[PATCH 5/5] wined3d: Add some basic SM4 bytecode dumping code.
Henri Verbeet
hverbeet at codeweavers.com
Wed Sep 26 03:12:15 CDT 2012
---
dlls/wined3d/shader_sm4.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 007b9b1..f50fd76 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -22,6 +22,7 @@
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
+WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
#define WINED3D_SM4_INSTRUCTION_MODIFIER (1 << 31)
@@ -555,6 +556,16 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
opcode = opcode_token & WINED3D_SM4_OPCODE_MASK;
len = ((opcode_token & WINED3D_SM4_INSTRUCTION_LENGTH_MASK) >> WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT) - 1;
+ if (TRACE_ON(d3d_bytecode))
+ {
+ TRACE_(d3d_bytecode)("[ %08x ", opcode_token);
+ for (i = 0; i < len; ++i)
+ {
+ TRACE_(d3d_bytecode)("%08x ", (*ptr)[i]);
+ }
+ TRACE_(d3d_bytecode)("]\n");
+ }
+
if (!(opcode_info = get_opcode_info(opcode)))
{
FIXME("Unrecognized opcode %#x, opcode_token 0x%08x.\n", opcode, opcode_token);
--
1.7.8.6
More information about the wine-patches
mailing list