(aco_descriptor_type)(ACO_DESC_PLANE_0 + plane), instr, false);
} else if (instr->sampler_dim == GLSL_SAMPLER_DIM_BUF) {
*res_ptr = get_sampler_desc(ctx, texture_deref_instr, ACO_DESC_BUFFER, instr, false);
- } else if (instr->op == nir_texop_fragment_mask_fetch) {
+ } else if (instr->op == nir_texop_fragment_mask_fetch_amd) {
*res_ptr = get_sampler_desc(ctx, texture_deref_instr, ACO_DESC_FMASK, instr, false);
} else {
*res_ptr = get_sampler_desc(ctx, texture_deref_instr, ACO_DESC_IMAGE, instr, false);
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS ||
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS) &&
instr->is_array && instr->op != nir_texop_txf && instr->op != nir_texop_txf_ms &&
- instr->op != nir_texop_fragment_fetch && instr->op != nir_texop_fragment_mask_fetch)
+ instr->op != nir_texop_fragment_fetch_amd && instr->op != nir_texop_fragment_mask_fetch_amd)
coords[2] = bld.vop1(aco_opcode::v_rndne_f32, bld.def(v1), coords[2]);
if (ctx->options->chip_class == GFX9 && instr->sampler_dim == GLSL_SAMPLER_DIM_1D &&
else if ((instr->sampler_dim == GLSL_SAMPLER_DIM_MS ||
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS) &&
- instr->op != nir_texop_txs && instr->op != nir_texop_fragment_fetch &&
- instr->op != nir_texop_fragment_mask_fetch) {
+ instr->op != nir_texop_txs && instr->op != nir_texop_fragment_fetch_amd &&
+ instr->op != nir_texop_fragment_mask_fetch_amd) {
assert(has_sample_index);
Operand op(sample_index);
if (sample_index_cv)
args.emplace_back(clamped_lod);
if (instr->op == nir_texop_txf || instr->op == nir_texop_txf_ms ||
- instr->op == nir_texop_samples_identical || instr->op == nir_texop_fragment_fetch ||
- instr->op == nir_texop_fragment_mask_fetch) {
+ instr->op == nir_texop_samples_identical || instr->op == nir_texop_fragment_fetch_amd ||
+ instr->op == nir_texop_fragment_mask_fetch_amd) {
aco_opcode op = level_zero || instr->sampler_dim == GLSL_SAMPLER_DIM_MS ||
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS
? aco_opcode::image_load
case nir_texop_lod:
args->opcode = ac_image_get_lod;
break;
- case nir_texop_fragment_fetch:
- case nir_texop_fragment_mask_fetch:
+ case nir_texop_fragment_fetch_amd:
+ case nir_texop_fragment_mask_fetch_amd:
args->opcode = ac_image_load;
args->level_zero = false;
break;
main_descriptor = AC_DESC_PLANE_0 + plane;
}
- if (instr->op == nir_texop_fragment_mask_fetch) {
+ if (instr->op == nir_texop_fragment_mask_fetch_amd) {
/* The fragment mask is fetched from the compressed
* multisampled surface.
*/
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS ||
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS) &&
instr->is_array && instr->op != nir_texop_txf && instr->op != nir_texop_txf_ms &&
- instr->op != nir_texop_fragment_fetch && instr->op != nir_texop_fragment_mask_fetch) {
+ instr->op != nir_texop_fragment_fetch_amd && instr->op != nir_texop_fragment_mask_fetch_amd) {
args.coords[2] = apply_round_slice(&ctx->ac, args.coords[2]);
}
}
/* Pack sample index */
- if (sample_index && (instr->op == nir_texop_txf_ms || instr->op == nir_texop_fragment_fetch))
+ if (sample_index && (instr->op == nir_texop_txf_ms || instr->op == nir_texop_fragment_fetch_amd))
args.coords[instr->coord_components] = sample_index;
if (instr->op == nir_texop_samples_identical) {
if ((instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS ||
instr->sampler_dim == GLSL_SAMPLER_DIM_MS) &&
- instr->op != nir_texop_txs && instr->op != nir_texop_fragment_fetch &&
- instr->op != nir_texop_fragment_mask_fetch) {
+ instr->op != nir_texop_txs && instr->op != nir_texop_fragment_fetch_amd &&
+ instr->op != nir_texop_fragment_mask_fetch_amd) {
unsigned sample_chan = instr->is_array ? 3 : 2;
args.coords[sample_chan] = adjust_sample_index_using_fmask(
&ctx->ac, args.coords[0], args.coords[1], instr->is_array ? args.coords[2] : NULL,
* multisampled images and (x,y,layer) for 2D multisampled layered
* images or for multisampled input attachments.
*/
- if (instr->op == nir_texop_fragment_mask_fetch) {
+ if (instr->op == nir_texop_fragment_mask_fetch_amd) {
if (args.dim == ac_image_2dmsaa) {
args.dim = ac_image_2d;
} else {
* identical.
*/
nir_texop_tex_prefetch, /**< Regular texture look-up, eligible for pre-dispatch */
- nir_texop_fragment_fetch, /**< Multisample fragment color texture fetch */
- nir_texop_fragment_mask_fetch,/**< Multisample fragment mask texture fetch */
+ nir_texop_fragment_fetch_amd, /**< Multisample fragment color texture fetch */
+ nir_texop_fragment_mask_fetch_amd, /**< Multisample fragment mask texture fetch */
} nir_texop;
/** Represents a texture instruction */
case nir_texop_texture_samples:
case nir_texop_query_levels:
case nir_texop_samples_identical:
- case nir_texop_fragment_mask_fetch:
+ case nir_texop_fragment_mask_fetch_amd:
return 1;
default:
case nir_instr_type_tex: {
nir_tex_instr *tex = nir_instr_as_tex(instr);
- if (tex->op == nir_texop_fragment_mask_fetch ||
- tex->op == nir_texop_fragment_fetch) {
+ if (tex->op == nir_texop_fragment_mask_fetch_amd ||
+ tex->op == nir_texop_fragment_fetch_amd) {
progress |= try_lower_input_texop(function->impl, tex,
options);
}
case nir_texop_tex_prefetch:
fprintf(fp, "tex (pre-dispatchable) ");
break;
- case nir_texop_fragment_fetch:
- fprintf(fp, "fragment_fetch ");
+ case nir_texop_fragment_fetch_amd:
+ fprintf(fp, "fragment_fetch_amd ");
break;
- case nir_texop_fragment_mask_fetch:
- fprintf(fp, "fragment_mask_fetch ");
+ case nir_texop_fragment_mask_fetch_amd:
+ fprintf(fp, "fragment_mask_fetch_amd ");
break;
default:
unreachable("Invalid texture operation");
break;
case SpvOpFragmentFetchAMD:
- texop = nir_texop_fragment_fetch;
+ texop = nir_texop_fragment_fetch_amd;
break;
case SpvOpFragmentMaskFetchAMD:
- texop = nir_texop_fragment_mask_fetch;
+ texop = nir_texop_fragment_mask_fetch_amd;
dest_type = nir_type_uint32;
break;
case nir_texop_query_levels:
case nir_texop_texture_samples:
case nir_texop_samples_identical:
- case nir_texop_fragment_fetch:
- case nir_texop_fragment_mask_fetch:
+ case nir_texop_fragment_fetch_amd:
+ case nir_texop_fragment_mask_fetch_amd:
/* These don't */
break;
case nir_texop_txf_ms_fb: