is_shadow && glsl_get_components(ret_type->type) == 1;
instr->component = gather_component;
+ /* If SpvCapabilityImageGatherBiasLodAMD is enabled, texture gather without an explicit LOD
+ * has an implicit one (instead of using level 0).
+ */
+ if (texop == nir_texop_tg4 && b->image_gather_bias_lod &&
+ !(operands & SpvImageOperandsLodMask)) {
+ instr->is_gather_implicit_lod = true;
+ }
+
/* The Vulkan spec says:
*
* "If an instruction loads from or stores to a resource (including
case SpvCapabilityImageGatherBiasLodAMD:
spv_check_supported(amd_image_gather_bias_lod, cap);
+ b->image_gather_bias_lod = true;
break;
case SpvCapabilityAtomicFloat16AddEXT:
struct vtn_value *entry_point;
struct vtn_value *workgroup_size_builtin;
bool variable_pointers;
+ bool image_gather_bias_lod;
uint32_t *interface_ids;
size_t interface_ids_count;