aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorJoakim Sindholt <[email protected]>2009-02-21 17:27:12 +0100
committerCorbin Simpson <[email protected]>2009-02-22 20:03:02 -0800
commit4776ebc648c6793b1d001ae2f46a673a19ab5ff3 (patch)
tree2abb11c0f0817ec43a8edfdf7a641ebb4244472e /src/gallium/drivers
parentb11f1c35d556b0c2d6815e33745b02e740e69167 (diff)
r300-gallium: Add all supported 2d texture formats
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index de3e80daf93..5ff9015a7bf 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -174,8 +174,7 @@ static float r300_get_paramf(struct pipe_screen* pscreen, int param)
}
}
-/* XXX even moar formats */
-static boolean check_tex_2d_format(enum pipe_format format)
+static boolean check_tex_2d_format(enum pipe_format format, boolean is_r500)
{
switch (format) {
/* Colorbuffer */
@@ -188,13 +187,32 @@ static boolean check_tex_2d_format(enum pipe_format format)
case PIPE_FORMAT_Z24S8_UNORM:
return TRUE;
- /* These formats are explicitly not supported, in order to keep
- * people from wasting their time trying to implement them... */
- case PIPE_FORMAT_S8Z24_UNORM:
+ /* XXX Supported yet unimplemented formats: */
+ case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_R5G6B5_UNORM:
+ /* XXX These don't even exist
+ case PIPE_FORMAT_A32R32G32B32:
+ case PIPE_FORMAT_A16R16G16B16: */
+ /* XXX Insert YUV422 packed VYUY and YVYU here */
+ /* XXX What the deuce is UV88? (r3xx accel page 14) */
+ case PIPE_FORMAT_A4R4G4B4_UNORM:
+ debug_printf("r300: Warning: Got unimplemented format: %s in %s\n",
+ pf_name(format), __FUNCTION__);
+ return FALSE;
+
+ /* XXX Supported yet unimplemented r5xx formats: */
+ /* XXX Again, what is UV1010 this time? (r5xx accel page 148) */
+ /* XXX Even more that don't exist
+ case PIPE_FORMAT_A10R10G10B10_UNORM:
+ case PIPE_FORMAT_A2R10G10B10_UNORM:
+ case PIPE_FORMAT_I10_UNORM: */
+ debug_printf(
+ "r300: Warning: Got unimplemented r500 format: %s in %s\n",
+ pf_name(format), __FUNCTION__);
return FALSE;
default:
- debug_printf("r300: Warning: Got unknown format: %s, in %s\n",
+ debug_printf("r300: Warning: Got unsupported format: %s in %s\n",
pf_name(format), __FUNCTION__);
break;
}
@@ -211,7 +229,8 @@ static boolean r300_is_format_supported(struct pipe_screen* pscreen,
{
switch (target) {
case PIPE_TEXTURE_2D:
- return check_tex_2d_format(format);
+ return check_tex_2d_format(format,
+ r300_screen(pscreen)->caps->is_r500);
default:
debug_printf("r300: Warning: Got unknown format target: %d\n",
format);