mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
v3dv: fix comment in texel buffer shader copy path
When using the texel buffer copy path to copy a buffer we need to sample from the buffer and for that we need a texture shader state record where we specify the base offset of the texture (the buffer). If the copy operation has a start offset we can't add that offset to the base address of the buffer because the texture state record requires the base pointer to be 64-byte aligned, so it would only work for offsets that are multiple of 64B. Instead, we pass the offset (in elements) to the shader and we use that to shift the indices into the buffer when selecting the source texel to copy. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17482>
This commit is contained in:
parent
4fbc237cae
commit
5a4c5f46c7
1 changed files with 4 additions and 7 deletions
|
|
@ -2057,13 +2057,10 @@ texel_buffer_shader_copy(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
if (result != VK_SUCCESS)
|
||||
return handled;
|
||||
|
||||
/* FIXME: for some reason passing region->bufferOffset here for the
|
||||
* offset field doesn't work, making the following CTS tests fail:
|
||||
*
|
||||
* dEQP-VK.api.copy_and_blit.core.buffer_to_image.*buffer_offset*
|
||||
*
|
||||
* So instead we pass 0 here and we pass the offset in texels as a push
|
||||
* constant to the shader, which seems to work correctly.
|
||||
/* We can't pass region->bufferOffset here for the offset field because
|
||||
* the texture base pointer in the texture shader state must be a 64-byte
|
||||
* aligned value. Instead, we use 0 here and we pass the offset in texels
|
||||
* as a push constant to the shader.
|
||||
*/
|
||||
VkDevice _device = v3dv_device_to_handle(cmd_buffer->device);
|
||||
VkBufferViewCreateInfo buffer_view_info = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue