mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 20:40:24 +01:00
turnip: Use tu6_reduction_mode() to avoid warning
This makes it a little more explicit that the values line up. src/freedreno/vulkan/tu_device.c:2209:75: warning: implicit conversion from enumeration type 'const VkSamplerReductionMode' (aka 'const enum VkSamplerReductionMode') to different enumeration type 'enum a6xx_reduction_mode' [-Wenum-conversion] Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>
This commit is contained in:
parent
fff17707ea
commit
697fe1c801
1 changed files with 10 additions and 2 deletions
|
|
@ -2165,6 +2165,14 @@ tu6_compare_func(VkCompareOp op)
|
|||
return (enum adreno_compare_func) op;
|
||||
}
|
||||
|
||||
static inline enum a6xx_reduction_mode
|
||||
tu6_reduction_mode(VkSamplerReductionMode reduction_mode)
|
||||
{
|
||||
/* note: vulkan enum matches hw */
|
||||
|
||||
return (enum a6xx_reduction_mode) reduction_mode;
|
||||
}
|
||||
|
||||
static void
|
||||
tu_init_sampler(struct tu_device *device,
|
||||
struct tu_sampler *sampler,
|
||||
|
|
@ -2205,8 +2213,8 @@ tu_init_sampler(struct tu_device *device,
|
|||
sampler->descriptor[3] = 0;
|
||||
|
||||
if (reduction) {
|
||||
/* note: vulkan enum matches hw */
|
||||
sampler->descriptor[2] |= A6XX_TEX_SAMP_2_REDUCTION_MODE(reduction->reductionMode);
|
||||
sampler->descriptor[2] |= A6XX_TEX_SAMP_2_REDUCTION_MODE(
|
||||
tu6_reduction_mode(reduction->reductionMode));
|
||||
}
|
||||
|
||||
sampler->ycbcr_sampler = ycbcr_conversion ?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue