Unverified Commit 281b21b1 authored by Joshua Ashton's avatar Joshua Ashton 🐸
Browse files

RADV VEGA RT: Implement radv_rt_bind_tables for older hardware

parent 35bbe2b2
......@@ -6082,16 +6082,21 @@ radv_rt_bind_tables(struct radv_cmd_buffer *cmd_buffer,
if (!radv_cmd_buffer_upload_alloc(cmd_buffer, 64, &offset, &ptr))
return false;
/* For the descriptor format. */
assert(cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10);
desc_ptr = ptr;
for (unsigned i = 0; i < 4; ++i, desc_ptr += 4) {
uint32_t rsrc_word3 =
S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) | S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) |
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W) |
S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_UINT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_STRUCTURED) | S_008F0C_RESOURCE_LEVEL(1);
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10) {
rsrc_word3 |=
S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_UINT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_STRUCTURED) | S_008F0C_RESOURCE_LEVEL(1);
} else {
rsrc_word3 |=
S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_UINT) |
S_008F0C_DATA_FORMAT(V_008F0C_BUF_DATA_FORMAT_32);
}
desc_ptr[0] = tables[i].deviceAddress;
desc_ptr[1] = S_008F04_BASE_ADDRESS_HI(tables[i].deviceAddress >> 32) |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment