mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
include: Add STATIC_ASSERT() macro.
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:
committed by
Alexandre Julliard
parent
be462a932f
commit
41ca2469b2
@@ -1788,7 +1788,7 @@ static void read_dword(const char **ptr, DWORD *d)
|
||||
|
||||
static void read_float(const char **ptr, float *f)
|
||||
{
|
||||
assert(sizeof(float) == sizeof(DWORD)); /* FIXME: use static assert */
|
||||
STATIC_ASSERT(sizeof(float) == sizeof(DWORD));
|
||||
read_dword(ptr, (DWORD *)f);
|
||||
}
|
||||
|
||||
|
@@ -6897,10 +6897,10 @@ static void vkd3d_dxbc_compiler_emit_shader_epilogue_function(struct vkd3d_dxbc_
|
||||
unsigned int i, count;
|
||||
DWORD variable_idx;
|
||||
|
||||
function_id = compiler->epilogue_function_id;
|
||||
STATIC_ASSERT(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(param_id));
|
||||
STATIC_ASSERT(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(param_type_id));
|
||||
|
||||
assert(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(param_id));
|
||||
assert(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(param_type_id));
|
||||
function_id = compiler->epilogue_function_id;
|
||||
|
||||
void_id = vkd3d_spirv_get_op_type_void(builder);
|
||||
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_TYPE_FLOAT, 4);
|
||||
|
Reference in New Issue
Block a user