mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/trace: Output sample count for multisampled resources.
This commit is contained in:
parent
9f6e6d3fcd
commit
ee52ad8106
Notes:
Alexandre Julliard
2023-03-08 21:51:58 +01:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/115
@ -288,6 +288,13 @@ static void shader_sm4_read_dcl_resource(struct vkd3d_shader_instruction *ins, u
|
||||
{
|
||||
semantic->resource_type = resource_type_table[resource_type];
|
||||
}
|
||||
|
||||
if (semantic->resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
|
||||
|| semantic->resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY)
|
||||
{
|
||||
semantic->sample_count = (opcode_token & VKD3D_SM4_RESOURCE_SAMPLE_COUNT_MASK) >> VKD3D_SM4_RESOURCE_SAMPLE_COUNT_SHIFT;
|
||||
}
|
||||
|
||||
reg_data_type = opcode == VKD3D_SM4_OP_DCL_RESOURCE ? VKD3D_DATA_RESOURCE : VKD3D_DATA_UAV;
|
||||
shader_sm4_read_dst_param(priv, &tokens, end, reg_data_type, &semantic->resource.reg);
|
||||
shader_sm4_set_descriptor_register_range(priv, &semantic->resource.reg.reg, &semantic->resource.range);
|
||||
|
@ -56,6 +56,9 @@
|
||||
#define VKD3D_SM4_RESOURCE_TYPE_SHIFT 11
|
||||
#define VKD3D_SM4_RESOURCE_TYPE_MASK (0xfu << VKD3D_SM4_RESOURCE_TYPE_SHIFT)
|
||||
|
||||
#define VKD3D_SM4_RESOURCE_SAMPLE_COUNT_SHIFT 16
|
||||
#define VKD3D_SM4_RESOURCE_SAMPLE_COUNT_MASK (0xfu << VKD3D_SM4_RESOURCE_SAMPLE_COUNT_SHIFT)
|
||||
|
||||
#define VKD3D_SM4_PRIMITIVE_TYPE_SHIFT 11
|
||||
#define VKD3D_SM4_PRIMITIVE_TYPE_MASK (0x3fu << VKD3D_SM4_PRIMITIVE_TYPE_SHIFT)
|
||||
|
||||
|
@ -663,8 +663,14 @@ static void shader_dump_decl_usage(struct vkd3d_d3d_asm_compiler *compiler,
|
||||
shader_addline(buffer, "_resource_");
|
||||
|
||||
shader_dump_resource_type(compiler, semantic->resource_type);
|
||||
if (semantic->resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
|
||||
|| semantic->resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY)
|
||||
{
|
||||
shader_addline(buffer, "(%u)", semantic->sample_count);
|
||||
}
|
||||
if (semantic->resource.reg.reg.type == VKD3DSPR_UAV)
|
||||
shader_dump_uav_flags(compiler, flags);
|
||||
shader_addline(buffer, " ");
|
||||
shader_dump_data_type(compiler, semantic->resource_data_type);
|
||||
}
|
||||
else
|
||||
|
@ -742,6 +742,7 @@ struct vkd3d_shader_semantic
|
||||
enum vkd3d_decl_usage usage;
|
||||
unsigned int usage_idx;
|
||||
enum vkd3d_shader_resource_type resource_type;
|
||||
unsigned int sample_count;
|
||||
enum vkd3d_data_type resource_data_type[VKD3D_VEC4_SIZE];
|
||||
struct vkd3d_shader_resource resource;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user