summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-02-06 18:57:11 +1000
committerDave Airlie <[email protected]>2011-02-06 19:00:04 +1000
commit780c183b8fdf2d301e1eea7f0b83cd96fb6cbf84 (patch)
tree4e397c8f7199982eb1d919be8ab292a1ca7b8de0 /src/gallium/drivers/r600/evergreen_state.c
parent68b701f5ded5f6b73a6b07cf37d862fab4836607 (diff)
r600g: use surface format not underlying texture format
This uses the surface format to set the CB up not the underlying texture format, since these can and do differ. Fixes piglit fbo-srgb.
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index d9b8eb768b0..05539aa61d7 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -664,12 +664,12 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
pitch = rtex->pitch_in_pixels[level] / 8 - 1;
slice = rtex->pitch_in_pixels[level] * surf->aligned_height / 64 - 1;
ntype = 0;
- desc = util_format_description(rtex->resource.base.b.format);
+ desc = util_format_description(surf->base.format);
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
ntype = V_028C70_NUMBER_SRGB;
- format = r600_translate_colorformat(rtex->resource.base.b.format);
- swap = r600_translate_colorswap(rtex->resource.base.b.format);
+ format = r600_translate_colorformat(surf->base.format);
+ swap = r600_translate_colorswap(surf->base.format);
color_info = S_028C70_FORMAT(format) |
S_028C70_COMP_SWAP(swap) |
S_028C70_ARRAY_MODE(rtex->array_mode[level]) |