summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-08-10 22:28:27 -0700
committerIan Romanick <[email protected]>2013-01-11 10:57:25 -0800
commit42ed81a7c3eec215a543c47239cc30536f284ada (patch)
tree0f71500ae3bf3a99f98f2481670a88124feb399e /src/mesa/drivers
parent00d8ad81ffeda1d2a10b1ee65f4a144467d0afd1 (diff)
mesa/es3: Add support for GL_PRIMITIVE_RESTART_FIXED_INDEX
This requires some derived state. The cut vertex used is either the value specified by glPrimitiveRestartIndex or it's hard-coded to ~0. The derived state gl_array_attrib::_RestartIndex captures this value. In addition, the derived state gl_array_attrib::_PrimitiveRestart is set whenever either gl_array_attrib::PrimitiveRestart or gl_array_attrib::PrimitiveRestartFixedIndex is set. v2: Use _mesa_is_gles3. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_primitive_restart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_primitive_restart.c b/src/mesa/drivers/dri/i965/brw_primitive_restart.c
index 38b52438c09..8c7219d4f92 100644
--- a/src/mesa/drivers/dri/i965/brw_primitive_restart.c
+++ b/src/mesa/drivers/dri/i965/brw_primitive_restart.c
@@ -52,13 +52,13 @@ can_cut_index_handle_restart_index(struct gl_context *ctx,
switch (ib->type) {
case GL_UNSIGNED_BYTE:
- cut_index_will_work = (ctx->Array.RestartIndex & 0xff) == 0xff;
+ cut_index_will_work = (ctx->Array._RestartIndex & 0xff) == 0xff;
break;
case GL_UNSIGNED_SHORT:
- cut_index_will_work = (ctx->Array.RestartIndex & 0xffff) == 0xffff;
+ cut_index_will_work = (ctx->Array._RestartIndex & 0xffff) == 0xffff;
break;
case GL_UNSIGNED_INT:
- cut_index_will_work = ctx->Array.RestartIndex == 0xffffffff;
+ cut_index_will_work = ctx->Array._RestartIndex == 0xffffffff;
break;
default:
cut_index_will_work = false;
@@ -157,7 +157,7 @@ brw_handle_primitive_restart(struct gl_context *ctx,
/* If PrimitiveRestart is not enabled, then we aren't concerned about
* handling this draw.
*/
- if (!(ctx->Array.PrimitiveRestart)) {
+ if (!(ctx->Array._PrimitiveRestart)) {
return GL_FALSE;
}