dest_type = nir_type_int;
break;
+ case SpvOpFragmentFetchAMD:
+ texop = nir_texop_fragment_fetch;
+ break;
+
+ case SpvOpFragmentMaskFetchAMD:
+ texop = nir_texop_fragment_mask_fetch;
+ break;
+
default:
vtn_fail_with_opcode("Unhandled opcode", opcode);
}
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:
/* These don't */
break;
case nir_texop_txf_ms_fb:
case SpvOpImageFetch:
case SpvOpImageGather:
case SpvOpImageDrefGather:
- case SpvOpImageQueryLod: {
+ case SpvOpImageQueryLod:
+ case SpvOpFragmentFetchAMD:
+ case SpvOpFragmentMaskFetchAMD: {
/* All these types have the coordinate as their first real argument */
switch (sampler_dim) {
case GLSL_SAMPLER_DIM_1D:
case GLSL_SAMPLER_DIM_2D:
case GLSL_SAMPLER_DIM_RECT:
case GLSL_SAMPLER_DIM_MS:
+ case GLSL_SAMPLER_DIM_SUBPASS_MS:
coord_components = 2;
break;
case GLSL_SAMPLER_DIM_3D:
if (opcode == SpvOpImageQuerySizeLod)
(*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_lod);
+ /* For OpFragmentFetchAMD, we always have a multisample index */
+ if (opcode == SpvOpFragmentFetchAMD)
+ (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_ms_index);
+
/* Now we need to handle some number of optional arguments */
struct vtn_value *gather_offsets = NULL;
if (idx < count) {
break;
}
+ case SpvOpFragmentMaskFetchAMD:
+ case SpvOpFragmentFetchAMD:
+ vtn_handle_texture(b, opcode, w, count);
+ break;
+
case SpvOpAtomicLoad:
case SpvOpAtomicExchange:
case SpvOpAtomicCompareExchange: