summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-09-15 12:41:00 +0100
committerDave Airlie <airlied@redhat.com>2011-09-16 09:26:57 +0100
commitf2bae9456f141f8c1104ef2a0aab31f6190ae5f0 (patch)
tree4e5a37dbc19036eb9be1a7890c0e1dd1c309fb14
parent2dfabdd0a479a29d23aa6b10a0b6bfeb48e956b2 (diff)
downloadexternal_mesa3d-f2bae9456f141f8c1104ef2a0aab31f6190ae5f0.zip
external_mesa3d-f2bae9456f141f8c1104ef2a0aab31f6190ae5f0.tar.gz
external_mesa3d-f2bae9456f141f8c1104ef2a0aab31f6190ae5f0.tar.bz2
r600g: interpret integer texture types as ints.
For signed/unsigned with no normalisation or srgb, assume its an INT type texture. Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--src/gallium/drivers/r600/r600_texture.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 3811c49..923547a 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1049,10 +1049,15 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
switch (desc->channel[i].type) {
case UTIL_FORMAT_TYPE_UNSIGNED:
case UTIL_FORMAT_TYPE_SIGNED:
+#if 0
if (!desc->channel[i].normalized &&
desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB) {
goto out_unknown;
}
+#endif
+ if (desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB &&
+ !desc->channel[i].normalized)
+ word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
switch (desc->channel[i].size) {
case 4: