Commit c3a01b31 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use a more reasonable name for "SHADER_OPCODE_ARG".

parent de4e8cf0
......@@ -771,16 +771,16 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
const SHADER_OPCODE *opcode_table = This->baseShader.shader_ins;
const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table;
DWORD shader_version = reg_maps->shader_version;
struct wined3d_shader_instruction ins;
const DWORD *pToken = pFunction;
const SHADER_OPCODE *curOpcode;
SHADER_HANDLER hw_fct;
DWORD i;
SHADER_OPCODE_ARG hw_arg;
/* Initialize current parsing state */
hw_arg.shader = iface;
hw_arg.buffer = buffer;
hw_arg.reg_maps = reg_maps;
ins.shader = iface;
ins.buffer = buffer;
ins.reg_maps = reg_maps;
This->baseShader.parse_state.current_row = 0;
while (WINED3DPS_END() != *pToken)
......@@ -838,39 +838,39 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
continue;
}
hw_arg.opcode = curOpcode;
ins.opcode = curOpcode;
hw_arg.flags = opcode_token & WINED3D_OPCODESPECIFICCONTROL_MASK;
hw_arg.coissue = opcode_token & WINED3DSI_COISSUE;
ins.flags = opcode_token & WINED3D_OPCODESPECIFICCONTROL_MASK;
ins.coissue = opcode_token & WINED3DSI_COISSUE;
/* Destination token */
if (curOpcode->dst_token)
{
DWORD param, addr_token = 0;
pToken += shader_get_param(pToken, shader_version, &param, &addr_token);
hw_arg.dst = param;
hw_arg.dst_addr = addr_token;
ins.dst = param;
ins.dst_addr = addr_token;
}
/* Predication token */
if (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) hw_arg.predicate = *pToken++;
if (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) ins.predicate = *pToken++;
/* Other source tokens */
for (i = 0; i < (curOpcode->num_params - curOpcode->dst_token); ++i)
{
DWORD param, addr_token = 0;
pToken += shader_get_param(pToken, shader_version, &param, &addr_token);
hw_arg.src[i] = param;
hw_arg.src_addr[i] = addr_token;
ins.src[i] = param;
ins.src_addr[i] = addr_token;
}
/* Call appropriate function for output target */
hw_fct(&hw_arg);
hw_fct(&ins);
/* Process instruction modifiers for GLSL apps ( _sat, etc. ) */
/* FIXME: This should be internal to the shader backend.
* Also, right now this is the only reason "shader_mode" exists. */
if (This->baseShader.shader_mode == SHADER_GLSL) shader_glsl_add_instruction_modifiers(&hw_arg);
if (This->baseShader.shader_mode == SHADER_GLSL) shader_glsl_add_instruction_modifiers(&ins);
}
}
......
......@@ -450,7 +450,7 @@ typedef struct SHADER_OPCODE
DWORD max_version;
} SHADER_OPCODE;
typedef struct SHADER_OPCODE_ARG
struct wined3d_shader_instruction
{
IWineD3DBaseShader *shader;
const shader_reg_maps *reg_maps;
......@@ -463,9 +463,9 @@ typedef struct SHADER_OPCODE_ARG
DWORD src[4];
DWORD src_addr[4];
SHADER_BUFFER *buffer;
} SHADER_OPCODE_ARG;
};
typedef void (*SHADER_HANDLER)(const struct SHADER_OPCODE_ARG *);
typedef void (*SHADER_HANDLER)(const struct wined3d_shader_instruction *);
struct shader_caps {
DWORD VertexShaderVersion;
......@@ -2300,7 +2300,7 @@ extern BOOL vshader_get_input(
extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object);
/* GLSL helper functions */
extern void shader_glsl_add_instruction_modifiers(const SHADER_OPCODE_ARG *arg);
extern void shader_glsl_add_instruction_modifiers(const struct wined3d_shader_instruction *ins);
/*****************************************************************************
* IDirect3DBaseShader implementation structure
......
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