* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "d3dcompiler_private.h"
+#define COBJMACROS
+#include "config.h"
+#include "wine/port.h"
+#include "wine/debug.h"
#include "wine/unicode.h"
+
+#include "d3dcompiler_private.h"
#include "wine/wpp.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
static char *wpp_lookup_mem(const char *filename, int type, const char *parent_name,
char **include_path, int include_path_count)
{
- /* Here we return always ok. We will maybe fail on the next wpp_open_mem */
+ /* We don't check for file existence here. We will potentially fail on
+ * the following wpp_open_mem(). */
char *path;
int i;
- TRACE("Looking for include %s.\n", debugstr_a(filename));
+ TRACE("Looking for include %s, parent %s.\n", debugstr_a(filename), debugstr_a(parent_name));
parent_include = NULL;
if (strcmp(parent_name, initial_filename))
{
HRESULT hr;
- TRACE("data %p, datasize %lu, filename %s, defines %p, include %p, sflags %#x,\n"
- "shader %p, error_messages %p\n",
+ TRACE("data %p, datasize %lu, filename %s, defines %p, include %p, sflags %#x, "
+ "shader %p, error_messages %p.\n",
data, datasize, debugstr_a(filename), defines, include, flags, shader, error_messages);
EnterCriticalSection(&wpp_mutex);
static const struct target_info * get_target_info(const char *target)
{
LONG min = 0;
- LONG max = sizeof(targets_info) / sizeof(targets_info[0]) - 1;
+ LONG max = ARRAY_SIZE(targets_info) - 1;
LONG cur;
int res;
return S_OK;
}
-HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
+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, ID3DBlob **shader, ID3DBlob **error_messages)
+ 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, shader %p, error_messages %p\n",
+ TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint %s, "
+ "target %s, sflags %#x, eflags %#x, secondary_flags %#x, secondary_data %p, "
+ "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, shader, error_messages);
+ 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;
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)
+{
+ TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint %s, "
+ "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);
+
+ 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,
const D3D_SHADER_MACRO *defines, ID3DInclude *include,
ID3DBlob **shader, ID3DBlob **error_messages)
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;
+}
+
+#ifndef __REACTOS__
+HRESULT WINAPI D3DLoadModule(const void *data, SIZE_T size, ID3D11Module **module)
+{
+ FIXME("data %p, size %lu, module %p stub!\n", data, size, module);
+ return E_NOTIMPL;
+}
+#endif