From fc4592aef5b7268a080c87c7a005c5ffc0440682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 25 Apr 2023 18:43:06 +0200 Subject: [PATCH] svga: Make declaration of emit_input_declaration match definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pointed out by GCC 13: ../src/gallium/drivers/svga/svga_tgsi_vgpu10.c:3786:1: warning: conflicting types for ‘emit_input_declaration’ due to enum/integer mismatch; have ‘void(struct svga_shader_emitter_v10 *, VGPU10_OPCODE_TYPE, VGPU10_OPERAND_TYPE, VGPU10_OPERAND_INDEX_DIMENSION, unsigned int, unsigned int, VGPU10_SYSTEM_NAME, VGPU10_OPERAND_NUM_COMPONENTS, VGPU10_OPERAND_4_COMPONENT_SELECTION_MODE, unsigned int, VGPU10_INTERPOLATION_MODE, boolean, SVGA3dDXSignatureSemanticName)’ {aka ‘void(struct svga_shader_emitter_v10 *, VGPU10_OPCODE_TYPE, VGPU10_OPERAND_TYPE, VGPU10_OPERAND_INDEX_DIMENSION, unsigned int, unsigned int, VGPU10_SYSTEM_NAME, VGPU10_OPERAND_NUM_COMPONENTS, VGPU10_OPERAND_4_COMPONENT_SELECTION_MODE, unsigned int, VGPU10_INTERPOLATION_MODE, unsigned char, unsigned int)’} [-Wenum-int-mismatch] 3786 | emit_input_declaration(struct svga_shader_emitter_v10 *emit, | ^~~~~~~~~~~~~~~~~~~~~~ ../src/gallium/drivers/svga/svga_tgsi_vgpu10.c:516:1: note: previous declaration of ‘emit_input_declaration’ with type ‘void(struct svga_shader_emitter_v10 *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, boolean, SVGA3dDXSignatureSemanticName)’ {aka ‘void(struct svga_shader_emitter_v10 *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned char, unsigned int)’} 516 | emit_input_declaration(struct svga_shader_emitter_v10 *emit, | ^~~~~~~~~~~~~~~~~~~~~~ Part-of: (cherry picked from commit 6bab67f5a66d6235a261c84b45df56db0658f247) --- .pick_status.json | 2 +- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index fe37cb69852..1c6ebfcb626 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1516,7 +1516,7 @@ "description": "svga: Make declaration of emit_input_declaration match definition", "nominated": false, "nomination_type": null, - "resolution": 4, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 05a1ff6bed9..e1532797e56 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -514,11 +514,15 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, static void emit_input_declaration(struct svga_shader_emitter_v10 *emit, - unsigned opcodeType, unsigned operandType, - unsigned dim, unsigned index, unsigned size, - unsigned name, unsigned numComp, - unsigned selMode, unsigned usageMask, - unsigned interpMode, + VGPU10_OPCODE_TYPE opcodeType, + VGPU10_OPERAND_TYPE operandType, + VGPU10_OPERAND_INDEX_DIMENSION dim, + unsigned index, unsigned size, + VGPU10_SYSTEM_NAME name, + VGPU10_OPERAND_NUM_COMPONENTS numComp, + VGPU10_OPERAND_4_COMPONENT_SELECTION_MODE selMode, + unsigned usageMask, + VGPU10_INTERPOLATION_MODE interpMode, boolean addSignature, SVGA3dDXSignatureSemanticName sgnName);