summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-08-01 14:50:26 +0200
committerMarek Olšák <[email protected]>2019-08-06 17:03:13 -0400
commit885dbe2e8471883acd2067fc092c39ea7c5c7a60 (patch)
tree3de7ab9d07f7c7a927e0d83b45013bdee1374fe1 /src
parentd9e26c3483396cc2ab5f9b9bdaf347969a5205d1 (diff)
mesa: add glBindMultiTextureEXT display list support
Fixes: 0972b0b059d ("mesa: add support for glBindMultiTextureEXT") Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/dlist.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 995e1fdc636..5c37668e207 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -581,6 +581,7 @@ typedef enum
OPCODE_COPY_TEXTURE_SUB_IMAGE1D,
OPCODE_COPY_TEXTURE_SUB_IMAGE2D,
OPCODE_COPY_TEXTURE_SUB_IMAGE3D,
+ OPCODE_BIND_MULTITEXTURE,
OPCODE_MULTITEXPARAMETER_F,
OPCODE_MULTITEXPARAMETER_I,
OPCODE_MULTITEXENV,
@@ -9911,6 +9912,24 @@ save_CopyTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level,
static void GLAPIENTRY
+save_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BIND_MULTITEXTURE, 3);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].ui = texture;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BindMultiTextureEXT(ctx->Exec, (texunit, target, texture));
+ }
+}
+
+
+static void GLAPIENTRY
save_MultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname,
const GLfloat *params)
{
@@ -11767,6 +11786,9 @@ execute_list(struct gl_context *ctx, GLuint list)
n[7].i, n[8].i, n[9].i,
n[10].i));
break;
+ case OPCODE_BIND_MULTITEXTURE:
+ CALL_BindMultiTextureEXT(ctx->Exec, (n[1].e, n[2].e, n[3].ui));
+ break;
case OPCODE_MULTITEXPARAMETER_F:
{
GLfloat params[4];
@@ -12810,6 +12832,7 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
SET_CopyTextureSubImage1DEXT(table, save_CopyTextureSubImage1DEXT);
SET_CopyTextureSubImage2DEXT(table, save_CopyTextureSubImage2DEXT);
SET_CopyTextureSubImage3DEXT(table, save_CopyTextureSubImage3DEXT);
+ SET_BindMultiTextureEXT(table, save_BindMultiTextureEXT);
SET_MultiTexParameteriEXT(table, save_MultiTexParameteriEXT);
SET_MultiTexParameterivEXT(table, save_MultiTexParameterivEXT);
SET_MultiTexParameterfEXT(table, save_MultiTexParameterfEXT);