mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Emit a trace message if TGSM alignment is ignored.
This would cause a lot of warning spam if it was a warning.
This commit is contained in:
parent
5e63164d01
commit
b22632ff1a
Notes:
Alexandre Julliard
2024-03-14 23:23:27 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/681
@ -6435,13 +6435,18 @@ static void spirv_compiler_emit_resource_declaration(struct spirv_compiler *comp
|
||||
}
|
||||
|
||||
static void spirv_compiler_emit_workgroup_memory(struct spirv_compiler *compiler,
|
||||
const struct vkd3d_shader_register *reg, unsigned int size, unsigned int structure_stride, bool zero_init)
|
||||
const struct vkd3d_shader_register *reg, unsigned int alignment, unsigned int size,
|
||||
unsigned int structure_stride, bool zero_init)
|
||||
{
|
||||
uint32_t type_id, array_type_id, length_id, pointer_type_id, var_id, init_id;
|
||||
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
|
||||
const SpvStorageClass storage_class = SpvStorageClassWorkgroup;
|
||||
struct vkd3d_symbol reg_symbol;
|
||||
|
||||
/* Alignment is supported only in the Kernel execution model. */
|
||||
if (alignment)
|
||||
TRACE("Ignoring alignment %u.\n", alignment);
|
||||
|
||||
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_SHADER_COMPONENT_UINT, 1);
|
||||
length_id = spirv_compiler_get_constant_uint(compiler, size);
|
||||
array_type_id = vkd3d_spirv_get_op_type_array(builder, type_id, length_id);
|
||||
@ -6464,7 +6469,7 @@ static void spirv_compiler_emit_dcl_tgsm_raw(struct spirv_compiler *compiler,
|
||||
const struct vkd3d_shader_instruction *instruction)
|
||||
{
|
||||
const struct vkd3d_shader_tgsm_raw *tgsm_raw = &instruction->declaration.tgsm_raw;
|
||||
spirv_compiler_emit_workgroup_memory(compiler, &tgsm_raw->reg.reg,
|
||||
spirv_compiler_emit_workgroup_memory(compiler, &tgsm_raw->reg.reg, tgsm_raw->alignment,
|
||||
tgsm_raw->byte_count / 4, 0, tgsm_raw->zero_init);
|
||||
}
|
||||
|
||||
@ -6473,7 +6478,7 @@ static void spirv_compiler_emit_dcl_tgsm_structured(struct spirv_compiler *compi
|
||||
{
|
||||
const struct vkd3d_shader_tgsm_structured *tgsm_structured = &instruction->declaration.tgsm_structured;
|
||||
unsigned int stride = tgsm_structured->byte_stride / 4;
|
||||
spirv_compiler_emit_workgroup_memory(compiler, &tgsm_structured->reg.reg,
|
||||
spirv_compiler_emit_workgroup_memory(compiler, &tgsm_structured->reg.reg, tgsm_structured->alignment,
|
||||
tgsm_structured->structure_count * stride, stride, tgsm_structured->zero_init);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user