mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
hk: fake min/max filtering for proton
this gets us to fl12_0. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
This commit is contained in:
parent
383a3065b8
commit
839b01bd2d
5 changed files with 22 additions and 4 deletions
|
|
@ -96,6 +96,7 @@ static const driOptionDescription hk_dri_options[] = {
|
||||||
DRI_CONF_SECTION_MISCELLANEOUS
|
DRI_CONF_SECTION_MISCELLANEOUS
|
||||||
DRI_CONF_HK_DISABLE_RGBA4_BORDER_COLOR_WORKAROUND(false)
|
DRI_CONF_HK_DISABLE_RGBA4_BORDER_COLOR_WORKAROUND(false)
|
||||||
DRI_CONF_HK_DISABLE_BORDER_EMULATION(false)
|
DRI_CONF_HK_DISABLE_BORDER_EMULATION(false)
|
||||||
|
DRI_CONF_HK_FAKE_MINMAX(false)
|
||||||
DRI_CONF_SECTION_END
|
DRI_CONF_SECTION_END
|
||||||
};
|
};
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
@ -118,6 +119,9 @@ hk_init_dri_options(struct hk_instance *instance)
|
||||||
|
|
||||||
instance->no_border =
|
instance->no_border =
|
||||||
driQueryOptionb(&instance->dri_options, "hk_disable_border_emulation");
|
driQueryOptionb(&instance->dri_options, "hk_disable_border_emulation");
|
||||||
|
|
||||||
|
instance->fake_minmax =
|
||||||
|
driQueryOptionb(&instance->dri_options, "hk_fake_minmax");
|
||||||
}
|
}
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL
|
VKAPI_ATTR VkResult VKAPI_CALL
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ struct hk_instance {
|
||||||
|
|
||||||
bool workaround_rgba4;
|
bool workaround_rgba4;
|
||||||
bool no_border;
|
bool no_border;
|
||||||
|
bool fake_minmax;
|
||||||
};
|
};
|
||||||
|
|
||||||
VK_DEFINE_HANDLE_CASTS(hk_instance, vk.base, VkInstance,
|
VK_DEFINE_HANDLE_CASTS(hk_instance, vk.base, VkInstance,
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ hk_get_device_extensions(const struct hk_instance *instance,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hk_get_device_features(
|
hk_get_device_features(
|
||||||
const struct agx_device *dev,
|
const struct agx_device *dev, const struct hk_instance *instance,
|
||||||
const struct vk_device_extension_table *supported_extensions,
|
const struct vk_device_extension_table *supported_extensions,
|
||||||
struct vk_features *features)
|
struct vk_features *features)
|
||||||
{
|
{
|
||||||
|
|
@ -331,7 +331,7 @@ hk_get_device_features(
|
||||||
.descriptorBindingPartiallyBound = true,
|
.descriptorBindingPartiallyBound = true,
|
||||||
.descriptorBindingVariableDescriptorCount = true,
|
.descriptorBindingVariableDescriptorCount = true,
|
||||||
.runtimeDescriptorArray = true,
|
.runtimeDescriptorArray = true,
|
||||||
.samplerFilterMinmax = false,
|
.samplerFilterMinmax = instance->fake_minmax,
|
||||||
.scalarBlockLayout = true,
|
.scalarBlockLayout = true,
|
||||||
.imagelessFramebuffer = true,
|
.imagelessFramebuffer = true,
|
||||||
.uniformBufferStandardLayout = true,
|
.uniformBufferStandardLayout = true,
|
||||||
|
|
@ -838,7 +838,7 @@ hk_get_device_properties(const struct agx_device *dev,
|
||||||
.maxDescriptorSetUpdateAfterBindSampledImages = HK_MAX_DESCRIPTORS,
|
.maxDescriptorSetUpdateAfterBindSampledImages = HK_MAX_DESCRIPTORS,
|
||||||
.maxDescriptorSetUpdateAfterBindStorageImages = HK_MAX_DESCRIPTORS,
|
.maxDescriptorSetUpdateAfterBindStorageImages = HK_MAX_DESCRIPTORS,
|
||||||
.maxDescriptorSetUpdateAfterBindInputAttachments = HK_MAX_DESCRIPTORS,
|
.maxDescriptorSetUpdateAfterBindInputAttachments = HK_MAX_DESCRIPTORS,
|
||||||
.filterMinmaxSingleComponentFormats = false,
|
.filterMinmaxSingleComponentFormats = instance->fake_minmax,
|
||||||
.filterMinmaxImageComponentMapping = false,
|
.filterMinmaxImageComponentMapping = false,
|
||||||
.maxTimelineSemaphoreValueDifference = UINT64_MAX,
|
.maxTimelineSemaphoreValueDifference = UINT64_MAX,
|
||||||
.framebufferIntegerColorSampleCounts = sample_counts,
|
.framebufferIntegerColorSampleCounts = sample_counts,
|
||||||
|
|
@ -1188,7 +1188,7 @@ hk_create_drm_physical_device(struct vk_instance *_instance,
|
||||||
hk_get_device_extensions(instance, &supported_extensions);
|
hk_get_device_extensions(instance, &supported_extensions);
|
||||||
|
|
||||||
struct vk_features supported_features;
|
struct vk_features supported_features;
|
||||||
hk_get_device_features(&pdev->dev, &supported_extensions,
|
hk_get_device_features(&pdev->dev, instance, &supported_extensions,
|
||||||
&supported_features);
|
&supported_features);
|
||||||
|
|
||||||
struct vk_properties properties;
|
struct vk_properties properties;
|
||||||
|
|
|
||||||
|
|
@ -1489,5 +1489,14 @@ TODO: document the other workarounds.
|
||||||
<application name="Control (DX11)" executable="Control_DX11.exe">
|
<application name="Control (DX11)" executable="Control_DX11.exe">
|
||||||
<option name="hk_disable_border_emulation" value="true" />
|
<option name="hk_disable_border_emulation" value="true" />
|
||||||
</application>
|
</application>
|
||||||
|
<engine engine_name_match="DXVK|vkd3d">
|
||||||
|
<!--
|
||||||
|
Apple hardware lacks min/max filtering, but this is required for
|
||||||
|
FL12_0. Fortunately, this is an obscure feature and we support
|
||||||
|
the rest of FL12_0, so we prefer to fake support and fail D3D
|
||||||
|
conformance rather than be limited to FL11.
|
||||||
|
-->
|
||||||
|
<option name="hk_fake_minmax" value="true" />
|
||||||
|
</engine>
|
||||||
</device>
|
</device>
|
||||||
</driconf>
|
</driconf>
|
||||||
|
|
|
||||||
|
|
@ -641,6 +641,10 @@
|
||||||
DRI_CONF_OPT_B(hk_disable_rgba4_border_color_workaround, def, \
|
DRI_CONF_OPT_B(hk_disable_rgba4_border_color_workaround, def, \
|
||||||
"Use hardware opaque_black, breaking certain RGBA4 formats")
|
"Use hardware opaque_black, breaking certain RGBA4 formats")
|
||||||
|
|
||||||
|
#define DRI_CONF_HK_FAKE_MINMAX(def) \
|
||||||
|
DRI_CONF_OPT_B(hk_fake_minmax, def, \
|
||||||
|
"Fake support for min/max filtering")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief venus specific configuration options
|
* \brief venus specific configuration options
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue