summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-07-11 10:30:56 -0600
committerBrian Paul <[email protected]>2011-09-23 07:58:47 -0600
commit9a41ecaddddb2f371e207901ae4d86918049c5aa (patch)
treec7485af1aeaf4e32cfb18e2dc99567ae7ae9f20a /src/gallium/drivers/svga
parent73e840ab7d5d4f42dabe498b194b388713fdc43b (diff)
svga: add translation for float formats
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_format.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c
index 1b3f716a333..40a0e6a58b5 100644
--- a/src/gallium/drivers/svga/svga_format.c
+++ b/src/gallium/drivers/svga/svga_format.c
@@ -80,6 +80,20 @@ svga_translate_format(struct svga_screen *ss,
case PIPE_FORMAT_DXT5_RGBA:
return SVGA3D_DXT5;
+ /* Float formats (only 1, 2 and 4-component formats supported) */
+ case PIPE_FORMAT_R32_FLOAT:
+ return SVGA3D_R_S23E8;
+ case PIPE_FORMAT_R32G32_FLOAT:
+ return SVGA3D_RG_S23E8;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ return SVGA3D_ARGB_S23E8;
+ case PIPE_FORMAT_R16_FLOAT:
+ return SVGA3D_R_S10E5;
+ case PIPE_FORMAT_R16G16_FLOAT:
+ return SVGA3D_RG_S10E5;
+ case PIPE_FORMAT_R16G16B16A16_FLOAT:
+ return SVGA3D_ARGB_S10E5;
+
case PIPE_FORMAT_Z32_UNORM:
/* SVGA3D_Z_D32 is not yet unsupported */
/* fall-through */