vkd3d: Introduce FIXME_ONCE().

The debug log level is demoted to WARN after the FIXME is printed once.

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:
Józef Kucia 2019-06-12 14:08:01 +02:00 committed by Alexandre Julliard
parent 4a0b62084a
commit 285a19408f
4 changed files with 18 additions and 8 deletions

View File

@ -59,6 +59,14 @@ const char *debugstr_w(const WCHAR *wstr, size_t wchar_size) DECLSPEC_HIDDEN;
const enum vkd3d_dbg_level vkd3d_dbg_level = VKD3D_DBG_LEVEL_##level; \
VKD3D_DBG_PRINTF
#define VKD3D_DBG_LOG_ONCE(first_time_level, level) \
do { \
static bool vkd3d_dbg_next_time; \
const enum vkd3d_dbg_level vkd3d_dbg_level = vkd3d_dbg_next_time \
? VKD3D_DBG_LEVEL_##level : VKD3D_DBG_LEVEL_##first_time_level; \
vkd3d_dbg_next_time = true; \
VKD3D_DBG_PRINTF
#define VKD3D_DBG_PRINTF(args...) \
vkd3d_dbg_printf(vkd3d_dbg_level, __FUNCTION__, args); } while (0)
@ -80,6 +88,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)
#endif
#define FIXME_ONCE VKD3D_DBG_LOG_ONCE(FIXME, WARN)
#define VKD3D_DEBUG_ENV_NAME(name) const char *vkd3d_dbg_env_name = name
static inline const char *debugstr_guid(const GUID *guid)

View File

@ -3538,7 +3538,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
if (!vk_viewports[i].width || !vk_viewports[i].height)
{
FIXME("Invalid viewport %u, ignoring RSSetViewports().\n", i);
FIXME_ONCE("Invalid viewport %u, ignoring RSSetViewports().\n", i);
return;
}
}
@ -3790,7 +3790,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
/* FIXME: Some formats in D3D12 are planar. Each plane is a separate sub-resource. */
if (sub_resource_idx >= d3d12_resource_desc_get_sub_resource_count(&resource->desc))
{
FIXME("Unhandled sub-resource idx %u.\n", sub_resource_idx);
FIXME_ONCE("Unhandled sub-resource idx %u.\n", sub_resource_idx);
continue;
}
@ -3806,7 +3806,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
}
if (have_aliasing_barriers)
FIXME("Aliasing barriers not implemented yet.\n");
FIXME_ONCE("Aliasing barriers not implemented yet.\n");
/* Vulkan doesn't support split barriers. */
if (have_split_barriers)
@ -4684,7 +4684,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(I
static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(ID3D12GraphicsCommandList1 *iface,
ID3D12Resource *resource, const D3D12_DISCARD_REGION *region)
{
FIXME("iface %p, resource %p, region %p stub!\n", iface, resource, region);
FIXME_ONCE("iface %p, resource %p, region %p stub!\n", iface, resource, region);
}
static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsCommandList1 *iface,
@ -4788,7 +4788,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12Graphics
* count precisely, even when it was signalled that non-precise is enough.
*/
if (type == D3D12_QUERY_TYPE_BINARY_OCCLUSION)
FIXME("D3D12 guarantees binary occlusion queries result in only 0 and 1.\n");
FIXME_ONCE("D3D12 guarantees binary occlusion queries result in only 0 and 1.\n");
if (!d3d12_resource_is_buffer(buffer))
{

View File

@ -2838,7 +2838,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandleByName(ID3D12Devic
static HRESULT STDMETHODCALLTYPE d3d12_device_MakeResident(ID3D12Device *iface,
UINT object_count, ID3D12Pageable * const *objects)
{
FIXME("iface %p, object_count %u, objects %p stub!\n",
FIXME_ONCE("iface %p, object_count %u, objects %p stub!\n",
iface, object_count, objects);
return S_OK;
@ -2847,7 +2847,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_MakeResident(ID3D12Device *iface,
static HRESULT STDMETHODCALLTYPE d3d12_device_Evict(ID3D12Device *iface,
UINT object_count, ID3D12Pageable * const *objects)
{
FIXME("iface %p, object_count %u, objects %p stub!\n",
FIXME_ONCE("iface %p, object_count %u, objects %p stub!\n",
iface, object_count, objects);
return S_OK;

View File

@ -1720,7 +1720,7 @@ static void rs_desc_from_d3d12(VkPipelineRasterizationStateCreateInfo *vk_desc,
vk_desc->lineWidth = 1.0f;
if (d3d12_desc->MultisampleEnable)
FIXME("Ignoring MultisampleEnable %#x.\n", d3d12_desc->MultisampleEnable);
FIXME_ONCE("Ignoring MultisampleEnable %#x.\n", d3d12_desc->MultisampleEnable);
if (d3d12_desc->AntialiasedLineEnable)
FIXME("Ignoring AntialiasedLineEnable %#x.\n", d3d12_desc->AntialiasedLineEnable);
if (d3d12_desc->ForcedSampleCount)