summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-11-07 14:14:19 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-11-07 14:14:19 -0800
commit547e939afb980c2fcc3edbbb07dba0f44be785c1 (patch)
tree87e4ee8477d0b24c9540190d3517bd024384da63 /src/gallium/drivers/r300
parent9f49db6f843885620a52a06721d5972afb29f21a (diff)
r300g: DCE.
This must never have been called before; it's completely wrong.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h2
-rw-r--r--src/gallium/drivers/r300/r300_vbo.c27
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 e53db3d0b5..b0f3386c62 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 d3f2ce799a..1d45fd590c 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;