DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(false)
DRI_CONF_ANV_FP64_WORKAROUND_ENABLED(false)
DRI_CONF_ANV_GENERATED_INDIRECT_THRESHOLD(4)
+ DRI_CONF_NO_16BIT(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
*ext = (struct vk_device_extension_table) {
.KHR_8bit_storage = true,
- .KHR_16bit_storage = true,
+ .KHR_16bit_storage = !device->instance->no_16bit,
.KHR_acceleration_structure = rt_enabled,
.KHR_bind_memory2 = true,
.KHR_buffer_device_address = true,
.KHR_shader_atomic_int64 = true,
.KHR_shader_clock = true,
.KHR_shader_draw_parameters = true,
- .KHR_shader_float16_int8 = true,
+ .KHR_shader_float16_int8 = !device->instance->no_16bit,
.KHR_shader_float_controls = true,
.KHR_shader_integer_dot_product = true,
.KHR_shader_non_semantic_info = true,
driQueryOptionb(&instance->dri_options, "anv_sample_mask_out_opengl_behaviour");
instance->lower_depth_range_rate =
driQueryOptionf(&instance->dri_options, "lower_depth_range_rate");
+ instance->no_16bit =
+ driQueryOptionb(&instance->dri_options, "no_16bit");
+
instance->fp64_workaround_enabled =
driQueryOptionb(&instance->dri_options, "fp64_workaround_enabled");
instance->generated_indirect_threshold =
{
assert(f->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES);
- f->storageBuffer16BitAccess = true;
- f->uniformAndStorageBuffer16BitAccess = true;
+ f->storageBuffer16BitAccess = !pdevice->instance->no_16bit;
+ f->uniformAndStorageBuffer16BitAccess = !pdevice->instance->no_16bit;
f->storagePushConstant16 = true;
f->storageInputOutput16 = false;
f->multiview = true;
f->storagePushConstant8 = true;
f->shaderBufferInt64Atomics = true;
f->shaderSharedInt64Atomics = false;
- f->shaderFloat16 = true;
- f->shaderInt8 = true;
+ f->shaderFloat16 = !pdevice->instance->no_16bit;
+ f->shaderInt8 = !pdevice->instance->no_16bit;
f->descriptorIndexing = true;
f->shaderInputAttachmentArrayDynamicIndexing = false;
bool fp64_workaround_enabled;
float lower_depth_range_rate;
unsigned generated_indirect_threshold;
+
+ /* HW workarounds */
+ bool no_16bit;
};
VkResult anv_init_wsi(struct anv_physical_device *physical_device);
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS(false)
DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(false)
+ DRI_CONF_NO_16BIT(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
*ext = (struct vk_device_extension_table) {
.KHR_8bit_storage = device->info.ver >= 8,
- .KHR_16bit_storage = device->info.ver >= 8,
+ .KHR_16bit_storage = device->info.ver >= 8 && !device->instance->no_16bit,
.KHR_bind_memory2 = true,
.KHR_buffer_device_address = device->has_a64_buffer_access,
.KHR_copy_commands2 = true,
.KHR_separate_depth_stencil_layouts = true,
.KHR_shader_clock = true,
.KHR_shader_draw_parameters = true,
- .KHR_shader_float16_int8 = device->info.ver >= 8,
+ .KHR_shader_float16_int8 = device->info.ver >= 8 && !device->instance->no_16bit,
.KHR_shader_float_controls = true,
.KHR_shader_integer_dot_product = true,
.KHR_shader_non_semantic_info = true,
driQueryOptionb(&instance->dri_options, "anv_sample_mask_out_opengl_behaviour");
instance->lower_depth_range_rate =
driQueryOptionf(&instance->dri_options, "lower_depth_range_rate");
+ instance->no_16bit =
+ driQueryOptionb(&instance->dri_options, "no_16bit");
}
VkResult anv_CreateInstance(
{
assert(f->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES);
- f->storageBuffer16BitAccess = pdevice->info.ver >= 8;
- f->uniformAndStorageBuffer16BitAccess = pdevice->info.ver >= 8;
+ f->storageBuffer16BitAccess = pdevice->info.ver >= 8 && !pdevice->instance->no_16bit;
+ f->uniformAndStorageBuffer16BitAccess = pdevice->info.ver >= 8 && !pdevice->instance->no_16bit;
f->storagePushConstant16 = pdevice->info.ver >= 8;
f->storageInputOutput16 = false;
f->multiview = true;
f->storagePushConstant8 = pdevice->info.ver >= 8;
f->shaderBufferInt64Atomics = false;
f->shaderSharedInt64Atomics = false;
- f->shaderFloat16 = pdevice->info.ver >= 8;
- f->shaderInt8 = pdevice->info.ver >= 8;
+ f->shaderFloat16 = pdevice->info.ver >= 8 && !pdevice->instance->no_16bit;
+ f->shaderInt8 = pdevice->info.ver >= 8 && !pdevice->instance->no_16bit;
f->descriptorIndexing = false;
f->shaderInputAttachmentArrayDynamicIndexing = false;
bool limit_trig_input_range;
bool sample_mask_out_opengl_behaviour;
float lower_depth_range_rate;
+
+ /* HW workarounds */
+ bool no_16bit;
};
VkResult anv_init_wsi(struct anv_physical_device *physical_device);
<application name="Rise of the Tomb Raider" executable="ROTTR.exe">
<option name="limit_trig_input_range" value="true" />
</application>
+ <!--
+ Disable 16-bit feature on zink and angle so that GLES mediump doesn't
+ lower to our inefficent 16-bit shader support. No need to do so for
+ ANGLE, since it uses RelaxedPrecision decorations, which the intel
+ compiler ignores.
+ -->
+ <engine engine_name_match="mesa zink">
+ <option name="no_16bit" value="true" />
+ </engine>
</device>
<device driver="dzn">
<application name="No Man's Sky" executable="NMS.exe">
DRI_CONF_OPT_B(limit_trig_input_range, def, \
"Limit trig input range to [-2p : 2p] to improve sin/cos calculation precision on Intel")
+#define DRI_CONF_NO_16BIT(def) \
+ DRI_CONF_OPT_B(no_16bit, def, \
+ "Disable 16-bit instructions")
+
/**
* \brief Image quality-related options
*/