diff options
author | Michel Dänzer <[email protected]> | 2013-01-22 17:05:08 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-01-24 08:46:31 +0100 |
commit | d0096dfa85a176c387701a035cfc21d55f615ed6 (patch) | |
tree | 575c5c07aadb5dfd8e3fb9bf091cefe7a1795f82 | |
parent | 5bd86b26df30d32412ca1b7ac02892ab5e10c6ef (diff) |
radeonsi: Make sure to use float number format for packed float colour formats.
These aren't covered by UTIL_FORMAT_TYPE_FLOAT.
Fixes 15 piglit (sub)tests.
Signed-off-by: Michel Dänzer <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index cd40e1ac774..a27dbdd775e 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1613,7 +1613,7 @@ static void si_cb(struct r600_context *rctx, struct si_pm4_state *pm4, break; } } - if (desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) { + if (i == 4 || desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) { ntype = V_028C70_NUMBER_FLOAT; } else { ntype = V_028C70_NUMBER_UNORM; @@ -2087,7 +2087,9 @@ static struct pipe_sampler_view *si_create_sampler_view(struct pipe_context *ctx util_format_compose_swizzles(desc->swizzle, state_swizzle, swizzle); first_non_void = util_format_get_first_non_void_channel(pipe_format); - switch (desc->channel[first_non_void].type) { + if (first_non_void < 0) { + num_format = V_008F14_IMG_NUM_FORMAT_FLOAT; + } else switch (desc->channel[first_non_void].type) { case UTIL_FORMAT_TYPE_FLOAT: num_format = V_008F14_IMG_NUM_FORMAT_FLOAT; break; |