mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
d3dx9_36-GetShaderSemantics: Use proper defines in shader code (thanks Christian Costa).
This commit is contained in:
parent
1c6124cc6e
commit
f151e1f36f
@ -1,17 +1,15 @@
|
||||
From 93378d11e8fc9c56251847f7eebf55454fe1d585 Mon Sep 17 00:00:00 2001
|
||||
From 112abf989d718eb45388793f138d115eeda5b921 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 5 Apr 2014 14:02:07 +0200
|
||||
Subject: d3dx9_36: Implement D3DXGetShaderInputSemantics + tests. (rev 3)
|
||||
|
||||
Fixes bug 22682.
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
|
||||
dlls/d3dx9_36/shader.c | 92 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/shader.c | 86 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/shader.c | 93 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/shader.c | 86 ++++++++++++++++++++++++++++++++++++++++
|
||||
include/d3dx9shader.h | 1 +
|
||||
4 files changed, 180 insertions(+), 1 deletion(-)
|
||||
4 files changed, 181 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
index f79b6fa..cba33b4 100644
|
||||
@ -27,7 +25,7 @@ index f79b6fa..cba33b4 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index e9d893b..39f1f31 100644
|
||||
index e9d893b..2918bde 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -38,7 +36,7 @@ index e9d893b..39f1f31 100644
|
||||
* Copyright 2011 Travis Athougies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -2151,3 +2152,94 @@ HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const
|
||||
@@ -2151,3 +2152,95 @@ HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const
|
||||
FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@ -89,9 +87,10 @@ index e9d893b..39f1f31 100644
|
||||
+ {
|
||||
+ DWORD param1 = *++ptr;
|
||||
+ DWORD param2 = *++ptr;
|
||||
+ DWORD usage = param1 & 0x1f;
|
||||
+ DWORD usage_index = (param1 >> D3DSP_DCL_USAGEINDEX_SHIFT) & D3DSP_DCL_USAGE_MASK;
|
||||
+ DWORD reg_type = (((param2 >> 11) & 0x3) << 3) | ((param2 >> D3DSP_REGTYPE_SHIFT) & 0x7);
|
||||
+ DWORD usage = (param1 & D3DSP_DCL_USAGE_MASK) >> D3DSP_DCL_USAGE_SHIFT;
|
||||
+ DWORD usage_index = (param1 & D3DSP_DCL_USAGEINDEX_MASK) >> D3DSP_DCL_USAGEINDEX_SHIFT;
|
||||
+ DWORD reg_type = ((param2 & D3DSP_REGTYPE_MASK2) >> D3DSP_REGTYPE_SHIFT2)
|
||||
+ | ((param2 & D3DSP_REGTYPE_MASK) >> D3DSP_REGTYPE_SHIFT);
|
||||
+
|
||||
+ TRACE("D3DSIO_DCL param1: %#x, param2: %#x, usage: %u, usage_index: %u, reg_type: %u\n",
|
||||
+ param1, param2, usage, usage_index, reg_type);
|
||||
|
Loading…
Reference in New Issue
Block a user