Skip to content
Snippets Groups Projects
Commit ffb3ab4d authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig Committed by Eric Engestrom
Browse files

nir/lower_pntc_ytransform: Support PointCoordIsSysval


Pattern match the point coord sysval and support lowering it as well.
This is required to handle flipped framebuffers on Bifrost. However,
what this pass normalizes to is the opposite of the hardware mode we
used on Bifrost before, so we need to swap modes at the same time to
prevent regressions.

Fixes Piglit glsl-fs-pointcoord and glsl-fs-pointcoord_gles2

Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable
Part-of: <mesa/mesa!13073>
(cherry picked from commit e257344a)
parent 53801042
No related branches found
No related tags found
No related merge requests found
...@@ -1426,7 +1426,7 @@ ...@@ -1426,7 +1426,7 @@
"description": "nir/lower_pntc_ytransform: Support PointCoordIsSysval", "description": "nir/lower_pntc_ytransform: Support PointCoordIsSysval",
"nominated": true, "nominated": true,
"nomination_type": 0, "nomination_type": 0,
"resolution": 0, "resolution": 1,
"main_sha": null, "main_sha": null,
"because_sha": null "because_sha": null
}, },
......
...@@ -94,8 +94,10 @@ lower_pntc_ytransform_block(lower_pntc_ytransform_state *state, ...@@ -94,8 +94,10 @@ lower_pntc_ytransform_block(lower_pntc_ytransform_state *state,
nir_deref_instr *deref = nir_src_as_deref(intr->src[0]); nir_deref_instr *deref = nir_src_as_deref(intr->src[0]);
nir_variable *var = nir_deref_instr_get_variable(deref); nir_variable *var = nir_deref_instr_get_variable(deref);
if (var->data.mode == nir_var_shader_in && if ((var->data.mode == nir_var_shader_in &&
var->data.location == VARYING_SLOT_PNTC) { var->data.location == VARYING_SLOT_PNTC) ||
(var->data.mode == nir_var_system_value &&
var->data.location == SYSTEM_VALUE_POINT_COORD)) {
lower_load_pointcoord(state, intr); lower_load_pointcoord(state, intr);
} }
} }
......
...@@ -19,7 +19,6 @@ glx@glx-swap-pixmap-bad,Fail ...@@ -19,7 +19,6 @@ glx@glx-swap-pixmap-bad,Fail
glx@glx-visuals-depth -pixmap,Crash glx@glx-visuals-depth -pixmap,Crash
glx@glx-visuals-stencil -pixmap,Crash glx@glx-visuals-stencil -pixmap,Crash
shaders@glsl-bug-110796,Fail shaders@glsl-bug-110796,Fail
shaders@glsl-fs-pointcoord,Fail
shaders@glsl-uniform-interstage-limits@subdivide 5,Crash shaders@glsl-uniform-interstage-limits@subdivide 5,Crash
shaders@glsl-uniform-interstage-limits@subdivide 5- statechanges,Crash shaders@glsl-uniform-interstage-limits@subdivide 5- statechanges,Crash
shaders@glsl-vs-if-bool,Fail shaders@glsl-vs-if-bool,Fail
...@@ -102,7 +101,6 @@ spec@arb_fragment_program@sparse-samplers,Crash ...@@ -102,7 +101,6 @@ spec@arb_fragment_program@sparse-samplers,Crash
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit depth gl_depth32f_stencil8,Fail spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit depth gl_depth32f_stencil8,Fail
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit depth_stencil gl_depth32f_stencil8,Fail spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit depth_stencil gl_depth32f_stencil8,Fail
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_depth32f_stencil8,Fail spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_depth32f_stencil8,Fail
spec@arb_framebuffer_object@fbo-gl_pointcoord,Fail
spec@arb_framebuffer_object@fbo-luminance-alpha,Fail spec@arb_framebuffer_object@fbo-luminance-alpha,Fail
spec@arb_framebuffer_srgb@fbo-fast-clear,Fail spec@arb_framebuffer_srgb@fbo-fast-clear,Fail
spec@arb_get_program_binary@restore-sso-program,Fail spec@arb_get_program_binary@restore-sso-program,Fail
...@@ -1291,6 +1289,5 @@ spec@!opengl 3.1@primitive-restart-xfb generated,Fail ...@@ -1291,6 +1289,5 @@ spec@!opengl 3.1@primitive-restart-xfb generated,Fail
spec@!opengl 3.1@primitive-restart-xfb written,Fail spec@!opengl 3.1@primitive-restart-xfb written,Fail
spec@!opengl 3.1@required-texture-attachment-formats,Fail spec@!opengl 3.1@required-texture-attachment-formats,Fail
spec@!opengl 3.2@coord-replace-doesnt-eliminate-frag-tex-coords,Fail spec@!opengl 3.2@coord-replace-doesnt-eliminate-frag-tex-coords,Fail
spec@!opengl es 2.0@glsl-fs-pointcoord,Fail
spec@!opengl es 3.0@ext_texture_array-compressed_gles3 texsubimage,Fail spec@!opengl es 3.0@ext_texture_array-compressed_gles3 texsubimage,Fail
spec@!opengl es 3.0@gles-3.0-transform-feedback-uniform-buffer-object,Fail spec@!opengl es 3.0@gles-3.0-transform-feedback-uniform-buffer-object,Fail
...@@ -142,6 +142,10 @@ pan_shader_prepare_bifrost_rsd(const struct pan_shader_info *info, ...@@ -142,6 +142,10 @@ pan_shader_prepare_bifrost_rsd(const struct pan_shader_info *info,
rsd->properties.shader_wait_dependency_7 = info->bifrost.wait_7; rsd->properties.shader_wait_dependency_7 = info->bifrost.wait_7;
#endif #endif
/* Match the mesa/st convention. If this needs to be flipped,
* nir_lower_pntc_ytransform will do so. */
rsd->properties.point_sprite_coord_origin_max_y = true;
rsd->properties.allow_forward_pixel_to_be_killed = rsd->properties.allow_forward_pixel_to_be_killed =
!info->fs.sidefx; !info->fs.sidefx;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment