mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader: Calculate register size for SM4.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
5a8c89566f
commit
f7bf1dc01c
@@ -737,9 +737,17 @@ static struct hlsl_reg allocate_range(struct hlsl_ctx *ctx, struct liveness *liv
|
||||
|
||||
static const char *debug_register(char class, struct hlsl_reg reg, const struct hlsl_type *type)
|
||||
{
|
||||
static const char writemask_offset[] = {'w','x','y','z'};
|
||||
|
||||
if (type->reg_size > 4)
|
||||
{
|
||||
if (type->reg_size & 3)
|
||||
return vkd3d_dbg_sprintf("%c%u-%c%u.%c", class, reg.id, class,
|
||||
reg.id + (type->reg_size / 4), writemask_offset[type->reg_size & 3]);
|
||||
|
||||
return vkd3d_dbg_sprintf("%c%u-%c%u", class, reg.id, class,
|
||||
reg.id + (type->reg_size / 4) - 1);
|
||||
}
|
||||
return vkd3d_dbg_sprintf("%c%u%s", class, reg.id, debug_hlsl_writemask(reg.writemask));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user