aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200/r200_maos_arrays.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-12-11 16:25:36 +0000
committerKeith Whitwell <[email protected]>2003-12-11 16:25:36 +0000
commit2dc621f3fdb585f23013aa3e220f2148f9405538 (patch)
treed4eb6b4a76b427143e88953bbec0284bf15e3ffc /src/mesa/drivers/dri/r200/r200_maos_arrays.c
parent5bcf52b4d6951f9058b5ef00cf2438b3bdfbeea0 (diff)
Updates to tnl_dd_dmatmp.h
- Allocate vertices explicitly, rather than trying to talk about dma buffers. - Clean up the various Flush() operations. - Don't allow fallbacks any longer. Provide a support function to detect them ahead o ftime Updates to tnl_dd_vbtmp.h - Get rid of power-of-two vertex strides. Pack all vertices tightly. - Get texunit 2,3 emit working coorrectly. Other stuff: - Get rid of lingering Ubyte color support. - Fix a few compiler warnings.
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_maos_arrays.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 6c6013054ab..9d1724db7e7 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -50,6 +50,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_swtcl.h"
#include "r200_maos.h"
+
+#if 0
/* Usage:
* - from r200_tcl_render
* - call r200EmitArrays to ensure uptodate arrays in dma
@@ -81,29 +83,6 @@ static void emit_ubyte_rgba3( GLcontext *ctx,
}
}
-
-#if defined(USE_X86_ASM)
-#define COPY_DWORDS( dst, src, nr ) \
-do { \
- int __tmp; \
- __asm__ __volatile__( "rep ; movsl" \
- : "=%c" (__tmp), "=D" (dst), "=S" (__tmp) \
- : "0" (nr), \
- "D" ((long)dst), \
- "S" ((long)src) ); \
-} while (0)
-#else
-#define COPY_DWORDS( dst, src, nr ) \
-do { \
- int j; \
- for ( j = 0 ; j < nr ; j++ ) \
- dst[j] = ((int *)src)[j]; \
- dst += nr; \
-} while (0)
-#endif
-
-
-
static void emit_ubyte_rgba4( GLcontext *ctx,
struct r200_dma_region *rvb,
char *data,
@@ -129,7 +108,6 @@ static void emit_ubyte_rgba4( GLcontext *ctx,
}
-#if 0
static void emit_ubyte_rgba( GLcontext *ctx,
struct r200_dma_region *rvb,
char *data,
@@ -176,6 +154,30 @@ static void emit_ubyte_rgba( GLcontext *ctx,
#endif
+#if defined(USE_X86_ASM)
+#define COPY_DWORDS( dst, src, nr ) \
+do { \
+ int __tmp; \
+ __asm__ __volatile__( "rep ; movsl" \
+ : "=%c" (__tmp), "=D" (dst), "=S" (__tmp) \
+ : "0" (nr), \
+ "D" ((long)dst), \
+ "S" ((long)src) ); \
+} while (0)
+#else
+#define COPY_DWORDS( dst, src, nr ) \
+do { \
+ int j; \
+ for ( j = 0 ; j < nr ; j++ ) \
+ dst[j] = ((int *)src)[j]; \
+ dst += nr; \
+} while (0)
+#endif
+
+
+
+
+
static void emit_vec4( GLcontext *ctx,
struct r200_dma_region *rvb,
char *data,
@@ -235,7 +237,7 @@ static void emit_vec12( GLcontext *ctx,
if (R200_DEBUG & DEBUG_VERTS)
fprintf(stderr, "%s count %d stride %d out %p data %p\n",
- __FUNCTION__, count, stride, out, (void *)data);
+ __FUNCTION__, count, stride, (void *)out, (void *)data);
if (stride == 12)
COPY_DWORDS( out, data, count*3 );