d3d10: Move debug_d3d10_device_state_types() to stateblock.c.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Connor McAdams 2019-10-30 17:31:33 +03:30 committed by Alexandre Julliard
parent ae1cc9c742
commit 79aaabeb7f
4 changed files with 39 additions and 65 deletions

View File

@ -8,7 +8,6 @@ C_SRCS = \
d3d10_main.c \
effect.c \
shader.c \
stateblock.c \
utils.c
stateblock.c
RC_SRCS = version.rc

View File

@ -40,9 +40,6 @@
*/
#define D3DERR_INVALIDCALL 0x8876086c
/* TRACE helper functions */
const char *debug_d3d10_device_state_types(D3D10_DEVICE_STATE_TYPES t) DECLSPEC_HIDDEN;
enum d3d10_effect_object_type
{
D3D10_EOT_RASTERIZER_STATE = 0x0,

View File

@ -65,6 +65,44 @@ struct d3d10_stateblock
BOOL predicate_value;
};
#define WINE_D3D10_TO_STR(x) case x: return #x
static const char *debug_d3d10_device_state_types(D3D10_DEVICE_STATE_TYPES t)
{
switch (t)
{
WINE_D3D10_TO_STR(D3D10_DST_SO_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_OM_RENDER_TARGETS);
WINE_D3D10_TO_STR(D3D10_DST_DEPTH_STENCIL_STATE);
WINE_D3D10_TO_STR(D3D10_DST_BLEND_STATE);
WINE_D3D10_TO_STR(D3D10_DST_VS);
WINE_D3D10_TO_STR(D3D10_DST_VS_SAMPLERS);
WINE_D3D10_TO_STR(D3D10_DST_VS_SHADER_RESOURCES);
WINE_D3D10_TO_STR(D3D10_DST_VS_CONSTANT_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_GS);
WINE_D3D10_TO_STR(D3D10_DST_GS_SAMPLERS);
WINE_D3D10_TO_STR(D3D10_DST_GS_SHADER_RESOURCES);
WINE_D3D10_TO_STR(D3D10_DST_GS_CONSTANT_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_PS);
WINE_D3D10_TO_STR(D3D10_DST_PS_SAMPLERS);
WINE_D3D10_TO_STR(D3D10_DST_PS_SHADER_RESOURCES);
WINE_D3D10_TO_STR(D3D10_DST_PS_CONSTANT_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_IA_VERTEX_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_IA_INDEX_BUFFER);
WINE_D3D10_TO_STR(D3D10_DST_IA_INPUT_LAYOUT);
WINE_D3D10_TO_STR(D3D10_DST_IA_PRIMITIVE_TOPOLOGY);
WINE_D3D10_TO_STR(D3D10_DST_RS_VIEWPORTS);
WINE_D3D10_TO_STR(D3D10_DST_RS_SCISSOR_RECTS);
WINE_D3D10_TO_STR(D3D10_DST_RS_RASTERIZER_STATE);
WINE_D3D10_TO_STR(D3D10_DST_PREDICATION);
default:
FIXME("Unrecognised D3D10_DEVICE_STATE_TYPES %#x.\n", t);
return "unrecognised";
}
}
#undef WINE_D3D10_TO_STR
static inline struct d3d10_stateblock *impl_from_ID3D10StateBlock(ID3D10StateBlock *iface)
{
return CONTAINING_RECORD(iface, struct d3d10_stateblock, ID3D10StateBlock_iface);

View File

@ -1,60 +0,0 @@
/*
* Copyright 2008-2009 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#include "d3d10_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
#define WINE_D3D10_TO_STR(x) case x: return #x
const char *debug_d3d10_device_state_types(D3D10_DEVICE_STATE_TYPES t)
{
switch (t)
{
WINE_D3D10_TO_STR(D3D10_DST_SO_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_OM_RENDER_TARGETS);
WINE_D3D10_TO_STR(D3D10_DST_DEPTH_STENCIL_STATE);
WINE_D3D10_TO_STR(D3D10_DST_BLEND_STATE);
WINE_D3D10_TO_STR(D3D10_DST_VS);
WINE_D3D10_TO_STR(D3D10_DST_VS_SAMPLERS);
WINE_D3D10_TO_STR(D3D10_DST_VS_SHADER_RESOURCES);
WINE_D3D10_TO_STR(D3D10_DST_VS_CONSTANT_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_GS);
WINE_D3D10_TO_STR(D3D10_DST_GS_SAMPLERS);
WINE_D3D10_TO_STR(D3D10_DST_GS_SHADER_RESOURCES);
WINE_D3D10_TO_STR(D3D10_DST_GS_CONSTANT_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_PS);
WINE_D3D10_TO_STR(D3D10_DST_PS_SAMPLERS);
WINE_D3D10_TO_STR(D3D10_DST_PS_SHADER_RESOURCES);
WINE_D3D10_TO_STR(D3D10_DST_PS_CONSTANT_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_IA_VERTEX_BUFFERS);
WINE_D3D10_TO_STR(D3D10_DST_IA_INDEX_BUFFER);
WINE_D3D10_TO_STR(D3D10_DST_IA_INPUT_LAYOUT);
WINE_D3D10_TO_STR(D3D10_DST_IA_PRIMITIVE_TOPOLOGY);
WINE_D3D10_TO_STR(D3D10_DST_RS_VIEWPORTS);
WINE_D3D10_TO_STR(D3D10_DST_RS_SCISSOR_RECTS);
WINE_D3D10_TO_STR(D3D10_DST_RS_RASTERIZER_STATE);
WINE_D3D10_TO_STR(D3D10_DST_PREDICATION);
default:
FIXME("Unrecognized D3D10_DEVICE_STATE_TYPES %#x.\n", t);
return "unrecognized";
}
}
#undef WINE_D3D10_TO_STR