mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-common: Add support for naming debug environment variable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1ae1f831f6
commit
52015b30b3
@ -57,6 +57,8 @@ const char *debugstr_w(const WCHAR *wstr, size_t wchar_size) DECLSPEC_HIDDEN;
|
|||||||
|
|
||||||
#define TRACE_ON() (vkd3d_dbg_get_level() == VKD3D_DBG_LEVEL_TRACE)
|
#define TRACE_ON() (vkd3d_dbg_get_level() == VKD3D_DBG_LEVEL_TRACE)
|
||||||
|
|
||||||
|
#define VKD3D_DEBUG_ENV_NAME(name) const char *vkd3d_dbg_env_name = name
|
||||||
|
|
||||||
static inline const char *debugstr_guid(const GUID *guid)
|
static inline const char *debugstr_guid(const GUID *guid)
|
||||||
{
|
{
|
||||||
if (!guid)
|
if (!guid)
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#define VKD3D_DEBUG_BUFFER_COUNT 64
|
#define VKD3D_DEBUG_BUFFER_COUNT 64
|
||||||
#define VKD3D_DEBUG_BUFFER_SIZE 512
|
#define VKD3D_DEBUG_BUFFER_SIZE 512
|
||||||
|
|
||||||
|
extern const char *vkd3d_dbg_env_name DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
static const char *debug_level_names[] =
|
static const char *debug_level_names[] =
|
||||||
{
|
{
|
||||||
/* VKD3D_DBG_LEVEL_NONE */ "none",
|
/* VKD3D_DBG_LEVEL_NONE */ "none",
|
||||||
@ -46,7 +48,7 @@ enum vkd3d_dbg_level vkd3d_dbg_get_level(void)
|
|||||||
if (level != ~0u)
|
if (level != ~0u)
|
||||||
return level;
|
return level;
|
||||||
|
|
||||||
if (!(vkd3d_debug = getenv("VKD3D_DEBUG")))
|
if (!(vkd3d_debug = getenv(vkd3d_dbg_env_name)))
|
||||||
vkd3d_debug = "";
|
vkd3d_debug = "";
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(debug_level_names); ++i)
|
for (i = 0; i < ARRAY_SIZE(debug_level_names); ++i)
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
VKD3D_DEBUG_ENV_NAME("VKD3D_DEBUG");
|
||||||
|
|
||||||
STATIC_ASSERT(MEMBER_SIZE(struct vkd3d_shader_scan_info, uav_counter_mask) * CHAR_BIT >= VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS);
|
STATIC_ASSERT(MEMBER_SIZE(struct vkd3d_shader_scan_info, uav_counter_mask) * CHAR_BIT >= VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS);
|
||||||
STATIC_ASSERT(MEMBER_SIZE(struct vkd3d_shader_scan_info, uav_read_mask) * CHAR_BIT >= VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS);
|
STATIC_ASSERT(MEMBER_SIZE(struct vkd3d_shader_scan_info, uav_read_mask) * CHAR_BIT >= VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS);
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include "vkd3d_utils_private.h"
|
#include "vkd3d_utils_private.h"
|
||||||
|
|
||||||
|
VKD3D_DEBUG_ENV_NAME("VKD3D_DEBUG");
|
||||||
|
|
||||||
HRESULT WINAPI D3D12GetDebugInterface(REFIID iid, void **debug)
|
HRESULT WINAPI D3D12GetDebugInterface(REFIID iid, void **debug)
|
||||||
{
|
{
|
||||||
FIXME("iid %s, debug %p stub!\n", debugstr_guid(iid), debug);
|
FIXME("iid %s, debug %p stub!\n", debugstr_guid(iid), debug);
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#define INITGUID
|
#define INITGUID
|
||||||
#include "vkd3d_private.h"
|
#include "vkd3d_private.h"
|
||||||
|
|
||||||
|
VKD3D_DEBUG_ENV_NAME("VKD3D_DEBUG");
|
||||||
|
|
||||||
HRESULT vkd3d_create_device(const struct vkd3d_device_create_info *create_info,
|
HRESULT vkd3d_create_device(const struct vkd3d_device_create_info *create_info,
|
||||||
REFIID iid, void **device)
|
REFIID iid, void **device)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user