wined3d: Handle the opcode specific control shift in the frontend rather than the backend.
This commit is contained in:
parent
234f167d9d
commit
35499d0c3c
|
@ -967,7 +967,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
|
|||
}
|
||||
|
||||
ins.handler_idx = curOpcode->handler_idx;
|
||||
ins.flags = opcode_token & WINED3D_OPCODESPECIFICCONTROL_MASK;
|
||||
ins.flags = (opcode_token & WINED3D_OPCODESPECIFICCONTROL_MASK) >> WINED3D_OPCODESPECIFICCONTROL_SHIFT;
|
||||
ins.coissue = opcode_token & WINED3DSI_COISSUE;
|
||||
|
||||
/* Destination token */
|
||||
|
@ -1146,7 +1146,7 @@ void shader_trace_init(const DWORD *pFunction, const SHADER_OPCODE *opcode_table
|
|||
if (curOpcode->opcode == WINED3DSIO_IFC
|
||||
|| curOpcode->opcode == WINED3DSIO_BREAKC)
|
||||
{
|
||||
DWORD op = (opcode_token & INST_CONTROLS_MASK) >> INST_CONTROLS_SHIFT;
|
||||
DWORD op = (opcode_token & WINED3D_OPCODESPECIFICCONTROL_MASK) >> WINED3D_OPCODESPECIFICCONTROL_SHIFT;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
|
@ -1161,7 +1161,7 @@ void shader_trace_init(const DWORD *pFunction, const SHADER_OPCODE *opcode_table
|
|||
}
|
||||
else if (curOpcode->opcode == WINED3DSIO_TEX
|
||||
&& shader_version >= WINED3DPS_VERSION(2,0)
|
||||
&& (opcode_token & WINED3DSI_TEXLD_PROJECT))
|
||||
&& (opcode_token & (WINED3DSI_TEXLD_PROJECT << WINED3D_OPCODESPECIFICCONTROL_SHIFT)))
|
||||
{
|
||||
TRACE("p");
|
||||
}
|
||||
|
|
|
@ -1351,9 +1351,8 @@ void shader_glsl_add_instruction_modifiers(const struct wined3d_shader_instructi
|
|||
}
|
||||
}
|
||||
|
||||
static inline const char *shader_get_comp_op(DWORD flags)
|
||||
static inline const char *shader_get_comp_op(DWORD op)
|
||||
{
|
||||
DWORD op = (flags & INST_CONTROLS_MASK) >> INST_CONTROLS_SHIFT;
|
||||
switch (op) {
|
||||
case COMPARISON_GT: return ">";
|
||||
case COMPARISON_EQ: return "==";
|
||||
|
|
|
@ -2253,10 +2253,6 @@ typedef struct local_constant {
|
|||
DWORD value[4];
|
||||
} local_constant;
|
||||
|
||||
/* Undocumented opcode controls */
|
||||
#define INST_CONTROLS_SHIFT 16
|
||||
#define INST_CONTROLS_MASK 0x00ff0000
|
||||
|
||||
typedef enum COMPARISON_TYPE {
|
||||
COMPARISON_GT = 1,
|
||||
COMPARISON_EQ = 2,
|
||||
|
|
|
@ -213,8 +213,8 @@ typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE {
|
|||
} WINED3DSHADER_INSTRUCTION_OPCODE_TYPE;
|
||||
|
||||
/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
|
||||
#define WINED3DSI_TEXLD_PROJECT 0x00010000
|
||||
#define WINED3DSI_TEXLD_BIAS 0x00020000
|
||||
#define WINED3DSI_TEXLD_PROJECT 1
|
||||
#define WINED3DSI_TEXLD_BIAS 2
|
||||
|
||||
/** Shader version tokens, and shader end tokens **/
|
||||
|
||||
|
|
Loading…
Reference in New Issue