Provides pointer to implicit kernel arguments (after explicit arguments).
R600 version of D20297
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hi,
this is still an RFC patch, because although it works (passes global_offset piglit with suitably adapted libclc).
It fails with dynamic offsets:
kernel void local_id(volatile global int *out, int j) { __attribute__((address_space(7))) uint * ptr = __builtin_r600_implicitarg_ptr(); out[0] = ptr[j]; }
only works if j == 0 (otherwise returns 0 or garbage). Note that changing the last line to
out[0] = ptr[j+1]
works OK.
The generated assembly looks OK:
ALU 1, @8, KC0[CB0:0-32], KC1[] TEX 0 @6 ALU 1, @10, KC0[CB0:0-32], KC1[] MEM_RAT_CACHELESS STORE_RAW T0.X, T1.X, 1 CF_END PAD Fetch clause starting at 6: VTX_READ_32 T0.X, T0.X, 44 ALU clause starting at 8: LSHL * T0.X, KC0[2].Z, literal.x, 2(2.802597e-45), 0(0.000000e+00) ALU clause starting at 10: LSHR * T1.X, KC0[2].Y, literal.x, 2(2.802597e-45), 0(0.000000e+00)
is there any interaction between constant and vertex buffer that needs to be handled? (i didn't find anything in the specs) or errata referring to this situation?
Comment Actions
The problems with dynamic indexing is caused by using the same ID for constant buffer (AS:8) and vtx fetches (AS:7). switching vtx fetches to use vtxid 3 fixes the problem