From: Brian Paul Date: Tue, 27 Jun 2017 02:49:35 +0000 (-0600) Subject: svga: add typeless switch cases in svga_typeless_format() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cbe72ae59880025d28e82a1d3cc0b2108e578574;p=mesa.git svga: add typeless switch cases in svga_typeless_format() We sometimes pass typeless formats to this function. By adding switch cases we avoid the "Unexpected format XXX in svga_typeless_format" warning messages. No functional change. No Piglit regressions, no above-mentioned warning messages. Reviewed-by: Charmaine Lee --- diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index 2f74240b6ab..597883f21f1 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -1827,6 +1827,7 @@ svga_typeless_format(SVGA3dSurfaceFormat format) case SVGA3D_R32G32_FLOAT: return SVGA3D_R32G32_TYPELESS; case SVGA3D_D32_FLOAT_S8X24_UINT: + case SVGA3D_R32G8X24_TYPELESS: return SVGA3D_R32G8X24_TYPELESS; case SVGA3D_X32_G8X24_UINT: return SVGA3D_R32_FLOAT_X8X24; @@ -1838,6 +1839,7 @@ svga_typeless_format(SVGA3dSurfaceFormat format) case SVGA3D_R8G8B8A8_UNORM_SRGB: case SVGA3D_R8G8B8A8_UINT: case SVGA3D_R8G8B8A8_SINT: + case SVGA3D_R8G8B8A8_TYPELESS: return SVGA3D_R8G8B8A8_TYPELESS; case SVGA3D_R16G16_UINT: case SVGA3D_R16G16_SINT: @@ -1849,8 +1851,10 @@ svga_typeless_format(SVGA3dSurfaceFormat format) case SVGA3D_R32_FLOAT: case SVGA3D_R32_UINT: case SVGA3D_R32_SINT: + case SVGA3D_R32_TYPELESS: return SVGA3D_R32_TYPELESS; case SVGA3D_D24_UNORM_S8_UINT: + case SVGA3D_R24G8_TYPELESS: return SVGA3D_R24G8_TYPELESS; case SVGA3D_X24_G8_UINT: return SVGA3D_R24_UNORM_X8; @@ -1865,6 +1869,7 @@ svga_typeless_format(SVGA3dSurfaceFormat format) case SVGA3D_R16_SNORM: case SVGA3D_R16_SINT: case SVGA3D_R16_FLOAT: + case SVGA3D_R16_TYPELESS: return SVGA3D_R16_TYPELESS; case SVGA3D_R8_UNORM: case SVGA3D_R8_UINT: @@ -1873,18 +1878,23 @@ svga_typeless_format(SVGA3dSurfaceFormat format) return SVGA3D_R8_TYPELESS; case SVGA3D_B8G8R8A8_UNORM_SRGB: case SVGA3D_B8G8R8A8_UNORM: + case SVGA3D_B8G8R8A8_TYPELESS: return SVGA3D_B8G8R8A8_TYPELESS; case SVGA3D_B8G8R8X8_UNORM_SRGB: case SVGA3D_B8G8R8X8_UNORM: + case SVGA3D_B8G8R8X8_TYPELESS: return SVGA3D_B8G8R8X8_TYPELESS; case SVGA3D_BC1_UNORM: case SVGA3D_BC1_UNORM_SRGB: + case SVGA3D_BC1_TYPELESS: return SVGA3D_BC1_TYPELESS; case SVGA3D_BC2_UNORM: case SVGA3D_BC2_UNORM_SRGB: + case SVGA3D_BC2_TYPELESS: return SVGA3D_BC2_TYPELESS; case SVGA3D_BC3_UNORM: case SVGA3D_BC3_UNORM_SRGB: + case SVGA3D_BC3_TYPELESS: return SVGA3D_BC3_TYPELESS; case SVGA3D_BC4_UNORM: case SVGA3D_BC4_SNORM: