diff options
author | Eric Anholt <[email protected]> | 2017-12-29 11:48:41 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-01-03 14:25:23 -0800 |
commit | 476469955225e15f454e01dc80047dd5fa5c9f97 (patch) | |
tree | 57ea220e209807c33f0eed0c70c0a57863beeecb /src/gallium/drivers/vc5/vc5_state.c | |
parent | ba965084b60e702b41beaea75237bfa39335b6cb (diff) |
braodcom/vc5: Rely on OVRTMUOUT always being set.
It seems that the HW team has decided that it's the only supported mode,
and it's the mode I actually meant to be using but forgot. Our table of
return_32_bit should have matched the default non-OVRTMUOUT behavior, so
this change should be invisible.
However, the change revealed that some my return_size checks for swizzling
were a bit confused in the shadow case, so I had to move them to draw time
once we have both the sampler and the view together.
Fixes assertion failures in the updated simulator, where the non-OVRTMUOUT
support has been removed.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_state.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_state.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index 04ce3075a8f..8bc575f6f1d 100644 --- a/src/gallium/drivers/vc5/vc5_state.c +++ b/src/gallium/drivers/vc5/vc5_state.c @@ -556,24 +556,6 @@ vc5_sampler_states_bind(struct pipe_context *pctx, stage_tex->num_samplers = new_nr; } -static uint32_t -translate_swizzle(unsigned char pipe_swizzle) -{ - switch (pipe_swizzle) { - case PIPE_SWIZZLE_0: - return 0; - case PIPE_SWIZZLE_1: - return 1; - case PIPE_SWIZZLE_X: - case PIPE_SWIZZLE_Y: - case PIPE_SWIZZLE_Z: - case PIPE_SWIZZLE_W: - return 2 + pipe_swizzle; - default: - unreachable("unknown swizzle"); - } -} - static struct pipe_sampler_view * vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, const struct pipe_sampler_view *cso) @@ -663,23 +645,6 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, tex.texture_type = vc5_get_tex_format(cso->format); } - /* Note: Contrary to the docs, the swizzle still applies even - * if the return size is 32. It's just that you probably want - * to swizzle in the shader, because you need the Y/Z/W - * channels to be defined. - */ - if (vc5_get_tex_return_size(cso->format) != 32) { - tex.swizzle_r = translate_swizzle(so->swizzle[0]); - tex.swizzle_g = translate_swizzle(so->swizzle[1]); - tex.swizzle_b = translate_swizzle(so->swizzle[2]); - tex.swizzle_a = translate_swizzle(so->swizzle[3]); - } else { - tex.swizzle_r = translate_swizzle(PIPE_SWIZZLE_X); - tex.swizzle_g = translate_swizzle(PIPE_SWIZZLE_Y); - tex.swizzle_b = translate_swizzle(PIPE_SWIZZLE_Z); - tex.swizzle_a = translate_swizzle(PIPE_SWIZZLE_W); - } - tex.uif_xor_disable = (rsc->slices[0].tiling == VC5_TILING_UIF_NO_XOR); |