r300g: Don't bother testing for empty scissors.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 11 Jan 2010 07:38:05 +0000 (23:38 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 11 Jan 2010 07:38:05 +0000 (23:38 -0800)
If somebody goes through that much effort, they probably intended it.
So humor them. :3

src/gallium/drivers/r300/r300_context.h
src/gallium/drivers/r300/r300_render.c
src/gallium/drivers/r300/r300_state.c

index 70a04d6f445e7a06ef3c4f66a959397b7f6542a9..5937f0e2cc542539d9e291956e0f3346d1787e1c 100644 (file)
@@ -109,9 +109,6 @@ struct r300_sampler_state {
 struct r300_scissor_regs {
     uint32_t top_left;     /* R300_SC_SCISSORS_TL: 0x43e0 */
     uint32_t bottom_right; /* R300_SC_SCISSORS_BR: 0x43e4 */
-
-    /* Whether everything is culled by scissoring. */
-    boolean empty_area;
 };
 
 struct r300_scissor_state {
index 2bd3acea410e997c37c4a1f51186b554c027e101..ee43421cdb7f69a99f7f9459ca4da0255a14dd5f 100644 (file)
@@ -69,12 +69,6 @@ uint32_t r300_translate_primitive(unsigned prim)
     }
 }
 
-static boolean r300_nothing_to_draw(struct r300_context *r300)
-{
-    return ((struct r300_rs_state*)r300->rs_state.state)->rs.scissor &&
-           ((struct r300_scissor_state*)r300->scissor_state.state)->scissor.empty_area;
-}
-
 static uint32_t r300_provoking_vertex_fixes(struct r300_context *r300,
                                             unsigned mode)
 {
@@ -236,10 +230,6 @@ void r300_draw_range_elements(struct pipe_context* pipe,
         return;
     }
 
-    if (r300_nothing_to_draw(r300)) {
-        return;
-    }
-
     r300_update_derived_state(r300);
 
     if (!r300_setup_vertex_buffers(r300)) {
@@ -289,10 +279,6 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
         return;
     }
 
-    if (r300_nothing_to_draw(r300)) {
-        return;
-    }
-
     r300_update_derived_state(r300);
 
     if (!r300_setup_vertex_buffers(r300)) {
@@ -324,10 +310,6 @@ void r300_swtcl_draw_arrays(struct pipe_context* pipe,
         return;
     }
 
-    if (r300_nothing_to_draw(r300)) {
-        return;
-    }
-
     for (i = 0; i < r300->vertex_buffer_count; i++) {
         void* buf = pipe_buffer_map(pipe->screen,
                                     r300->vertex_buffer[i].buffer,
@@ -369,10 +351,6 @@ void r300_swtcl_draw_range_elements(struct pipe_context* pipe,
         return;
     }
 
-    if (r300_nothing_to_draw(r300)) {
-        return;
-    }
-
     for (i = 0; i < r300->vertex_buffer_count; i++) {
         void* buf = pipe_buffer_map(pipe->screen,
                                     r300->vertex_buffer[i].buffer,
index 86773adc8dbec23e2d89e1632e10997e9fff031e..78764ddc98e74f8e6a6e91699cc01bfb7ce8f9cf 100644 (file)
@@ -494,9 +494,6 @@ static void r300_set_scissor_regs(const struct pipe_scissor_state* state,
             (((state->maxx - 1) + 1440) << R300_SCISSORS_X_SHIFT) |
             (((state->maxy - 1) + 1440) << R300_SCISSORS_Y_SHIFT);
     }
-
-    scissor->empty_area = state->minx >= state->maxx ||
-                          state->miny >= state->maxy;
 }
 
 static void