mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d-shader: Avoid potential stack smashing.
This commit is contained in:
parent
7b5d745ef5
commit
3340cafdc4
@ -5552,14 +5552,17 @@ void vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler
|
||||
static void vkd3d_dxbc_compiler_emit_output_setup_function(struct vkd3d_dxbc_compiler *compiler)
|
||||
{
|
||||
uint32_t void_id, type_id, ptr_type_id, function_type_id, function_id, val_id;
|
||||
uint32_t param_type_id[MAX_REG_OUTPUT + 1], param_id[MAX_REG_OUTPUT + 1] = {};
|
||||
const struct vkd3d_shader_signature *signature = compiler->output_signature;
|
||||
uint32_t param_type_id[MAX_REG_OUTPUT], param_id[MAX_REG_OUTPUT] = {};
|
||||
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
|
||||
DWORD write_mask, variable_idx;
|
||||
unsigned int i, count;
|
||||
|
||||
function_id = compiler->output_setup_function_id;
|
||||
|
||||
assert(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(param_id));
|
||||
assert(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(param_type_id));
|
||||
|
||||
void_id = vkd3d_spirv_get_op_type_void(builder);
|
||||
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_TYPE_FLOAT, 4);
|
||||
ptr_type_id = vkd3d_spirv_get_op_type_pointer(builder, SpvStorageClassPrivate, type_id);
|
||||
|
Loading…
Reference in New Issue
Block a user