anv: override vendorID for Cyberpunk 2077
A recent update to Cyberpunk 2077 enables XeSS code for Intel GPUs which is causing the game to crash in the XeSS libraries. As a temporary work around, stop identifying as Intel for Cyberpunk so XeSS falls back to the cross-vendor path. References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8860 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23271>
This commit is contained in:
committed by
Kenneth Graunke
parent
96c33fb027
commit
5731ebac40
@@ -85,6 +85,7 @@ static const driOptionDescription anv_dri_options[] = {
|
||||
DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(false)
|
||||
DRI_CONF_LIMIT_TRIG_INPUT_RANGE(false)
|
||||
DRI_CONF_ANV_MESH_CONV_PRIM_ATTRS_TO_VERT_ATTRS(-2)
|
||||
DRI_CONF_FORCE_VK_VENDOR(0)
|
||||
DRI_CONF_SECTION_END
|
||||
|
||||
DRI_CONF_SECTION_QUALITY
|
||||
@@ -1500,6 +1501,8 @@ anv_init_dri_options(struct anv_instance *instance)
|
||||
driQueryOptioni(&instance->dri_options, "generated_indirect_threshold");
|
||||
instance->query_clear_with_blorp_threshold =
|
||||
driQueryOptioni(&instance->dri_options, "query_clear_with_blorp_threshold");
|
||||
instance->force_vk_vendor =
|
||||
driQueryOptioni(&instance->dri_options, "force_vk_vendor");
|
||||
}
|
||||
|
||||
VkResult anv_CreateInstance(
|
||||
@@ -1749,6 +1752,8 @@ void anv_GetPhysicalDeviceProperties(
|
||||
.sparseProperties = {0}, /* Broadwell doesn't do sparse. */
|
||||
};
|
||||
|
||||
if (unlikely(pdevice->instance->force_vk_vendor))
|
||||
pProperties->vendorID = pdevice->instance->force_vk_vendor;
|
||||
snprintf(pProperties->deviceName, sizeof(pProperties->deviceName),
|
||||
"%s", pdevice->info.name);
|
||||
memcpy(pProperties->pipelineCacheUUID,
|
||||
|
||||
@@ -1037,6 +1037,7 @@ struct anv_instance {
|
||||
float lower_depth_range_rate;
|
||||
unsigned generated_indirect_threshold;
|
||||
unsigned query_clear_with_blorp_threshold;
|
||||
unsigned force_vk_vendor;
|
||||
|
||||
/* HW workarounds */
|
||||
bool no_16bit;
|
||||
|
||||
@@ -1056,6 +1056,9 @@ TODO: document the other workarounds.
|
||||
<application name="NieR:Automata" executable="NieRAutomata.exe">
|
||||
<option name="limit_trig_input_range" value="true" />
|
||||
</application>
|
||||
<application name="Cyberpunk 2077" executable="Cyberpunk2077.exe">
|
||||
<option name="force_vk_vendor" value="-1" />
|
||||
</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
|
||||
|
||||
@@ -310,6 +310,9 @@
|
||||
DRI_CONF_OPT_B(ignore_discard_framebuffer, def, \
|
||||
"Ignore glDiscardFramebuffer/glInvalidateFramebuffer, workaround for games that use it incorrectly")
|
||||
|
||||
#define DRI_CONF_FORCE_VK_VENDOR(def) \
|
||||
DRI_CONF_OPT_I(force_vk_vendor, 0, -1, 2147483647, "Override GPU vendor id")
|
||||
|
||||
/**
|
||||
* \brief Image quality-related options
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user