diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 6f2d991e2d6..4a63d3784a1 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -3509,6 +3509,9 @@ nir_tex_instr_result_size(const nir_tex_instr *instr) case nir_texop_sample_pos_nv: return 4; + case nir_texop_gradient_pan: + return 2; + case nir_texop_custom_border_color_agx: return 4; @@ -3562,6 +3565,7 @@ nir_tex_instr_is_query(const nir_tex_instr *instr) case nir_texop_samples_identical: case nir_texop_fragment_mask_fetch_amd: case nir_texop_fragment_fetch_amd: + case nir_texop_gradient_pan: case nir_texop_sample_weighted_qcom: case nir_texop_box_filter_qcom: case nir_texop_block_match_sad_qcom: diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index cfa9a6e8a73..ad5f561394f 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2536,6 +2536,8 @@ typedef enum nir_texop { nir_texop_tex_type_nv, /** Maps to TXQ.SAMPLER_POS */ nir_texop_sample_pos_nv, + /** Maps to TEX_GRADIENT */ + nir_texop_gradient_pan, /** * Returns the weighted average of a region of texels in the texture, using * the filter kernel sampled from ref_texture. (VK_QCOM_image_processing) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 82e20391435..38446388b8f 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -1990,6 +1990,9 @@ print_tex_instr(nir_tex_instr *instr, print_state *state) case nir_texop_sample_pos_nv: fprintf(fp, "sample_pos_nv "); break; + case nir_texop_gradient_pan: + fprintf(fp, "gradient_pan "); + break; case nir_texop_sample_weighted_qcom: fprintf(fp, "sample_weighted_qcom "); break; diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index b98ea222964..32f9e6cd5ec 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3807,6 +3807,9 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, case nir_texop_sample_pos_nv: vtn_fail("unexpected nir_texop_*_nv"); break; + case nir_texop_gradient_pan: + vtn_fail("unexpected nir_texop_*_pan"); + break; case nir_texop_resinfo_intel: case nir_texop_sparse_residency_intel: case nir_texop_sparse_residency_txf_intel: