Mesa (master): radeonsi: remove interp_at_sample from the key, use TGSI_INTERPOLATE_LOC_SAMPLE
Marek Olšák
mareko at kemper.freedesktop.org
Sat Oct 4 13:37:11 UTC 2014
Module: Mesa
Branch: master
Commit: 10e386f4aa3ef8ce1c60ec5be0865cc61bd093e2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=10e386f4aa3ef8ce1c60ec5be0865cc61bd093e2
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Sep 30 17:09:13 2014 +0200
radeonsi: remove interp_at_sample from the key, use TGSI_INTERPOLATE_LOC_SAMPLE
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 at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 4 ++--
src/gallium/drivers/radeonsi/si_shader.h | 1 -
src/gallium/drivers/radeonsi/si_state.c | 2 --
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 6372ccf..69382bd 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -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);
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index c46e649..d9a89e3 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -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 {
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 46dbca3..88a50f3 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -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 &&
More information about the mesa-commit
mailing list