Commit 7245cd2b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add a struct wined3d_shader_dst_param for storing destination parameter information.

parent 04b2e0b1
...@@ -771,6 +771,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, ...@@ -771,6 +771,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
const SHADER_OPCODE *opcode_table = This->baseShader.shader_ins; const SHADER_OPCODE *opcode_table = This->baseShader.shader_ins;
const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table; const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table;
DWORD shader_version = reg_maps->shader_version; DWORD shader_version = reg_maps->shader_version;
struct wined3d_shader_dst_param dst_param;
struct wined3d_shader_instruction ins; struct wined3d_shader_instruction ins;
const DWORD *pToken = pFunction; const DWORD *pToken = pFunction;
const SHADER_OPCODE *curOpcode; const SHADER_OPCODE *curOpcode;
...@@ -781,6 +782,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, ...@@ -781,6 +782,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
ins.shader = iface; ins.shader = iface;
ins.buffer = buffer; ins.buffer = buffer;
ins.reg_maps = reg_maps; ins.reg_maps = reg_maps;
ins.dst = &dst_param;
This->baseShader.parse_state.current_row = 0; This->baseShader.parse_state.current_row = 0;
while (WINED3DPS_END() != *pToken) while (WINED3DPS_END() != *pToken)
...@@ -846,10 +848,8 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, ...@@ -846,10 +848,8 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
ins.dst_count = curOpcode->dst_token ? 1 : 0; ins.dst_count = curOpcode->dst_token ? 1 : 0;
if (ins.dst_count) if (ins.dst_count)
{ {
DWORD param, addr_token = 0; dst_param.addr_token = 0;
pToken += shader_get_param(pToken, shader_version, &param, &addr_token); pToken += shader_get_param(pToken, shader_version, &dst_param.token, &dst_param.addr_token);
ins.dst = param;
ins.dst_addr = addr_token;
} }
/* Predication token */ /* Predication token */
......
...@@ -450,6 +450,12 @@ typedef struct SHADER_OPCODE ...@@ -450,6 +450,12 @@ typedef struct SHADER_OPCODE
DWORD max_version; DWORD max_version;
} SHADER_OPCODE; } SHADER_OPCODE;
struct wined3d_shader_dst_param
{
DWORD token;
DWORD addr_token;
};
struct wined3d_shader_instruction struct wined3d_shader_instruction
{ {
IWineD3DBaseShader *shader; IWineD3DBaseShader *shader;
...@@ -457,13 +463,12 @@ struct wined3d_shader_instruction ...@@ -457,13 +463,12 @@ struct wined3d_shader_instruction
enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx;
DWORD flags; DWORD flags;
BOOL coissue; BOOL coissue;
DWORD dst;
DWORD dst_addr;
DWORD predicate; DWORD predicate;
DWORD src[4]; DWORD src[4];
DWORD src_addr[4]; DWORD src_addr[4];
SHADER_BUFFER *buffer; SHADER_BUFFER *buffer;
UINT dst_count; UINT dst_count;
const struct wined3d_shader_dst_param *dst;
UINT src_count; UINT src_count;
}; };
......
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