pvr: implement VK_(EXT|KHR)_vertex_attribute_divisor
Signed-off-by: Frank Binns <frank.binns@imgtec.com> Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Co-authored-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
+2
-2
@@ -526,7 +526,7 @@ Vulkan 1.4 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv/gfx8+, tu/a7xx+, vn
|
||||
VK_KHR_shader_expect_assume DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
|
||||
VK_KHR_shader_float_controls2 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn)
|
||||
VK_KHR_shader_subgroup_rotate DONE (anv, lvp, nvk, panvk, radv, tu, vn)
|
||||
VK_KHR_vertex_attribute_divisor DONE (anv, lvp, nvk, panvk, radv, tu, v3dv, vn)
|
||||
VK_KHR_vertex_attribute_divisor DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
|
||||
VK_EXT_host_image_copy DONE (anv, lvp, nvk/Turing+, panvk, radv/gfx10+, tu, vn)
|
||||
VK_EXT_pipeline_protected_access DONE (anv/gfx12+, vn)
|
||||
VK_EXT_pipeline_robustness DONE (anv, lvp, nvk, panvk, radv, v3dv, tu, vn)
|
||||
@@ -669,7 +669,7 @@ Khronos extensions that are not part of any Vulkan version:
|
||||
VK_EXT_surface_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_swapchain_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_transform_feedback DONE (anv, hasvk, hk, lvp, nvk, radv, tu, vn)
|
||||
VK_EXT_vertex_attribute_divisor DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, tu, v3dv, vn)
|
||||
VK_EXT_vertex_attribute_divisor DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
|
||||
VK_EXT_vertex_input_dynamic_state DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn)
|
||||
VK_EXT_ycbcr_image_arrays DONE (anv, hasvk, hk, lvp, nvk, panvk/v10+, radv, vn)
|
||||
VK_EXT_zero_initialize_device_memory DONE (lvp, nvk, radv)
|
||||
|
||||
@@ -189,6 +189,7 @@ static void pvr_physical_device_get_supported_extensions(
|
||||
.KHR_swapchain = PVR_USE_WSI_PLATFORM,
|
||||
.KHR_timeline_semaphore = true,
|
||||
.KHR_uniform_buffer_standard_layout = true,
|
||||
.KHR_vertex_attribute_divisor = true,
|
||||
.KHR_zero_initialize_workgroup_memory = false,
|
||||
.EXT_depth_clamp_zero_one = true,
|
||||
.EXT_external_memory_dma_buf = true,
|
||||
@@ -200,6 +201,7 @@ static void pvr_physical_device_get_supported_extensions(
|
||||
.EXT_scalar_block_layout = true,
|
||||
.EXT_texel_buffer_alignment = false,
|
||||
.EXT_tooling_info = true,
|
||||
.EXT_vertex_attribute_divisor = true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -306,6 +308,11 @@ static void pvr_physical_device_get_supported_features(
|
||||
/* VK_KHR_present_wait2 */
|
||||
.presentWait2 = PVR_USE_WSI_PLATFORM,
|
||||
|
||||
/* Vulkan 1.4 / VK_EXT_vertex_attribute_divisor /
|
||||
VK_KHR_vertex_attribute_divisor */
|
||||
.vertexAttributeInstanceRateDivisor = true,
|
||||
.vertexAttributeInstanceRateZeroDivisor = true,
|
||||
|
||||
/* Vulkan 1.3 / VK_KHR_zero_initialize_workgroup_memory */
|
||||
.shaderZeroInitializeWorkgroupMemory = false,
|
||||
};
|
||||
@@ -538,6 +545,10 @@ static bool pvr_physical_device_get_properties(
|
||||
.storageTexelBufferOffsetSingleTexelAlignment = true,
|
||||
.uniformTexelBufferOffsetAlignmentBytes = PVR_TEXEL_BUFFER_OFFSET_ALIGNMENT,
|
||||
.uniformTexelBufferOffsetSingleTexelAlignment = false,
|
||||
|
||||
/* Vulkan 1.4 / VK_EXT_vertex_attribute_divisor / VK_KHR_vertex_attribute_divisor */
|
||||
.maxVertexAttribDivisor = UINT32_MAX,
|
||||
.supportsNonZeroFirstInstance = true,
|
||||
};
|
||||
|
||||
if (PVR_HAS_FEATURE(dev_info, gpu_multicore_support)) {
|
||||
|
||||
@@ -1414,11 +1414,9 @@ static void pvr_graphics_pipeline_setup_vertex_dma(
|
||||
*/
|
||||
dma_desc->binding_index = attribute->binding;
|
||||
|
||||
/* We don't currently support VK_EXT_vertex_attribute_divisor so no
|
||||
* repeating of instance-rate vertex attributes needed. We should always
|
||||
* move on to the next vertex attribute.
|
||||
*/
|
||||
dma_desc->divisor = 1;
|
||||
if (binding->inputRate == VK_VERTEX_INPUT_RATE_INSTANCE)
|
||||
dma_desc->divisor = vi->bindings[attribute->binding].divisor;
|
||||
|
||||
/* Will be used to generate PDS code that takes care of robust buffer
|
||||
* access, and later on by the driver to write the correct robustness
|
||||
|
||||
Reference in New Issue
Block a user