Re: [Mesa-dev] [PATCH] gallium: remove boolean from state tracker APIs

2019-07-08 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] gallium: remove boolean from state tracker APIs

2019-07-04 Thread Timothy Arceri

Looks good to me.

Reviewed-by: Timothy Arceri 

On 5/7/19 5:36 am, Ilia Mirkin wrote:

Signed-off-by: Ilia Mirkin 
---

It's actually a bit tricky to compile all the bits involved, so some of
this is untested. However if it so happens that I missed a spot, it
should be trivial to fix.

  src/gallium/include/state_tracker/graw.h  |  8 +-
  src/gallium/include/state_tracker/st_api.h| 73 +--
  src/gallium/include/state_tracker/sw_winsys.h |  5 +-
  src/gallium/state_trackers/dri/dri_drawable.c | 34 -
  src/gallium/state_trackers/dri/dri_drawable.h |  6 +-
  src/gallium/state_trackers/dri/dri_screen.c   |  8 +-
  src/gallium/state_trackers/glx/xlib/xm_st.c   | 24 +++---
  src/gallium/state_trackers/glx/xlib/xm_st.h   |  2 +-
  src/gallium/state_trackers/hgl/hgl.c  | 14 ++--
  src/gallium/state_trackers/osmesa/osmesa.c|  8 +-
  src/gallium/state_trackers/wgl/stw_st.c   | 14 ++--
  src/gallium/state_trackers/wgl/stw_st.h   |  2 +-
  src/gallium/targets/graw-null/graw_util.c | 14 ++--
  src/gallium/winsys/sw/dri/dri_sw_winsys.c | 12 +--
  src/gallium/winsys/sw/gdi/gdi_sw_winsys.c | 10 +--
  src/gallium/winsys/sw/hgl/hgl_sw_winsys.c |  8 +-
  .../winsys/sw/kms-dri/kms_dri_sw_winsys.c | 12 +--
  src/gallium/winsys/sw/null/null_sw_winsys.c   |  8 +-
  .../winsys/sw/wrapper/wrapper_sw_winsys.c | 10 +--
  src/gallium/winsys/sw/xlib/xlib_sw_winsys.c   | 14 ++--
  src/mesa/state_tracker/st_manager.c   | 50 ++---
  src/mesa/state_tracker/st_manager.h   |  2 +-
  22 files changed, 168 insertions(+), 170 deletions(-)

diff --git a/src/gallium/include/state_tracker/graw.h 
b/src/gallium/include/state_tracker/graw.h
index 78ddf0a87f7..af81cc8871b 100644
--- a/src/gallium/include/state_tracker/graw.h
+++ b/src/gallium/include/state_tracker/graw.h
@@ -79,7 +79,7 @@ PUBLIC void *graw_parse_fragment_shader( struct pipe_context 
*pipe,
   * If an option has been successfully parsed, argi is updated
   * to point just after the option and return TRUE.
   */
-PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]);
+PUBLIC bool graw_parse_args(int *argi, int argc, char *argv[]);
  
  /* Saves surface contents to a file.

   *
@@ -89,8 +89,8 @@ PUBLIC boolean graw_parse_args(int *argi, int argc, char 
*argv[]);
   *
   * Returns TRUE if the surface has been saved.
   */
-PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe,
- struct pipe_surface *surface,
- const char *filename);
+PUBLIC bool graw_save_surface_to_file(struct pipe_context *pipe,
+  struct pipe_surface *surface,
+  const char *filename);
  
  #endif

diff --git a/src/gallium/include/state_tracker/st_api.h 
b/src/gallium/include/state_tracker/st_api.h
index 2b63b8a3d2a..b2b81b6ebc4 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -27,7 +27,6 @@
  #ifndef _ST_API_H_
  #define _ST_API_H_
  
-#include "pipe/p_compiler.h"

  #include "pipe/p_format.h"
  
  /**

@@ -218,19 +217,19 @@ struct st_visual
   */
  struct st_config_options
  {
-   boolean disable_blend_func_extended;
-   boolean disable_glsl_line_continuations;
-   boolean force_glsl_extensions_warn;
+   bool disable_blend_func_extended;
+   bool disable_glsl_line_continuations;
+   bool force_glsl_extensions_warn;
 unsigned force_glsl_version;
-   boolean allow_glsl_extension_directive_midshader;
-   boolean allow_glsl_builtin_const_expression;
-   boolean allow_glsl_relaxed_es;
-   boolean allow_glsl_builtin_variable_redeclaration;
-   boolean allow_higher_compat_version;
-   boolean glsl_zero_init;
-   boolean force_glsl_abs_sqrt;
-   boolean allow_glsl_cross_stage_interpolation_mismatch;
-   boolean allow_glsl_layout_qualifier_on_function_parameters;
+   bool allow_glsl_extension_directive_midshader;
+   bool allow_glsl_builtin_const_expression;
+   bool allow_glsl_relaxed_es;
+   bool allow_glsl_builtin_variable_redeclaration;
+   bool allow_higher_compat_version;
+   bool glsl_zero_init;
+   bool force_glsl_abs_sqrt;
+   bool allow_glsl_cross_stage_interpolation_mismatch;
+   bool allow_glsl_layout_qualifier_on_function_parameters;
 unsigned char config_options_sha1[20];
  };
  
@@ -319,9 +318,9 @@ struct st_framebuffer_iface

  *
  * @att is one of the front buffer attachments.
  */
-   boolean (*flush_front)(struct st_context_iface *stctx,
-  struct st_framebuffer_iface *stfbi,
-  enum st_attachment_type statt);
+   bool (*flush_front)(struct st_context_iface *stctx,
+   struct st_framebuffer_iface *stfbi,
+   enum st_attachment_type statt);
  
 /**

  * The state tracker asks for the textures it needs.
@@ -340,13 +339,13 @@ struct st_framebuffer_iface
  * 

[Mesa-dev] [PATCH] gallium: remove boolean from state tracker APIs

2019-07-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin 
---

It's actually a bit tricky to compile all the bits involved, so some of
this is untested. However if it so happens that I missed a spot, it
should be trivial to fix.

 src/gallium/include/state_tracker/graw.h  |  8 +-
 src/gallium/include/state_tracker/st_api.h| 73 +--
 src/gallium/include/state_tracker/sw_winsys.h |  5 +-
 src/gallium/state_trackers/dri/dri_drawable.c | 34 -
 src/gallium/state_trackers/dri/dri_drawable.h |  6 +-
 src/gallium/state_trackers/dri/dri_screen.c   |  8 +-
 src/gallium/state_trackers/glx/xlib/xm_st.c   | 24 +++---
 src/gallium/state_trackers/glx/xlib/xm_st.h   |  2 +-
 src/gallium/state_trackers/hgl/hgl.c  | 14 ++--
 src/gallium/state_trackers/osmesa/osmesa.c|  8 +-
 src/gallium/state_trackers/wgl/stw_st.c   | 14 ++--
 src/gallium/state_trackers/wgl/stw_st.h   |  2 +-
 src/gallium/targets/graw-null/graw_util.c | 14 ++--
 src/gallium/winsys/sw/dri/dri_sw_winsys.c | 12 +--
 src/gallium/winsys/sw/gdi/gdi_sw_winsys.c | 10 +--
 src/gallium/winsys/sw/hgl/hgl_sw_winsys.c |  8 +-
 .../winsys/sw/kms-dri/kms_dri_sw_winsys.c | 12 +--
 src/gallium/winsys/sw/null/null_sw_winsys.c   |  8 +-
 .../winsys/sw/wrapper/wrapper_sw_winsys.c | 10 +--
 src/gallium/winsys/sw/xlib/xlib_sw_winsys.c   | 14 ++--
 src/mesa/state_tracker/st_manager.c   | 50 ++---
 src/mesa/state_tracker/st_manager.h   |  2 +-
 22 files changed, 168 insertions(+), 170 deletions(-)

diff --git a/src/gallium/include/state_tracker/graw.h 
b/src/gallium/include/state_tracker/graw.h
index 78ddf0a87f7..af81cc8871b 100644
--- a/src/gallium/include/state_tracker/graw.h
+++ b/src/gallium/include/state_tracker/graw.h
@@ -79,7 +79,7 @@ PUBLIC void *graw_parse_fragment_shader( struct pipe_context 
*pipe,
  * If an option has been successfully parsed, argi is updated
  * to point just after the option and return TRUE.
  */
-PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]);
+PUBLIC bool graw_parse_args(int *argi, int argc, char *argv[]);
 
 /* Saves surface contents to a file.
  *
@@ -89,8 +89,8 @@ PUBLIC boolean graw_parse_args(int *argi, int argc, char 
*argv[]);
  *
  * Returns TRUE if the surface has been saved.
  */
-PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe,
- struct pipe_surface *surface,
- const char *filename);
+PUBLIC bool graw_save_surface_to_file(struct pipe_context *pipe,
+  struct pipe_surface *surface,
+  const char *filename);
 
 #endif
diff --git a/src/gallium/include/state_tracker/st_api.h 
b/src/gallium/include/state_tracker/st_api.h
index 2b63b8a3d2a..b2b81b6ebc4 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -27,7 +27,6 @@
 #ifndef _ST_API_H_
 #define _ST_API_H_
 
-#include "pipe/p_compiler.h"
 #include "pipe/p_format.h"
 
 /**
@@ -218,19 +217,19 @@ struct st_visual
  */
 struct st_config_options
 {
-   boolean disable_blend_func_extended;
-   boolean disable_glsl_line_continuations;
-   boolean force_glsl_extensions_warn;
+   bool disable_blend_func_extended;
+   bool disable_glsl_line_continuations;
+   bool force_glsl_extensions_warn;
unsigned force_glsl_version;
-   boolean allow_glsl_extension_directive_midshader;
-   boolean allow_glsl_builtin_const_expression;
-   boolean allow_glsl_relaxed_es;
-   boolean allow_glsl_builtin_variable_redeclaration;
-   boolean allow_higher_compat_version;
-   boolean glsl_zero_init;
-   boolean force_glsl_abs_sqrt;
-   boolean allow_glsl_cross_stage_interpolation_mismatch;
-   boolean allow_glsl_layout_qualifier_on_function_parameters;
+   bool allow_glsl_extension_directive_midshader;
+   bool allow_glsl_builtin_const_expression;
+   bool allow_glsl_relaxed_es;
+   bool allow_glsl_builtin_variable_redeclaration;
+   bool allow_higher_compat_version;
+   bool glsl_zero_init;
+   bool force_glsl_abs_sqrt;
+   bool allow_glsl_cross_stage_interpolation_mismatch;
+   bool allow_glsl_layout_qualifier_on_function_parameters;
unsigned char config_options_sha1[20];
 };
 
@@ -319,9 +318,9 @@ struct st_framebuffer_iface
 *
 * @att is one of the front buffer attachments.
 */
-   boolean (*flush_front)(struct st_context_iface *stctx,
-  struct st_framebuffer_iface *stfbi,
-  enum st_attachment_type statt);
+   bool (*flush_front)(struct st_context_iface *stctx,
+   struct st_framebuffer_iface *stfbi,
+   enum st_attachment_type statt);
 
/**
 * The state tracker asks for the textures it needs.
@@ -340,13 +339,13 @@ struct st_framebuffer_iface
 * the last call might be destroyed.  This behavior might change in the
 * future.
 */
-   boolean (*validate)(struct st_context_iface *stctx,
-