From 12facf23b1f1fd8668e057f13bcc69356fd89b52 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 27 Sep 2021 17:32:57 -0400 Subject: [PATCH] panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER We already set HALF_INTEGER, which is what the compiler actually does. If we also set PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, we get incorrect lowering. Only set the CAP we respect. On Bifrost, this convention is arbitrary. We should consider moving the Bifrost lowering into NIR to optimize this better... Fixes Piglit glsl-arb-fragment-coord-conventions. Signed-off-by: Alyssa Rosenzweig Cc: mesa-stable Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 4 ++-- src/panfrost/ci/piglit-panfrost-g52-fails.txt | 15 --------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index c4c4b22..1902411 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -224,12 +224,12 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) return MAX_MIP_LEVELS; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: - /* Hardware is natively upper left */ + case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: + /* Hardware is upper left. Pixel center at (0.5, 0.5) */ return 0; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: case PIPE_CAP_TGSI_TEXCOORD: return 1; diff --git a/src/panfrost/ci/piglit-panfrost-g52-fails.txt b/src/panfrost/ci/piglit-panfrost-g52-fails.txt index 7f5440e..4cd6249 100644 --- a/src/panfrost/ci/piglit-panfrost-g52-fails.txt +++ b/src/panfrost/ci/piglit-panfrost-g52-fails.txt @@ -18,7 +18,6 @@ glx@glx-query-drawable-glx_fbconfig_id-window,Fail glx@glx-swap-pixmap-bad,Fail glx@glx-visuals-depth -pixmap,Crash glx@glx-visuals-stencil -pixmap,Crash -shaders@glsl-arb-fragment-coord-conventions,Fail shaders@glsl-bug-110796,Fail shaders@glsl-fs-pointcoord,Fail shaders@glsl-uniform-interstage-limits@subdivide 5,Crash @@ -367,20 +366,6 @@ spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_RGBA8,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_RGBA8I,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_SRGB8_ALPHA8,Fail -spec@arb_texture_multisample@texelfetch@2-fs-sampler2dmsarray,Fail -spec@arb_texture_multisample@texelfetch@2-fs-sampler2dms,Fail -spec@arb_texture_multisample@texelfetch@2-vs-sampler2dmsarray,Fail -spec@arb_texture_multisample@texelfetch@2-vs-sampler2dms,Fail -spec@arb_texture_multisample@texelfetch@4-fs-sampler2dmsarray,Fail -spec@arb_texture_multisample@texelfetch@4-fs-sampler2dms,Fail -spec@arb_texture_multisample@texelfetch@4-vs-sampler2dmsarray,Fail -spec@arb_texture_multisample@texelfetch@4-vs-sampler2dms,Fail -spec@arb_texture_multisample@texelfetch fs sampler2dms 4 1x130-501x130,Fail -spec@arb_texture_multisample@texelfetch fs sampler2dms 4 1x71-501x71,Fail -spec@arb_texture_multisample@texelfetch fs sampler2dms 4 281x1-281x130,Fail -spec@arb_texture_multisample@texelfetch fs sampler2dms 4 71x1-71x130,Fail -spec@arb_texture_multisample@texelfetch fs sampler2dmsarray 4 1x129x9-98x129x9,Fail -spec@arb_texture_multisample@texelfetch fs sampler2dmsarray 4 98x1x9-98x129x9,Fail spec@arb_texture_rectangle@1-1-linear-texture,Fail spec@arb_texture_rectangle@tex-miplevel-selection gl2:texture() 2drect,Crash spec@arb_texture_rectangle@tex-miplevel-selection gl2:texture() 2drectshadow,Crash -- 2.7.4