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:
committed by
Marge Bot
parent
383a3065b8
commit
839b01bd2d
@@ -96,6 +96,7 @@ static const driOptionDescription hk_dri_options[] = {
|
||||
DRI_CONF_SECTION_MISCELLANEOUS
|
||||
DRI_CONF_HK_DISABLE_RGBA4_BORDER_COLOR_WORKAROUND(false)
|
||||
DRI_CONF_HK_DISABLE_BORDER_EMULATION(false)
|
||||
DRI_CONF_HK_FAKE_MINMAX(false)
|
||||
DRI_CONF_SECTION_END
|
||||
};
|
||||
/* clang-format on */
|
||||
@@ -118,6 +119,9 @@ hk_init_dri_options(struct hk_instance *instance)
|
||||
|
||||
instance->no_border =
|
||||
driQueryOptionb(&instance->dri_options, "hk_disable_border_emulation");
|
||||
|
||||
instance->fake_minmax =
|
||||
driQueryOptionb(&instance->dri_options, "hk_fake_minmax");
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
|
||||
@@ -22,6 +22,7 @@ struct hk_instance {
|
||||
|
||||
bool workaround_rgba4;
|
||||
bool no_border;
|
||||
bool fake_minmax;
|
||||
};
|
||||
|
||||
VK_DEFINE_HANDLE_CASTS(hk_instance, vk.base, VkInstance,
|
||||
|
||||
@@ -212,7 +212,7 @@ hk_get_device_extensions(const struct hk_instance *instance,
|
||||
|
||||
static void
|
||||
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,
|
||||
struct vk_features *features)
|
||||
{
|
||||
@@ -331,7 +331,7 @@ hk_get_device_features(
|
||||
.descriptorBindingPartiallyBound = true,
|
||||
.descriptorBindingVariableDescriptorCount = true,
|
||||
.runtimeDescriptorArray = true,
|
||||
.samplerFilterMinmax = false,
|
||||
.samplerFilterMinmax = instance->fake_minmax,
|
||||
.scalarBlockLayout = true,
|
||||
.imagelessFramebuffer = true,
|
||||
.uniformBufferStandardLayout = true,
|
||||
@@ -838,7 +838,7 @@ hk_get_device_properties(const struct agx_device *dev,
|
||||
.maxDescriptorSetUpdateAfterBindSampledImages = HK_MAX_DESCRIPTORS,
|
||||
.maxDescriptorSetUpdateAfterBindStorageImages = HK_MAX_DESCRIPTORS,
|
||||
.maxDescriptorSetUpdateAfterBindInputAttachments = HK_MAX_DESCRIPTORS,
|
||||
.filterMinmaxSingleComponentFormats = false,
|
||||
.filterMinmaxSingleComponentFormats = instance->fake_minmax,
|
||||
.filterMinmaxImageComponentMapping = false,
|
||||
.maxTimelineSemaphoreValueDifference = UINT64_MAX,
|
||||
.framebufferIntegerColorSampleCounts = sample_counts,
|
||||
@@ -1188,7 +1188,7 @@ hk_create_drm_physical_device(struct vk_instance *_instance,
|
||||
hk_get_device_extensions(instance, &supported_extensions);
|
||||
|
||||
struct vk_features supported_features;
|
||||
hk_get_device_features(&pdev->dev, &supported_extensions,
|
||||
hk_get_device_features(&pdev->dev, instance, &supported_extensions,
|
||||
&supported_features);
|
||||
|
||||
struct vk_properties properties;
|
||||
|
||||
Reference in New Issue
Block a user