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)
lvl = 0;
so->texconst1 =
- A6XX_TEX_CONST_1_WIDTH(elements) |
- A6XX_TEX_CONST_1_HEIGHT(1);
+ A6XX_TEX_CONST_1_WIDTH(elements & MASK(15)) |
+ A6XX_TEX_CONST_1_HEIGHT(elements >> 15);
so->texconst2 =
- A6XX_TEX_CONST_2_FETCHSIZE(fd6_pipe2fetchsize(format)) |
- A6XX_TEX_CONST_2_PITCH(elements * rsc->cpp);
+ A6XX_TEX_CONST_2_UNK4 |
+ A6XX_TEX_CONST_2_UNK31;
so->offset = cso->u.buf.offset;
} else {
unsigned miplevels;
if (is_a3xx(screen)) return 16;
if (is_a4xx(screen)) return 32;
if (is_a5xx(screen)) return 32;
- if (is_a6xx(screen)) return 32;
+ if (is_a6xx(screen)) return 64;
return 0;
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
/* We could possibly emulate more by pretending 2d/rect textures and
if (is_a3xx(screen)) return 8192;
if (is_a4xx(screen)) return 16384;
if (is_a5xx(screen)) return 16384;
- if (is_a6xx(screen)) return 16384;
+ if (is_a6xx(screen)) return 1 << 27;
return 0;
case PIPE_CAP_TEXTURE_FLOAT_LINEAR: