d3dx9_36-D3DXDisassembleShader: Declare variable before for loop.

This commit is contained in:
Sebastian Lackner 2016-02-21 21:23:15 +01:00
parent 83071bc1dc
commit b765f1e594

View File

@ -1,14 +1,14 @@
From ac7b3ad976941f0f4bb991fcfd2cd8dd3b0b8214 Mon Sep 17 00:00:00 2001
From 0e8c5ad0e1d2c798a28f14677ca0f8a51c26f2be Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sat, 13 Feb 2016 15:29:37 +0100
Subject: d3dx9_36: Implement D3DXDisassembleShader.
---
dlls/d3dx9_36/shader.c | 295 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 293 insertions(+), 2 deletions(-)
dlls/d3dx9_36/shader.c | 297 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 295 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index 50d5669..3f0e6d3 100644
index 50d5669..0879557 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -21,6 +21,7 @@
@ -19,7 +19,7 @@ index 50d5669..3f0e6d3 100644
#include "wine/debug.h"
#include "wine/unicode.h"
@@ -2147,10 +2148,300 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
@@ -2147,10 +2148,302 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
return D3D_OK;
}
@ -272,6 +272,8 @@ index 50d5669..3f0e6d3 100644
+ else if ((*ptr & D3DSI_OPCODE_MASK) <= D3DSIO_BREAKP)
+ {
+ DWORD index = *ptr & D3DSI_OPCODE_MASK;
+ int j;
+
+ if (index >= 64)
+ index -= 15;
+ buf += sprintf(buf, " %s", opcode[index].name);
@ -281,7 +283,7 @@ index 50d5669..3f0e6d3 100644
+ {
+ buf += add_modifier(buf, *ptr);
+
+ for (int j = 0; j < opcode[index].length; j++)
+ for (j = 0; j < opcode[index].length; j++)
+ {
+ buf += sprintf(buf, "%s ", j ? "," : "");
+