Commit 9f9add79 authored by Andreas Baierl's avatar Andreas Baierl
Browse files

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.
Signed-off-by: Andreas Baierl's avatarAndreas Baierl <ichgeh@imkreisrum.de>
parent f1095260
Pipeline #405667 waiting for manual action with stages
......@@ -32,7 +32,6 @@ dEQP-GLES2.functional.fragment_ops.depth_stencil.random.9,Fail
dEQP-GLES2.functional.fragment_ops.depth_stencil.write_mask.stencil,Fail
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,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
......
......@@ -726,7 +726,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;
......
......@@ -637,6 +637,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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment