wined3d: Get rid of the WINED3DSHADER_PARAM_SRCMOD_TYPE typedef.
This commit is contained in:
parent
a11a171366
commit
563edce2fa
|
@ -1951,8 +1951,9 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
|
|||
}
|
||||
else if (shader_version < WINED3D_SHADER_VERSION(2,0))
|
||||
{
|
||||
DWORD src_mod = ins->src[0].modifiers;
|
||||
if (src_mod == WINED3DSPSM_DZ) {
|
||||
enum wined3d_shader_src_modifier src_mod = ins->src[0].modifiers;
|
||||
if (src_mod == WINED3DSPSM_DZ)
|
||||
{
|
||||
/* TXP cannot handle DZ natively, so move the z coordinate to .w. reg_coord is a read-only
|
||||
* varying register, so we need a temp reg
|
||||
*/
|
||||
|
|
|
@ -1234,7 +1234,8 @@ static const char * const shift_glsl_tab[] = {
|
|||
};
|
||||
|
||||
/* Generate a GLSL parameter that does the input modifier computation and return the input register/mask to use */
|
||||
static void shader_glsl_gen_modifier(DWORD src_modifier, const char *in_reg, const char *in_regswizzle, char *out_str)
|
||||
static void shader_glsl_gen_modifier(enum wined3d_shader_src_modifier src_modifier,
|
||||
const char *in_reg, const char *in_regswizzle, char *out_str)
|
||||
{
|
||||
out_str[0] = 0;
|
||||
|
||||
|
@ -3054,7 +3055,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
|
|||
}
|
||||
else if (shader_version < WINED3D_SHADER_VERSION(2,0))
|
||||
{
|
||||
DWORD src_mod = ins->src[0].modifiers;
|
||||
enum wined3d_shader_src_modifier src_mod = ins->src[0].modifiers;
|
||||
|
||||
if (src_mod == WINED3DSPSM_DZ) {
|
||||
sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED;
|
||||
|
@ -3187,9 +3188,11 @@ static void shader_glsl_texcoord(const struct wined3d_shader_instruction *ins)
|
|||
shader_glsl_get_write_mask(&ins->dst[0], dst_mask);
|
||||
shader_addline(buffer, "clamp(gl_TexCoord[%u], 0.0, 1.0)%s);\n",
|
||||
ins->dst[0].reg.idx, dst_mask);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
enum wined3d_shader_src_modifier src_mod = ins->src[0].modifiers;
|
||||
DWORD reg = ins->src[0].reg.idx;
|
||||
DWORD src_mod = ins->src[0].modifiers;
|
||||
char dst_swizzle[6];
|
||||
|
||||
shader_glsl_get_swizzle(&ins->src[0], FALSE, write_mask, dst_swizzle);
|
||||
|
|
|
@ -1099,7 +1099,7 @@ void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
|
|||
void shader_dump_src_param(const struct wined3d_shader_src_param *param,
|
||||
const struct wined3d_shader_version *shader_version)
|
||||
{
|
||||
DWORD src_modifier = param->modifiers;
|
||||
enum wined3d_shader_src_modifier src_modifier = param->modifiers;
|
||||
DWORD swizzle = param->swizzle;
|
||||
|
||||
if (src_modifier == WINED3DSPSM_NEG
|
||||
|
|
|
@ -324,7 +324,7 @@ enum wined3d_immconst_type
|
|||
|
||||
#define WINED3DSP_NOSWIZZLE (0 | (1 << 2) | (2 << 4) | (3 << 6))
|
||||
|
||||
typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE
|
||||
enum wined3d_shader_src_modifier
|
||||
{
|
||||
WINED3DSPSM_NONE = 0,
|
||||
WINED3DSPSM_NEG = 1,
|
||||
|
@ -340,7 +340,7 @@ typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE
|
|||
WINED3DSPSM_ABS = 11,
|
||||
WINED3DSPSM_ABSNEG = 12,
|
||||
WINED3DSPSM_NOT = 13,
|
||||
} WINED3DSHADER_PARAM_SRCMOD_TYPE;
|
||||
};
|
||||
|
||||
#define WINED3DSP_WRITEMASK_0 0x1 /* .x r */
|
||||
#define WINED3DSP_WRITEMASK_1 0x2 /* .y g */
|
||||
|
@ -617,7 +617,7 @@ struct wined3d_shader_src_param
|
|||
{
|
||||
struct wined3d_shader_register reg;
|
||||
DWORD swizzle;
|
||||
DWORD modifiers;
|
||||
enum wined3d_shader_src_modifier modifiers;
|
||||
};
|
||||
|
||||
struct wined3d_shader_instruction
|
||||
|
|
Loading…
Reference in New Issue