summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-12-11 13:25:56 +0100
committerMarek Olšák <[email protected]>2011-12-12 08:04:51 +0100
commit4298c88f656c191f3daca0c341850dd8c23f5f92 (patch)
treedd914d6091ddec47c0eb031860efcbd8c767485b /src/gallium/drivers
parent1ded658ce074a85bc08c989ff17840b840ff3051 (diff)
r300g: integer and fixed-point 16.16 textures are not supported
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index fa09410c6a5..2738f582f69 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -236,6 +236,17 @@ uint32_t r300_translate_texformat(enum pipe_format format,
return R300_TX_FORMAT_CxV8U8 | result;
}
+ /* Integer and fixed-point 16.16 textures are not supported. */
+ for (i = 0; i < 4; i++) {
+ if (desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED ||
+ ((desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED ||
+ desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED) &&
+ (!desc->channel[i].normalized ||
+ desc->channel[i].pure_integer))) {
+ return ~0; /* Unsupported/unknown. */
+ }
+ }
+
/* Add sign. */
for (i = 0; i < desc->nr_channels; i++) {
if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {