Commit 3f221611 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Skip search of the parent include for the initial file.

parent bcecdbda
...@@ -149,8 +149,10 @@ static char *wpp_lookup_mem(const char *filename, int type, const char *parent_n ...@@ -149,8 +149,10 @@ static char *wpp_lookup_mem(const char *filename, int type, const char *parent_n
char *path; char *path;
int i; int i;
TRACE("Looking for include %s.\n", debugstr_a(filename));
parent_include = NULL; parent_include = NULL;
if(parent_name[0] != '\0') if (strcmp(parent_name, initial_filename))
{ {
for(i = 0; i < includes_size; i++) for(i = 0; i < includes_size; i++)
{ {
...@@ -162,7 +164,7 @@ static char *wpp_lookup_mem(const char *filename, int type, const char *parent_n ...@@ -162,7 +164,7 @@ static char *wpp_lookup_mem(const char *filename, int type, const char *parent_n
} }
if(parent_include == NULL) if(parent_include == NULL)
{ {
ERR("Parent include file missing\n"); ERR("Parent include %s missing.\n", debugstr_a(parent_name));
return NULL; return NULL;
} }
} }
...@@ -178,6 +180,8 @@ static void *wpp_open_mem(const char *filename, int type) ...@@ -178,6 +180,8 @@ static void *wpp_open_mem(const char *filename, int type)
struct mem_file_desc *desc; struct mem_file_desc *desc;
HRESULT hr; HRESULT hr;
TRACE("Opening include %s.\n", debugstr_a(filename));
if(!strcmp(filename, initial_filename)) if(!strcmp(filename, initial_filename))
{ {
current_shader.pos = 0; current_shader.pos = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment