mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 21:20:12 +01:00
anv: use 64bit int support in generation shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
This commit is contained in:
parent
a2026bf5f9
commit
200cec935d
4 changed files with 7 additions and 8 deletions
|
|
@ -134,6 +134,7 @@ compile_upload_spirv(struct anv_device *device,
|
|||
{
|
||||
struct spirv_to_nir_options spirv_options = {
|
||||
.caps = {
|
||||
.int64 = true,
|
||||
},
|
||||
.ubo_addr_format = nir_address_format_32bit_index_offset,
|
||||
.ssbo_addr_format = nir_address_format_64bit_global_32bit_offset,
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ struct anv_generated_indirect_draw_params {
|
|||
uint32_t max_draw_count;
|
||||
uint32_t instance_multiplier;
|
||||
uint32_t indirect_data_stride;
|
||||
uint32_t end_addr_ldw;
|
||||
uint32_t end_addr_udw;
|
||||
uint64_t end_addr;
|
||||
};
|
||||
|
||||
struct anv_generated_indirect_params {
|
||||
|
|
|
|||
|
|
@ -450,8 +450,7 @@ genX(cmd_buffer_rewrite_forward_end_addr)(struct anv_cmd_buffer *cmd_buffer,
|
|||
uint64_t end_addr =
|
||||
anv_address_physical(anv_batch_current_address(&cmd_buffer->batch));
|
||||
while (params != NULL) {
|
||||
params->draw.end_addr_ldw = end_addr & 0xffffffff;
|
||||
params->draw.end_addr_udw = end_addr >> 32;
|
||||
params->draw.end_addr = end_addr;
|
||||
params = params->prev;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#version 450
|
||||
#extension GL_ARB_gpu_shader_int64 : enable
|
||||
|
||||
#define BITFIELD_BIT(i) (1u << (i))
|
||||
|
||||
|
|
@ -46,8 +47,7 @@ layout(set = 0, binding = 2) uniform block {
|
|||
uint max_draw_count;
|
||||
uint instance_multiplier;
|
||||
uint indirect_data_stride;
|
||||
uint end_addr_ldw;
|
||||
uint end_addr_udw;
|
||||
uint64_t end_addr;
|
||||
};
|
||||
|
||||
void main()
|
||||
|
|
@ -115,7 +115,7 @@ void main()
|
|||
49 << 23 | /* MI Command Opcode */
|
||||
1 << 8 | /* Address Space Indicator (PPGTT) */
|
||||
1 << 0); /* DWord Length */
|
||||
commands[cmd_idx + 1] = end_addr_ldw;
|
||||
commands[cmd_idx + 2] = end_addr_udw;
|
||||
commands[cmd_idx + 1] = uint(end_addr & 0xffffffff);
|
||||
commands[cmd_idx + 2] = uint(end_addr >> 32);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue