aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxcmds.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-03-25 10:23:25 +0100
committermarha <marha@users.sourceforge.net>2013-03-25 10:23:25 +0100
commit30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea (patch)
tree7ae924e3fb64c93a0f59e55fd08a914db9bb551b /xorg-server/glx/glxcmds.c
parent55a9a54c65cd0ff58966408ea4d7879a3d9c749c (diff)
parent176eab9e8277db1549bfc6c9ae805c4e1858f0b0 (diff)
downloadvcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.tar.gz
vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.tar.bz2
vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa pixman xserver git update 25 Mar 2013
Diffstat (limited to 'xorg-server/glx/glxcmds.c')
-rw-r--r--xorg-server/glx/glxcmds.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c
index 900349a60..d5d14b7a6 100644
--- a/xorg-server/glx/glxcmds.c
+++ b/xorg-server/glx/glxcmds.c
@@ -926,7 +926,7 @@ __glXDisp_CopyContext(__GLXclientState * cl, GLbyte * pc)
enum {
GLX_VIS_CONFIG_UNPAIRED = 18,
- GLX_VIS_CONFIG_PAIRED = 20
+ GLX_VIS_CONFIG_PAIRED = 22
};
enum {
@@ -1018,8 +1018,17 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
buf[p++] = modes->samples;
buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
buf[p++] = modes->sampleBuffers;
- buf[p++] = 0; /* copy over visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)? */
- buf[p++] = 0;
+ /* Add attribute only if its value is not default. */
+ if (modes->sRGBCapable != GL_FALSE) {
+ buf[p++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT;
+ buf[p++] = modes->sRGBCapable;
+ }
+ /* Don't add visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)?
+ * Pad the remaining place with zeroes, so that attributes count is constant. */
+ while (p < GLX_VIS_CONFIG_TOTAL) {
+ buf[p++] = 0;
+ buf[p++] = 0;
+ }
assert(p == GLX_VIS_CONFIG_TOTAL);
if (client->swapped) {
@@ -1030,7 +1039,7 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
return Success;
}
-#define __GLX_TOTAL_FBCONFIG_ATTRIBS (36)
+#define __GLX_TOTAL_FBCONFIG_ATTRIBS (37)
#define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2)
/**
* Send the set of GLXFBConfigs to the client. There is not currently
@@ -1122,6 +1131,15 @@ DoGetFBConfigs(__GLXclientState * cl, unsigned screen)
WRITE_PAIR(GLX_BIND_TO_MIPMAP_TEXTURE_EXT, modes->bindToMipmapTexture);
WRITE_PAIR(GLX_BIND_TO_TEXTURE_TARGETS_EXT,
modes->bindToTextureTargets);
+ /* Add attribute only if its value is not default. */
+ if (modes->sRGBCapable != GL_FALSE) {
+ WRITE_PAIR(GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, modes->sRGBCapable);
+ }
+ /* Pad the remaining place with zeroes, so that attributes count is constant. */
+ while (p < __GLX_FBCONFIG_ATTRIBS_LENGTH) {
+ WRITE_PAIR(0, 0);
+ }
+ assert(p == __GLX_FBCONFIG_ATTRIBS_LENGTH);
if (client->swapped) {
__GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH);