radeonsi: fix R600_DEBUG=precompile for shader-db
authorMarek Olšák <marek.olsak@amd.com>
Tue, 11 Oct 2016 14:55:41 +0000 (16:55 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 12 Oct 2016 16:29:40 +0000 (18:29 +0200)
radeonsi no longer supports pixel shaders without interpolation optimizations,
which led to assertion failures in si_shader_ps when running shader-db.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index f6bd12915cdcf3a20a72ab826fa774fefc493efd..c41c51964663bb521e93e547d1ddf10056e8e66b 100644 (file)
@@ -1233,6 +1233,12 @@ void si_init_shader_selector_async(void *job, int thread_index)
                        key.tcs.epilog.prim_mode = PIPE_PRIM_TRIANGLES;
                        break;
                case PIPE_SHADER_FRAGMENT:
+                       key.ps.prolog.bc_optimize_for_persp =
+                               sel->info.uses_persp_center &&
+                               sel->info.uses_persp_centroid;
+                       key.ps.prolog.bc_optimize_for_linear =
+                               sel->info.uses_linear_center &&
+                               sel->info.uses_linear_centroid;
                        key.ps.epilog.alpha_func = PIPE_FUNC_ALWAYS;
                        for (i = 0; i < 8; i++)
                                if (sel->info.colors_written & (1 << i))