lima: Fix glFrontFace handling
Bit 12 of render->aux1 is GL_CCW/GL_CW. For GL_CCW (default of glFrontFace) we have to set that bit active. This is not what the blob does and what the original reverse engineering documentation says. The blob sets this value inverted and does some bogus negation of the fragment shaders gl_FrontFacing variable instead. Anyway, doing it this way does not cause regressions but fixes dEQP-GLES2.functional.shaders.builtin_variable.frontfacing and 4 piglit tests. Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7690>
This commit is contained in:
parent
03097f30fb
commit
187f786108
|
@ -30,7 +30,6 @@ dEQP-GLES2.functional.fragment_ops.depth_stencil.random.7,Fail
|
|||
dEQP-GLES2.functional.fragment_ops.depth_stencil.random.8,Fail
|
||||
dEQP-GLES2.functional.fragment_ops.depth_stencil.random.9,Fail
|
||||
dEQP-GLES2.functional.fragment_ops.depth_stencil.write_mask.stencil,Fail
|
||||
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing,Fail
|
||||
dEQP-GLES2.functional.shaders.indexing.matrix_subscript.mat4_dynamic_loop_write_dynamic_loop_read_vertex,Fail
|
||||
dEQP-GLES2.functional.shaders.indexing.matrix_subscript.mat4_dynamic_loop_write_dynamic_read_vertex,Fail
|
||||
dEQP-GLES2.functional.shaders.indexing.matrix_subscript.mat4_dynamic_loop_write_static_loop_read_vertex,Fail
|
||||
|
|
|
@ -721,7 +721,10 @@ lima_pack_render_state(struct lima_context *ctx, const struct pipe_draw_info *in
|
|||
render->textures_address = 0x00000000;
|
||||
|
||||
render->aux0 = (ctx->vs->state.varying_stride >> 3);
|
||||
render->aux1 = 0x00001000;
|
||||
render->aux1 = 0x00000000;
|
||||
if (ctx->rasterizer->base.front_ccw)
|
||||
render->aux1 = 0x00001000;
|
||||
|
||||
if (ctx->blend->base.dither)
|
||||
render->aux1 |= 0x00002000;
|
||||
|
||||
|
|
|
@ -641,6 +641,12 @@ parse_rsw(FILE *fp, uint32_t *value, int i, uint32_t *helper)
|
|||
fprintf(fp, ": ");
|
||||
if ((*value & 0x00002000) == 0x00002000)
|
||||
fprintf(fp, "blend->base.dither true, ");
|
||||
|
||||
if ((*value & 0x00001000) == 0x00001000)
|
||||
fprintf(fp, "glFrontFace(GL_CCW), ");
|
||||
else
|
||||
fprintf(fp, "glFrontFace(GL_CW), ");
|
||||
|
||||
if ((*value & 0x00010000) == 0x00010000)
|
||||
fprintf(fp, "ctx->const_buffer[PIPE_SHADER_FRAGMENT].buffer true ");
|
||||
fprintf(fp, "*/\n");
|
||||
|
|
Loading…
Reference in New Issue