mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 13:00:21 +01:00
ir3: use OPC_GETBUF to get size of sampler buffers
The maximum value which OPC_GETSIZE could return for one dimension is 0x007ff0, however sampler buffer could be much bigger. Blob uses OPC_GETBUF for them. Fixes tests: dEQP-VK.memory.pipeline_barrier.transfer_dst_uniform_texel_buffer.1048576 Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9391>
This commit is contained in:
parent
8e6ed9948e
commit
2764cf8d32
2 changed files with 13 additions and 1 deletions
|
|
@ -2568,7 +2568,17 @@ emit_tex_txs(struct ir3_context *ctx, nir_tex_instr *tex)
|
|||
|
||||
lod = ir3_get_src(ctx, &tex->src[lod_idx].src)[0];
|
||||
|
||||
sam = emit_sam(ctx, OPC_GETSIZE, info, dst_type, 0b1111, lod, NULL);
|
||||
if (tex->sampler_dim != GLSL_SAMPLER_DIM_BUF) {
|
||||
sam = emit_sam(ctx, OPC_GETSIZE, info, dst_type, 0b1111, lod, NULL);
|
||||
} else {
|
||||
/*
|
||||
* The maximum value which OPC_GETSIZE could return for one dimension
|
||||
* is 0x007ff0, however sampler buffer could be much bigger.
|
||||
* Blob uses OPC_GETBUF for them.
|
||||
*/
|
||||
sam = emit_sam(ctx, OPC_GETBUF, info, dst_type, 0b1111, NULL, NULL);
|
||||
}
|
||||
|
||||
ir3_split_dest(b, dst, sam, 0, 4);
|
||||
|
||||
/* Array size actually ends up in .w rather than .z. This doesn't
|
||||
|
|
|
|||
|
|
@ -134,6 +134,8 @@ static const struct test {
|
|||
INSTR_6XX(a0c00f00_04400002, "sam (f16)(xyzw)hr0.x, hr0.y, s#2, t#2"),
|
||||
INSTR_6XX(a6c02f00_00000000, "rgetinfo (u16)(xyzw)hr0.x"),
|
||||
INSTR_6XX(a3482f08_c0000000, "getinfo.base0 (u16)(xyzw)hr2.x, t#0"),
|
||||
/* dEQP-GLES31.functional.texture.texture_buffer.render.as_fragment_texture.buffer_size_65536 */
|
||||
INSTR_5XX(a2c03102_00000000, "getbuf (u32)(x)r0.z, t#0"),
|
||||
|
||||
|
||||
/* cat6 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue