From: Eric Anholt Date: Wed, 5 Oct 2011 20:38:03 +0000 (-0700) Subject: i965: Add mapping from MESA_FORMAT to BRW_SURFACEFORMAT for integer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35be4ae77eb813bf6184699c038e82ad32bd267d;p=mesa.git i965: Add mapping from MESA_FORMAT to BRW_SURFACEFORMAT for integer. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 66a8a5a53bb..335962217a9 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -127,6 +127,30 @@ brw_format_for_mesa_format(gl_format mesa_format) [MESA_FORMAT_SIGNED_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_SNORM, [MESA_FORMAT_RGB9_E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP, [MESA_FORMAT_R11_G11_B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT, + + [MESA_FORMAT_R_INT32] = BRW_SURFACEFORMAT_R32_SINT, + [MESA_FORMAT_RG_INT32] = BRW_SURFACEFORMAT_R32G32_SINT, + [MESA_FORMAT_RGB_INT32] = BRW_SURFACEFORMAT_R32G32B32_SINT, + [MESA_FORMAT_RGBA_INT32] = BRW_SURFACEFORMAT_R32G32B32A32_SINT, + + [MESA_FORMAT_R_UINT32] = BRW_SURFACEFORMAT_R32_UINT, + [MESA_FORMAT_RG_UINT32] = BRW_SURFACEFORMAT_R32G32_UINT, + [MESA_FORMAT_RGB_UINT32] = BRW_SURFACEFORMAT_R32G32B32_UINT, + [MESA_FORMAT_RGBA_UINT32] = BRW_SURFACEFORMAT_R32G32B32A32_UINT, + + [MESA_FORMAT_RGBA_UINT16] = BRW_SURFACEFORMAT_R16G16B16A16_UINT, + [MESA_FORMAT_RGBA_INT16] = BRW_SURFACEFORMAT_R16G16B16A16_SINT, + [MESA_FORMAT_RG_UINT16] = BRW_SURFACEFORMAT_R16G16_UINT, + [MESA_FORMAT_RG_INT16] = BRW_SURFACEFORMAT_R16G16_SINT, + [MESA_FORMAT_R_UINT16] = BRW_SURFACEFORMAT_R16_UINT, + [MESA_FORMAT_R_INT16] = BRW_SURFACEFORMAT_R16_SINT, + + [MESA_FORMAT_RGBA_UINT8] = BRW_SURFACEFORMAT_R8G8B8A8_UINT, + [MESA_FORMAT_RGBA_INT8] = BRW_SURFACEFORMAT_R8G8B8A8_SINT, + [MESA_FORMAT_RG_UINT8] = BRW_SURFACEFORMAT_R8G8_UINT, + [MESA_FORMAT_RG_INT8] = BRW_SURFACEFORMAT_R8G8_SINT, + [MESA_FORMAT_R_UINT8] = BRW_SURFACEFORMAT_R8_UINT, + [MESA_FORMAT_R_INT8] = BRW_SURFACEFORMAT_R8_SINT, }; assert(mesa_format < MESA_FORMAT_COUNT); return table[mesa_format];