From 79aaabeb7f0c2d3686e04e98a928adae87ac79fb Mon Sep 17 00:00:00 2001 From: Connor McAdams Date: Wed, 30 Oct 2019 17:31:33 +0330 Subject: [PATCH] d3d10: Move debug_d3d10_device_state_types() to stateblock.c. Signed-off-by: Connor McAdams Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d10/Makefile.in | 3 +- dlls/d3d10/d3d10_private.h | 3 -- dlls/d3d10/stateblock.c | 38 ++++++++++++++++++++++++ dlls/d3d10/utils.c | 60 -------------------------------------- 4 files changed, 39 insertions(+), 65 deletions(-) delete mode 100644 dlls/d3d10/utils.c diff --git a/dlls/d3d10/Makefile.in b/dlls/d3d10/Makefile.in index e76f3c5f195..dec11188c4d 100644 --- a/dlls/d3d10/Makefile.in +++ b/dlls/d3d10/Makefile.in @@ -8,7 +8,6 @@ C_SRCS = \ d3d10_main.c \ effect.c \ shader.c \ - stateblock.c \ - utils.c + stateblock.c RC_SRCS = version.rc diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index 1deba9c8601..fadd027f7a9 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -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, diff --git a/dlls/d3d10/stateblock.c b/dlls/d3d10/stateblock.c index e20a4e31f3c..ccc8a0e504e 100644 --- a/dlls/d3d10/stateblock.c +++ b/dlls/d3d10/stateblock.c @@ -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); diff --git a/dlls/d3d10/utils.c b/dlls/d3d10/utils.c deleted file mode 100644 index 680a11f37e2..00000000000 --- a/dlls/d3d10/utils.c +++ /dev/null @@ -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