summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-05-08 18:51:03 +0200
committerMarek Olšák <maraeo@gmail.com>2010-05-08 23:03:45 +0200
commit71584d0cc75dda3c579a2a0cb6c1ac9591f7d5c9 (patch)
treeee6ae2d414a69c87dfbded303b002bf7adad5ae6 /src/gallium/drivers/r300/r300_state.c
parent78e881368b392d8a6945990c20493560fcd73231 (diff)
r300g: pass depth texture swizzle to the compiler if compare mode is enabled
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 446422ca0f..fe3eae9805 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1021,7 +1021,6 @@ r300_create_sampler_view(struct pipe_context *pipe,
{
struct r300_sampler_view *view = CALLOC_STRUCT(r300_sampler_view);
struct r300_texture *tex = r300_texture(texture);
- unsigned char swizzle[4];
if (view) {
view->base = *templ;
@@ -1030,14 +1029,14 @@ r300_create_sampler_view(struct pipe_context *pipe,
view->base.texture = NULL;
pipe_resource_reference(&view->base.texture, texture);
- swizzle[0] = templ->swizzle_r;
- swizzle[1] = templ->swizzle_g;
- swizzle[2] = templ->swizzle_b;
- swizzle[3] = templ->swizzle_a;
+ view->swizzle[0] = templ->swizzle_r;
+ view->swizzle[1] = templ->swizzle_g;
+ view->swizzle[2] = templ->swizzle_b;
+ view->swizzle[3] = templ->swizzle_a;
view->format = tex->tx_format;
view->format.format1 |= r300_translate_texformat(templ->format,
- swizzle);
+ view->swizzle);
if (r300_screen(pipe->screen)->caps.is_r500) {
view->format.format2 |= r500_tx_format_msb_bit(templ->format);
}