Commit 4ccffd8f authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Don't write the shader version tag from the header backend function.

parent e7a9218e
...@@ -744,12 +744,8 @@ static void vs_1_x_header(struct bc_writer *This, const struct bwriter_shader *s ...@@ -744,12 +744,8 @@ static void vs_1_x_header(struct bc_writer *This, const struct bwriter_shader *s
return; return;
} }
/* Declare the shader type and version */
put_dword(buffer, This->version);
write_declarations(This, buffer, FALSE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); write_declarations(This, buffer, FALSE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_constF(shader, buffer, FALSE); write_constF(shader, buffer, FALSE);
return;
} }
static HRESULT find_ps_builtin_semantics(struct bc_writer *This, static HRESULT find_ps_builtin_semantics(struct bc_writer *This,
...@@ -826,8 +822,6 @@ static void ps_1_x_header(struct bc_writer *This, const struct bwriter_shader *s ...@@ -826,8 +822,6 @@ static void ps_1_x_header(struct bc_writer *This, const struct bwriter_shader *s
return; return;
} }
/* Declare the shader type and version */
put_dword(buffer, This->version);
write_constF(shader, buffer, FALSE); write_constF(shader, buffer, FALSE);
} }
...@@ -847,8 +841,6 @@ static void ps_1_4_header(struct bc_writer *This, const struct bwriter_shader *s ...@@ -847,8 +841,6 @@ static void ps_1_4_header(struct bc_writer *This, const struct bwriter_shader *s
return; return;
} }
/* Declare the shader type and version */
put_dword(buffer, This->version);
write_constF(shader, buffer, FALSE); write_constF(shader, buffer, FALSE);
} }
...@@ -1595,14 +1587,10 @@ static void vs_2_header(struct bc_writer *This, ...@@ -1595,14 +1587,10 @@ static void vs_2_header(struct bc_writer *This,
return; return;
} }
/* Declare the shader type and version */
put_dword(buffer, This->version);
write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_constF(shader, buffer, TRUE); write_constF(shader, buffer, TRUE);
write_constB(shader, buffer, TRUE); write_constB(shader, buffer, TRUE);
write_constI(shader, buffer, TRUE); write_constI(shader, buffer, TRUE);
return;
} }
static void vs_2_srcreg(struct bc_writer *This, static void vs_2_srcreg(struct bc_writer *This,
...@@ -1875,8 +1863,6 @@ static void ps_2_header(struct bc_writer *This, const struct bwriter_shader *sha ...@@ -1875,8 +1863,6 @@ static void ps_2_header(struct bc_writer *This, const struct bwriter_shader *sha
return; return;
} }
/* Declare the shader type and version */
put_dword(buffer, This->version);
write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_samplers(shader, buffer); write_samplers(shader, buffer);
write_constF(shader, buffer, TRUE); write_constF(shader, buffer, TRUE);
...@@ -2112,16 +2098,12 @@ static const struct bytecode_backend ps_2_x_backend = { ...@@ -2112,16 +2098,12 @@ static const struct bytecode_backend ps_2_x_backend = {
}; };
static void sm_3_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { static void sm_3_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) {
/* Declare the shader type and version */
put_dword(buffer, This->version);
write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_declarations(This, buffer, TRUE, shader->outputs, shader->num_outputs, BWRITERSPR_OUTPUT); write_declarations(This, buffer, TRUE, shader->outputs, shader->num_outputs, BWRITERSPR_OUTPUT);
write_constF(shader, buffer, TRUE); write_constF(shader, buffer, TRUE);
write_constB(shader, buffer, TRUE); write_constB(shader, buffer, TRUE);
write_constI(shader, buffer, TRUE); write_constI(shader, buffer, TRUE);
write_samplers(shader, buffer); write_samplers(shader, buffer);
return;
} }
static void sm_3_srcreg(struct bc_writer *This, static void sm_3_srcreg(struct bc_writer *This,
...@@ -2571,6 +2553,9 @@ HRESULT SlWriteBytecode(const struct bwriter_shader *shader, int dxversion, DWOR ...@@ -2571,6 +2553,9 @@ HRESULT SlWriteBytecode(const struct bwriter_shader *shader, int dxversion, DWOR
goto error; goto error;
} }
/* Write shader type and version */
put_dword(buffer, shader->version);
writer->funcs->header(writer, shader, buffer); writer->funcs->header(writer, shader, buffer);
if(FAILED(writer->state)) { if(FAILED(writer->state)) {
hr = writer->state; hr = writer->state;
......
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