Zebediah Figura : d3dcompiler: Get rid of the "len" parameter to write_declarations().
Alexandre Julliard
julliard at winehq.org
Fri Mar 27 16:14:40 CDT 2020
Module: wine
Branch: master
Commit: 5ba51ef26cb7d47d5c60d8cfe72f1285f7d33227
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5ba51ef26cb7d47d5c60d8cfe72f1285f7d33227
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Mar 25 23:29:02 2020 -0500
d3dcompiler: Get rid of the "len" parameter to write_declarations().
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dcompiler_43/bytecodewriter.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/d3dcompiler_43/bytecodewriter.c b/dlls/d3dcompiler_43/bytecodewriter.c
index b1c0bb6071..39ab6a5ccc 100644
--- a/dlls/d3dcompiler_43/bytecodewriter.c
+++ b/dlls/d3dcompiler_43/bytecodewriter.c
@@ -592,9 +592,9 @@ static DWORD d3dsp_register( D3DSHADER_PARAM_REGISTER_TYPE type, DWORD num )
/******************************************************
* Implementation of the writer functions starts here *
******************************************************/
-static void write_declarations(struct bc_writer *This,
- struct bytecode_buffer *buffer, BOOL len,
- const struct declaration *decls, unsigned int num, DWORD type) {
+static void write_declarations(struct bc_writer *This, struct bytecode_buffer *buffer,
+ const struct declaration *decls, unsigned int num, DWORD type)
+{
DWORD i;
DWORD instr_dcl = D3DSIO_DCL;
DWORD token;
@@ -602,9 +602,8 @@ static void write_declarations(struct bc_writer *This,
ZeroMemory(®, sizeof(reg));
- if(len) {
+ if (This->shader->major_version > 1)
instr_dcl |= 2 << D3DSI_INSTLENGTH_SHIFT;
- }
for(i = 0; i < num; i++) {
if(decls[i].builtin) continue;
@@ -759,7 +758,7 @@ static void vs_1_x_header(struct bc_writer *This, const struct bwriter_shader *s
return;
}
- write_declarations(This, buffer, FALSE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
+ write_declarations(This, buffer, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_constF(shader, buffer, FALSE);
}
@@ -1569,7 +1568,7 @@ static void vs_2_header(struct bc_writer *This,
return;
}
- write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
+ write_declarations(This, buffer, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_constF(shader, buffer, TRUE);
write_constB(shader, buffer, TRUE);
write_constI(shader, buffer, TRUE);
@@ -1836,7 +1835,7 @@ static void ps_2_header(struct bc_writer *This, const struct bwriter_shader *sha
return;
}
- write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
+ write_declarations(This, buffer, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
write_samplers(shader, buffer);
write_constF(shader, buffer, TRUE);
write_constB(shader, buffer, TRUE);
@@ -2065,8 +2064,8 @@ 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) {
- 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, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT);
+ write_declarations(This, buffer, shader->outputs, shader->num_outputs, BWRITERSPR_OUTPUT);
write_constF(shader, buffer, TRUE);
write_constB(shader, buffer, TRUE);
write_constI(shader, buffer, TRUE);
More information about the wine-cvs
mailing list