diff options
author | Chia-I Wu <[email protected]> | 2014-07-16 13:51:49 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-07-16 14:31:59 +0800 |
commit | 1661f7559b0c482f9365a99fe68ff33a8dc650c4 (patch) | |
tree | 1979bb7a24b3e0952b9fb04794e64381e4e9cac0 /src/gallium/drivers/ilo | |
parent | 69cd3ebd6f411a22d80921031321cfb82fd6dd69 (diff) |
ilo: add some missing formats
Map more pipe formats to hardware formats. Enable more VB formats on Haswell.
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_format.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/gallium/drivers/ilo/ilo_format.c b/src/gallium/drivers/ilo/ilo_format.c index 4f3c07c67b8..953be8d802c 100644 --- a/src/gallium/drivers/ilo/ilo_format.c +++ b/src/gallium/drivers/ilo/ilo_format.c @@ -78,7 +78,7 @@ static const struct ilo_format_info ilo_format_table[] = { FI_ENTRY( 1, 5, X, X, X, X, X, X, X, R32G32B32X32_FLOAT), FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32B32A32_SSCALED), FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32B32A32_USCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R32G32B32A32_SFIXED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R32G32B32A32_SFIXED), FI_ENTRY( X, X, X, X, X, X, X, X, X, R64G64_PASSTHRU), FI_ENTRY( 1, 5, X, X, X, X, 1, 1, X, R32G32B32_FLOAT), FI_ENTRY( 1, X, X, X, X, X, 1, 1, X, R32G32B32_SINT), @@ -87,7 +87,7 @@ static const struct ilo_format_info ilo_format_table[] = { FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32B32_SNORM), FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32B32_SSCALED), FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32B32_USCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R32G32B32_SFIXED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R32G32B32_SFIXED), FI_ENTRY( 1, 1, X, X, 1, 4.5, 1, X, 6, R16G16B16A16_UNORM), FI_ENTRY( 1, 1, X, X, 1, 6, 1, X, X, R16G16B16A16_SNORM), FI_ENTRY( 1, X, X, X, 1, X, 1, X, X, R16G16B16A16_SINT), @@ -111,7 +111,7 @@ static const struct ilo_format_info ilo_format_table[] = { FI_ENTRY( X, X, X, X, X, X, 1, X, X, R16G16B16A16_USCALED), FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32_SSCALED), FI_ENTRY( X, X, X, X, X, X, 1, X, X, R32G32_USCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R32G32_SFIXED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R32G32_SFIXED), FI_ENTRY( X, X, X, X, X, X, X, X, X, R64_PASSTHRU), FI_ENTRY( 1, 1, X, 1, 1, 1, 1, X, 6, B8G8R8A8_UNORM), FI_ENTRY( 1, 1, X, X, 1, 1, X, X, X, B8G8R8A8_UNORM_SRGB), @@ -129,7 +129,7 @@ static const struct ilo_format_info ilo_format_table[] = { FI_ENTRY( 1, X, X, X, 1, X, 1, X, X, R16G16_SINT), FI_ENTRY( 1, X, X, X, 1, X, 1, X, X, R16G16_UINT), FI_ENTRY( 1, 1, X, X, 1, 1, 1, X, X, R16G16_FLOAT), - FI_ENTRY( 1, 1, X, X, 1, 1, X, X, 6, B10G10R10A2_UNORM), + FI_ENTRY( 1, 1, X, X, 1, 1, 7.5, X, 6, B10G10R10A2_UNORM), FI_ENTRY( 1, 1, X, X, 1, 1, X, X, 6, B10G10R10A2_UNORM_SRGB), FI_ENTRY( 1, 1, X, X, 1, 1, 1, X, X, R11G11B10_FLOAT), FI_ENTRY( 1, X, X, X, 1, X, 1, 1, X, R32_SINT), @@ -269,26 +269,26 @@ static const struct ilo_format_info ilo_format_table[] = { FI_ENTRY( X, X, X, X, X, X, X, X, X, EAC_SIGNED_R11), FI_ENTRY( X, X, X, X, X, X, X, X, X, EAC_SIGNED_RG11), FI_ENTRY( X, X, X, X, X, X, X, X, X, ETC2_SRGB8), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R16G16B16_UINT), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R16G16B16_SINT), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R32_SFIXED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R10G10B10A2_SNORM), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R10G10B10A2_USCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R10G10B10A2_SSCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R10G10B10A2_SINT), - FI_ENTRY( X, X, X, X, X, X, X, X, X, B10G10R10A2_SNORM), - FI_ENTRY( X, X, X, X, X, X, X, X, X, B10G10R10A2_USCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, B10G10R10A2_SSCALED), - FI_ENTRY( X, X, X, X, X, X, X, X, X, B10G10R10A2_UINT), - FI_ENTRY( X, X, X, X, X, X, X, X, X, B10G10R10A2_SINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R16G16B16_UINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R16G16B16_SINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R32_SFIXED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R10G10B10A2_SNORM), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R10G10B10A2_USCALED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R10G10B10A2_SSCALED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R10G10B10A2_SINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, B10G10R10A2_SNORM), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, B10G10R10A2_USCALED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, B10G10R10A2_SSCALED), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, B10G10R10A2_UINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, B10G10R10A2_SINT), FI_ENTRY( X, X, X, X, X, X, X, X, X, R64G64B64A64_PASSTHRU), FI_ENTRY( X, X, X, X, X, X, X, X, X, R64G64B64_PASSTHRU), FI_ENTRY( X, X, X, X, X, X, X, X, X, ETC2_RGB8_PTA), FI_ENTRY( X, X, X, X, X, X, X, X, X, ETC2_SRGB8_PTA), FI_ENTRY( X, X, X, X, X, X, X, X, X, ETC2_EAC_RGBA8), FI_ENTRY( X, X, X, X, X, X, X, X, X, ETC2_EAC_SRGB8_A8), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R8G8B8_UINT), - FI_ENTRY( X, X, X, X, X, X, X, X, X, R8G8B8_SINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R8G8B8_UINT), + FI_ENTRY( X, X, X, X, X, X, 7.5, X, X, R8G8B8_SINT), FI_ENTRY( X, X, X, X, X, X, X, X, X, RAW), }; @@ -409,10 +409,10 @@ ilo_translate_color_format(enum pipe_format format) [PIPE_FORMAT_A8B8G8R8_SRGB] = 0, [PIPE_FORMAT_X8B8G8R8_SRGB] = 0, [PIPE_FORMAT_B8G8R8A8_SRGB] = GEN6_FORMAT_B8G8R8A8_UNORM_SRGB, - [PIPE_FORMAT_B8G8R8X8_SRGB] = 0, + [PIPE_FORMAT_B8G8R8X8_SRGB] = GEN6_FORMAT_B8G8R8X8_UNORM_SRGB, [PIPE_FORMAT_A8R8G8B8_SRGB] = 0, [PIPE_FORMAT_X8R8G8B8_SRGB] = 0, - [PIPE_FORMAT_R8G8B8A8_SRGB] = 0, + [PIPE_FORMAT_R8G8B8A8_SRGB] = GEN6_FORMAT_R8G8B8A8_UNORM_SRGB, [PIPE_FORMAT_DXT1_RGB] = GEN6_FORMAT_DXT1_RGB, [PIPE_FORMAT_DXT1_RGBA] = GEN6_FORMAT_BC1_UNORM, [PIPE_FORMAT_DXT3_RGBA] = GEN6_FORMAT_BC2_UNORM, @@ -435,7 +435,7 @@ ilo_translate_color_format(enum pipe_format format) [PIPE_FORMAT_R11G11B10_FLOAT] = GEN6_FORMAT_R11G11B10_FLOAT, [PIPE_FORMAT_R9G9B9E5_FLOAT] = GEN6_FORMAT_R9G9B9E5_SHAREDEXP, [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT] = 0, - [PIPE_FORMAT_R1_UNORM] = 0, + [PIPE_FORMAT_R1_UNORM] = GEN6_FORMAT_R1_UNORM, [PIPE_FORMAT_R10G10B10X2_USCALED] = GEN6_FORMAT_R10G10B10X2_USCALED, [PIPE_FORMAT_R10G10B10X2_SNORM] = 0, [PIPE_FORMAT_L4A4_UNORM] = 0, @@ -562,6 +562,7 @@ ilo_translate_color_format(enum pipe_format format) [PIPE_FORMAT_R32A32_UINT] = 0, [PIPE_FORMAT_R32A32_SINT] = 0, [PIPE_FORMAT_R10G10B10A2_UINT] = GEN6_FORMAT_R10G10B10A2_UINT, + [PIPE_FORMAT_B5G6R5_SRGB] = GEN6_FORMAT_B5G6R5_UNORM_SRGB, }; int sfmt = format_mapping[format]; |