d3dcompiler: Carry around both shader major and minor version.

This commit is contained in:
Matteo Bruni 2012-07-10 15:39:43 +02:00 committed by Alexandre Julliard
parent b8cdf2ee18
commit 29ba39face
4 changed files with 8 additions and 6 deletions

View File

@ -503,7 +503,7 @@ static HRESULT compile_shader(const char *preproc_shader, const char *target, co
TRACE("Preprocessed shader source: %s\n", debugstr_a(preproc_shader)); TRACE("Preprocessed shader source: %s\n", debugstr_a(preproc_shader));
FIXME("Parse compilation target.\n"); FIXME("Parse compilation target.\n");
shader = parse_hlsl_shader(preproc_shader, ST_VERTEX, 2, entrypoint, &messages); shader = parse_hlsl_shader(preproc_shader, ST_VERTEX, 2, 0, entrypoint, &messages);
if (messages) if (messages)
{ {

View File

@ -874,7 +874,7 @@ struct hlsl_ir_deref *new_var_deref(struct hlsl_ir_var *var) DECLSPEC_HIDDEN;
void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN;
BOOL pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; BOOL pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN;
struct hlsl_ir_function_decl *new_func_decl(const char *name, struct hlsl_type *return_type, struct list *parameters) DECLSPEC_HIDDEN; struct hlsl_ir_function_decl *new_func_decl(const char *name, struct hlsl_type *return_type, struct list *parameters) DECLSPEC_HIDDEN;
struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD version, struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD major, DWORD minor,
const char *entrypoint, char **messages) DECLSPEC_HIDDEN; const char *entrypoint, char **messages) DECLSPEC_HIDDEN;
const char *debug_hlsl_type(const struct hlsl_type *type) DECLSPEC_HIDDEN; const char *debug_hlsl_type(const struct hlsl_type *type) DECLSPEC_HIDDEN;

View File

@ -266,9 +266,10 @@ row_major {return KW_ROW_MAJOR; }
%% %%
struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD version, const char *entrypoint, char **messages); struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor,
const char *entrypoint, char **messages);
struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD version, struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD major, DWORD minor,
const char *entrypoint, char **messages) const char *entrypoint, char **messages)
{ {
struct bwriter_shader *ret = NULL; struct bwriter_shader *ret = NULL;
@ -277,7 +278,7 @@ struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type
buffer = hlsl__scan_string(text); buffer = hlsl__scan_string(text);
hlsl__switch_to_buffer(buffer); hlsl__switch_to_buffer(buffer);
ret = parse_hlsl(type, version, entrypoint, messages); ret = parse_hlsl(type, major, minor, entrypoint, messages);
hlsl__delete_buffer(buffer); hlsl__delete_buffer(buffer);
return ret; return ret;

View File

@ -918,7 +918,8 @@ expr: assignment_expr
%% %%
struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD version, const char *entrypoint, char **messages) struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor,
const char *entrypoint, char **messages)
{ {
struct hlsl_ir_function_decl *function; struct hlsl_ir_function_decl *function;
struct hlsl_scope *scope, *next_scope; struct hlsl_scope *scope, *next_scope;