summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-09-16 22:42:54 +0200
committerMarek Olšák <[email protected]>2016-10-19 19:26:30 +0200
commita2ea653a498a55a37a7f139d486694969c6aecef (patch)
tree8fbf6b3d57ccc3b6bb344a10512019fae65f3729
parent54f8efeb022de8686db18c49daf14e6771f0fda1 (diff)
radeonsi: remove cb0_is_integer handling
st/mesa does this for us. Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h1
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c9
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c6
3 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index e10d3fb4fc5..8fc5fcc370f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -165,7 +165,6 @@ struct si_framebuffer {
struct pipe_framebuffer_state state;
unsigned nr_samples;
unsigned log_samples;
- unsigned cb0_is_integer;
unsigned compressed_cb_mask;
unsigned spi_shader_col_format;
unsigned spi_shader_col_format_alpha;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 732f9e9b092..97bd308e19a 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1144,8 +1144,7 @@ static void si_emit_db_render_state(struct si_context *sctx, struct r600_atom *s
S_028010_DISABLE_SMEM_EXPCLEAR_OPTIMIZATION(sctx->db_stencil_disable_expclear) |
S_028010_DECOMPRESS_Z_ON_FLUSH(sctx->framebuffer.nr_samples >= 4));
- db_shader_control = S_02880C_ALPHA_TO_MASK_DISABLE(sctx->framebuffer.cb0_is_integer) |
- sctx->ps_db_shader_control;
+ db_shader_control = sctx->ps_db_shader_control;
/* Bug workaround for smoothing (overrasterization) on SI. */
if (sctx->b.chip_class == SI && sctx->smoothing_enabled) {
@@ -2288,7 +2287,6 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
struct pipe_constant_buffer constbuf = {0};
struct r600_surface *surf = NULL;
struct r600_texture *rtex;
- bool old_cb0_is_integer = sctx->framebuffer.cb0_is_integer;
bool old_any_dst_linear = sctx->framebuffer.any_dst_linear;
unsigned old_nr_samples = sctx->framebuffer.nr_samples;
int i;
@@ -2333,13 +2331,8 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
sctx->framebuffer.compressed_cb_mask = 0;
sctx->framebuffer.nr_samples = util_framebuffer_get_num_samples(state);
sctx->framebuffer.log_samples = util_logbase2(sctx->framebuffer.nr_samples);
- sctx->framebuffer.cb0_is_integer = state->nr_cbufs && state->cbufs[0] &&
- util_format_is_pure_integer(state->cbufs[0]->format);
sctx->framebuffer.any_dst_linear = false;
- if (sctx->framebuffer.cb0_is_integer != old_cb0_is_integer)
- si_mark_atom_dirty(sctx, &sctx->db_render_state);
-
for (i = 0; i < state->nr_cbufs; i++) {
if (!state->cbufs[i])
continue;
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index d339b8463c3..137a5d1c842 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -845,8 +845,7 @@ static void si_shader_init_pm4_state(struct si_screen *sscreen,
static unsigned si_get_alpha_test_func(struct si_context *sctx)
{
/* Alpha-test should be disabled if colorbuffer 0 is integer. */
- if (sctx->queued.named.dsa &&
- !sctx->framebuffer.cb0_is_integer)
+ if (sctx->queued.named.dsa)
return sctx->queued.named.dsa->alpha_func;
return PIPE_FUNC_ALWAYS;
@@ -957,8 +956,7 @@ static inline void si_shader_selector_key(struct pipe_context *ctx,
if (sctx->queued.named.blend) {
key->ps.epilog.alpha_to_one = sctx->queued.named.blend->alpha_to_one &&
- rs->multisample_enable &&
- !sctx->framebuffer.cb0_is_integer;
+ rs->multisample_enable;
}
key->ps.prolog.poly_stipple = rs->poly_stipple_enable && is_poly;