aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_maos.c
diff options
context:
space:
mode:
authorAapo Tahkola <[email protected]>2006-08-22 22:27:32 +0000
committerAapo Tahkola <[email protected]>2006-08-22 22:27:32 +0000
commit43c9587ed48c315d44e5cc657a045e904a156265 (patch)
tree8a680af5bf8e511e64a906eb4b6e81d121abf8ed /src/mesa/drivers/dri/r300/r300_maos.c
parentcafb0617eaacf09d9d19b75a5596b4dd2a1f85ba (diff)
remove duplicate pieces of code.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_maos.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index cba3fd37290..5cbdab8d70a 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "colormac.h"
#include "imports.h"
#include "macros.h"
+#include "image.h"
#include "swrast_setup/swrast_setup.h"
#include "math/m_translate.h"
@@ -289,26 +290,6 @@ static GLuint t_vir0_size(struct dt *dt)
return 0;
}
-static GLuint comp_bytes(struct dt *dt)
-{
- switch (dt->type) {
- case GL_UNSIGNED_BYTE:
- return 1;
-
- case GL_SHORT:
- return 2;
-
- case GL_FLOAT:
- return 4;
-
- default:
- assert(0);
- break;
- }
-
- return 0;
-}
-
static GLuint t_aos_size(struct dt *dt)
{
switch (dt->type) {
@@ -520,7 +501,7 @@ int r300EmitArrays(GLcontext *ctx)
rmesa->state.aos[i].aos_size = t_aos_size(&VB->AttribPtr[tab[i]]);
- comp_size = comp_bytes(&VB->AttribPtr[tab[i]]);
+ comp_size = _mesa_sizeof_type(VB->AttribPtr[tab[i]].type);
#if MESA_LITTLE_ENDIAN
for (fix = 0; fix <= 4 - VB->AttribPtr[tab[i]].size; fix++) {