Author: akhaldi
Date: Sun Nov 22 16:34:38 2015
New Revision: 70035
URL:
http://svn.reactos.org/svn/reactos?rev=70035&view=rev
Log:
[D3DCOMPILER_43] Sync with Wine Staging 1.7.55. CORE-10536
Added:
trunk/reactos/dll/directx/wine/d3dcompiler_43/main.c
- copied unchanged from r70034,
trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c
Removed:
trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c
Modified:
trunk/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
trunk/reactos/dll/directx/wine/d3dcompiler_43/blob.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/bytecodewriter.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt [iso-8859-1] Sun Nov 22
16:34:38 2015
@@ -13,9 +13,9 @@
blob.c
bytecodewriter.c
compiler.c
- d3dcompiler_43_main.c
hlsl.tab.c
hlsl.yy.c
+ main.c
reflection.c
utils.c
d3dcompiler_private.h
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/blob.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/blob.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/blob.c [iso-8859-1] Sun Nov 22 16:34:38
2015
@@ -460,3 +460,17 @@
return d3dcompiler_strip_shader(data, data_size, flags, blob);
}
+
+HRESULT WINAPI D3DReadFileToBlob(const WCHAR *filename, ID3DBlob **contents)
+{
+ FIXME("filename %s, contents %p\n", debugstr_w(filename), contents);
+
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI D3DWriteBlobToFile(ID3DBlob* blob, const WCHAR *filename, BOOL overwrite)
+{
+ FIXME("blob %p, filename %s, overwrite %d\n", blob, debugstr_w(filename),
overwrite);
+
+ return E_NOTIMPL;
+}
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/bytecodewriter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/bytecodewriter.c [iso-8859-1]
(original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/bytecodewriter.c [iso-8859-1] Sun Nov 22
16:34:38 2015
@@ -598,7 +598,7 @@
put_dword(buffer, instr_dcl);
/* Write the usage and index */
- token = (1 << 31); /* Bit 31 of non-instruction opcodes is 1 */
+ token = (1u << 31); /* Bit 31 of non-instruction opcodes is 1 */
token |= (decls[i].usage << D3DSP_DCL_USAGE_SHIFT) &
D3DSP_DCL_USAGE_MASK;
token |= (decls[i].usage_idx << D3DSP_DCL_USAGEINDEX_SHIFT) &
D3DSP_DCL_USAGEINDEX_MASK;
put_dword(buffer, token);
@@ -614,7 +614,7 @@
static void write_const(struct constant **consts, int num, DWORD opcode, DWORD reg_type,
struct bytecode_buffer *buffer, BOOL len) {
int i;
DWORD instr_def = opcode;
- const DWORD reg = (1<<31) | d3dsp_register( reg_type, 0 ) |
D3DSP_WRITEMASK_ALL;
+ const DWORD reg = (1u << 31) | d3dsp_register( reg_type, 0 ) |
D3DSP_WRITEMASK_ALL;
if(len) {
if(opcode == D3DSIO_DEFB)
@@ -885,7 +885,7 @@
static void vs_12_dstreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD has_wmask;
if(reg->rel_reg) {
@@ -959,7 +959,7 @@
static void vs_1_x_srcreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD has_swizzle;
DWORD component;
@@ -1070,7 +1070,7 @@
static void ps_1_0123_srcreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported in <= ps_3_0\n");
This->state = E_INVALIDARG;
@@ -1116,7 +1116,7 @@
static void ps_1_0123_dstreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported for destination registers\n");
@@ -1378,7 +1378,7 @@
static void ps_1_4_srcreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported in <= ps_3_0\n");
This->state = E_INVALIDARG;
@@ -1417,7 +1417,7 @@
static void ps_1_4_dstreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported for destination registers\n");
@@ -1564,7 +1564,7 @@
static void vs_2_srcreg(struct bc_writer *This,
const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD has_swizzle;
DWORD component;
DWORD d3d9reg;
@@ -1799,12 +1799,12 @@
DWORD i;
DWORD instr_dcl = D3DSIO_DCL | (2 << D3DSI_INSTLENGTH_SHIFT);
DWORD token;
- const DWORD reg = (1<<31) | d3dsp_register( D3DSPR_SAMPLER, 0 ) |
D3DSP_WRITEMASK_ALL;
+ const DWORD reg = (1u << 31) | d3dsp_register( D3DSPR_SAMPLER, 0 ) |
D3DSP_WRITEMASK_ALL;
for(i = 0; i < shader->num_samplers; i++) {
/* Write the DCL instruction */
put_dword(buffer, instr_dcl);
- token = (1<<31);
+ token = (1u << 31);
/* Already shifted */
token |= (d3d9_sampler(shader->samplers[i].type)) &
D3DSP_TEXTURETYPE_MASK;
put_dword(buffer, token);
@@ -1831,7 +1831,7 @@
static void ps_2_srcreg(struct bc_writer *This,
const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
if(reg->rel_reg) {
WARN("Relative addressing not supported in <= ps_3_0\n");
@@ -1886,7 +1886,7 @@
const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
if(reg->rel_reg) {
@@ -2059,7 +2059,7 @@
static void sm_3_srcreg(struct bc_writer *This,
const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
d3d9reg = d3d9_register(reg->type);
@@ -2098,7 +2098,7 @@
const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
if(reg->rel_reg) {
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c [iso-8859-1] Sun Nov 22
16:34:38 2015
@@ -687,29 +687,49 @@
return S_OK;
}
+HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filename,
+ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
+ const char *target, UINT sflags, UINT eflags, UINT secondary_flags,
+ const void *secondary_data, SIZE_T secondary_data_size, ID3DBlob **shader,
+ ID3DBlob **error_messages)
+{
+ HRESULT hr;
+
+ TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint
%s,\n"
+ "target %s, sflags %#x, eflags %#x, secondary_flags %#x, secondary_data
%p,\n"
+ "secondary_data_size %lu, shader %p, error_messages %p\n",
+ data, data_size, debugstr_a(filename), defines, include,
debugstr_a(entrypoint),
+ debugstr_a(target), sflags, eflags, secondary_flags, secondary_data,
+ secondary_data_size, shader, error_messages);
+
+ if (secondary_data)
+ FIXME("secondary data not implemented yet\n");
+
+ if (shader) *shader = NULL;
+ if (error_messages) *error_messages = NULL;
+
+ EnterCriticalSection(&wpp_mutex);
+
+ hr = preprocess_shader(data, data_size, filename, defines, include, error_messages);
+ if (SUCCEEDED(hr))
+ hr = compile_shader(wpp_output, target, entrypoint, shader, error_messages);
+
+ HeapFree(GetProcessHeap(), 0, wpp_output);
+ LeaveCriticalSection(&wpp_mutex);
+ return hr;
+}
+
HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob
**error_messages)
{
- HRESULT hr;
-
TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint
%s,\n"
"target %s, sflags %#x, eflags %#x, shader %p, error_messages
%p\n",
data, data_size, debugstr_a(filename), defines, include,
debugstr_a(entrypoint),
debugstr_a(target), sflags, eflags, shader, error_messages);
- if (shader) *shader = NULL;
- if (error_messages) *error_messages = NULL;
-
- EnterCriticalSection(&wpp_mutex);
-
- hr = preprocess_shader(data, data_size, filename, defines, include, error_messages);
- if (SUCCEEDED(hr))
- hr = compile_shader(wpp_output, target, entrypoint, shader, error_messages);
-
- HeapFree(GetProcessHeap(), 0, wpp_output);
- LeaveCriticalSection(&wpp_mutex);
- return hr;
+ return D3DCompile2(data, data_size, filename, defines, include, entrypoint, target,
sflags,
+ eflags, 0, NULL, 0, shader, error_messages);
}
HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename,
@@ -758,3 +778,12 @@
data, size, flags, comments, disassembly);
return E_NOTIMPL;
}
+
+HRESULT WINAPI D3DCompileFromFile(const WCHAR *filename, const D3D_SHADER_MACRO *defines,
ID3DInclude *includes,
+ const char *entrypoint, const char *target, UINT flags1, UINT flags2, ID3DBlob
**code, ID3DBlob **errors)
+{
+ FIXME("filename %s, defines %p, includes %p, entrypoint %s, target %s, flags1
%x, flags2 %x, code %p, errors %p\n",
+ debugstr_w(filename), defines, includes, debugstr_a(entrypoint),
debugstr_a(target), flags1, flags2, code, errors);
+
+ return E_NOTIMPL;
+}
Removed: trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c [iso-8859-1]
(original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c (removed)
@@ -1,35 +0,0 @@
-/*
- * Direct3D shader compiler main file
- *
- * Copyright 2010 Matteo Bruni for CodeWeavers
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
- */
-
-#include "d3dcompiler_private.h"
-
-BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
-{
- switch (reason)
- {
- case DLL_WINE_PREATTACH:
- return FALSE; /* prefer native version */
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls(inst);
- break;
- }
- return TRUE;
-}
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h [iso-8859-1]
(original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h [iso-8859-1] Sun
Nov 22 16:34:38 2015
@@ -535,8 +535,8 @@
BWRITERSPSM_NOT,
};
-#define BWRITER_SM1_VS 0xfffe
-#define BWRITER_SM1_PS 0xffff
+#define BWRITER_SM1_VS 0xfffeu
+#define BWRITER_SM1_PS 0xffffu
#define BWRITERPS_VERSION(major, minor) ((BWRITER_SM1_PS << 16) | ((major) <<
8) | (minor))
#define BWRITERVS_VERSION(major, minor) ((BWRITER_SM1_VS << 16) | ((major) <<
8) | (minor))
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Nov 22 16:34:38 2015
@@ -24,7 +24,7 @@
reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3d8 # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3d9 # Synced to WineStaging-1.7.55
-reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.47
+reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3drm # Synced to WineStaging-1.7.47
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.47