wined3d: Pass a struct wined3d_shader_register to shader_is_scalar().
This commit is contained in:
parent
4a18697246
commit
96005c0fca
|
@ -1242,7 +1242,7 @@ static DWORD shader_glsl_get_write_mask(const struct wined3d_shader_dst_param *p
|
||||||
{
|
{
|
||||||
DWORD mask = param->write_mask;
|
DWORD mask = param->write_mask;
|
||||||
|
|
||||||
if (shader_is_scalar(param->reg.type, param->reg.idx))
|
if (shader_is_scalar(¶m->reg))
|
||||||
{
|
{
|
||||||
mask = WINED3DSP_WRITEMASK_0;
|
mask = WINED3DSP_WRITEMASK_0;
|
||||||
*write_mask = '\0';
|
*write_mask = '\0';
|
||||||
|
@ -1285,7 +1285,7 @@ static void shader_glsl_swizzle_to_str(const DWORD swizzle, BOOL fixup, DWORD ma
|
||||||
static void shader_glsl_get_swizzle(const struct wined3d_shader_src_param *param,
|
static void shader_glsl_get_swizzle(const struct wined3d_shader_src_param *param,
|
||||||
BOOL fixup, DWORD mask, char *swizzle_str)
|
BOOL fixup, DWORD mask, char *swizzle_str)
|
||||||
{
|
{
|
||||||
if (shader_is_scalar(param->reg.type, param->reg.idx))
|
if (shader_is_scalar(¶m->reg))
|
||||||
*swizzle_str = '\0';
|
*swizzle_str = '\0';
|
||||||
else
|
else
|
||||||
shader_glsl_swizzle_to_str(param->swizzle, fixup, mask, swizzle_str);
|
shader_glsl_swizzle_to_str(param->swizzle, fixup, mask, swizzle_str);
|
||||||
|
@ -1970,7 +1970,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
|
||||||
char mask_char[6];
|
char mask_char[6];
|
||||||
BOOL temp_destination = FALSE;
|
BOOL temp_destination = FALSE;
|
||||||
|
|
||||||
if (shader_is_scalar(ins->src[0].reg.type, ins->src[0].reg.idx))
|
if (shader_is_scalar(&ins->src[0].reg))
|
||||||
{
|
{
|
||||||
write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
|
write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
|
||||||
|
|
||||||
|
|
|
@ -2594,13 +2594,13 @@ static inline BOOL shader_is_vshader_version(enum wined3d_shader_type type)
|
||||||
return type == WINED3D_SHADER_TYPE_VERTEX;
|
return type == WINED3D_SHADER_TYPE_VERTEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline BOOL shader_is_scalar(WINED3DSHADER_PARAM_REGISTER_TYPE register_type, UINT register_idx)
|
static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
|
||||||
{
|
{
|
||||||
switch (register_type)
|
switch (reg->type)
|
||||||
{
|
{
|
||||||
case WINED3DSPR_RASTOUT:
|
case WINED3DSPR_RASTOUT:
|
||||||
/* oFog & oPts */
|
/* oFog & oPts */
|
||||||
if (register_idx != 0) return TRUE;
|
if (reg->idx != 0) return TRUE;
|
||||||
/* oPos */
|
/* oPos */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -2611,7 +2611,7 @@ static inline BOOL shader_is_scalar(WINED3DSHADER_PARAM_REGISTER_TYPE register_t
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case WINED3DSPR_MISCTYPE:
|
case WINED3DSPR_MISCTYPE:
|
||||||
switch(register_idx)
|
switch(reg->idx)
|
||||||
{
|
{
|
||||||
case 0: /* vPos */
|
case 0: /* vPos */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue