You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against b54a8dda844a1a43d1dff22eff0ea206be5c630c.
[d3dx9_36-D3DXDisassembleShader] Removed patch to implement d3dx9_36.D3DXCreateTextureShader with stub interface (accepted upstream). [ntdll-NtQuerySection] Partially removed patches to implement NtQuerySection (fixed upstream).
This commit is contained in:
@@ -1,302 +0,0 @@
|
||||
From 472e521bce8bb2f218518718a645efc53acd5d29 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Mon, 8 Feb 2016 23:02:52 +0100
|
||||
Subject: d3dx9_36: Implement D3DXCreateTextureShader with stubbed
|
||||
ID3DXTextureShader interface.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
|
||||
dlls/d3dx9_36/shader.c | 267 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 268 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
index 611adf0..28f1a26 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_36.spec
|
||||
+++ b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
@@ -104,7 +104,7 @@
|
||||
@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr)
|
||||
@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr)
|
||||
@ stub D3DXCreateTextureGutterHelper(long long ptr long ptr)
|
||||
-@ stub D3DXCreateTextureShader(ptr ptr)
|
||||
+@ stdcall D3DXCreateTextureShader(ptr ptr)
|
||||
@ stdcall D3DXCreateTorus(ptr long long long long ptr ptr)
|
||||
@ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr)
|
||||
@ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index eb0680a..8a9cbf2 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -2297,3 +2297,270 @@ HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *byte_code, D3DXSEMANTIC
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
+
|
||||
+struct d3dx9_texture_shader
|
||||
+{
|
||||
+ ID3DXTextureShader ID3DXTextureShader_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct d3dx9_texture_shader *impl_from_ID3DXTextureShader(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct d3dx9_texture_shader, ID3DXTextureShader_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_QueryInterface(ID3DXTextureShader *iface, REFIID riid, void **out)
|
||||
+{
|
||||
+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_ID3DXTextureShader))
|
||||
+ {
|
||||
+ iface->lpVtbl->AddRef(iface);
|
||||
+ *out = iface;
|
||||
+ return D3D_OK;
|
||||
+ }
|
||||
+
|
||||
+ WARN("Interface %s not found.\n", debugstr_guid(riid));
|
||||
+ *out = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3dx9_texture_shader_AddRef(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface);
|
||||
+ ULONG refcount = InterlockedIncrement(&texture_shader->ref);
|
||||
+
|
||||
+ TRACE("%p increasing refcount to %u.\n", texture_shader, refcount);
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3dx9_texture_shader_Release(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface);
|
||||
+ ULONG refcount = InterlockedDecrement(&texture_shader->ref);
|
||||
+
|
||||
+ TRACE("%p decreasing refcount to %u.\n", texture_shader, refcount);
|
||||
+
|
||||
+ if (!refcount)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, texture_shader);
|
||||
+ }
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetFunction(ID3DXTextureShader *iface, struct ID3DXBuffer **function)
|
||||
+{
|
||||
+ FIXME("iface %p, function %p stub.\n", iface, function);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetConstantBuffer(ID3DXTextureShader *iface, struct ID3DXBuffer **constant_buffer)
|
||||
+{
|
||||
+ FIXME("iface %p, constant_buffer %p stub.\n", iface, constant_buffer);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetDesc(ID3DXTextureShader *iface, D3DXCONSTANTTABLE_DESC *desc)
|
||||
+{
|
||||
+ FIXME("iface %p, desc %p stub.\n", iface, desc);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetConstantDesc(ID3DXTextureShader *iface, D3DXHANDLE constant, D3DXCONSTANT_DESC *constant_desc, UINT *count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, constant_desc %p, count %p stub.\n", iface, constant, constant_desc, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstant(ID3DXTextureShader *iface, D3DXHANDLE constant, UINT index)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, index %u stub.\n", iface, constant, index);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstantByName(ID3DXTextureShader *iface, D3DXHANDLE constant, const char *name)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, name %s stub.\n", iface, constant, debugstr_a(name));
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstantElement(ID3DXTextureShader *iface, D3DXHANDLE constant, UINT index)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, index %u stub.\n", iface, constant, index);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetDefaults(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ FIXME("iface %p stub.\n", iface);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetValue(ID3DXTextureShader *iface, D3DXHANDLE constant, const void *data, UINT bytes)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, data %p, bytes %u stub.\n", iface, constant, data, bytes);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetBool(ID3DXTextureShader *iface, D3DXHANDLE constant, BOOL b)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, b %u stub.\n", iface, constant, b);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetBoolArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const BOOL *b, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, b %p, count %u stub.\n", iface, constant, b, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetInt(ID3DXTextureShader *iface, D3DXHANDLE constant, INT n)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, n %d stub.\n", iface, constant, n);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetIntArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const INT *n, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, n %p, count %u stub.\n", iface, constant, n, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetFloat(ID3DXTextureShader *iface, D3DXHANDLE constant, FLOAT f)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, f %f stub.\n", iface, constant, f);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetFloatArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const FLOAT *f, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, f %p, count %u stub.\n", iface, constant, f, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetVector(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXVECTOR4 *vector)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, vector %p stub.\n", iface, constant, vector);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetVectorArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXVECTOR4 *vector, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, vector %p, count %u stub.\n", iface, constant, vector, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrix(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p stub.\n", iface, constant, matrix);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixPointerArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTranspose(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p stub.\n", iface, constant, matrix);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTransposeArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTransposePointerArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct ID3DXTextureShaderVtbl d3dx9_texture_shader_vtbl =
|
||||
+{
|
||||
+ /*** IUnknown methods ***/
|
||||
+ d3dx9_texture_shader_QueryInterface,
|
||||
+ d3dx9_texture_shader_AddRef,
|
||||
+ d3dx9_texture_shader_Release,
|
||||
+ /*** ID3DXTextureShader methods ***/
|
||||
+ d3dx9_texture_shader_GetFunction,
|
||||
+ d3dx9_texture_shader_GetConstantBuffer,
|
||||
+ d3dx9_texture_shader_GetDesc,
|
||||
+ d3dx9_texture_shader_GetConstantDesc,
|
||||
+ d3dx9_texture_shader_GetConstant,
|
||||
+ d3dx9_texture_shader_GetConstantByName,
|
||||
+ d3dx9_texture_shader_GetConstantElement,
|
||||
+ d3dx9_texture_shader_SetDefaults,
|
||||
+ d3dx9_texture_shader_SetValue,
|
||||
+ d3dx9_texture_shader_SetBool,
|
||||
+ d3dx9_texture_shader_SetBoolArray,
|
||||
+ d3dx9_texture_shader_SetInt,
|
||||
+ d3dx9_texture_shader_SetIntArray,
|
||||
+ d3dx9_texture_shader_SetFloat,
|
||||
+ d3dx9_texture_shader_SetFloatArray,
|
||||
+ d3dx9_texture_shader_SetVector,
|
||||
+ d3dx9_texture_shader_SetVectorArray,
|
||||
+ d3dx9_texture_shader_SetMatrix,
|
||||
+ d3dx9_texture_shader_SetMatrixArray,
|
||||
+ d3dx9_texture_shader_SetMatrixPointerArray,
|
||||
+ d3dx9_texture_shader_SetMatrixTranspose,
|
||||
+ d3dx9_texture_shader_SetMatrixTransposeArray,
|
||||
+ d3dx9_texture_shader_SetMatrixTransposePointerArray
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader **texture_shader)
|
||||
+{
|
||||
+ struct d3dx9_texture_shader *object;
|
||||
+
|
||||
+ TRACE("function %p, texture_shader %p.\n", function, texture_shader);
|
||||
+
|
||||
+ if (!function || !texture_shader)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->ID3DXTextureShader_iface.lpVtbl = &d3dx9_texture_shader_vtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ *texture_shader = &object->ID3DXTextureShader_iface;
|
||||
+
|
||||
+ return D3D_OK;
|
||||
+}
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1,32 +0,0 @@
|
||||
From 94a5f0e6ac8a945dcb08dcb607eee0df3228e41f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:24:00 +0100
|
||||
Subject: include: Fix prototypes of D3DXFillXXXTextureTx for d3dx9.
|
||||
|
||||
---
|
||||
include/d3dx9tex.h | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/d3dx9tex.h b/include/d3dx9tex.h
|
||||
index 542460f..77f2d35 100644
|
||||
--- a/include/d3dx9tex.h
|
||||
+++ b/include/d3dx9tex.h
|
||||
@@ -337,12 +337,9 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f
|
||||
HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *cube, LPD3DXFILL3D function, void *data);
|
||||
HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *volume, LPD3DXFILL3D function, void *data);
|
||||
|
||||
-HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, const DWORD *function,
|
||||
- const D3DXVECTOR4 *constants, UINT numconstants);
|
||||
-HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *cube, const DWORD *function,
|
||||
- const D3DXVECTOR4 *constants, UINT numconstants);
|
||||
-HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, const DWORD *function,
|
||||
- const D3DXVECTOR4 *constants, UINT numconstants);
|
||||
+HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, ID3DXTextureShader *texture_shader);
|
||||
+HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *cube, ID3DXTextureShader *texture_shader);
|
||||
+HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, ID3DXTextureShader *texture_shader);
|
||||
|
||||
HRESULT WINAPI D3DXComputeNormalMap(IDirect3DTexture9 *texture, IDirect3DTexture9 *srctexture,
|
||||
const PALETTEENTRY *srcpalette, DWORD flags, DWORD channel, float amplitude);
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From af160ceb1fc68b5c3edb35d9bbe0ab3bc2bb7563 Mon Sep 17 00:00:00 2001
|
||||
From ac716fe03fbbe45d9128e4e31c5654b9049c59aa 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. (v2)
|
||||
@@ -10,7 +10,7 @@ Changes in v2 (by Christian Costa):
|
||||
1 file changed, 328 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index 0f6e226..4b63f4c 100644
|
||||
index e3924a9..34a98aa 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,7 +1,7 @@
|
||||
@@ -366,7 +366,7 @@ index 0f6e226..4b63f4c 100644
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static const DWORD* skip_instruction(const DWORD *byte_code, UINT shader_model)
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.7.1
|
||||
2.8.0
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
Fixes: [37919] Implement d3dx9_36.D3DXCreateTextureShader with stub interface
|
||||
Fixes: Implement stub for d3dx9_36.D3DXFillCubeTextureTX
|
||||
Fixes: Initial implementation for d3dx9_36.D3DXDisassembleShader
|
||||
Depends: d3dx9_36-GetShaderSemantics
|
||||
|
Reference in New Issue
Block a user