From: Brian Paul Date: Mon, 11 Jul 2011 16:30:56 +0000 (-0600) Subject: svga: add translation for float formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a41ecaddddb2f371e207901ae4d86918049c5aa;p=mesa.git svga: add translation for float formats --- 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 */