wined3d: Recognize conservative depth output registers.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2017-09-10 14:25:39 +02:00 committed by Alexandre Julliard
parent 6ee7f90746
commit c95e0ef092
4 changed files with 18 additions and 0 deletions

View File

@ -2904,6 +2904,8 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
break; break;
case WINED3DSPR_DEPTHOUT: case WINED3DSPR_DEPTHOUT:
case WINED3DSPR_DEPTHOUTGE:
case WINED3DSPR_DEPTHOUTLE:
sprintf(register_name, "gl_FragDepth"); sprintf(register_name, "gl_FragDepth");
break; break;

View File

@ -2143,6 +2143,14 @@ static void shader_dump_register(struct wined3d_string_buffer *buffer,
shader_addline(buffer, "oDepth"); shader_addline(buffer, "oDepth");
break; break;
case WINED3DSPR_DEPTHOUTGE:
shader_addline(buffer, "oDepthGE");
break;
case WINED3DSPR_DEPTHOUTLE:
shader_addline(buffer, "oDepthLE");
break;
case WINED3DSPR_ATTROUT: case WINED3DSPR_ATTROUT:
shader_addline(buffer, "oD"); shader_addline(buffer, "oD");
break; break;

View File

@ -333,6 +333,8 @@ enum wined3d_sm4_register_type
WINED3D_SM5_RT_COVERAGE = 0x23, WINED3D_SM5_RT_COVERAGE = 0x23,
WINED3D_SM5_RT_LOCAL_THREAD_INDEX = 0x24, WINED3D_SM5_RT_LOCAL_THREAD_INDEX = 0x24,
WINED3D_SM5_RT_GS_INSTANCE_ID = 0x25, WINED3D_SM5_RT_GS_INSTANCE_ID = 0x25,
WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL = 0x26,
WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL = 0x27,
}; };
enum wined3d_sm4_output_primitive_type enum wined3d_sm4_output_primitive_type
@ -1148,6 +1150,8 @@ static const enum wined3d_shader_register_type register_type_table[] =
/* WINED3D_SM5_RT_COVERAGE */ WINED3DSPR_COVERAGE, /* WINED3D_SM5_RT_COVERAGE */ WINED3DSPR_COVERAGE,
/* WINED3D_SM5_RT_LOCAL_THREAD_INDEX */ WINED3DSPR_LOCALTHREADINDEX, /* WINED3D_SM5_RT_LOCAL_THREAD_INDEX */ WINED3DSPR_LOCALTHREADINDEX,
/* WINED3D_SM5_RT_GS_INSTANCE_ID */ WINED3DSPR_GSINSTID, /* WINED3D_SM5_RT_GS_INSTANCE_ID */ WINED3DSPR_GSINSTID,
/* WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL */ WINED3DSPR_DEPTHOUTGE,
/* WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL */ WINED3DSPR_DEPTHOUTLE,
}; };
static const struct wined3d_sm4_opcode_info *get_opcode_info(enum wined3d_sm4_opcode opcode) static const struct wined3d_sm4_opcode_info *get_opcode_info(enum wined3d_sm4_opcode opcode)

View File

@ -490,6 +490,8 @@ enum wined3d_shader_register_type
WINED3DSPR_COVERAGE, WINED3DSPR_COVERAGE,
WINED3DSPR_SAMPLEMASK, WINED3DSPR_SAMPLEMASK,
WINED3DSPR_GSINSTID, WINED3DSPR_GSINSTID,
WINED3DSPR_DEPTHOUTGE,
WINED3DSPR_DEPTHOUTLE,
}; };
enum wined3d_data_type enum wined3d_data_type
@ -3995,6 +3997,8 @@ static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
return FALSE; return FALSE;
case WINED3DSPR_DEPTHOUT: /* oDepth */ case WINED3DSPR_DEPTHOUT: /* oDepth */
case WINED3DSPR_DEPTHOUTGE:
case WINED3DSPR_DEPTHOUTLE:
case WINED3DSPR_CONSTBOOL: /* b# */ case WINED3DSPR_CONSTBOOL: /* b# */
case WINED3DSPR_LOOP: /* aL */ case WINED3DSPR_LOOP: /* aL */
case WINED3DSPR_PREDICATE: /* p0 */ case WINED3DSPR_PREDICATE: /* p0 */