aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-04-22 16:17:18 +0200
committerMarek Olšák <[email protected]>2011-04-22 16:19:41 +0200
commit673cec467a1b60890bb2cc4e8c90f5a05e47eea7 (patch)
tree75ce697a9f05d7628c7d39359b1365fe81b1a6fa
parent400a99a679dfcf671d6d35cc4256d86cad7f9e93 (diff)
r300g: disallow A16F,L16F,LA16F,I16F texture formats on DRM<2.8.0
-rw-r--r--src/gallium/drivers/r300/r300_screen.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index a5d737c4b3c..13344a226d7 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -327,9 +327,14 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
format == PIPE_FORMAT_RGTC2_SNORM ||
format == PIPE_FORMAT_LATC2_UNORM ||
format == PIPE_FORMAT_LATC2_SNORM;
- boolean is_r16f_rg16f = format == PIPE_FORMAT_R16_FLOAT ||
- format == PIPE_FORMAT_R16G16_FLOAT;
- boolean is_half_float = is_r16f_rg16f ||
+ boolean is_x16f_xy16f = format == PIPE_FORMAT_R16_FLOAT ||
+ format == PIPE_FORMAT_R16G16_FLOAT ||
+ format == PIPE_FORMAT_A16_FLOAT ||
+ format == PIPE_FORMAT_L16_FLOAT ||
+ format == PIPE_FORMAT_L16A16_FLOAT ||
+ format == PIPE_FORMAT_I16_FLOAT;
+ boolean is_half_float = format == PIPE_FORMAT_R16_FLOAT ||
+ format == PIPE_FORMAT_R16G16_FLOAT ||
format == PIPE_FORMAT_R16G16B16_FLOAT ||
format == PIPE_FORMAT_R16G16B16A16_FLOAT;
@@ -365,7 +370,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
/* ATI2N is supported on r4xx-r5xx. */
(is_r400 || is_r500 || !is_ati2n) &&
/* R16F and RG16F texture support was added in as late as DRM 2.8.0 */
- (drm_2_8_0 || !is_r16f_rg16f) &&
+ (drm_2_8_0 || !is_x16f_xy16f) &&
r300_is_sampler_format_supported(format)) {
retval |= PIPE_BIND_SAMPLER_VIEW;
}