diff options
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_access.py')
-rw-r--r-- | src/gallium/auxiliary/util/u_format_access.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format_access.py b/src/gallium/auxiliary/util/u_format_access.py index 00424779d2..42a37badca 100644 --- a/src/gallium/auxiliary/util/u_format_access.py +++ b/src/gallium/auxiliary/util/u_format_access.py @@ -60,6 +60,9 @@ def is_format_supported(format): channel = format.channels[i] if channel.type not in (VOID, UNSIGNED, FLOAT): return False + if channel.type == FLOAT: + if channel.size not in (32, 64) or format.is_mixed(): + return False # We can only read a color from a depth/stencil format if the depth channel is present if format.colorspace == 'zs' and format.swizzles[0] == SWIZZLE_NONE: @@ -78,6 +81,8 @@ 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 == VOID: + channel = format.channels[1] if channel.type == UNSIGNED: return 'uint%u_t' % channel.size elif channel.type == SIGNED: |