vkd3d: Add workaround to disable occlusion query optimization.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
e99a2c9da7
commit
b8c96d9b30
|
@ -6845,8 +6845,11 @@ static inline bool d3d12_query_type_is_indexed(D3D12_QUERY_TYPE type)
|
|||
type <= D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3;
|
||||
}
|
||||
|
||||
static inline bool d3d12_query_type_is_inline(D3D12_QUERY_TYPE type)
|
||||
static inline bool d3d12_query_type_is_inline(struct d3d12_device *device, D3D12_QUERY_TYPE type)
|
||||
{
|
||||
if (device->vkd3d_instance->config_flags & VKD3D_CONFIG_FLAG_DISABLE_QUERY_OPTIMIZATION)
|
||||
return false;
|
||||
|
||||
return type == D3D12_QUERY_TYPE_OCCLUSION ||
|
||||
type == D3D12_QUERY_TYPE_BINARY_OCCLUSION;
|
||||
}
|
||||
|
@ -6880,7 +6883,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(d3d12_command_list_i
|
|||
|
||||
d3d12_command_list_track_query_heap(list, query_heap);
|
||||
|
||||
if (d3d12_query_type_is_inline(type))
|
||||
if (d3d12_query_type_is_inline(list->device, type))
|
||||
{
|
||||
d3d12_command_list_enable_query(list, query_heap->vk_query_pool, index, flags);
|
||||
}
|
||||
|
@ -6913,7 +6916,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(d3d12_command_list_ifa
|
|||
|
||||
d3d12_command_list_track_query_heap(list, query_heap);
|
||||
|
||||
if (d3d12_query_type_is_inline(type))
|
||||
if (d3d12_query_type_is_inline(list->device, type))
|
||||
{
|
||||
d3d12_command_list_disable_query(list, query_heap->vk_query_pool, index);
|
||||
}
|
||||
|
|
|
@ -409,6 +409,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] =
|
|||
* Works around buggy games which mix typed and raw buffer types. */
|
||||
{"force_bindless_texel_buffer", VKD3D_CONFIG_FLAG_FORCE_BINDLESS_TEXEL_BUFFER},
|
||||
{"skip_application_workarounds", VKD3D_CONFIG_FLAG_SKIP_APPLICATION_WORKAROUNDS},
|
||||
{"disable_query_optimization", VKD3D_CONFIG_FLAG_DISABLE_QUERY_OPTIMIZATION},
|
||||
};
|
||||
|
||||
static uint64_t vkd3d_init_config_flags(void)
|
||||
|
|
|
@ -160,6 +160,7 @@ enum vkd3d_config_flags
|
|||
VKD3D_CONFIG_FLAG_VULKAN_DEBUG = 0x00000001,
|
||||
VKD3D_CONFIG_FLAG_FORCE_BINDLESS_TEXEL_BUFFER = 0x00000002,
|
||||
VKD3D_CONFIG_FLAG_SKIP_APPLICATION_WORKAROUNDS = 0x00000004,
|
||||
VKD3D_CONFIG_FLAG_DISABLE_QUERY_OPTIMIZATION = 0x00000008,
|
||||
};
|
||||
|
||||
struct vkd3d_instance
|
||||
|
|
Loading…
Reference in New Issue