Mesa (master): Change return type of try_emit_* methods to bool.

Ian Romanick idr at kemper.freedesktop.org
Thu Aug 25 14:22:01 UTC 2011


Module: Mesa
Branch: master
Commit: 79a486ead92e4493b2de1fedf0c8cb5de47003cd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=79a486ead92e4493b2de1fedf0c8cb5de47003cd

Author: Kai Wasserbäch <kai at dev.carbon-project.org>
Date:   Tue Aug 23 10:48:57 2011 +0200

Change return type of try_emit_* methods to bool.

Ian Romanick explained (Message-Id: <4E528973.6080902 at freedesktop.org>),
that the return type of non-API methods shouldn't use GLboolean but a
standard C++ bool.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Bryan Cain <bryancain3 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Kai Wasserbäch <kai at dev.carbon-project.org>

---

 src/mesa/program/ir_to_mesa.cpp            |    8 ++++----
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index e7609df..6820e4c 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -312,11 +312,11 @@ public:
    void emit_scs(ir_instruction *ir, enum prog_opcode op,
 		 dst_reg dst, const src_reg &src);
 
-   GLboolean try_emit_mad(ir_expression *ir,
+   bool try_emit_mad(ir_expression *ir,
 			  int mul_operand);
    bool try_emit_mad_for_and_not(ir_expression *ir,
 				 int mul_operand);
-   GLboolean try_emit_sat(ir_expression *ir);
+   bool try_emit_sat(ir_expression *ir);
 
    void emit_swz(ir_expression *ir);
 
@@ -871,7 +871,7 @@ ir_to_mesa_visitor::visit(ir_function *ir)
    }
 }
 
-GLboolean
+bool
 ir_to_mesa_visitor::try_emit_mad(ir_expression *ir, int mul_operand)
 {
    int nonmul_operand = 1 - mul_operand;
@@ -934,7 +934,7 @@ ir_to_mesa_visitor::try_emit_mad_for_and_not(ir_expression *ir, int try_operand)
    return true;
 }
 
-GLboolean
+bool
 ir_to_mesa_visitor::try_emit_sat(ir_expression *ir)
 {
    /* Saturates were only introduced to vertex programs in
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 6f0d9fa..fff848c 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -390,11 +390,11 @@ public:
    void emit_scs(ir_instruction *ir, unsigned op,
         	 st_dst_reg dst, const st_src_reg &src);
 
-   GLboolean try_emit_mad(ir_expression *ir,
-        		  int mul_operand);
+   bool try_emit_mad(ir_expression *ir,
+              int mul_operand);
    bool try_emit_mad_for_and_not(ir_expression *ir,
               int mul_operand);
-   GLboolean try_emit_sat(ir_expression *ir);
+   bool try_emit_sat(ir_expression *ir);
 
    void emit_swz(ir_expression *ir);
 
@@ -1186,7 +1186,7 @@ glsl_to_tgsi_visitor::visit(ir_function *ir)
    }
 }
 
-GLboolean
+bool
 glsl_to_tgsi_visitor::try_emit_mad(ir_expression *ir, int mul_operand)
 {
    int nonmul_operand = 1 - mul_operand;
@@ -1252,7 +1252,7 @@ glsl_to_tgsi_visitor::try_emit_mad_for_and_not(ir_expression *ir, int try_operan
    return true;
 }
 
-GLboolean
+bool
 glsl_to_tgsi_visitor::try_emit_sat(ir_expression *ir)
 {
    /* Saturates were only introduced to vertex programs in




More information about the mesa-commit mailing list