nir: add image_min_lod_agx
for EXT_image_view_min_lod emulation. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
This commit is contained in:
committed by
Marge Bot
parent
4fc856af98
commit
c5de33e48e
@@ -3167,6 +3167,7 @@ nir_tex_instr_need_sampler(const nir_tex_instr *instr)
|
||||
case nir_texop_texture_samples:
|
||||
case nir_texop_samples_identical:
|
||||
case nir_texop_descriptor_amd:
|
||||
case nir_texop_image_min_lod_agx:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
@@ -3212,6 +3213,7 @@ nir_tex_instr_result_size(const nir_tex_instr *instr)
|
||||
case nir_texop_samples_identical:
|
||||
case nir_texop_fragment_mask_fetch_amd:
|
||||
case nir_texop_lod_bias_agx:
|
||||
case nir_texop_image_min_lod_agx:
|
||||
case nir_texop_has_custom_border_color_agx:
|
||||
return 1;
|
||||
|
||||
@@ -3247,6 +3249,7 @@ nir_tex_instr_is_query(const nir_tex_instr *instr)
|
||||
case nir_texop_descriptor_amd:
|
||||
case nir_texop_sampler_descriptor_amd:
|
||||
case nir_texop_lod_bias_agx:
|
||||
case nir_texop_image_min_lod_agx:
|
||||
case nir_texop_custom_border_color_agx:
|
||||
case nir_texop_has_custom_border_color_agx:
|
||||
case nir_texop_hdr_dim_nv:
|
||||
|
||||
@@ -2376,6 +2376,8 @@ typedef enum nir_texop {
|
||||
nir_texop_sampler_descriptor_amd,
|
||||
/** Returns the sampler's LOD bias */
|
||||
nir_texop_lod_bias_agx,
|
||||
/** Returns the image view's min LOD */
|
||||
nir_texop_image_min_lod_agx,
|
||||
/** Returns a bool indicating that the sampler uses a custom border colour */
|
||||
nir_texop_has_custom_border_color_agx,
|
||||
/** Returns the sampler's custom border colour (if has_custom_border_agx) */
|
||||
|
||||
@@ -1772,6 +1772,9 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
|
||||
case nir_texop_lod_bias_agx:
|
||||
fprintf(fp, "lod_bias_agx ");
|
||||
break;
|
||||
case nir_texop_image_min_lod_agx:
|
||||
fprintf(fp, "image_min_lod_agx ");
|
||||
break;
|
||||
case nir_texop_has_custom_border_color_agx:
|
||||
fprintf(fp, "has_custom_border_color_agx ");
|
||||
break;
|
||||
|
||||
@@ -828,6 +828,10 @@ validate_tex_src_texture_deref(nir_tex_instr *instr, validate_state *state,
|
||||
case nir_texop_lod_bias_agx:
|
||||
validate_assert(state, nir_alu_type_get_base_type(instr->dest_type) == nir_type_float);
|
||||
break;
|
||||
case nir_texop_image_min_lod_agx:
|
||||
validate_assert(state, instr->dest_type == nir_type_float16 ||
|
||||
instr->dest_type == nir_type_uint16);
|
||||
break;
|
||||
case nir_texop_samples_identical:
|
||||
case nir_texop_has_custom_border_color_agx:
|
||||
validate_assert(state, nir_alu_type_get_base_type(instr->dest_type) == nir_type_bool);
|
||||
|
||||
@@ -3322,6 +3322,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
||||
vtn_fail("unexpected nir_texop_*descriptor_amd");
|
||||
break;
|
||||
case nir_texop_lod_bias_agx:
|
||||
case nir_texop_image_min_lod_agx:
|
||||
case nir_texop_custom_border_color_agx:
|
||||
case nir_texop_has_custom_border_color_agx:
|
||||
vtn_fail("unexpected nir_texop_*_agx");
|
||||
|
||||
Reference in New Issue
Block a user