diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-05-12 23:50:04 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-05-14 18:58:20 +0200 |
commit | 3d4d388e3929d7948b62d90867357aecbfba5aeb (patch) | |
tree | f39c61ddf84d3519f7684761102a894421d834d1 /src/amd/vulkan/radv_shader.h | |
parent | e361970ed73d0f0a11d93a718dbfe2bf4f38b56d (diff) |
radv: Fix up 2_10_10_10 alpha sign.
Pre-Vega HW always interprets the alpha for this format as unsigned,
so we have to implement a fixup to do the sign correctly for signed
formats.
v2: Improve indexing mess.
CC: 18.0 18.1 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106480
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.h')
-rw-r--r-- | src/amd/vulkan/radv_shader.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 12878307ecd..b711cba80cf 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -55,9 +55,21 @@ struct radv_shader_module { char data[0]; }; +enum { + RADV_ALPHA_ADJUST_NONE = 0, + RADV_ALPHA_ADJUST_SNORM = 1, + RADV_ALPHA_ADJUST_SINT = 2, + RADV_ALPHA_ADJUST_SSCALED = 3, +}; + struct radv_vs_variant_key { uint32_t instance_rate_inputs; uint32_t instance_rate_divisors[MAX_VERTEX_ATTRIBS]; + + /* For 2_10_10_10 formats the alpha is handled as unsigned by pre-vega HW. + * so we may need to fix it up. */ + uint64_t alpha_adjust; + uint32_t as_es:1; uint32_t as_ls:1; uint32_t export_prim_id:1; |