summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-05-26 19:25:44 -0600
committerBrian Paul <[email protected]>2011-05-26 19:25:44 -0600
commite00481586c6fe87c5bf8753f9502d220ea46763a (patch)
tree6aac78cac403e7b00102b087a1ee81ed72f8ff26 /src/mesa
parent3b0f4318207d393ce586bd7dccc1c92eee13eaa1 (diff)
mesa: more geometry shader display list functions
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/dlist.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 80a3c950df9..c2cd96e5fa0 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -454,6 +454,8 @@ typedef enum
/* GL_ARB_geometry_shader4 */
OPCODE_PROGRAM_PARAMETERI,
+ OPCODE_FRAMEBUFFER_TEXTURE,
+ OPCODE_FRAMEBUFFER_TEXTURE_FACE,
/* GL_ARB_sync */
OPCODE_WAIT_SYNC,
@@ -7308,6 +7310,47 @@ save_ProgramParameteri(GLuint program, GLenum pname, GLint value)
}
}
+static void GLAPIENTRY
+save_FramebufferTexture(GLenum target, GLenum attachment,
+ GLuint texture, GLint level)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_FRAMEBUFFER_TEXTURE, 4);
+ if (n) {
+ n[1].e = target;
+ n[2].e = attachment;
+ n[3].ui = texture;
+ n[4].i = level;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_FramebufferTextureARB(ctx->Exec, (target, attachment, texture, level));
+ }
+}
+
+static void GLAPIENTRY
+save_FramebufferTextureFace(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLenum face)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_FRAMEBUFFER_TEXTURE_FACE, 5);
+ if (n) {
+ n[1].e = target;
+ n[2].e = attachment;
+ n[3].ui = texture;
+ n[4].i = level;
+ n[5].e = face;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_FramebufferTextureFaceARB(ctx->Exec, (target, attachment, texture,
+ level, face));
+ }
+}
+
+
static void GLAPIENTRY
save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
@@ -8576,6 +8619,14 @@ execute_list(struct gl_context *ctx, GLuint list)
case OPCODE_PROGRAM_PARAMETERI:
CALL_ProgramParameteriARB(ctx->Exec, (n[1].ui, n[2].e, n[3].i));
break;
+ case OPCODE_FRAMEBUFFER_TEXTURE:
+ CALL_FramebufferTextureARB(ctx->Exec, (n[1].e, n[2].e,
+ n[3].ui, n[4].i));
+ break;
+ case OPCODE_FRAMEBUFFER_TEXTURE_FACE:
+ CALL_FramebufferTextureFaceARB(ctx->Exec, (n[1].e, n[2].e,
+ n[3].ui, n[4].i, n[5].e));
+ break;
/* GL_ARB_sync */
case OPCODE_WAIT_SYNC:
@@ -10283,6 +10334,8 @@ _mesa_create_save_table(void)
/* GL_ARB_geometry_shader4 */
SET_ProgramParameteriARB(table, save_ProgramParameteri);
+ SET_FramebufferTextureARB(table, save_FramebufferTexture);
+ SET_FramebufferTextureFaceARB(table, save_FramebufferTextureFace);
/* GL_ARB_sync */
_mesa_init_sync_dispatch(table);