radeonsi: remove interp_at_sample from the key, use TGSI_INTERPOLATE_LOC_SAMPLE
authorMarek Olšák <marek.olsak@amd.com>
Tue, 30 Sep 2014 15:09:13 +0000 (17:09 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 4 Oct 2014 13:16:14 +0000 (15:16 +0200)
st/mesa has the same flag in its shader key, we don't need to do it
in the driver anymore.

Instead, use TGSI_INTERPOLATE_LOC_SAMPLE, which is what st/mesa sets.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state.c

index 6372ccfcfe1b9efc3084a5dabf403241c9f8be92..69382bd81b2b382493781d6ab630d6f57753cff9 100644 (file)
@@ -501,7 +501,7 @@ static void declare_input_fs(
                interp_param = 0;
                break;
        case TGSI_INTERPOLATE_LINEAR:
-               if (si_shader_ctx->shader->key.ps.interp_at_sample)
+               if (decl->Interp.Location == TGSI_INTERPOLATE_LOC_SAMPLE)
                        interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_SAMPLE);
                else if (decl->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID)
                        interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_CENTROID);
@@ -515,7 +515,7 @@ static void declare_input_fs(
                }
                /* fall through to perspective */
        case TGSI_INTERPOLATE_PERSPECTIVE:
-               if (si_shader_ctx->shader->key.ps.interp_at_sample)
+               if (decl->Interp.Location == TGSI_INTERPOLATE_LOC_SAMPLE)
                        interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_SAMPLE);
                else if (decl->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID)
                        interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTROID);
index c46e649fd3df12ba32a991de81a3f8121ef01a19..d9a89e3fee7702ae467415761e467a7951e177fa 100644 (file)
@@ -137,7 +137,6 @@ union si_shader_key {
                unsigned        color_two_side:1;
                unsigned        alpha_func:3;
                unsigned        flatshade:1;
-               unsigned        interp_at_sample:1;
                unsigned        alpha_to_one:1;
        } ps;
        struct {
index 46dbca3b200eb64a913cb1f38fa8b2caacb7ccb8..88a50f37651666db4871a3378c49941564708f46 100644 (file)
@@ -2221,8 +2221,6 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx,
                if (sctx->queued.named.rasterizer) {
                        key->ps.color_two_side = sctx->queued.named.rasterizer->two_side;
                        key->ps.flatshade = sctx->queued.named.rasterizer->flatshade;
-                       key->ps.interp_at_sample = sctx->framebuffer.nr_samples > 1 &&
-                                                  sctx->ps_iter_samples == sctx->framebuffer.nr_samples;
 
                        if (sctx->queued.named.blend) {
                                key->ps.alpha_to_one = sctx->queued.named.blend->alpha_to_one &&