aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/singlepixswap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-08 11:47:30 +0100
committermarha <marha@users.sourceforge.net>2013-11-08 11:47:30 +0100
commitc8483dc2831dc37d93a36804022f6b064f5962ea (patch)
tree599f145a848e10b75a1a8c314ed9c51031446506 /xorg-server/glx/singlepixswap.c
parentc97d11aec40d8fa07d6b456bf8694133a77d35f4 (diff)
downloadvcxsrv-c8483dc2831dc37d93a36804022f6b064f5962ea.tar.gz
vcxsrv-c8483dc2831dc37d93a36804022f6b064f5962ea.tar.bz2
vcxsrv-c8483dc2831dc37d93a36804022f6b064f5962ea.zip
Solved compilation and link problems after last merge
Diffstat (limited to 'xorg-server/glx/singlepixswap.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/glx/singlepixswap.c88
1 files changed, 56 insertions, 32 deletions
diff --git a/xorg-server/glx/singlepixswap.c b/xorg-server/glx/singlepixswap.c
index 064f5cce2..7e20ed6bb 100644..100755
--- a/xorg-server/glx/singlepixswap.c
+++ b/xorg-server/glx/singlepixswap.c
@@ -39,6 +39,10 @@
#include "unpack.h"
#include "indirect_dispatch.h"
#include "indirect_size_get.h"
+#include "glapitable.h"
+#include "glapi.h"
+#include "glthread.h"
+#include "dispatch.h"
int
__glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc)
@@ -78,13 +82,17 @@ __glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc)
if (compsize < 0)
compsize = 0;
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
- glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
- glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4),
- *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12),
- *(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer);
+ CALL_ReadPixels(GET_DISPATCH(),
+ (*(GLint *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLsizei *) (pc + 8),
+ *(GLsizei *) (pc + 12),
+ *(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer)
+ );
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@@ -133,10 +141,13 @@ __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 16);
- glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width);
- glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height);
+ CALL_GetTexLevelParameteriv(GET_DISPATCH(),
+ (target, level, GL_TEXTURE_WIDTH, &width));
+ CALL_GetTexLevelParameteriv(GET_DISPATCH(),
+ (target, level, GL_TEXTURE_HEIGHT, &height));
if (target == GL_TEXTURE_3D) {
- glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth);
+ CALL_GetTexLevelParameteriv(GET_DISPATCH(),
+ (target, level, GL_TEXTURE_DEPTH, &depth));
}
/*
* The three queries above might fail if we're in a state where queries
@@ -147,11 +158,13 @@ __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
if (compsize < 0)
compsize = 0;
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
- glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4),
- *(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer);
+ CALL_GetTexImage(GET_DISPATCH(), (*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ *(GLenum *) (pc + 12), answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@@ -193,11 +206,11 @@ __glXDispSwap_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc)
pc += __GLX_SINGLE_HDR_SIZE;
lsbFirst = *(GLboolean *) (pc + 0);
- glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
__GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1);
__glXClearErrorOccured();
- glGetPolygonStipple((GLubyte *) answer);
+ CALL_GetPolygonStipple(GET_DISPATCH(), ((GLubyte *) answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
__GLX_SWAP_REPLY_HEADER();
@@ -243,8 +256,10 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
/* target must be SEPARABLE_2D, however I guess we can let the GL
barf on this one.... */
- glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width);
- glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height);
+ CALL_GetConvolutionParameteriv(GET_DISPATCH(),
+ (target, GL_CONVOLUTION_WIDTH, &width));
+ CALL_GetConvolutionParameteriv(GET_DISPATCH(),
+ (target, GL_CONVOLUTION_HEIGHT, &height));
/*
* The two queries above might fail if we're in a state where queries
* are illegal, but then width and height would still be zero anyway.
@@ -259,11 +274,13 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
compsize = __GLX_PAD(compsize);
compsize2 = __GLX_PAD(compsize2);
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
__glXClearErrorOccured();
- glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
- *(GLenum *) (pc + 8), answer, answer + compsize, NULL);
+ CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ answer, answer + compsize, NULL));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@@ -326,12 +343,15 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 12);
- glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width);
+ CALL_GetConvolutionParameteriv(GET_DISPATCH(),
+ (target, GL_CONVOLUTION_WIDTH, &width));
if (target == GL_CONVOLUTION_2D) {
height = 1;
}
else {
- glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height);
+ CALL_GetConvolutionParameteriv(GET_DISPATCH(),
+ (target, GL_CONVOLUTION_HEIGHT,
+ &height));
}
/*
* The two queries above might fail if we're in a state where queries
@@ -341,11 +361,12 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
- glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
- *(GLenum *) (pc + 8), answer);
+ CALL_GetConvolutionFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@@ -409,7 +430,8 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
swapBytes = *(GLboolean *) (pc + 12);
reset = *(GLboolean *) (pc + 13);
- glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width);
+ CALL_GetHistogramParameteriv(GET_DISPATCH(),
+ (target, GL_HISTOGRAM_WIDTH, &width));
/*
* The one query above might fail if we're in a state where queries
* are illegal, but then width would still be zero anyway.
@@ -418,10 +440,10 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
- glGetHistogram(target, reset, format, type, answer);
+ CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@@ -486,10 +508,10 @@ GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
- glGetMinmax(target, reset, format, type, answer);
+ CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@@ -548,7 +570,8 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 12);
- glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width);
+ CALL_GetColorTableParameteriv(GET_DISPATCH(),
+ (target, GL_COLOR_TABLE_WIDTH, &width));
/*
* The one query above might fail if we're in a state where queries
* are illegal, but then width would still be zero anyway.
@@ -557,11 +580,12 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
- glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
+ CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
- glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
- *(GLenum *) (pc + 8), answer);
+ CALL_GetColorTable(GET_DISPATCH(), (*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);