summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-02-20 17:33:23 -0500
committerRob Clark <[email protected]>2019-02-20 18:50:08 -0500
commit323958908e5f98d7d9c7cee0797ad365adb4e19e (patch)
tree1791ecc310d726b3a17d8689725e89ff30ee01da /src/freedreno/ir3
parent50dd773a2d15570944d3955bb851b46ac345cdf4 (diff)
freedreno/a6xx: samplerBuffer fixes
Use the 'UNK31' bit (which should probably be called 'BUFFER') for samplerBuffer case, which increases the size of supported buffer texture beyond 2^15 elements. Also need to fix the 2nd coord injected to handle the tex instructions that take integer coords. Fixes dEQP-GLES31.functional.texture.texture_buffer.render.as_fragment_texture.buffer_size_131071 and similar Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3')
-rw-r--r--src/freedreno/ir3/ir3_compiler_nir.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 8599d910ad3..6fb899f611c 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -1573,9 +1573,18 @@ emit_tex(struct ir3_context *ctx, nir_tex_instr *tex)
if (coords == 1) {
/* hw doesn't do 1d, so we treat it as 2d with
* height of 1, and patch up the y coord.
- * TODO: y coord should be (int)0 in some cases..
*/
- src0[nsrc0++] = create_immed(b, fui(0.5));
+ switch (opc) {
+ case OPC_ISAM:
+ case OPC_ISAML:
+ case OPC_ISAMM:
+ /* These instructions expect integer coord: */
+ src0[nsrc0++] = create_immed(b, 0);
+ break;
+ default:
+ src0[nsrc0++] = create_immed(b, fui(0.5));
+ break;
+ }
}
if (tex->is_shadow && tex->op != nir_texop_lod)