aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pipelineobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-04-20 22:42:55 +0200
committermarha <marha@users.sourceforge.net>2015-04-20 22:42:55 +0200
commit934184bfecd402aae891b8740d788b486aa7269f (patch)
treec23fb0afd169dc6846ea23bda21260fcffd1e3e6 /mesalib/src/mesa/main/pipelineobj.c
parent57dd848fb6dd7cf15820172e2abc9fb9de2b4268 (diff)
parent4ba9be2882d9f1567809edb0a31fcdf11320d41f (diff)
downloadvcxsrv-934184bfecd402aae891b8740d788b486aa7269f.tar.gz
vcxsrv-934184bfecd402aae891b8740d788b486aa7269f.tar.bz2
vcxsrv-934184bfecd402aae891b8740d788b486aa7269f.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/main/.gitignore mesalib/src/mesa/main/dlopen.h xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/win.h xorg-server/hw/xwin/winengine.c xorg-server/hw/xwin/winglobals.c xorg-server/hw/xwin/winscrinit.c xorg-server/hw/xwin/winshaddd.c xorg-server/randr/rrxinerama.c
Diffstat (limited to 'mesalib/src/mesa/main/pipelineobj.c')
-rw-r--r--mesalib/src/mesa/main/pipelineobj.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/pipelineobj.c b/mesalib/src/mesa/main/pipelineobj.c
index fb241af1e..0fefa7d56 100644
--- a/mesalib/src/mesa/main/pipelineobj.c
+++ b/mesalib/src/mesa/main/pipelineobj.c
@@ -498,16 +498,18 @@ _mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
* \param n Number of IDs to generate.
* \param pipelines pipeline of \c n locations to store the IDs.
*/
-void GLAPIENTRY
-_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines)
+static void
+create_program_pipelines(struct gl_context *ctx, GLsizei n, GLuint *pipelines,
+ bool dsa)
{
- GET_CURRENT_CONTEXT(ctx);
-
+ const char *func;
GLuint first;
GLint i;
+ func = dsa ? "glCreateProgramPipelines" : "glGenProgramPipelines";
+
if (n < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGenProgramPipelines(n<0)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s (n < 0)", func);
return;
}
@@ -523,16 +525,37 @@ _mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines)
obj = _mesa_new_pipeline_object(ctx, name);
if (!obj) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenProgramPipelines");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
return;
}
+ if (dsa) {
+ /* make dsa-allocated objects behave like program objects */
+ obj->EverBound = GL_TRUE;
+ }
+
save_pipeline_object(ctx, obj);
pipelines[i] = first + i;
}
}
+void GLAPIENTRY
+_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ create_program_pipelines(ctx, n, pipelines, false);
+}
+
+void GLAPIENTRY
+_mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ create_program_pipelines(ctx, n, pipelines, true);
+}
+
/**
* Determine if ID is the name of an pipeline object.
*