d3dx9_36-GetShaderSemantics: Fix issue in implementation of D3DXGetShaderInputSemantics.

This commit is contained in:
Sebastian Lackner 2015-02-10 23:26:58 +01:00
parent 65c1bc4fd2
commit d8772033dd
2 changed files with 12 additions and 11 deletions

View File

@ -1,18 +1,18 @@
From 8bead9c1fd37eff6e1f0612faf0fc7fb93e899f3 Mon Sep 17 00:00:00 2001
From 2ef3087d876425c688c4b6cda1ab7b7689bf5252 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.
Subject: d3dx9_36: Implement D3DXGetShaderInputSemantics + tests. (rev 2)
Fixes bug 22682.
---
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
dlls/d3dx9_36/shader.c | 94 ++++++++++++++++++++++++++++++++++++++++++++
dlls/d3dx9_36/tests/shader.c | 86 ++++++++++++++++++++++++++++++++++++++++
dlls/d3dx9_36/shader.c | 95 ++++++++++++++++++++++++++++++++++++++++++++
dlls/d3dx9_36/tests/shader.c | 86 +++++++++++++++++++++++++++++++++++++++
include/d3dx9shader.h | 1 +
4 files changed, 182 insertions(+), 1 deletion(-)
4 files changed, 183 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index 4c72dc2..e4890ee 100644
index 13f0d99..1fb2aaf 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -159,7 +159,7 @@
@ -25,7 +25,7 @@ index 4c72dc2..e4890ee 100644
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
@ stdcall D3DXGetShaderSize(ptr)
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index 5ea3d13..63852d0 100644
index 5ea3d13..ff03fd6 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -1,6 +1,7 @@
@ -36,7 +36,7 @@ index 5ea3d13..63852d0 100644
* Copyright 2011 Travis Athougies
*
* This library is free software; you can redistribute it and/or
@@ -2126,3 +2127,96 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
@@ -2126,3 +2127,97 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
return D3D_OK;
}
@ -73,7 +73,8 @@ index 5ea3d13..63852d0 100644
+ UINT shader_model = (*ptr >> 8) & 0xff;
+ UINT i = 0;
+
+ TRACE("Shader version: %#x\n", *ptr++);
+ TRACE("Shader version: %#x\n", *ptr);
+ ptr++;
+
+ while (*ptr != D3DSIO_END)
+ {
@ -261,5 +262,5 @@ index d665f72..f565432 100644
HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines,
ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
--
2.1.2
2.2.2

View File

@ -1350,7 +1350,7 @@ if test "$enable_d3dx9_36_GetShaderSemantics" -eq 1; then
patch_apply d3dx9_36-GetShaderSemantics/0001-d3dx9_36-Implement-D3DXGetShaderInputSemantics-tests.patch
patch_apply d3dx9_36-GetShaderSemantics/0002-d3dx9_36-Implement-D3DXGetShaderOutputSemantics.patch
(
echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXGetShaderInputSemantics + tests.", 1 },';
echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXGetShaderInputSemantics + tests.", 2 },';
echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXGetShaderOutputSemantics.", 1 },';
) >> "$patchlist"
fi