summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_state.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-10-07 15:13:09 +1000
committerDave Airlie <airlied@redhat.com>2010-10-07 15:17:28 +1000
commit97eea87bde5d05f247580aeb2963ac2476417bd5 (patch)
tree79ec0e9043bdff6812e9f08f8f4fe0b580e8fb53 /src/gallium/drivers/r600/r600_state.c
parent84457701b05ef29126d90c2fe72083278d26bd4f (diff)
r600g: use format from the sampler view not from the texture.
we want to use the format from the sampler view which isn't always the same as the texture format when creating sampler views.
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r--src/gallium/drivers/r600/r600_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index b55c345005..7ceedf6363 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -626,15 +626,15 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
swizzle[1] = state->swizzle_g;
swizzle[2] = state->swizzle_b;
swizzle[3] = state->swizzle_a;
- format = r600_translate_texformat(texture->format,
+ format = r600_translate_texformat(state->format,
swizzle,
&word4, &yuv_format);
if (format == ~0) {
format = 0;
}
- desc = util_format_description(texture->format);
+ desc = util_format_description(state->format);
if (desc == NULL) {
- R600_ERR("unknow format %d\n", texture->format);
+ R600_ERR("unknow format %d\n", state->format);
}
tmp = (struct r600_resource_texture*)texture;
rbuffer = &tmp->resource;