From 547e939afb980c2fcc3edbbb07dba0f44be785c1 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Sat, 7 Nov 2009 14:14:19 -0800 Subject: [PATCH] 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 e53db3d0b55..b0f3386c621 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 d3f2ce799af..1d45fd590cd 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; -- 2.30.2