mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-15 19:40:30 +01:00
dzn, driconf: Add a driconf entry for NMS to claim wide line support
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20959>
This commit is contained in:
parent
df0054e523
commit
237e12c2df
5 changed files with 38 additions and 2 deletions
|
|
@ -39,6 +39,8 @@
|
|||
#include "util/mesa-sha1.h"
|
||||
#include "util/u_dl.h"
|
||||
|
||||
#include "util/driconf.h"
|
||||
|
||||
#include "glsl_types.h"
|
||||
|
||||
#include "dxil_validator.h"
|
||||
|
|
@ -1115,6 +1117,22 @@ dzn_enumerate_physical_devices(struct vk_instance *instance)
|
|||
return result;
|
||||
}
|
||||
|
||||
static const driOptionDescription dzn_dri_options[] = {
|
||||
DRI_CONF_SECTION_DEBUG
|
||||
DRI_CONF_DZN_CLAIM_WIDE_LINES(false)
|
||||
DRI_CONF_SECTION_END
|
||||
};
|
||||
|
||||
static void
|
||||
dzn_init_dri_config(struct dzn_instance *instance)
|
||||
{
|
||||
driParseOptionInfo(&instance->available_dri_options, dzn_dri_options,
|
||||
ARRAY_SIZE(dzn_dri_options));
|
||||
driParseConfigFiles(&instance->dri_options, &instance->available_dri_options, 0, "dzn", NULL, NULL,
|
||||
instance->vk.app_info.app_name, instance->vk.app_info.app_version,
|
||||
instance->vk.app_info.engine_name, instance->vk.app_info.engine_version);
|
||||
}
|
||||
|
||||
static VkResult
|
||||
dzn_instance_create(const VkInstanceCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator,
|
||||
|
|
@ -1198,6 +1216,7 @@ dzn_instance_create(const VkInstanceCreateInfo *pCreateInfo,
|
|||
d3d12_enable_gpu_validation(instance->d3d12_mod, instance->factory);
|
||||
|
||||
instance->sync_binary_type = vk_sync_binary_get_type(&dzn_sync_type);
|
||||
dzn_init_dri_config(instance);
|
||||
|
||||
*out = dzn_instance_to_handle(instance);
|
||||
return VK_SUCCESS;
|
||||
|
|
@ -1275,6 +1294,7 @@ dzn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
VkPhysicalDeviceFeatures2 *pFeatures)
|
||||
{
|
||||
VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice);
|
||||
struct dzn_instance *instance = container_of(pdev->vk.instance, struct dzn_instance, vk);
|
||||
|
||||
pFeatures->features = (VkPhysicalDeviceFeatures) {
|
||||
.robustBufferAccess = true, /* This feature is mandatory */
|
||||
|
|
@ -1292,7 +1312,7 @@ dzn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
.depthBiasClamp = true,
|
||||
.fillModeNonSolid = false,
|
||||
.depthBounds = dzn_physical_device_supports_depth_bounds(pdev),
|
||||
.wideLines = false,
|
||||
.wideLines = driQueryOptionb(&instance->dri_options, "dzn_claim_wide_lines"),
|
||||
.largePoints = false,
|
||||
.alphaToOne = false,
|
||||
.multiViewport = false,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#include "util/hash_table.h"
|
||||
#include "util/u_dynarray.h"
|
||||
#include "util/log.h"
|
||||
#include "util/xmlconfig.h"
|
||||
|
||||
#include "shader_enums.h"
|
||||
|
||||
|
|
@ -1127,6 +1128,9 @@ struct dzn_instance {
|
|||
uint32_t debug_flags;
|
||||
|
||||
struct vk_sync_binary_type sync_binary_type;
|
||||
|
||||
struct driOptionCache dri_options;
|
||||
struct driOptionCache available_dri_options;
|
||||
};
|
||||
|
||||
struct dzn_event {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ libvulkan_dzn = shared_library(
|
|||
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux,
|
||||
inc_compiler, inc_util
|
||||
],
|
||||
dependencies : [dzn_deps, idep_vulkan_wsi],
|
||||
dependencies : [dzn_deps, idep_vulkan_wsi, idep_xmlconfig],
|
||||
c_args : dzn_flags,
|
||||
cpp_args : dzn_cpp_flags,
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
|
|
|
|||
|
|
@ -1000,6 +1000,11 @@ TODO: document the other workarounds.
|
|||
<option name="anv_sample_mask_out_opengl_behaviour" value="true"/>
|
||||
</application>
|
||||
</device>
|
||||
<device driver="dzn">
|
||||
<application name="No Man's Sky" executable="NMS.exe">
|
||||
<option name="dzn_claim_wide_lines" value="true" />
|
||||
</application>
|
||||
</device>
|
||||
|
||||
<device driver="r600">
|
||||
<application name="Tomb Raider 2013" executable="TombRaider">
|
||||
|
|
|
|||
|
|
@ -637,4 +637,11 @@
|
|||
DRI_CONF_OPT_I(generated_indirect_threshold, def, 0, INT32_MAX, \
|
||||
"Indirect threshold count above which we start generating commands")
|
||||
|
||||
/**
|
||||
* \brief DZN specific configuration options
|
||||
*/
|
||||
|
||||
#define DRI_CONF_DZN_CLAIM_WIDE_LINES(def) \
|
||||
DRI_CONF_OPT_B(dzn_claim_wide_lines, def, "Claim wide line support")
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue