diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2005-05-31 04:04:24 +0000 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2005-05-31 04:04:24 +0000 |
commit | 8a1df968627de01d04f3d692fd81108ba6492c18 (patch) | |
tree | 83eddfc1d1d8a1c0e58bdc012e5cec7f3a5ea336 /src/mesa/drivers/dri/radeon/radeon_context.h | |
parent | 9dff2ca07a6a74f65d831269b1cee8c3ee2c0103 (diff) |
Bugzilla #2195: Convert the radeon driver to the t_vertex interface. This cuts
about 200 lines from the code and 25k from the binary, while matching other
drivers more closely. In the worst case (tcl_mode=0) it appears to have
a performance cost of 4.4% +/- 0.3% on quake3 (800x600 demofours, 1ghz p3,
rv200). Tested on ut2004, ut, q3, projtex.
Submitted by: Andreas Stenglein <a.stenglein@gmx.net>
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_context.h')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h index 8d0637ca32..3019602b7c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.h +++ b/src/mesa/drivers/dri/radeon/radeon_context.h @@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __RADEON_CONTEXT_H__ #define __RADEON_CONTEXT_H__ +#include "tnl/t_vertex.h" #include "dri_util.h" #include "drm.h" #include "radeon_drm.h" @@ -530,12 +531,13 @@ struct radeon_tcl_info { /* radeon_swtcl.c */ struct radeon_swtcl_info { - GLuint SetupIndex; - GLuint SetupNewInputs; GLuint RenderIndex; GLuint vertex_size; - GLuint vertex_stride_shift; GLuint vertex_format; + + struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; + GLuint vertex_attr_count; + GLubyte *verts; /* Fallback rasterization functions @@ -548,6 +550,18 @@ struct radeon_swtcl_info { GLenum render_primitive; GLuint numverts; + /** + * Offset of the 4UB color data within a hardware (swtcl) vertex. + */ + GLuint coloroffset; + + /** + * Offset of the 3UB specular color data within a hardware (swtcl) vertex. + */ + GLuint specoffset; + + GLboolean needproj; + struct radeon_dma_region indexed_verts; }; @@ -707,6 +721,7 @@ struct radeon_context { GLuint TclFallback; GLuint Fallback; GLuint NewGLState; + GLuint tnl_index; /* index of bits for last tnl_install_attrs */ /* Vertex buffers */ |