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

Author: Corbin Simpson <[email protected]>
Date:   Sat Nov  7 14:14:19 2009 -0800

r300g: DCE.

This must never have been called before; it's completely wrong.

---

 src/gallium/drivers/r300/r300_state_inlines.h |    2 +-
 src/gallium/drivers/r300/r300_vbo.c           |   27 +------------------------
 2 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_state_inlines.h 
b/src/gallium/drivers/r300/r300_state_inlines.h
index e53db3d..b0f3386 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -436,7 +436,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
     if (pf_layout(format) != PIPE_FORMAT_LAYOUT_RGBAZS) {
         debug_printf("r300: Bad format %s in %s:%d\n", pf_name(format),
             __FUNCTION__, __LINE__);
-        return 0;
+        assert(0);
     }
 
     switch (pf_type(format)) {
diff --git a/src/gallium/drivers/r300/r300_vbo.c 
b/src/gallium/drivers/r300/r300_vbo.c
index d3f2ce7..1d45fd5 100644
--- a/src/gallium/drivers/r300/r300_vbo.c
+++ b/src/gallium/drivers/r300/r300_vbo.c
@@ -79,30 +79,6 @@ void setup_vertex_attributes(struct r300_context *r300)
     finish_vertex_attribs_setup(r300->vertex_info, r300->aos_count);
 }
 
-/* XXX move/integrate this with the checks in r300_state_inlines */
-static boolean format_is_supported(enum pipe_format format, int nr_components)
-{
-    if (pf_layout(format) != PIPE_FORMAT_LAYOUT_RGBAZS)
-        return FALSE;
-
-    if ((pf_size_x(format) != pf_size_y(format)) ||
-        (pf_size_x(format) != pf_size_z(format)) ||
-        (pf_size_x(format) != pf_size_w(format)))
-        return FALSE;
-
-    /* Following should be supported as long as stride is 4 bytes aligned */
-    if (pf_size_x(format) != 1 && nr_components != 4)
-        return FALSE;
-
-    if (pf_size_x(format) != 2 && !(nr_components == 2 || nr_components == 4))
-        return FALSE;
-
-    if (pf_size_x(format) == 3 || pf_size_x(format) > 4)
-        return FALSE;
-
-    return TRUE;
-}
-
 static INLINE int get_buffer_offset(struct r300_context *r300,
                                     unsigned int buf_nr,
                                     unsigned int elem_offset)
@@ -110,8 +86,7 @@ static INLINE int get_buffer_offset(struct r300_context 
*r300,
     return r300->vertex_buffer[buf_nr].buffer_offset + elem_offset;
 }
 
-/**
- */
+/* XXX not called at all */
 static void setup_vertex_buffers(struct r300_context *r300)
 {
     struct pipe_vertex_element *vert_elem;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to