From: Elizabeth Figura zfigura@codeweavers.com
Point sprite only affects point rasterization; blit state does not involve drawing points.
This was added in f22d37e4dd959b268b7e0823be0f1020ffdcaeee. It is unclear why, but it is most prudent to assume it was either a mistake, or added to silently work around some driver bug. --- dlls/wined3d/context_gl.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index e150e2bdec6..b91c8168dd7 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -3190,11 +3190,6 @@ void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl, gl_info->gl_ops.gl.p_glDisable(GL_DEPTH_TEST); gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST); context_invalidate_state(context, STATE_DEPTH_STENCIL); - if (gl_info->supported[ARB_POINT_SPRITE]) - { - gl_info->gl_ops.gl.p_glDisable(GL_POINT_SPRITE_ARB); - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE)); - } if (gl_info->supported[ARB_FRAMEBUFFER_SRGB]) { gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/context_gl.c | 13 +++++++++++++ dlls/wined3d/ffp_gl.c | 29 ----------------------------- dlls/wined3d/glsl_shader.c | 13 ------------- dlls/wined3d/wined3d_private.h | 4 ---- 4 files changed, 13 insertions(+), 46 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index b91c8168dd7..8443952cff8 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2223,6 +2223,19 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
if (gl_info->supported[ARB_POINT_SPRITE]) { + /* The actual effect of D3DRS_POINTSPRITEENABLE is more accurately + * congruent to GL_COORD_REPLACE_ARB. GL_POINT_SPRITE_ARB, when + * disabled, affects point rasterization (which we do not want), + * implicitly disables GL_COORD_REPLACE_ARB, and causes gl_PointCoord + * to return an undefined value. + * + * We implement D3DRS_POINTSPRITEENABLE by altering the shader to read + * from gl_PointCoord or from the actual texcoord, so we do not need + * GL_COORD_REPLACE_ARB, nor do we need to dynamically toggle + * GL_POINT_SPRITE_ARB. */ + + gl_info->gl_ops.gl.p_glEnable(GL_POINT_SPRITE_ARB); + for (i = 0; i < gl_info->limits.ffp_textures; ++i) { wined3d_context_gl_active_texture(context_gl, gl_info, i); diff --git a/dlls/wined3d/ffp_gl.c b/dlls/wined3d/ffp_gl.c index 98363dcac14..61b4244c15f 100644 --- a/dlls/wined3d/ffp_gl.c +++ b/dlls/wined3d/ffp_gl.c @@ -834,35 +834,6 @@ static void state_linepattern_w(struct wined3d_context *context, const struct wi FIXME("Setting line patterns is not supported in OpenGL core contexts.\n"); }
-void state_pointsprite_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) -{ - static BOOL warned; - - /* TODO: NV_POINT_SPRITE */ - if (!warned && state->render_states[WINED3D_RS_POINTSPRITEENABLE]) - { - /* A FIXME, not a WARN because point sprites should be software emulated if not supported by HW */ - FIXME("Point sprites not supported\n"); - warned = TRUE; - } -} - -void state_pointsprite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) -{ - const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; - - if (state->render_states[WINED3D_RS_POINTSPRITEENABLE]) - { - gl_info->gl_ops.gl.p_glEnable(GL_POINT_SPRITE_ARB); - checkGLcall("glEnable(GL_POINT_SPRITE_ARB)"); - } - else - { - gl_info->gl_ops.gl.p_glDisable(GL_POINT_SPRITE_ARB); - checkGLcall("glDisable(GL_POINT_SPRITE_ARB)"); - } -} - static void state_msaa_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { if (state->render_states[WINED3D_RS_MULTISAMPLEANTIALIAS]) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index af25e3db538..d5696c7d390 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11890,16 +11890,6 @@ static void glsl_vertex_pipe_pointsize(struct wined3d_context *context, context->constant_update_mask |= WINED3D_SHADER_CONST_VS_POINTSIZE; }
-static void glsl_vertex_pointsprite_core(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id) -{ - static unsigned int once; - - if (state->primitive_type == WINED3D_PT_POINTLIST - && !state->render_states[WINED3D_RS_POINTSPRITEENABLE] && !once++) - FIXME("Non-point sprite points not supported in core profile.\n"); -} - static void glsl_vertex_pipe_shademode(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -11964,9 +11954,6 @@ static const struct wined3d_state_entry_template glsl_vertex_pipe_vp_states[] = {STATE_RENDER(WINED3D_RS_CLIPPLANEENABLE), {STATE_RENDER(WINED3D_RS_CLIPPING), NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_POINTSIZE), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), glsl_vertex_pipe_pointsize}, WINED3D_GL_EXT_NONE }, - {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), state_pointsprite }, ARB_POINT_SPRITE }, - {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), state_pointsprite_w }, WINED3D_GL_LEGACY_CONTEXT }, - {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), glsl_vertex_pointsprite_core}, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_POINTSIZE_MAX), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_SHADEMODE), {STATE_RENDER(WINED3D_RS_SHADEMODE), glsl_vertex_pipe_shademode}, WINED3D_GLSL_130 }, {STATE_RENDER(WINED3D_RS_SHADEMODE), {STATE_RENDER(WINED3D_RS_SHADEMODE), glsl_vertex_pipe_nop }, WINED3D_GL_EXT_NONE }, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 710d3ce32fd..beff7c216c4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4125,10 +4125,6 @@ void state_clipping(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id); void clipplane(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id); -void state_pointsprite_w(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id); -void state_pointsprite(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id); void state_shademode(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id);
From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/glsl_shader.c | 6 ++---- dlls/wined3d/shader.c | 1 - dlls/wined3d/wined3d_private.h | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index d5696c7d390..d7fbb2ccaae 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8151,7 +8151,7 @@ static void shader_glsl_generate_vs_epilogue(const struct wined3d_gl_info *gl_in shader_addline(buffer, "gl_ClipDistance[%u] = dot(gl_Position, clip_planes[%u]);\n", i, i); }
- if (args->point_size && !args->per_vertex_point_size) + if (args->point_size && !shader->reg_maps.point_size) { if (reg_maps->shader_version.major >= 4) shader_addline(buffer, "gl_PointSize = 1.0;\n"); @@ -8200,7 +8200,7 @@ static GLuint shader_glsl_generate_vertex_shader(const struct wined3d_context_gl for (i = 0; i < shader->input_signature.element_count; ++i) shader_glsl_declare_generic_vertex_attribute(buffer, gl_info, &shader->input_signature.elements[i]);
- if (args->point_size && !args->per_vertex_point_size && reg_maps->shader_version.major < 4) + if (args->point_size && !shader->reg_maps.point_size && reg_maps->shader_version.major < 4) { shader_addline(buffer, "uniform struct\n{\n"); shader_addline(buffer, " float size;\n"); @@ -8753,8 +8753,6 @@ static BOOL vs_args_equal(const struct vs_compile_args *stored, const struct vs_ return FALSE; if (stored->point_size != new->point_size) return FALSE; - if (stored->per_vertex_point_size != new->per_vertex_point_size) - return FALSE; if (stored->flatshading != new->flatshading) return FALSE; if (stored->next_shader_type != new->next_shader_type) diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index c40dc69e8ec..4ac9979dbd4 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2731,7 +2731,6 @@ void find_vs_compile_args(const struct wined3d_state *state, const struct wined3 args->clip_enabled = state->render_states[WINED3D_RS_CLIPPING] && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; args->point_size = state->primitive_type == WINED3D_PT_POINTLIST; - args->per_vertex_point_size = shader->reg_maps.point_size; 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) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index beff7c216c4..7f482ebc203 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1504,10 +1504,9 @@ struct vs_compile_args BYTE fog_src; BYTE clip_enabled : 1; BYTE point_size : 1; - BYTE per_vertex_point_size : 1; BYTE flatshading : 1; BYTE next_shader_type : 3; - BYTE padding : 1; + BYTE padding : 2; };
struct ds_compile_args
From: Elizabeth Figura zfigura@codeweavers.com
FOGVERTEXMODE is an FFP-only state and has no effect when shaders are used. In this case we do not use ps_compile_args, only ffp_frag_settings, which has its own version of this data. --- dlls/wined3d/shader.c | 15 --------------- 1 file changed, 15 deletions(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 4ac9979dbd4..bbf873954b8 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -3069,21 +3069,6 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 switch (state->render_states[WINED3D_RS_FOGTABLEMODE]) { case WINED3D_FOG_NONE: - if (position_transformed || (vs && !vs->is_ffp_vs)) - { - args->fog = WINED3D_FFP_PS_FOG_LINEAR; - break; - } - - switch (state->render_states[WINED3D_RS_FOGVERTEXMODE]) - { - case WINED3D_FOG_NONE: /* Fall through. */ - case WINED3D_FOG_LINEAR: args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; - case WINED3D_FOG_EXP: args->fog = WINED3D_FFP_PS_FOG_EXP; break; - case WINED3D_FOG_EXP2: args->fog = WINED3D_FFP_PS_FOG_EXP2; break; - } - break; - case WINED3D_FOG_LINEAR: args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; case WINED3D_FOG_EXP: args->fog = WINED3D_FFP_PS_FOG_EXP; break; case WINED3D_FOG_EXP2: args->fog = WINED3D_FFP_PS_FOG_EXP2; break;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151239
Your paranoid android.
=== debian11b (64 bit WoW report) ===
rasapi32=load error 731