wined3d: Merge shader_dump_arr_entry() into shader_dump_register().
This commit is contained in:
parent
6144104f24
commit
752d80400d
|
@ -911,34 +911,21 @@ static void shader_dump_decl_usage(const struct wined3d_shader_semantic *semanti
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shader_dump_arr_entry(const struct wined3d_shader_src_param *rel_addr,
|
|
||||||
UINT register_idx, DWORD shader_version)
|
|
||||||
{
|
|
||||||
if (rel_addr)
|
|
||||||
{
|
|
||||||
TRACE("[");
|
|
||||||
shader_dump_src_param(rel_addr, shader_version);
|
|
||||||
TRACE(" + ");
|
|
||||||
}
|
|
||||||
TRACE("%u", register_idx);
|
|
||||||
if (rel_addr) TRACE("]");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type, UINT register_idx,
|
static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type, UINT register_idx,
|
||||||
const struct wined3d_shader_src_param *rel_addr, DWORD shader_version)
|
const struct wined3d_shader_src_param *rel_addr, DWORD shader_version)
|
||||||
{
|
{
|
||||||
static const char * const rastout_reg_names[] = {"oPos", "oFog", "oPts"};
|
static const char * const rastout_reg_names[] = {"oPos", "oFog", "oPts"};
|
||||||
static const char * const misctype_reg_names[] = {"vPos", "vFace"};
|
static const char * const misctype_reg_names[] = {"vPos", "vFace"};
|
||||||
|
UINT offset = register_idx;
|
||||||
|
|
||||||
switch (register_type)
|
switch (register_type)
|
||||||
{
|
{
|
||||||
case WINED3DSPR_TEMP:
|
case WINED3DSPR_TEMP:
|
||||||
TRACE("r%u", register_idx);
|
TRACE("r");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_INPUT:
|
case WINED3DSPR_INPUT:
|
||||||
TRACE("v");
|
TRACE("v");
|
||||||
shader_dump_arr_entry(rel_addr, register_idx, shader_version);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_CONST:
|
case WINED3DSPR_CONST:
|
||||||
|
@ -946,11 +933,11 @@ static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type
|
||||||
case WINED3DSPR_CONST3:
|
case WINED3DSPR_CONST3:
|
||||||
case WINED3DSPR_CONST4:
|
case WINED3DSPR_CONST4:
|
||||||
TRACE("c");
|
TRACE("c");
|
||||||
shader_dump_arr_entry(rel_addr, shader_get_float_offset(register_type, register_idx), shader_version);
|
offset = shader_get_float_offset(register_type, register_idx);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_TEXTURE: /* vs: case WINED3DSPR_ADDR */
|
case WINED3DSPR_TEXTURE: /* vs: case WINED3DSPR_ADDR */
|
||||||
TRACE("%c%u", (shader_is_pshader_version(shader_version) ? 't' : 'a'), register_idx);
|
TRACE("%c", shader_is_pshader_version(shader_version) ? 't' : 'a');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_RASTOUT:
|
case WINED3DSPR_RASTOUT:
|
||||||
|
@ -958,7 +945,7 @@ static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_COLOROUT:
|
case WINED3DSPR_COLOROUT:
|
||||||
TRACE("oC%u", register_idx);
|
TRACE("oC");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_DEPTHOUT:
|
case WINED3DSPR_DEPTHOUT:
|
||||||
|
@ -966,35 +953,26 @@ static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_ATTROUT:
|
case WINED3DSPR_ATTROUT:
|
||||||
TRACE("oD%u", register_idx);
|
TRACE("oD");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_TEXCRDOUT:
|
case WINED3DSPR_TEXCRDOUT:
|
||||||
/* Vertex shaders >= 3.0 use general purpose output registers
|
/* Vertex shaders >= 3.0 use general purpose output registers
|
||||||
* (WINED3DSPR_OUTPUT), which can include an address token */
|
* (WINED3DSPR_OUTPUT), which can include an address token */
|
||||||
if (WINED3DSHADER_VERSION_MAJOR(shader_version) >= 3)
|
if (WINED3DSHADER_VERSION_MAJOR(shader_version) >= 3) TRACE("o");
|
||||||
{
|
else TRACE("oT");
|
||||||
TRACE("o");
|
|
||||||
shader_dump_arr_entry(rel_addr, register_idx, shader_version);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TRACE("oT%u", register_idx);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_CONSTINT:
|
case WINED3DSPR_CONSTINT:
|
||||||
TRACE("i");
|
TRACE("i");
|
||||||
shader_dump_arr_entry(rel_addr, register_idx, shader_version);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_CONSTBOOL:
|
case WINED3DSPR_CONSTBOOL:
|
||||||
TRACE("b");
|
TRACE("b");
|
||||||
shader_dump_arr_entry(rel_addr, register_idx, shader_version);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_LABEL:
|
case WINED3DSPR_LABEL:
|
||||||
TRACE("l%u", register_idx);
|
TRACE("l");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_LOOP:
|
case WINED3DSPR_LOOP:
|
||||||
|
@ -1002,7 +980,7 @@ static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_SAMPLER:
|
case WINED3DSPR_SAMPLER:
|
||||||
TRACE("s%u", register_idx);
|
TRACE("s");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_MISCTYPE:
|
case WINED3DSPR_MISCTYPE:
|
||||||
|
@ -1011,13 +989,25 @@ static void shader_dump_register(WINED3DSHADER_PARAM_REGISTER_TYPE register_type
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINED3DSPR_PREDICATE:
|
case WINED3DSPR_PREDICATE:
|
||||||
TRACE("p%u", register_idx);
|
TRACE("p");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
TRACE("unhandled_rtype(%#x)", register_type);
|
TRACE("unhandled_rtype(%#x)", register_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (register_type != WINED3DSPR_RASTOUT && register_type != WINED3DSPR_MISCTYPE)
|
||||||
|
{
|
||||||
|
if (rel_addr)
|
||||||
|
{
|
||||||
|
TRACE("[");
|
||||||
|
shader_dump_src_param(rel_addr, shader_version);
|
||||||
|
TRACE(" + ");
|
||||||
|
}
|
||||||
|
TRACE("%u", offset);
|
||||||
|
if (rel_addr) TRACE("]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shader_dump_dst_param(const struct wined3d_shader_dst_param *param, DWORD shader_version)
|
static void shader_dump_dst_param(const struct wined3d_shader_dst_param *param, DWORD shader_version)
|
||||||
|
|
Loading…
Reference in New Issue