ir3: Fix LDC offset units
I had missed that LDC actually uses vec4 units for its offset. This means that we have to create a new instruction, and lower it in ir3_nir_lower_io_offsets, similar to the existing SSBO instructions. Unfortunately we can't assume that loads are always vec4-aligned, so we have to use the alignment information that NIR gives us. Unfortunately, it's currently woefully inadequate, and will have to be fixed to give us good codegen in the future. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4568>
This commit is contained in:
@@ -802,6 +802,12 @@ intrinsic("ssbo_atomic_xor_ir3", src_comp=[1, 1, 1, 1], dest_comp=1)
|
||||
intrinsic("ssbo_atomic_exchange_ir3", src_comp=[1, 1, 1, 1], dest_comp=1)
|
||||
intrinsic("ssbo_atomic_comp_swap_ir3", src_comp=[1, 1, 1, 1, 1], dest_comp=1)
|
||||
|
||||
# IR3-specific instruction for UBO loads using the ldc instruction. The second
|
||||
# source is the indirect offset, in units of four dwords. The base is a
|
||||
# component offset, in dword units.
|
||||
intrinsic("load_ubo_ir3", src_comp=[1, 1], bit_sizes=[32], dest_comp=0, indices=[BASE],
|
||||
flags=[CAN_REORDER, CAN_ELIMINATE])
|
||||
|
||||
# System values for freedreno geometry shaders.
|
||||
system_value("vs_primitive_stride_ir3", 1)
|
||||
system_value("vs_vertex_stride_ir3", 1)
|
||||
|
Reference in New Issue
Block a user