From 9a41ecaddddb2f371e207901ae4d86918049c5aa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 11 Jul 2011 10:30:56 -0600 Subject: svga: add translation for float formats --- src/gallium/drivers/svga/svga_format.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gallium/drivers') 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 */ -- cgit v1.2.3