wined3d: Handle the sampler type shift in the frontend.
This commit is contained in:
parent
65321dd1ce
commit
42a8041cb8
|
@ -38,6 +38,10 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
|
|||
#define WINED3DSP_DCL_USAGEINDEX_SHIFT 16
|
||||
#define WINED3DSP_DCL_USAGEINDEX_MASK (0xf << WINED3DSP_DCL_USAGEINDEX_SHIFT)
|
||||
|
||||
/* DCL sampler type */
|
||||
#define WINED3DSP_TEXTURETYPE_SHIFT 27
|
||||
#define WINED3DSP_TEXTURETYPE_MASK (0xf << WINED3DSP_TEXTURETYPE_SHIFT)
|
||||
|
||||
/* Opcode-related masks */
|
||||
#define WINED3DSI_OPCODE_MASK 0x0000ffff
|
||||
|
||||
|
@ -269,7 +273,7 @@ static void shader_sm1_read_semantic(const DWORD **ptr, struct wined3d_shader_se
|
|||
|
||||
semantic->usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
|
||||
semantic->usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
|
||||
semantic->sampler_type = usage_token & WINED3DSP_TEXTURETYPE_MASK;
|
||||
semantic->sampler_type = (usage_token & WINED3DSP_TEXTURETYPE_MASK) >> WINED3DSP_TEXTURETYPE_SHIFT;
|
||||
shader_parse_dst_param(dst_token, NULL, &semantic->reg);
|
||||
}
|
||||
|
||||
|
@ -824,7 +828,7 @@ static void shader_dump_decl_usage(DWORD decl, DWORD param, DWORD shader_version
|
|||
TRACE("dcl");
|
||||
|
||||
if (regtype == WINED3DSPR_SAMPLER) {
|
||||
DWORD ttype = decl & WINED3DSP_TEXTURETYPE_MASK;
|
||||
DWORD ttype = (decl & WINED3DSP_TEXTURETYPE_MASK) >> WINED3DSP_TEXTURETYPE_SHIFT;
|
||||
|
||||
switch (ttype) {
|
||||
case WINED3DSTT_2D: TRACE("_2d"); break;
|
||||
|
|
|
@ -31,18 +31,15 @@
|
|||
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
|
||||
#define WINED3DFMT_FLAG_FOURCC 0x20
|
||||
|
||||
/** DCL sampler texture type **/
|
||||
#define WINED3DSP_TEXTURETYPE_SHIFT 27
|
||||
#define WINED3DSP_TEXTURETYPE_MASK 0x78000000
|
||||
typedef enum _WINED3DSAMPLER_TEXTURE_TYPE
|
||||
{
|
||||
WINED3DSTT_UNKNOWN = 0,
|
||||
WINED3DSTT_1D = 1,
|
||||
WINED3DSTT_2D = 2,
|
||||
WINED3DSTT_CUBE = 3,
|
||||
WINED3DSTT_VOLUME = 4,
|
||||
|
||||
typedef enum _WINED3DSAMPLER_TEXTURE_TYPE {
|
||||
WINED3DSTT_UNKNOWN = 0 << WINED3DSP_TEXTURETYPE_SHIFT,
|
||||
WINED3DSTT_1D = 1 << WINED3DSP_TEXTURETYPE_SHIFT,
|
||||
WINED3DSTT_2D = 2 << WINED3DSP_TEXTURETYPE_SHIFT,
|
||||
WINED3DSTT_CUBE = 3 << WINED3DSP_TEXTURETYPE_SHIFT,
|
||||
WINED3DSTT_VOLUME = 4 << WINED3DSP_TEXTURETYPE_SHIFT,
|
||||
|
||||
WINED3DSTT_FORCE_DWORD = 0x7FFFFFFF
|
||||
WINED3DSTT_FORCE_DWORD = 0x7FFFFFFF
|
||||
} WINED3DSAMPLER_TEXTURE_TYPE;
|
||||
|
||||
/** Register types **/
|
||||
|
|
Loading…
Reference in New Issue