radeonsi/nir: Delete unreachable code
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 13 May 2019 14:28:58 +0000 (16:28 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 8 Jul 2019 12:18:41 +0000 (14:18 +0200)
We always get gl_FragCoord as a system value, not a varying, so this is
never hit. We already set PIXEL_CENTER_INTEGER elsewhere.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader_nir.c

index a852283aff058858a4e7c7bd3c8e38d65520a98d..365c137f8fccf9d6e36c6203090c1e217fbfd4f2 100644 (file)
@@ -444,17 +444,6 @@ void si_nir_scan_shader(const struct nir_shader *nir,
                        continue;
                }
 
-               /* Fragment shader position is a system value. */
-               if (nir->info.stage == MESA_SHADER_FRAGMENT &&
-                   variable->data.location == VARYING_SLOT_POS) {
-                       if (nir->info.fs.pixel_center_integer)
-                               info->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER] =
-                                       TGSI_FS_COORD_PIXEL_CENTER_INTEGER;
-
-                       num_inputs++;
-                       continue;
-               }
-
                for (unsigned j = 0; j < attrib_count; j++, i++) {
 
                        if (processed_inputs & ((uint64_t)1 << i))