#include "util/u_string.h"
#include "util/u_memory.h"
-#include "util/u_inlines.h"
+#include "util/u_math.h"
#include "ir3_compiler.h"
#include "ir3_shader.h"
(compiler->gpu_id < 500) &&
so->shader->stream_output.num_outputs > 0) {
so->constbase.tfbo = constoff;
- constoff += align(PIPE_MAX_SO_BUFFERS * ptrsz, 4) / 4;
+ constoff += align(IR3_MAX_SO_BUFFERS * ptrsz, 4) / 4;
}
so->constbase.immediate = constoff;
if (ncoords == 1)
coords[ncoords++] = create_immed(b, 0);
- sam = ir3_SAM(b, OPC_ISAM, type, TGSI_WRITEMASK_XYZW, flags,
+ sam = ir3_SAM(b, OPC_ISAM, type, 0b1111, flags,
tex_idx, tex_idx, create_collect(ctx, coords, ncoords), NULL);
sam->barrier_class = IR3_BARRIER_IMAGE_R;
unsigned flags, ncoords = get_image_coords(var, &flags);
lod = create_immed(b, 0);
- sam = ir3_SAM(b, OPC_GETSIZE, TYPE_U32, TGSI_WRITEMASK_XYZW, flags,
+ sam = ir3_SAM(b, OPC_GETSIZE, TYPE_U32, 0b1111, flags,
tex_idx, tex_idx, lod, NULL);
/* Array size actually ends up in .w rather than .z. This doesn't
struct ir3_instruction *col0 = create_collect(ctx, src0, nsrc0);
struct ir3_instruction *col1 = create_collect(ctx, src1, nsrc1);
- sam = ir3_SAM(b, opc, type, TGSI_WRITEMASK_XYZW, flags,
+ sam = ir3_SAM(b, opc, type, 0b1111, flags,
tex_idx, tex_idx, col0, col1);
if ((ctx->astc_srgb & (1 << tex_idx)) && !nir_tex_instr_is_query(tex)) {
/* we need to sample the alpha separately with a non-ASTC
* texture state:
*/
- sam = ir3_SAM(b, opc, type, TGSI_WRITEMASK_W, flags,
+ sam = ir3_SAM(b, opc, type, 0b1000, flags,
tex_idx, tex_idx, col0, col1);
array_insert(ctx->ir, ctx->ir->astc_srgb, sam);
dst = get_dst(ctx, &tex->dest, 1);
- sam = ir3_SAM(b, OPC_GETINFO, TYPE_U32, TGSI_WRITEMASK_Z, 0,
+ sam = ir3_SAM(b, OPC_GETINFO, TYPE_U32, 0b0100, 0,
tex->texture_index, tex->texture_index, NULL, NULL);
/* even though there is only one component, since it ends
lod = get_src(ctx, &tex->src[0].src)[0];
- sam = ir3_SAM(b, OPC_GETSIZE, TYPE_U32, TGSI_WRITEMASK_XYZW, flags,
+ sam = ir3_SAM(b, OPC_GETSIZE, TYPE_U32, 0b1111, flags,
tex->texture_index, tex->texture_index, lod, NULL);
split_dest(b, dst, sam, 0, 4);
&ctx->so->shader->stream_output;
struct ir3_block *orig_end_block, *stream_out_block, *new_end_block;
struct ir3_instruction *vtxcnt, *maxvtxcnt, *cond;
- struct ir3_instruction *bases[PIPE_MAX_SO_BUFFERS];
+ struct ir3_instruction *bases[IR3_MAX_SO_BUFFERS];
/* create vtxcnt input in input block at top of shader,
* so that it is seen as live over the entire duration
* generated for bases not used in following loop will be
* stripped out in the backend.
*/
- for (unsigned i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
+ for (unsigned i = 0; i < IR3_MAX_SO_BUFFERS; i++) {
unsigned stride = strmout->stride[i];
struct ir3_instruction *base, *off;