Mesa (master): r300g: remove unnecessary assertions

Joakim Sindholt jsindholt at kemper.freedesktop.org
Sat Oct 31 06:31:13 UTC 2009


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Oct 30 13:08:37 2009 +0100

r300g: remove unnecessary assertions

Also, correct typos in comments.

---

 src/gallium/drivers/r300/r300_reg.h   |    4 ++--
 src/gallium/drivers/r300/r300_state.c |    3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h
index babc3c7..1e4d3f5 100644
--- a/src/gallium/drivers/r300/r300_reg.h
+++ b/src/gallium/drivers/r300/r300_reg.h
@@ -862,10 +862,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #       define R300_POINTSIZE_X_MASK          0xffff0000
 #       define R300_POINTSIZE_MAX             (R300_POINTSIZE_Y_MASK / 6)
 
-/* Blue fill color */
+/* Red fill color */
 #define R500_GA_FILL_R                                0x4220
 
-/* Blue fill color */
+/* Green fill color */
 #define R500_GA_FILL_G                                0x4224
 
 /* Blue fill color */
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 5db8c69..1e7fabf 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -608,17 +608,14 @@ static void r300_set_viewport_state(struct pipe_context* pipe,
     r300->viewport_state->vte_control = R300_VTX_W0_FMT;
 
     if (state->scale[0] != 1.0f) {
-        assert(state->scale[0] != 0.0f);
         r300->viewport_state->xscale = state->scale[0];
         r300->viewport_state->vte_control |= R300_VPORT_X_SCALE_ENA;
     }
     if (state->scale[1] != 1.0f) {
-        assert(state->scale[1] != 0.0f);
         r300->viewport_state->yscale = state->scale[1];
         r300->viewport_state->vte_control |= R300_VPORT_Y_SCALE_ENA;
     }
     if (state->scale[2] != 1.0f) {
-        assert(state->scale[2] != 0.0f);
         r300->viewport_state->zscale = state->scale[2];
         r300->viewport_state->vte_control |= R300_VPORT_Z_SCALE_ENA;
     }




More information about the mesa-commit mailing list