aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_private.h
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2020-04-10 09:19:36 -0400
committerMarge Bot <[email protected]>2020-05-20 13:22:12 +0000
commitd070a7ba0cfb11f1e01774b9dd3775ab7cd0c4ea (patch)
tree5ad01540e1ee1da55cbaf189e9f38014e5080be5 /src/freedreno/vulkan/tu_private.h
parent70502f071cde4497104cf2b0d46a7e9fda5cef3a (diff)
turnip: implement VK_KHR_sampler_ycbcr_conversion
Most changes based on radv, some simplification, since we don't need to sample multiple planes, 422_UNORM/420_UNORM formats will be supported directly using the hardware formats for those. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4590>
Diffstat (limited to 'src/freedreno/vulkan/tu_private.h')
-rw-r--r--src/freedreno/vulkan/tu_private.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h
index f1a52cbb5fd..8554083d5bb 100644
--- a/src/freedreno/vulkan/tu_private.h
+++ b/src/freedreno/vulkan/tu_private.h
@@ -1507,8 +1507,18 @@ struct tu_image_view
uint32_t RB_BLIT_DST_INFO;
};
+struct tu_sampler_ycbcr_conversion {
+ VkFormat format;
+ VkSamplerYcbcrModelConversion ycbcr_model;
+ VkSamplerYcbcrRange ycbcr_range;
+ VkComponentMapping components;
+ VkChromaLocation chroma_offsets[2];
+ VkFilter chroma_filter;
+};
+
struct tu_sampler {
uint32_t descriptor[A6XX_TEX_SAMP_DWORDS];
+ struct tu_sampler_ycbcr_conversion *ycbcr_sampler;
};
void
@@ -1774,6 +1784,7 @@ TU_DEFINE_NONDISP_HANDLE_CASTS(tu_pipeline_layout, VkPipelineLayout)
TU_DEFINE_NONDISP_HANDLE_CASTS(tu_query_pool, VkQueryPool)
TU_DEFINE_NONDISP_HANDLE_CASTS(tu_render_pass, VkRenderPass)
TU_DEFINE_NONDISP_HANDLE_CASTS(tu_sampler, VkSampler)
+TU_DEFINE_NONDISP_HANDLE_CASTS(tu_sampler_ycbcr_conversion, VkSamplerYcbcrConversion)
TU_DEFINE_NONDISP_HANDLE_CASTS(tu_shader_module, VkShaderModule)
TU_DEFINE_NONDISP_HANDLE_CASTS(tu_semaphore, VkSemaphore)