projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch to using driFillInModes fix depthbuffer = 0
[mesa.git]
/
src
/
mesa
/
tnl_dd
/
t_dd_dmatmp.h
diff --git
a/src/mesa/tnl_dd/t_dd_dmatmp.h
b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 44eaeaf76b004438f4ffd447b9e018b599e2359b..43d50308566dc7a277e7a49c33850d9e2d1cd33f 100644
(file)
--- a/
src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/
src/mesa/tnl_dd/t_dd_dmatmp.h
@@
-113,11
+113,12
@@
static void TAG(render_points_verts)( GLcontext *ctx,
if (HAVE_POINTS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
if (HAVE_POINTS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
GLuint j, nr;
INIT( GL_POINTS );
GLuint j, nr;
INIT( GL_POINTS );
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
if (currentsz < 8)
currentsz = dmasz;
if (currentsz < 8)
currentsz = dmasz;
@@
-141,7
+142,7
@@
static void TAG(render_lines_verts)( GLcontext *ctx,
if (HAVE_LINES) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
if (HAVE_LINES) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
GLuint j, nr;
INIT( GL_LINES );
GLuint j, nr;
INIT( GL_LINES );
@@
-149,6
+150,7
@@
static void TAG(render_lines_verts)( GLcontext *ctx,
/* Emit whole number of lines in total and in each buffer:
*/
count -= (count-start) & 1;
/* Emit whole number of lines in total and in each buffer:
*/
count -= (count-start) & 1;
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
currentsz -= currentsz & 1;
dmasz -= dmasz & 1;
currentsz -= currentsz & 1;
dmasz -= dmasz & 1;
@@
-176,11
+178,12
@@
static void TAG(render_line_strip_verts)( GLcontext *ctx,
if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
GLuint j, nr;
INIT( GL_LINE_STRIP );
GLuint j, nr;
INIT( GL_LINE_STRIP );
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
if (currentsz < 8)
currentsz = dmasz;
if (currentsz < 8)
currentsz = dmasz;
@@
-207,7
+210,7
@@
static void TAG(render_line_loop_verts)( GLcontext *ctx,
if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
GLuint j, nr;
INIT( GL_LINE_STRIP );
GLuint j, nr;
INIT( GL_LINE_STRIP );
@@
-219,6
+222,7
@@
static void TAG(render_line_loop_verts)( GLcontext *ctx,
/* Ensure last vertex won't wrap buffers:
*/
/* Ensure last vertex won't wrap buffers:
*/
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
currentsz--;
dmasz--;
currentsz--;
dmasz--;
@@
-269,11
+273,13
@@
static void TAG(render_triangles_verts)( GLcontext *ctx,
{
LOCAL_VARS;
int dmasz = (GET_SUBSEQUENT_VB_MAX_VERTS()/3) * 3;
{
LOCAL_VARS;
int dmasz = (GET_SUBSEQUENT_VB_MAX_VERTS()/3) * 3;
- int currentsz
= (GET_CURRENT_VB_MAX_VERTS()/3) * 3
;
+ int currentsz;
GLuint j, nr;
INIT(GL_TRIANGLES);
GLuint j, nr;
INIT(GL_TRIANGLES);
+ currentsz = (GET_CURRENT_VB_MAX_VERTS()/3) * 3;
+
/* Emit whole number of tris in total. dmasz is already a multiple
* of 3.
*/
/* Emit whole number of tris in total. dmasz is already a multiple
* of 3.
*/
@@
-338,15
+344,16
@@
static void TAG(render_tri_fan_verts)( GLcontext *ctx,
LOCAL_VARS;
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
LOCAL_VARS;
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
INIT(GL_TRIANGLE_FAN);
INIT(GL_TRIANGLE_FAN);
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
if (currentsz < 8) {
currentsz = dmasz;
}
if (currentsz < 8) {
currentsz = dmasz;
}
- for (j = start + 1 ; j + 1 < count; j += nr -
1
) {
+ for (j = start + 1 ; j + 1 < count; j += nr -
2
) {
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_VERTS( nr );
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_VERTS( nr );
@@
-376,15
+383,16
@@
static void TAG(render_poly_verts)( GLcontext *ctx,
LOCAL_VARS;
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
LOCAL_VARS;
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
INIT(GL_POLYGON);
INIT(GL_POLYGON);
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
if (currentsz < 8) {
currentsz = dmasz;
}
if (currentsz < 8) {
currentsz = dmasz;
}
- for (j = start + 1 ; j + 1 < count ; j += nr -
1
) {
+ for (j = start + 1 ; j + 1 < count ; j += nr -
2
) {
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_VERTS( nr );
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_VERTS( nr );
@@
-419,7
+427,6
@@
static void TAG(render_quad_strip_verts)( GLcontext *ctx,
INIT(GL_QUAD_STRIP);
currentsz = GET_CURRENT_VB_MAX_VERTS();
INIT(GL_QUAD_STRIP);
currentsz = GET_CURRENT_VB_MAX_VERTS();
-
if (currentsz < 8) {
currentsz = dmasz;
}
if (currentsz < 8) {
currentsz = dmasz;
}
@@
-495,7
+502,7
@@
static void TAG(render_quad_strip_verts)( GLcontext *ctx,
else if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
else if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz
= GET_CURRENT_VB_MAX_VERTS()
;
+ int currentsz;
/* Emit smooth-shaded quadstrips as tristrips:
*/
/* Emit smooth-shaded quadstrips as tristrips:
*/
@@
-505,6
+512,7
@@
static void TAG(render_quad_strip_verts)( GLcontext *ctx,
/* Emit whole number of quads in total, and in each buffer.
*/
dmasz -= dmasz & 1;
/* Emit whole number of quads in total, and in each buffer.
*/
dmasz -= dmasz & 1;
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
currentsz -= currentsz & 1;
count -= (count-start) & 1;
currentsz -= currentsz & 1;
count -= (count-start) & 1;
@@
-535,7
+543,7
@@
static void TAG(render_quads_verts)( GLcontext *ctx,
if (HAVE_QUADS) {
LOCAL_VARS;
int dmasz = (GET_SUBSEQUENT_VB_MAX_VERTS()/4) * 4;
if (HAVE_QUADS) {
LOCAL_VARS;
int dmasz = (GET_SUBSEQUENT_VB_MAX_VERTS()/4) * 4;
- int currentsz
= (GET_CURRENT_VB_MAX_VERTS()/4) * 4
;
+ int currentsz;
GLuint j, nr;
INIT(GL_QUADS);
GLuint j, nr;
INIT(GL_QUADS);
@@
-545,6
+553,7
@@
static void TAG(render_quads_verts)( GLcontext *ctx,
*/
count -= (count-start)%4;
*/
count -= (count-start)%4;
+ currentsz = (GET_CURRENT_VB_MAX_VERTS()/4) * 4;
if (currentsz < 8)
currentsz = dmasz;
if (currentsz < 8)
currentsz = dmasz;
@@
-910,7
+919,7
@@
static void TAG(render_tri_fan_elts)( GLcontext *ctx,
currentsz = dmasz;
}
currentsz = dmasz;
}
- for (j = start + 1 ; j + 1 < count; j += nr -
1
) {
+ for (j = start + 1 ; j + 1 < count; j += nr -
2
) {
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_ELTS( nr );
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_ELTS( nr );
@@
-947,7
+956,7
@@
static void TAG(render_poly_elts)( GLcontext *ctx,
currentsz = dmasz;
}
currentsz = dmasz;
}
- for (j = start + 1 ; j + 1 < count; j += nr -
1
) {
+ for (j = start + 1 ; j + 1 < count; j += nr -
2
) {
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_ELTS( nr );
void *tmp;
nr = MIN2( currentsz, count - j + 1 );
tmp = ALLOC_ELTS( nr );
@@
-1143,7
+1152,7
@@
static GLboolean TAG(validate_render)( GLcontext *ctx,
{
GLint i;
{
GLint i;
- if (VB->ClipOrMask)
+ if (VB->ClipOrMask
& ~CLIP_CULL_BIT
)
return GL_FALSE;
if (VB->Elts && !HAVE_ELTS)
return GL_FALSE;
if (VB->Elts && !HAVE_ELTS)