mesa/arbprog: fix compile errors
authorChristian Gmeiner <cgmeiner@igalia.com>
Wed, 14 Jun 2023 10:23:39 +0000 (12:23 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 15 Jun 2023 05:47:32 +0000 (05:47 +0000)
When DEBUG_FP is set I see the following compiler errors:

../../src/gitlab_mesa/src/mesa/program/arbprogparse.c: In function '_mesa_parse_arb_fragment_program':
../../src/gitlab_mesa/src/mesa/program/arbprogparse.c:133:4: error: implicit declaration of function '_mesa_print_program'; did you mean '_mesa_parse_arb_program'? [-Werror=implicit-function-declaration]
  133 |    _mesa_print_program(&program->Base);
      |    ^~~~~~~~~~~~~~~~~~~
      |    _mesa_parse_arb_program
../../src/gitlab_mesa/src/mesa/program/arbprogparse.c:133:32: error: 'struct gl_program' has no member named 'Base'
  133 |    _mesa_print_program(&program->Base);
      |                                ^~
cc1: some warnings being treated as errors

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23644>

src/mesa/program/arbprogparse.c

index 30f940c..ed67ca8 100644 (file)
@@ -59,6 +59,7 @@ having three separate program parameter arrays.
 #include "prog_parameter.h"
 #include "prog_statevars.h"
 #include "prog_instruction.h"
+#include "prog_print.h"
 #include "program_parser.h"
 
 
@@ -130,7 +131,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
 
 #if DEBUG_FP
    printf("____________Fragment program %u ________\n", program->Id);
-   _mesa_print_program(&program->Base);
+   _mesa_print_program(program);
 #endif
 }