Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/glsl_shader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 3692a276518..d6615d7c605 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -2174,9 +2174,9 @@ static const char *shader_glsl_interpolation_qualifiers(enum wined3d_shader_inte switch (mode) { case WINED3DSIM_CONSTANT: - return "flat"; + return "flat "; case WINED3DSIM_LINEAR_NOPERSPECTIVE: - return "noperspective"; + return "noperspective "; default: FIXME("Unhandled interpolation mode %#x.\n", mode); case WINED3DSIM_NONE: @@ -2207,7 +2207,7 @@ static void shader_glsl_declare_shader_inputs(const struct wined3d_gl_info *gl_i for (i = 0; i < element_count; ++i) { mode = wined3d_extract_interpolation_mode(interpolation_mode, i); - shader_addline(buffer, "%s vec4 reg%u;\n", shader_glsl_interpolation_qualifiers(mode), i); + shader_addline(buffer, " %svec4 reg%u;\n", shader_glsl_interpolation_qualifiers(mode), i); } shader_addline(buffer, "} shader_in;\n"); } @@ -2242,7 +2242,7 @@ static void shader_glsl_declare_shader_outputs(const struct wined3d_gl_info *gl_ mode = wined3d_extract_interpolation_mode(interpolation_mode, i); interpolation_qualifiers = shader_glsl_interpolation_qualifiers(mode); } - shader_addline(buffer, "%s vec4 reg%u;\n", interpolation_qualifiers, i); + shader_addline(buffer, " %svec4 reg%u;\n", interpolation_qualifiers, i); } shader_addline(buffer, "} shader_out;\n"); }
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/dxgi/dxgi_private.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index c8dc67f3117..c05a0e81e7e 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -44,7 +44,6 @@
enum dxgi_frame_latency { - DXGI_FRAME_LATENCY_DEFAULT = 3, DXGI_FRAME_LATENCY_MAX = 16, };
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/directx.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3ca389e0363..afb97184e39 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3279,6 +3279,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) USE_GL_FUNC(glIsEnabledi) /* OpenGL 3.0 */ USE_GL_FUNC(glLinkProgram) /* OpenGL 2.0 */ USE_GL_FUNC(glMapBuffer) /* OpenGL 1.5 */ + USE_GL_FUNC(glMinSampleShading) /* OpenGL 4.0 */ USE_GL_FUNC(glPointParameteri) /* OpenGL 1.4 */ USE_GL_FUNC(glPointParameteriv) /* OpenGL 1.4 */ USE_GL_FUNC(glShaderSource) /* OpenGL 2.0 */
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Fix for bug 45127.
dlls/wined3d/glsl_shader.c | 10 +++++++--- dlls/wined3d/shader.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index d6615d7c605..a99762b151f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8537,8 +8537,10 @@ static GLuint find_glsl_pshader(const struct wined3d_context *context, static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const struct vs_compile_args *new, const DWORD use_map) { - if((stored->swizzle_map & use_map) != new->swizzle_map) return FALSE; - if((stored->clip_enabled) != new->clip_enabled) return FALSE; + if ((stored->swizzle_map & use_map) != new->swizzle_map) + return FALSE; + if ((stored->clip_enabled) != new->clip_enabled) + return FALSE; if (stored->point_size != new->point_size) return FALSE; if (stored->per_vertex_point_size != new->per_vertex_point_size) @@ -8549,7 +8551,9 @@ static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const str return FALSE; if (stored->next_shader_input_count != new->next_shader_input_count) return FALSE; - return stored->fog_src == new->fog_src; + if (stored->fog_src != new->fog_src) + return FALSE; + return !memcmp(stored->interpolation_mode, new->interpolation_mode, sizeof(new->interpolation_mode)); }
static GLuint find_glsl_vshader(const struct wined3d_context *context, struct shader_glsl_priv *priv, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 8a6307a3edb..20d4f0773dd 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -3532,7 +3532,7 @@ void find_vs_compile_args(const struct wined3d_state *state, const struct wined3 && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; args->point_size = state->gl_primitive_type == GL_POINTS; args->per_vertex_point_size = shader->reg_maps.point_size; - args->next_shader_type = hull_shader? WINED3D_SHADER_TYPE_HULL + args->next_shader_type = hull_shader ? WINED3D_SHADER_TYPE_HULL : geometry_shader ? WINED3D_SHADER_TYPE_GEOMETRY : WINED3D_SHADER_TYPE_PIXEL; if (shader->reg_maps.shader_version.major >= 4) args->next_shader_input_count = hull_shader ? hull_shader->limits->packed_input
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3f1ca8ce658..e5ae7f478f8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1444,10 +1444,21 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data) { + const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_cs_set_shader *op = data;
cs->state.shader[op->type] = op->shader; device_invalidate_state(cs->device, STATE_SHADER(op->type)); + if (needs_interpolation_qualifiers_for_shader_outputs(gl_info) && op->type == WINED3D_SHADER_TYPE_PIXEL + && op->shader && op->shader->reg_maps.shader_version.major >= 4) + { + if (cs->state.shader[WINED3D_SHADER_TYPE_GEOMETRY]) + device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY)); + else if (cs->state.shader[WINED3D_SHADER_TYPE_DOMAIN]) + device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN)); + else if (cs->state.shader[WINED3D_SHADER_TYPE_VERTEX]) + device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX)); + } if (op->type != WINED3D_SHADER_TYPE_COMPUTE) device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING); else
On Mon, Jun 4, 2018 at 8:32 PM, Matteo Bruni mbruni@codeweavers.com wrote:
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
dlls/wined3d/cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3f1ca8ce658..e5ae7f478f8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1444,10 +1444,21 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data) {
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_cs_set_shader *op = data;
cs->state.shader[op->type] = op->shader; device_invalidate_state(cs->device, STATE_SHADER(op->type));
if (needs_interpolation_qualifiers_for_shader_outputs(gl_info) && op->type == WINED3D_SHADER_TYPE_PIXEL
&& op->shader && op->shader->reg_maps.shader_version.major >= 4)
{
if (cs->state.shader[WINED3D_SHADER_TYPE_GEOMETRY])
device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY));
else if (cs->state.shader[WINED3D_SHADER_TYPE_DOMAIN])
device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN));
else if (cs->state.shader[WINED3D_SHADER_TYPE_VERTEX])
device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX));
} if (op->type != WINED3D_SHADER_TYPE_COMPUTE) device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING); else
-- 2.16.1
Is this really needed? See glsl_vertex_pipe_pixel_shader().
2018-06-04 21:11 GMT+02:00 Józef Kucia joseph.kucia@gmail.com:
On Mon, Jun 4, 2018 at 8:32 PM, Matteo Bruni mbruni@codeweavers.com wrote:
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
dlls/wined3d/cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3f1ca8ce658..e5ae7f478f8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1444,10 +1444,21 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data) {
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_cs_set_shader *op = data;
cs->state.shader[op->type] = op->shader; device_invalidate_state(cs->device, STATE_SHADER(op->type));
if (needs_interpolation_qualifiers_for_shader_outputs(gl_info) && op->type == WINED3D_SHADER_TYPE_PIXEL
&& op->shader && op->shader->reg_maps.shader_version.major >= 4)
{
if (cs->state.shader[WINED3D_SHADER_TYPE_GEOMETRY])
device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY));
else if (cs->state.shader[WINED3D_SHADER_TYPE_DOMAIN])
device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN));
else if (cs->state.shader[WINED3D_SHADER_TYPE_VERTEX])
device_invalidate_state(cs->device, STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX));
} if (op->type != WINED3D_SHADER_TYPE_COMPUTE) device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING); else
-- 2.16.1
Is this really needed? See glsl_vertex_pipe_pixel_shader().
Indeed, it should be redundant.