mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 22:13:40 +00:00
wined3d: Implement support for projective textures in ps 2.0 and later.
This commit is contained in:
parent
bb00c95c45
commit
333de16fb6
|
@ -941,6 +941,9 @@ void shader_trace_init(
|
|||
default:
|
||||
TRACE("_(%u)", op);
|
||||
}
|
||||
} else if (curOpcode->opcode == WINED3DSIO_TEX &&
|
||||
This->baseShader.hex_version >= WINED3DPS_VERSION(2,0)) {
|
||||
if(opcode_token & WINED3DSI_TEXLD_PROJECT) TRACE("p");
|
||||
}
|
||||
|
||||
/* Destination token */
|
||||
|
|
|
@ -1472,8 +1472,13 @@ void pshader_glsl_tex(SHADER_OPCODE_ARG* arg) {
|
|||
}
|
||||
} else {
|
||||
sampler_idx = arg->src[1] & WINED3DSP_REGNUM_MASK;
|
||||
/* TODO: Handle D3DSI_TEXLD_PROJECTED... */
|
||||
projected = FALSE;
|
||||
if(arg->opcode_token & WINED3DSI_TEXLD_PROJECT) {
|
||||
/* ps 2.0 texldp instruction always divides by the fourth component. */
|
||||
projected = TRUE;
|
||||
mask = WINED3DSP_WRITEMASK_3;
|
||||
} else {
|
||||
projected = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
sampler_type = arg->reg_maps->samplers[sampler_idx] & WINED3DSP_TEXTURETYPE_MASK;
|
||||
|
|
|
@ -291,6 +291,9 @@ typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE {
|
|||
|
||||
#define WINED3DSHADER_INSTRUCTION_PREDICATED (1 << 28)
|
||||
|
||||
/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
|
||||
#define WINED3DSI_TEXLD_PROJECT 0x00010000
|
||||
|
||||
/** Shader version tokens, and shader end tokens **/
|
||||
|
||||
#define WINED3DPS_VERSION(major, minor) (0xFFFF0000 | ((major) << 8) | (minor))
|
||||
|
|
Loading…
Reference in a new issue