mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-14 17:30:50 +02:00
util: Use VOID type for X channels in format descriptions.
This commit is contained in:
parent
d0258ca59d
commit
338b9d71df
3 changed files with 18 additions and 18 deletions
|
|
@ -58,12 +58,12 @@
|
|||
|
||||
# Typical rendertarget formats
|
||||
PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
|
||||
PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, rgb
|
||||
PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, rgb
|
||||
PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, rgb
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, x8 , un8 , un8 , un8 , yzw1, rgb
|
||||
PIPE_FORMAT_A8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
|
||||
PIPE_FORMAT_X8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, rgb
|
||||
PIPE_FORMAT_B5G5R5X1_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyx1, rgb
|
||||
PIPE_FORMAT_X8B8G8R8_UNORM , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, rgb
|
||||
PIPE_FORMAT_B5G5R5X1_UNORM , plain, 1, 1, un5 , un5 , un5 , x1 , zyx1, rgb
|
||||
PIPE_FORMAT_B5G5R5A1_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
|
||||
PIPE_FORMAT_B4G4R4A4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
|
||||
PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
|
||||
|
|
@ -81,11 +81,11 @@ PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, s
|
|||
PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
|
||||
PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
|
||||
PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
|
||||
PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, srgb
|
||||
PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb
|
||||
PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
|
||||
PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, srgb
|
||||
PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, srgb
|
||||
PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb
|
||||
PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, srgb
|
||||
PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , yzw1, srgb
|
||||
|
||||
# Mixed-sign formats (typically used for bump map textures)
|
||||
PIPE_FORMAT_R8SG8SB8UX8U_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb
|
||||
|
|
@ -98,8 +98,8 @@ PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, z
|
|||
PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs
|
||||
PIPE_FORMAT_Z24S8_UNORM , plain, 1, 1, un24, un8 , , , xy__, zs
|
||||
PIPE_FORMAT_S8Z24_UNORM , plain, 1, 1, un8 , un24, , , yx__, zs
|
||||
PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, un8 , , , x___, zs
|
||||
PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, un8 , un24, , , y___, zs
|
||||
PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, x8 , , , x___, zs
|
||||
PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, x8 , un24, , , y___, zs
|
||||
|
||||
# YUV formats
|
||||
# http://www.fourcc.org/yuv.php#UYVY
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 8 and column 3.
|
|
|
@ -78,7 +78,7 @@ def native_type(format):
|
|||
else:
|
||||
# For array pixel formats return the integer type that matches the color channel
|
||||
channel = format.channels[0]
|
||||
if channel.type == UNSIGNED:
|
||||
if channel.type in (UNSIGNED, VOID):
|
||||
return 'uint%u_t' % channel.size
|
||||
elif channel.type == SIGNED:
|
||||
return 'int%u_t' % channel.size
|
||||
|
|
|
|||
|
|
@ -124,15 +124,15 @@ def native_type(format):
|
|||
return 'uint%u_t' % format.block_size()
|
||||
else:
|
||||
# For array pixel formats return the integer type that matches the color channel
|
||||
type = format.channels[0]
|
||||
if type.type == UNSIGNED:
|
||||
return 'uint%u_t' % type.size
|
||||
elif type.type == SIGNED:
|
||||
return 'int%u_t' % type.size
|
||||
elif type.type == FLOAT:
|
||||
if type.size == 32:
|
||||
channel = format.channels[0]
|
||||
if channel.type in (UNSIGNED, VOID):
|
||||
return 'uint%u_t' % channel.size
|
||||
elif channel.type == SIGNED:
|
||||
return 'int%u_t' % channel.size
|
||||
elif channel.type == FLOAT:
|
||||
if channel.size == 32:
|
||||
return 'float'
|
||||
elif type.size == 64:
|
||||
elif channel.size == 64:
|
||||
return 'double'
|
||||
else:
|
||||
assert False
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue