tu: Fix incorrect bpcs value for padded formats
This doesn't make a difference for now as we don't expose any padded formats yet, but will be needed for VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Signed-off-by: Valentine Burley <valentine.burley@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
This commit is contained in:
committed by
Marge Bot
parent
c8a8543af7
commit
af338d2d2e
@@ -553,10 +553,8 @@ lower_tex_ycbcr(const struct tu_pipeline_layout *layout,
|
||||
|
||||
builder->cursor = nir_after_instr(&tex->instr);
|
||||
|
||||
uint8_t bits = vk_format_get_component_bits(ycbcr_sampler->format,
|
||||
UTIL_FORMAT_COLORSPACE_RGB,
|
||||
PIPE_SWIZZLE_X);
|
||||
uint32_t bpcs[3] = {bits, bits, bits}; /* TODO: use right bpc for each channel ? */
|
||||
uint8_t bits = vk_format_get_bpc(ycbcr_sampler->format);
|
||||
uint32_t bpcs[3] = {bits, bits, bits}; /* We only support uniform formats */
|
||||
nir_def *result = nir_convert_ycbcr_to_rgb(builder,
|
||||
ycbcr_sampler->ycbcr_model,
|
||||
ycbcr_sampler->ycbcr_range,
|
||||
|
||||
Reference in New Issue
Block a user