From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/arb_program_shader.c | 12 ------------ dlls/wined3d/glsl_shader.c | 12 ------------ dlls/wined3d/shader.c | 12 ------------ dlls/wined3d/shader_spirv.c | 12 ------------ dlls/wined3d/utils.c | 3 +-- dlls/wined3d/wined3d_private.h | 1 - 6 files changed, 1 insertion(+), 51 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 153786c25e7..ee693924a24 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -286,7 +286,6 @@ struct shader_arb_priv
const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct wined3d_fragment_pipe_ops *fragment_pipe; - BOOL ffp_proj_control; };
/* Context activation for state handlers is done by the caller. */ @@ -4843,7 +4842,6 @@ static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct wine const struct wined3d_fragment_pipe_ops *fragment_pipe) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; - struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; struct shader_arb_priv *priv;
@@ -4874,8 +4872,6 @@ static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct wine
priv->vertex_pipe = vertex_pipe; priv->fragment_pipe = fragment_pipe; - fragment_pipe->get_caps(device->adapter, &fragment_caps); - priv->ffp_proj_control = fragment_caps.proj_control;
device->vertex_priv = vertex_priv; device->fragment_priv = fragment_priv; @@ -5695,13 +5691,6 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio shader_arb_add_instruction_modifiers(ins); }
-static BOOL shader_arb_has_ffp_proj_control(void *shader_priv) -{ - struct shader_arb_priv *priv = shader_priv; - - return priv->ffp_proj_control; -} - static void shader_arb_precompile(void *shader_priv, struct wined3d_shader *shader) {}
static uint64_t shader_arb_shader_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, @@ -5729,7 +5718,6 @@ const struct wined3d_shader_backend_ops arb_program_shader_backend = shader_arb_init_context_state, shader_arb_get_caps, shader_arb_color_fixup_supported, - shader_arb_has_ffp_proj_control, shader_arb_shader_compile, };
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index a9775d94cf1..5dfcbb689b7 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -137,7 +137,6 @@ struct shader_glsl_priv const struct wined3d_fragment_pipe_ops *fragment_pipe; struct wine_rb_tree ffp_vertex_shaders; struct wine_rb_tree ffp_fragment_shaders; - BOOL ffp_proj_control; BOOL legacy_lighting; };
@@ -11060,7 +11059,6 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win const struct wined3d_fragment_pipe_ops *fragment_pipe) { SIZE_T stack_size = wined3d_log2i(max(WINED3D_MAX_VS_CONSTS_F, WINED3D_MAX_PS_CONSTS_F)) + 1; - struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; struct shader_glsl_priv *priv;
@@ -11113,8 +11111,6 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win priv->next_constant_version = 1; priv->vertex_pipe = vertex_pipe; priv->fragment_pipe = fragment_pipe; - fragment_pipe->get_caps(device->adapter, &fragment_caps); - priv->ffp_proj_control = fragment_caps.proj_control; priv->legacy_lighting = device->wined3d->flags & WINED3D_LEGACY_FFP_LIGHTING;
device->vertex_priv = vertex_priv; @@ -11524,13 +11520,6 @@ static void shader_glsl_handle_instruction(const struct wined3d_shader_instructi shader_glsl_add_instruction_modifiers(ins); }
-static BOOL shader_glsl_has_ffp_proj_control(void *shader_priv) -{ - struct shader_glsl_priv *priv = shader_priv; - - return priv->ffp_proj_control; -} - static uint64_t shader_glsl_shader_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, enum wined3d_shader_type shader_type) { @@ -11556,7 +11545,6 @@ const struct wined3d_shader_backend_ops glsl_shader_backend = shader_glsl_init_context_state, shader_glsl_get_caps, shader_glsl_color_fixup_supported, - shader_glsl_has_ffp_proj_control, shader_glsl_shader_compile, };
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 8e2b9b4de66..428389a7177 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1922,7 +1922,6 @@ struct shader_none_priv { const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct wined3d_fragment_pipe_ops *fragment_pipe; - BOOL ffp_proj_control; };
static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins) {} @@ -1966,7 +1965,6 @@ static void shader_none_disable(void *shader_priv, struct wined3d_context *conte static HRESULT shader_none_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, const struct wined3d_fragment_pipe_ops *fragment_pipe) { - struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; struct shader_none_priv *priv;
@@ -1990,8 +1988,6 @@ static HRESULT shader_none_alloc(struct wined3d_device *device, const struct win
priv->vertex_pipe = vertex_pipe; priv->fragment_pipe = fragment_pipe; - fragment_pipe->get_caps(device->adapter, &fragment_caps); - priv->ffp_proj_control = fragment_caps.proj_control;
device->vertex_priv = vertex_priv; device->fragment_priv = fragment_priv; @@ -2027,13 +2023,6 @@ static BOOL shader_none_color_fixup_supported(struct color_fixup_desc fixup) return TRUE; }
-static BOOL shader_none_has_ffp_proj_control(void *shader_priv) -{ - struct shader_none_priv *priv = shader_priv; - - return priv->ffp_proj_control; -} - static uint64_t shader_none_shader_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, enum wined3d_shader_type shader_type) { @@ -2058,7 +2047,6 @@ const struct wined3d_shader_backend_ops none_shader_backend = shader_none_init_context_state, shader_none_get_caps, shader_none_color_fixup_supported, - shader_none_has_ffp_proj_control, shader_none_shader_compile, };
diff --git a/dlls/wined3d/shader_spirv.c b/dlls/wined3d/shader_spirv.c index 2d98dd526ef..b5b0e1f0462 100644 --- a/dlls/wined3d/shader_spirv.c +++ b/dlls/wined3d/shader_spirv.c @@ -49,7 +49,6 @@ struct shader_spirv_priv { const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct wined3d_fragment_pipe_ops *fragment_pipe; - bool ffp_proj_control;
struct shader_spirv_resource_bindings bindings; }; @@ -968,7 +967,6 @@ static void shader_spirv_destroy(struct wined3d_shader *shader) static HRESULT shader_spirv_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, const struct wined3d_fragment_pipe_ops *fragment_pipe) { - struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; struct shader_spirv_priv *priv;
@@ -992,8 +990,6 @@ static HRESULT shader_spirv_alloc(struct wined3d_device *device,
priv->vertex_pipe = vertex_pipe; priv->fragment_pipe = fragment_pipe; - fragment_pipe->get_caps(device->adapter, &fragment_caps); - priv->ffp_proj_control = fragment_caps.proj_control; memset(&priv->bindings, 0, sizeof(priv->bindings));
device->vertex_priv = vertex_priv; @@ -1049,13 +1045,6 @@ static BOOL shader_spirv_color_fixup_supported(struct color_fixup_desc fixup) return is_identity_fixup(fixup); }
-static BOOL shader_spirv_has_ffp_proj_control(void *shader_priv) -{ - struct shader_spirv_priv *priv = shader_priv; - - return priv->ffp_proj_control; -} - static uint64_t shader_spirv_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, enum wined3d_shader_type shader_type) { @@ -1081,7 +1070,6 @@ static const struct wined3d_shader_backend_ops spirv_shader_backend_vk = .shader_init_context_state = shader_spirv_init_context_state, .shader_get_caps = shader_spirv_get_caps, .shader_color_fixup_supported = shader_spirv_color_fixup_supported, - .shader_has_ffp_proj_control = shader_spirv_has_ffp_proj_control, .shader_compile = shader_spirv_compile, };
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index ac53f477edd..b2b234c8e29 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -5850,7 +5850,6 @@ static void compute_texture_matrix(const struct wined3d_matrix *matrix, uint32_t void get_texture_matrix(const struct wined3d_context *context, const struct wined3d_state *state, const unsigned int tex, struct wined3d_matrix *mat) { - const struct wined3d_device *device = context->device; BOOL generated = (state->texture_states[tex][WINED3D_TSS_TEXCOORD_INDEX] & 0xffff0000) != WINED3DTSS_TCI_PASSTHRU; unsigned int coord_idx = min(state->texture_states[tex][WINED3D_TSS_TEXCOORD_INDEX & 0x0000ffff], @@ -5863,7 +5862,7 @@ void get_texture_matrix(const struct wined3d_context *context, const struct wine context->stream_info.use_map & (1u << (WINED3D_FFP_TEXCOORD0 + coord_idx)) ? context->stream_info.elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->id : WINED3DFMT_UNKNOWN, - device->shader_backend->shader_has_ffp_proj_control(device->shader_priv), mat); + context->d3d_info->ffp_fragment_caps.proj_control, mat);
if (texture && !(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT)) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d1a2469ab23..ea78312fef3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1557,7 +1557,6 @@ struct wined3d_shader_backend_ops void (*shader_init_context_state)(struct wined3d_context *context); void (*shader_get_caps)(const struct wined3d_adapter *adapter, struct shader_caps *caps); BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup); - BOOL (*shader_has_ffp_proj_control)(void *shader_priv); uint64_t (*shader_compile)(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, enum wined3d_shader_type shader_type); };