aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesalib/docs/GL3.txt30
-rw-r--r--mesalib/docs/helpwanted.html6
-rw-r--r--mesalib/docs/shading.html2
-rw-r--r--mesalib/include/EGL/eglext.h157
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blit.c53
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c134
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.h40
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_tests.c13
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c17
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_surface.c6
-rw-r--r--mesalib/src/mesa/drivers/dri/common/dri_util.c23
-rw-r--r--mesalib/src/mesa/program/nvfragparse.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_sampler.c106
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c99
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c25
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_clear.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c16
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.c10
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.h12
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp3
-rw-r--r--xorg-server/Xext/sync.c24
-rw-r--r--xorg-server/Xi/exevents.c6
-rw-r--r--xorg-server/Xi/extinit.c38
-rw-r--r--xorg-server/Xi/xiproperty.c253
-rw-r--r--xorg-server/config/wscons.c6
-rw-r--r--xorg-server/configure.ac2
-rw-r--r--xorg-server/dix/gc.c10
-rw-r--r--xorg-server/dix/getevents.c2
-rw-r--r--xorg-server/dix/pixmap.c4
-rw-r--r--xorg-server/dix/tables.c955
-rw-r--r--xorg-server/glx/extension_string.c2
-rw-r--r--xorg-server/glx/glxext.c1
-rw-r--r--xorg-server/glx/glxscreens.c2
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxext.c1
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c80
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.c36
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.h10
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c20
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c2
-rw-r--r--xorg-server/hw/xfree86/dixmods/glxmodule.c1
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c8
-rw-r--r--xorg-server/hw/xfree86/loader/loader.c13
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c11
-rw-r--r--xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c171
-rw-r--r--xorg-server/hw/xfree86/modes/xf86EdidModes.c122
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c38
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c26
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c26
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Sbus.c20
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_apm.c31
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_apm.c26
-rw-r--r--xorg-server/hw/xquartz/pbproxy/x-selection.m2
-rw-r--r--xorg-server/hw/xquartz/pseudoramiX.c73
-rw-r--r--xorg-server/hw/xquartz/xpr/xprEvent.c34
-rw-r--r--xorg-server/hw/xwin/InitOutput.c1
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c317
-rw-r--r--xorg-server/hw/xwin/winclipboardwndproc.c14
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c92
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c108
-rw-r--r--xorg-server/hw/xwin/winwindow.h3
-rw-r--r--xorg-server/include/extinit.h1
-rw-r--r--xorg-server/include/glx_extinit.h34
-rw-r--r--xorg-server/os/utils.c13
-rw-r--r--xorg-server/randr/rrmode.c4
-rw-r--r--xorg-server/randr/rrproperty.c12
-rw-r--r--xorg-server/randr/rrproviderproperty.c12
-rw-r--r--xorg-server/randr/rrxinerama.c20
-rw-r--r--xorg-server/test/Makefile.am2
-rw-r--r--xorg-server/test/os.c36
-rw-r--r--xorg-server/xkeyboard-config/symbols/de2
70 files changed, 2053 insertions, 1432 deletions
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt
index 7c6874568..ecc5a21a7 100644
--- a/mesalib/docs/GL3.txt
+++ b/mesalib/docs/GL3.txt
@@ -130,5 +130,35 @@ GL_ARB_internalformat_query not started
GL_ARB_map_buffer_alignment not started
+GL 4.3:
+
+GLSL 4.3 not started
+ARB_arrays_of_arrays not started
+ARB_ES3_compatibility not started
+ARB_clear_buffer_object not started
+ARB_compute_shader started (gallium)
+ARB_copy_image not started
+ARB_debug_group not started
+ARB_debug_label not started
+ARB_debug_output DONE
+ARB_debug_output2 not started
+ARB_explicit_uniform_location not started
+ARB_fragment_layer_viewport not started
+ARB_framebuffer_no_attachments not started
+ARB_internalformat_query2 not started
+ARB_invalidate_subdata not started
+ARB_multi_draw_indirect not started
+ARB_program_interface_query not started
+ARB_robust_buffer_access_behavior not started
+ARB_shader_image_size not started
+ARB_shader_storage_buffer_object not started
+ARB_stencil_texturing not started
+ARB_texture_buffer_range not started
+ARB_texture_query_levels not started
+ARB_texture_storage_multisample not started
+ARB_texture_view not started
+ARB_vertex_attrib_binding not started
+
+
More info about these features and the work involved can be found at
http://dri.freedesktop.org/wiki/MissingFunctionality
diff --git a/mesalib/docs/helpwanted.html b/mesalib/docs/helpwanted.html
index 6d6058eb5..e452689ac 100644
--- a/mesalib/docs/helpwanted.html
+++ b/mesalib/docs/helpwanted.html
@@ -37,7 +37,7 @@ deprecated starting in Mesa 8.0.<br>
They have to be ported to DRI2 to be accepted in mesa master again.
<li>
<b>Contribute more tests to
-<a href="http://people.freedesktop.org/~nh/piglit/" target="_parent">Piglit</a>.</b>
+<a href="http://piglit.freedesktop.org/" target="_parent">Piglit</a>.</b>
<li>
<b>Automatic testing.
</b>
@@ -56,8 +56,12 @@ You can find some further To-do lists here:
target="_parent"><b>LLVMpipe - todo</b></a></li>
<li><a href="http://dri.freedesktop.org/wiki/MissingFunctionality"
target="_parent"><b>MissingFunctionality</b></a></li>
+ <li><a href="http://dri.freedesktop.org/wiki/R600ToDo"
+ target="_parent"><b>R600ToDo</b></a></li>
<li><a href="http://dri.freedesktop.org/wiki/R300ToDo"
target="_parent"><b>R300ToDo</b></a></li>
+ <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/i915/TODO"
+ target="_parent"><b>i915g TODO</b></a></li>
</ul>
<p>
diff --git a/mesalib/docs/shading.html b/mesalib/docs/shading.html
index a9b7cfc4b..17cf35c22 100644
--- a/mesalib/docs/shading.html
+++ b/mesalib/docs/shading.html
@@ -243,7 +243,7 @@ regressions.
</p>
<p>
-The <a href="http://people.freedesktop.org/~nh/piglit/" target="_parent">Piglit</a> project
+The <a href="http://piglit.freedesktop.org/" target="_parent">Piglit</a> project
has many GLSL tests and the
<a href="http://glean.sf.net" target="_parent">Glean</a> glsl1 test
tests GLSL features.
diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h
index a7ea2ea2f..815859d8e 100644
--- a/mesalib/include/EGL/eglext.h
+++ b/mesalib/include/EGL/eglext.h
@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
-** Copyright (c) 2007-2010 The Khronos Group Inc.
+** Copyright (c) 2007-2012 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -34,8 +34,8 @@ extern "C" {
/* Header file version number */
/* Current version at http://www.khronos.org/registry/egl/ */
-/* $Revision: 15052 $ on $Date: 2011-07-06 17:43:46 -0700 (Wed, 06 Jul 2011) $ */
-#define EGL_EGLEXT_VERSION 10
+/* $Revision: 18699 $ on $Date: 2012-07-31 03:04:59 -0700 (Tue, 31 Jul 2012) $ */
+#define EGL_EGLEXT_VERSION 14
#ifndef EGL_KHR_config_attribs
#define EGL_KHR_config_attribs 1
@@ -178,15 +178,15 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
#ifndef EGL_NV_coverage_sample
#define EGL_NV_coverage_sample 1
-#define EGL_COVERAGE_BUFFERS_NV 0x30E0
-#define EGL_COVERAGE_SAMPLES_NV 0x30E1
+#define EGL_COVERAGE_BUFFERS_NV 0x30E0
+#define EGL_COVERAGE_SAMPLES_NV 0x30E1
#endif
#ifndef EGL_NV_depth_nonlinear
#define EGL_NV_depth_nonlinear 1
-#define EGL_DEPTH_ENCODING_NV 0x30E2
+#define EGL_DEPTH_ENCODING_NV 0x30E2
#define EGL_DEPTH_ENCODING_NONE_NV 0
-#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
#endif
#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */
@@ -208,12 +208,12 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
typedef void* EGLSyncNV;
typedef khronos_utime_nanoseconds_t EGLTimeNV;
#ifdef EGL_EGLEXT_PROTOTYPES
-EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
-EGLBoolean eglFenceNV (EGLSyncNV sync);
-EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
-EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
+EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
+EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
#endif /* EGL_EGLEXT_PROTOTYPES */
typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
@@ -313,7 +313,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay
#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
#endif
-#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
+#if KHRONOS_SUPPORT_INT64 /* EGLuint64NV requires 64-bit uint support */
#ifndef EGL_NV_system_time
#define EGL_NV_system_time 1
@@ -328,6 +328,135 @@ typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
#endif
#endif
+#if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */
+#ifndef EGL_KHR_stream
+#define EGL_KHR_stream 1
+typedef void* EGLStreamKHR;
+typedef khronos_uint64_t EGLuint64KHR;
+#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
+#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
+#define EGL_PRODUCER_FRAME_KHR 0x3212
+#define EGL_CONSUMER_FRAME_KHR 0x3213
+#define EGL_STREAM_STATE_KHR 0x3214
+#define EGL_STREAM_STATE_CREATED_KHR 0x3215
+#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
+#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
+#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
+#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
+#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
+#define EGL_BAD_STREAM_KHR 0x321B
+#define EGL_BAD_STATE_KHR 0x321C
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
+#endif
+#endif
+
+#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
+#ifndef EGL_KHR_stream_consumer_gltexture
+#define EGL_KHR_stream_consumer_gltexture 1
+#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
+#endif
+#endif
+
+#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
+#ifndef EGL_KHR_stream_producer_eglsurface
+#define EGL_KHR_stream_producer_eglsurface 1
+#define EGL_STREAM_BIT_KHR 0x0800
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
+#endif
+#endif
+
+#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
+#ifndef EGL_KHR_stream_producer_aldatalocator
+#define EGL_KHR_stream_producer_aldatalocator 1
+#endif
+#endif
+
+#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
+#ifndef EGL_KHR_stream_fifo
+#define EGL_KHR_stream_fifo 1
+/* reuse EGLTimeKHR */
+#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
+#define EGL_STREAM_TIME_NOW_KHR 0x31FD
+#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
+#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
+#endif
+#endif
+
+#ifndef EGL_EXT_create_context_robustness
+#define EGL_EXT_create_context_robustness 1
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
+#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
+#endif
+
+#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
+#define EGL_ANGLE_d3d_share_handle_client_buffer 1
+/* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */
+#endif
+
+#ifndef EGL_KHR_create_context
+#define EGL_KHR_create_context 1
+#define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION
+#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
+#define EGL_CONTEXT_FLAGS_KHR 0x30FC
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
+#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
+#endif
+
+#ifndef EGL_KHR_surfaceless_context
+#define EGL_KHR_surfaceless_context 1
+/* No tokens/entry points, just relaxes an error condition */
+#endif
+
+#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
+#ifndef EGL_KHR_stream_cross_process_fd
+#define EGL_KHR_stream_cross_process_fd 1
+typedef int EGLNativeFileDescriptorKHR;
+#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
+typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
+#endif
+#endif
+
#include <EGL/eglmesaext.h>
#ifdef __cplusplus
diff --git a/mesalib/src/gallium/auxiliary/util/u_blit.c b/mesalib/src/gallium/auxiliary/util/u_blit.c
index b52f4c092..3887e65fb 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blit.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blit.c
@@ -478,10 +478,11 @@ util_blit_pixels(struct blit_state *ctx,
/*
* Check for simple case: no format conversion, no flipping, no stretching,
- * no overlapping.
+ * no overlapping, same number of samples.
* Filter mode should not matter since there's no stretching.
*/
if (formats_compatible(src_format, dst_format) &&
+ src_tex->nr_samples == dst->texture->nr_samples &&
is_stencil == blit_stencil &&
is_depth == blit_depth &&
srcX0 < srcX1 &&
@@ -506,6 +507,12 @@ util_blit_pixels(struct blit_state *ctx,
return;
}
+ /* XXX Reading multisample textures is unimplemented. */
+ assert(src_tex->nr_samples <= 1);
+ if (src_tex->nr_samples > 1) {
+ return;
+ }
+
/* It's a mistake to call this function with a stencil format and
* without shader stencil export. We don't do software fallbacks here.
* Ignore stencil and only copy depth.
@@ -648,8 +655,9 @@ util_blit_pixels(struct blit_state *ctx,
cso_save_blend(ctx->cso);
cso_save_depth_stencil_alpha(ctx->cso);
cso_save_rasterizer(ctx->cso);
- cso_save_samplers(ctx->cso);
- cso_save_fragment_sampler_views(ctx->cso);
+ cso_save_sample_mask(ctx->cso);
+ cso_save_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
cso_save_stream_outputs(ctx->cso);
cso_save_viewport(ctx->cso);
cso_save_framebuffer(ctx->cso);
@@ -665,6 +673,7 @@ util_blit_pixels(struct blit_state *ctx,
else
cso_set_blend(ctx->cso, &ctx->blend_keep_color);
+ cso_set_sample_mask(ctx->cso, ~0);
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
cso_set_stream_outputs(ctx->cso, 0, NULL, 0);
@@ -680,17 +689,17 @@ util_blit_pixels(struct blit_state *ctx,
* we blit.
*/
if (blit_depth && blit_stencil) {
- cso_single_sampler(ctx->cso, 0, &ctx->sampler);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
/* don't filter stencil */
ctx->sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
ctx->sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
- cso_single_sampler(ctx->cso, 1, &ctx->sampler);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &ctx->sampler);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_write_depthstencil);
set_depthstencil_fragment_shader(ctx, sampler_view->texture->target);
}
else if (blit_depth) {
- cso_single_sampler(ctx->cso, 0, &ctx->sampler);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_write_depth);
set_depth_fragment_shader(ctx, sampler_view->texture->target);
}
@@ -698,17 +707,17 @@ util_blit_pixels(struct blit_state *ctx,
/* don't filter stencil */
ctx->sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
ctx->sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
- cso_single_sampler(ctx->cso, 0, &ctx->sampler);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_write_stencil);
set_stencil_fragment_shader(ctx, sampler_view->texture->target);
}
else { /* color */
- cso_single_sampler(ctx->cso, 0, &ctx->sampler);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_keep_depthstencil);
set_fragment_shader(ctx, writemask, sampler_view->texture->target);
}
- cso_single_sampler_done(ctx->cso);
+ cso_single_sampler_done(ctx->cso, PIPE_SHADER_FRAGMENT);
/* textures */
if (blit_depth && blit_stencil) {
@@ -722,12 +731,12 @@ util_blit_pixels(struct blit_state *ctx,
views[0] = sampler_view;
views[1] = pipe->create_sampler_view(pipe, views[0]->texture, &templ);
- cso_set_fragment_sampler_views(ctx->cso, 2, views);
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 2, views);
pipe_sampler_view_reference(&views[1], NULL);
}
else {
- cso_set_fragment_sampler_views(ctx->cso, 1, &sampler_view);
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &sampler_view);
}
/* viewport */
@@ -777,8 +786,9 @@ util_blit_pixels(struct blit_state *ctx,
cso_restore_blend(ctx->cso);
cso_restore_depth_stencil_alpha(ctx->cso);
cso_restore_rasterizer(ctx->cso);
- cso_restore_samplers(ctx->cso);
- cso_restore_fragment_sampler_views(ctx->cso);
+ cso_restore_sample_mask(ctx->cso);
+ cso_restore_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
cso_restore_viewport(ctx->cso);
cso_restore_framebuffer(ctx->cso);
cso_restore_fragment_shader(ctx->cso);
@@ -849,8 +859,9 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_save_blend(ctx->cso);
cso_save_depth_stencil_alpha(ctx->cso);
cso_save_rasterizer(ctx->cso);
- cso_save_samplers(ctx->cso);
- cso_save_fragment_sampler_views(ctx->cso);
+ cso_save_sample_mask(ctx->cso);
+ cso_save_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
cso_save_stream_outputs(ctx->cso);
cso_save_viewport(ctx->cso);
cso_save_framebuffer(ctx->cso);
@@ -863,6 +874,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend_write_color);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->dsa_keep_depthstencil);
+ cso_set_sample_mask(ctx->cso, ~0);
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
cso_set_stream_outputs(ctx->cso, 0, NULL, 0);
@@ -871,8 +883,8 @@ util_blit_pixels_tex(struct blit_state *ctx,
ctx->sampler.normalized_coords = normalized;
ctx->sampler.min_img_filter = filter;
ctx->sampler.mag_img_filter = filter;
- cso_single_sampler(ctx->cso, 0, &ctx->sampler);
- cso_single_sampler_done(ctx->cso);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ cso_single_sampler_done(ctx->cso, PIPE_SHADER_FRAGMENT);
/* viewport */
ctx->viewport.scale[0] = 0.5f * dst->width;
@@ -886,7 +898,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_set_viewport(ctx->cso, &ctx->viewport);
/* texture */
- cso_set_fragment_sampler_views(ctx->cso, 1, &src_sampler_view);
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &src_sampler_view);
/* shaders */
set_fragment_shader(ctx, TGSI_WRITEMASK_XYZW,
@@ -921,8 +933,9 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_restore_blend(ctx->cso);
cso_restore_depth_stencil_alpha(ctx->cso);
cso_restore_rasterizer(ctx->cso);
- cso_restore_samplers(ctx->cso);
- cso_restore_fragment_sampler_views(ctx->cso);
+ cso_restore_sample_mask(ctx->cso);
+ cso_restore_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
cso_restore_viewport(ctx->cso);
cso_restore_framebuffer(ctx->cso);
cso_restore_fragment_shader(ctx->cso);
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c
index b31ac2d5c..fa71f25ea 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c
@@ -439,6 +439,12 @@ static void blitter_restore_fragment_states(struct blitter_context_priv *ctx)
pipe->bind_blend_state(pipe, ctx->base.saved_blend_state);
ctx->base.saved_blend_state = INVALID_PTR;
+ /* Sample mask. */
+ if (ctx->base.is_sample_mask_saved) {
+ pipe->set_sample_mask(pipe, ctx->base.saved_sample_mask);
+ ctx->base.is_sample_mask_saved = FALSE;
+ }
+
/* Miscellaneous states. */
/* XXX check whether these are saved and whether they need to be restored
* (depending on the operation) */
@@ -848,6 +854,7 @@ static void util_blitter_clear_custom(struct blitter_context *blitter,
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
}
pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, num_cbufs, int_format));
+ pipe->set_sample_mask(pipe, ~0);
blitter_set_common_draw_rect_state(ctx);
blitter_set_dst_dimensions(ctx, width, height);
@@ -925,66 +932,89 @@ void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ,
src_templ->swizzle_a = PIPE_SWIZZLE_ALPHA;
}
+boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
+ const struct pipe_resource *dst,
+ const struct pipe_resource *src,
+ unsigned mask)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_screen *screen = ctx->base.pipe->screen;
+
+ if (dst) {
+ unsigned bind;
+ boolean is_stencil;
+ const struct util_format_description *desc =
+ util_format_description(dst->format);
+
+ is_stencil = util_format_has_stencil(desc);
+
+ /* Stencil export must be supported for stencil copy. */
+ if ((mask & PIPE_MASK_S) && is_stencil && !ctx->has_stencil_export) {
+ return FALSE;
+ }
+
+ if (is_stencil || util_format_has_depth(desc))
+ bind = PIPE_BIND_DEPTH_STENCIL;
+ else
+ bind = PIPE_BIND_RENDER_TARGET;
+
+ if (!screen->is_format_supported(screen, dst->format, dst->target,
+ dst->nr_samples, bind)) {
+ return FALSE;
+ }
+ }
+
+ if (src) {
+ if (!screen->is_format_supported(screen, src->format, src->target,
+ src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
+ return FALSE;
+ }
+
+ /* Check stencil sampler support for stencil copy. */
+ if (util_format_has_stencil(util_format_description(src->format))) {
+ enum pipe_format stencil_format =
+ util_format_stencil_only(src->format);
+ assert(stencil_format != PIPE_FORMAT_NONE);
+
+ if (stencil_format != src->format &&
+ !screen->is_format_supported(screen, stencil_format, src->target,
+ src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
+ return FALSE;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
void util_blitter_copy_texture(struct blitter_context *blitter,
struct pipe_resource *dst,
- unsigned dstlevel,
+ unsigned dst_level,
unsigned dstx, unsigned dsty, unsigned dstz,
struct pipe_resource *src,
- unsigned srclevel,
- const struct pipe_box *srcbox,
- boolean ignore_stencil)
+ unsigned src_level,
+ const struct pipe_box *srcbox)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
struct pipe_context *pipe = ctx->base.pipe;
- struct pipe_screen *screen = pipe->screen;
struct pipe_surface *dst_view, dst_templ;
struct pipe_sampler_view src_templ, *src_view;
- unsigned bind;
- boolean is_stencil, is_depth;
- const struct util_format_description *src_desc =
- util_format_description(src->format);
- /* Give up if textures are not set. */
assert(dst && src);
- if (!dst || !src)
- return;
-
assert(src->target < PIPE_MAX_TEXTURE_TYPES);
- /* Is this a ZS format? */
- is_depth = util_format_has_depth(src_desc);
- is_stencil = util_format_has_stencil(src_desc);
-
- if (is_depth || is_stencil)
- bind = PIPE_BIND_DEPTH_STENCIL;
- else
- bind = PIPE_BIND_RENDER_TARGET;
-
- /* Check if we can sample from and render to the surfaces. */
- /* (assuming copying a stencil buffer is not possible) */
- if ((!ignore_stencil && is_stencil && !ctx->has_stencil_export) ||
- !screen->is_format_supported(screen, dst->format, dst->target,
- dst->nr_samples, bind) ||
- !screen->is_format_supported(screen, src->format, src->target,
- src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
- blitter_set_running_flag(ctx);
- util_resource_copy_region(pipe, dst, dstlevel, dstx, dsty, dstz,
- src, srclevel, srcbox);
- blitter_unset_running_flag(ctx);
- return;
- }
-
/* Initialize the surface. */
- util_blitter_default_dst_texture(&dst_templ, dst, dstlevel, dstz, srcbox);
+ util_blitter_default_dst_texture(&dst_templ, dst, dst_level, dstz, srcbox);
dst_view = pipe->create_surface(pipe, dst, &dst_templ);
/* Initialize the sampler view. */
- util_blitter_default_src_texture(&src_templ, src, srclevel);
+ util_blitter_default_src_texture(&src_templ, src, src_level);
src_view = pipe->create_sampler_view(pipe, src, &src_templ);
/* Copy. */
util_blitter_copy_texture_view(blitter, dst_view, dstx, dsty, src_view,
- srcbox, src->width0, src->height0);
+ srcbox, src->width0, src->height0,
+ PIPE_MASK_RGBAZS);
pipe_surface_reference(&dst_view, NULL);
pipe_sampler_view_reference(&src_view, NULL);
@@ -995,7 +1025,8 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
unsigned dstx, unsigned dsty,
struct pipe_sampler_view *src,
const struct pipe_box *srcbox,
- unsigned src_width0, unsigned src_height0)
+ unsigned src_width0, unsigned src_height0,
+ unsigned mask)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
struct pipe_context *pipe = ctx->base.pipe;
@@ -1003,19 +1034,19 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
enum pipe_texture_target src_target = src->texture->target;
unsigned width = srcbox->width;
unsigned height = srcbox->height;
- boolean is_stencil, is_depth;
+ boolean blit_stencil, blit_depth;
const struct util_format_description *src_desc =
util_format_description(src->format);
- is_depth = util_format_has_depth(src_desc);
- is_stencil = util_format_has_stencil(src_desc);
+ blit_depth = util_format_has_depth(src_desc) && (mask & PIPE_MASK_Z);
+ blit_stencil = util_format_has_stencil(src_desc) && (mask & PIPE_MASK_S);
/* If you want a fallback for stencil copies,
* use util_blitter_copy_texture. */
- if (is_stencil && !ctx->has_stencil_export) {
- is_stencil = FALSE;
+ if (blit_stencil && !ctx->has_stencil_export) {
+ blit_stencil = FALSE;
- if (!is_depth)
+ if (!blit_depth)
return;
}
@@ -1039,15 +1070,15 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
fb_state.width = dst->width;
fb_state.height = dst->height;
- if (is_depth || is_stencil) {
+ if (blit_depth || blit_stencil) {
pipe->bind_blend_state(pipe, ctx->blend_keep_color);
- if (is_depth && is_stencil) {
+ if (blit_depth && blit_stencil) {
pipe->bind_depth_stencil_alpha_state(pipe,
ctx->dsa_write_depth_stencil);
pipe->bind_fs_state(pipe,
blitter_get_fs_texfetch_depthstencil(ctx, src_target));
- } else if (is_depth) {
+ } else if (blit_depth) {
pipe->bind_depth_stencil_alpha_state(pipe,
ctx->dsa_write_depth_keep_stencil);
pipe->bind_fs_state(pipe,
@@ -1072,7 +1103,7 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
fb_state.zsbuf = 0;
}
- if (is_depth && is_stencil) {
+ if (blit_depth && blit_stencil) {
/* Setup two samplers, one for depth and the other one for stencil. */
struct pipe_sampler_view templ;
struct pipe_sampler_view *views[2];
@@ -1096,6 +1127,7 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, ~0);
blitter_set_common_draw_rect_state(ctx);
blitter_set_dst_dimensions(ctx, dst->width, dst->height);
@@ -1183,6 +1215,7 @@ void util_blitter_clear_render_target(struct blitter_context *blitter,
fb_state.cbufs[0] = dstsurf;
fb_state.zsbuf = 0;
pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, ~0);
blitter_set_common_draw_rect_state(ctx);
blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
@@ -1248,6 +1281,7 @@ void util_blitter_clear_depth_stencil(struct blitter_context *blitter,
fb_state.cbufs[0] = 0;
fb_state.zsbuf = dstsurf;
pipe->set_framebuffer_state(pipe, &fb_state);
+ pipe->set_sample_mask(pipe, ~0);
blitter_set_common_draw_rect_state(ctx);
blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h
index 2db984c8a..7600391c5 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.h
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h
@@ -94,6 +94,8 @@ struct blitter_context
struct pipe_framebuffer_state saved_fb_state; /**< framebuffer state */
struct pipe_stencil_ref saved_stencil_ref; /**< stencil ref */
struct pipe_viewport_state saved_viewport;
+ boolean is_sample_mask_saved;
+ unsigned saved_sample_mask;
int saved_num_sampler_states;
void *saved_sampler_states[PIPE_MAX_SAMPLERS];
@@ -159,6 +161,16 @@ void util_blitter_clear_depth_custom(struct blitter_context *blitter,
double depth, void *custom_dsa);
/**
+ * Check if the blitter (with the help of the driver) can blit between
+ * the two resources.
+ * The mask is a combination of the PIPE_MASK_* flags.
+ * Set to PIPE_MASK_RGBAZS if unsure.
+ */
+boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
+ const struct pipe_resource *dst,
+ const struct pipe_resource *src,
+ unsigned mask);
+/**
* Copy a block of pixels from one surface to another.
*
* You can copy from any color format to any other color format provided
@@ -166,13 +178,6 @@ void util_blitter_clear_depth_custom(struct blitter_context *blitter,
* a software fallback path is taken and both surfaces must be of the same
* format.
*
- * The same holds for depth-stencil formats with the exception that stencil
- * cannot be copied unless you set ignore_stencil to FALSE. In that case,
- * a software fallback path is taken and both surfaces must be of the same
- * format. If the shader stencil export is supported, stencil copy is always
- * accelerated.
- *
- * Use pipe_screen->is_format_supported to know your options.
*
* These states must be saved in the blitter in addition to the state objects
* already required to be saved:
@@ -185,12 +190,11 @@ void util_blitter_clear_depth_custom(struct blitter_context *blitter,
*/
void util_blitter_copy_texture(struct blitter_context *blitter,
struct pipe_resource *dst,
- unsigned dstlevel,
+ unsigned dst_level,
unsigned dstx, unsigned dsty, unsigned dstz,
struct pipe_resource *src,
- unsigned srclevel,
- const struct pipe_box *srcbox,
- boolean ignore_stencil);
+ unsigned src_level,
+ const struct pipe_box *srcbox);
/**
* Same as util_blitter_copy_texture, but dst and src are pipe_surface and
@@ -207,6 +211,9 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
* coordinates. The dst dimensions are supplied through pipe_surface::width
* and height.
*
+ * The mask is a combination of the PIPE_MASK_* flags.
+ * Set to PIPE_MASK_RGBAZS if unsure.
+ *
* NOTE: There are no checks whether the blit is actually supported.
*/
void util_blitter_copy_texture_view(struct blitter_context *blitter,
@@ -214,7 +221,8 @@ void util_blitter_copy_texture_view(struct blitter_context *blitter,
unsigned dstx, unsigned dsty,
struct pipe_sampler_view *src,
const struct pipe_box *srcbox,
- unsigned src_width0, unsigned src_height0);
+ unsigned src_width0, unsigned src_height0,
+ unsigned mask);
/**
* Helper function to initialize a view for copy_texture_view.
@@ -418,6 +426,14 @@ util_blitter_save_so_targets(struct blitter_context *blitter,
targets[i]);
}
+static INLINE void
+util_blitter_save_sample_mask(struct blitter_context *blitter,
+ unsigned sample_mask)
+{
+ blitter->is_sample_mask_saved = TRUE;
+ blitter->saved_sample_mask = sample_mask;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_tests.c b/mesalib/src/gallium/auxiliary/util/u_format_tests.c
index d34860886..26e7acb62 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_tests.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_tests.c
@@ -26,6 +26,7 @@
**************************************************************************/
+#include <math.h>
#include <float.h>
#include "pipe/p_config.h"
@@ -66,14 +67,6 @@
{{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
-#ifdef __GNUC__
-#define NAN __builtin_nan("")
-#define INF __builtin_inf()
-#else
-#define NAN (0.0 / 0.0)
-#define INF (1.0 / 0.0)
-#endif
-
/**
* Test cases.
*
@@ -911,8 +904,8 @@ util_format_test_cases[] =
{PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1( -NAN, 0.0, 0.0, 1.0)},
/* Inf */
- {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), UNPACKED_1x1( INF, 0.0, 0.0, 1.0)},
- {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), UNPACKED_1x1( -INF, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), UNPACKED_1x1( INFINITY, 0.0, 0.0, 1.0)},
+ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), UNPACKED_1x1( -INFINITY, 0.0, 0.0, 1.0)},
#endif
diff --git a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
index a96cf6a30..c82c52c84 100644
--- a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -1573,8 +1573,9 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_save_blend(ctx->cso);
cso_save_depth_stencil_alpha(ctx->cso);
cso_save_rasterizer(ctx->cso);
- cso_save_samplers(ctx->cso);
- cso_save_fragment_sampler_views(ctx->cso);
+ cso_save_sample_mask(ctx->cso);
+ cso_save_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
cso_save_stream_outputs(ctx->cso);
cso_save_framebuffer(ctx->cso);
cso_save_fragment_shader(ctx->cso);
@@ -1590,6 +1591,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_set_depth_stencil_alpha(ctx->cso, is_depth ? &ctx->dsa_write_depth :
&ctx->dsa_keep_depth);
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_sample_mask(ctx->cso, ~0);
cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
cso_set_stream_outputs(ctx->cso, 0, NULL, 0);
@@ -1675,10 +1677,10 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
*/
ctx->sampler.min_lod = ctx->sampler.max_lod = (float) srcLevel;
ctx->sampler.lod_bias = (float) srcLevel;
- cso_single_sampler(ctx->cso, 0, &ctx->sampler);
- cso_single_sampler_done(ctx->cso);
+ cso_single_sampler(ctx->cso, PIPE_SHADER_FRAGMENT, 0, &ctx->sampler);
+ cso_single_sampler_done(ctx->cso, PIPE_SHADER_FRAGMENT);
- cso_set_fragment_sampler_views(ctx->cso, 1, &psv);
+ cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 1, &psv);
/* quad coords in clip coords */
offset = set_vertex_data(ctx,
@@ -1703,8 +1705,9 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_restore_blend(ctx->cso);
cso_restore_depth_stencil_alpha(ctx->cso);
cso_restore_rasterizer(ctx->cso);
- cso_restore_samplers(ctx->cso);
- cso_restore_fragment_sampler_views(ctx->cso);
+ cso_restore_sample_mask(ctx->cso);
+ cso_restore_samplers(ctx->cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT);
cso_restore_framebuffer(ctx->cso);
cso_restore_fragment_shader(ctx->cso);
cso_restore_vertex_shader(ctx->cso);
diff --git a/mesalib/src/gallium/auxiliary/util/u_surface.c b/mesalib/src/gallium/auxiliary/util/u_surface.c
index a541a38ff..fcfff148f 100644
--- a/mesalib/src/gallium/auxiliary/util/u_surface.c
+++ b/mesalib/src/gallium/auxiliary/util/u_surface.c
@@ -160,12 +160,12 @@ util_resource_copy_region(struct pipe_context *pipe,
unsigned h = src_box->height;
assert(src && dst);
- assert((src->target == PIPE_BUFFER && dst->target == PIPE_BUFFER) ||
- (src->target != PIPE_BUFFER && dst->target != PIPE_BUFFER));
-
if (!src || !dst)
return;
+ assert((src->target == PIPE_BUFFER && dst->target == PIPE_BUFFER) ||
+ (src->target != PIPE_BUFFER && dst->target != PIPE_BUFFER));
+
src_format = src->format;
dst_format = dst->format;
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c
index f9b2a73b2..91ae186fe 100644
--- a/mesalib/src/mesa/drivers/dri/common/dri_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c
@@ -197,12 +197,6 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
return NULL;
}
- if (mesa_api != API_OPENGL && num_attribs != 0) {
- *error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE;
- assert(!"Should not get here.");
- return NULL;
- }
-
for (unsigned i = 0; i < num_attribs; i++) {
switch (attribs[i * 2]) {
case __DRI_CTX_ATTRIB_MAJOR_VERSION:
@@ -224,6 +218,23 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
}
}
+ /* The EGL_KHR_create_context spec says:
+ *
+ * "Flags are only defined for OpenGL context creation, and specifying
+ * a flags value other than zero for other types of contexts,
+ * including OpenGL ES contexts, will generate an error."
+ *
+ * The GLX_EXT_create_context_es2_profile specification doesn't say
+ * anything specific about this case. However, none of the known flags
+ * have any meaning in an ES context, so this seems safe.
+ */
+ if (mesa_api != __DRI_API_OPENGL
+ && mesa_api != __DRI_API_OPENGL_CORE
+ && flags != 0) {
+ *error = __DRI_CTX_ERROR_BAD_FLAG;
+ return NULL;
+ }
+
/* There are no forward-compatible contexts before OpenGL 3.0. The
* GLX_ARB_create_context spec says:
*
diff --git a/mesalib/src/mesa/program/nvfragparse.c b/mesalib/src/mesa/program/nvfragparse.c
index bcc553a9b..20c8579b0 100644
--- a/mesalib/src/mesa/program/nvfragparse.c
+++ b/mesalib/src/mesa/program/nvfragparse.c
@@ -582,7 +582,7 @@ Parse_TextureImageId(struct parse_state *parseState,
RETURN_ERROR1("Expected TEX# source");
}
unit = atoi((const char *) imageSrc + 3);
- if ((unit < 0 || unit > MAX_TEXTURE_IMAGE_UNITS) ||
+ if ((unit < 0 || unit >= MAX_TEXTURE_IMAGE_UNITS) ||
(unit == 0 && (imageSrc[3] != '0' || imageSrc[4] != 0))) {
RETURN_ERROR1("Invalied TEX# source index");
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
index dc0c789c5..f39fd7551 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
@@ -195,84 +195,82 @@ convert_sampler(struct st_context *st,
}
+/**
+ * Update the gallium driver's sampler state for fragment, vertex or
+ * geometry shader stage.
+ */
static void
-update_vertex_samplers(struct st_context *st)
+update_shader_samplers(struct st_context *st,
+ unsigned shader_stage,
+ const struct gl_program *prog,
+ unsigned max_units,
+ struct pipe_sampler_state *samplers,
+ unsigned *num_samplers)
{
- const struct gl_context *ctx = st->ctx;
- struct gl_vertex_program *vprog = ctx->VertexProgram._Current;
- GLuint su;
-
- if (st->state.num_vertex_samplers == 0 && vprog->Base.SamplersUsed == 0)
- return;
- st->state.num_vertex_samplers = 0;
-
- /* loop over sampler units (aka tex image units) */
- for (su = 0; su < ctx->Const.MaxVertexTextureImageUnits; su++) {
- struct pipe_sampler_state *sampler = st->state.vertex_samplers + su;
-
- if (vprog->Base.SamplersUsed & (1 << su)) {
- GLuint texUnit;
-
- texUnit = vprog->Base.SamplerUnits[su];
+ GLuint unit;
+ GLbitfield samplers_used;
+ const GLuint old_max = *num_samplers;
- convert_sampler(st, sampler, texUnit);
+ samplers_used = prog->SamplersUsed;
- st->state.num_vertex_samplers = su + 1;
-
- cso_single_vertex_sampler(st->cso_context, su, sampler);
- } else {
- cso_single_vertex_sampler(st->cso_context, su, NULL);
- }
- }
- cso_single_vertex_sampler_done(st->cso_context);
-}
-
-
-static void
-update_fragment_samplers(struct st_context *st)
-{
- const struct gl_context *ctx = st->ctx;
- struct gl_fragment_program *fprog = ctx->FragmentProgram._Current;
- GLuint su;
- GLuint samplers_used = fprog->Base.SamplersUsed;
- GLuint old_max = st->state.num_samplers;
+ if (*num_samplers == 0 && samplers_used == 0x0)
+ return;
- st->state.num_samplers = 0;
+ *num_samplers = 0;
/* loop over sampler units (aka tex image units) */
- for (su = 0; su < ctx->Const.MaxTextureImageUnits; su++, samplers_used >>= 1) {
- struct pipe_sampler_state *sampler = st->state.samplers + su;
+ for (unit = 0; unit < max_units; unit++, samplers_used >>= 1) {
+ struct pipe_sampler_state *sampler = samplers + unit;
if (samplers_used & 1) {
- GLuint texUnit;
-
- texUnit = fprog->Base.SamplerUnits[su];
+ const GLuint texUnit = prog->SamplerUnits[unit];
convert_sampler(st, sampler, texUnit);
- st->state.num_samplers = su + 1;
+ *num_samplers = unit + 1;
- /*printf("%s su=%u non-null\n", __FUNCTION__, su);*/
- cso_single_sampler(st->cso_context, su, sampler);
+ cso_single_sampler(st->cso_context, shader_stage, unit, sampler);
+ }
+ else if (samplers_used != 0 || unit < old_max) {
+ cso_single_sampler(st->cso_context, shader_stage, unit, NULL);
}
- else if (samplers_used != 0 || su < old_max) {
- /*printf("%s su=%u null\n", __FUNCTION__, su);*/
- cso_single_sampler(st->cso_context, su, NULL);
- } else {
- /* if we've reset all the old views and we have no more new ones */
+ else {
+ /* if we've reset all the old samplers and we have no more new ones */
break;
}
}
- cso_single_sampler_done(st->cso_context);
+ cso_single_sampler_done(st->cso_context, shader_stage);
}
static void
update_samplers(struct st_context *st)
{
- update_fragment_samplers(st);
- update_vertex_samplers(st);
+ const struct gl_context *ctx = st->ctx;
+
+ update_shader_samplers(st,
+ PIPE_SHADER_FRAGMENT,
+ &ctx->FragmentProgram._Current->Base,
+ ctx->Const.MaxTextureImageUnits,
+ st->state.fragment_samplers,
+ &st->state.num_fragment_samplers);
+
+ update_shader_samplers(st,
+ PIPE_SHADER_VERTEX,
+ &ctx->VertexProgram._Current->Base,
+ ctx->Const.MaxVertexTextureImageUnits,
+ st->state.vertex_samplers,
+ &st->state.num_vertex_samplers);
+
+/*
+ update_shader_samplers(st,
+ PIPE_SHADER_GEOMETRY,
+ &ctx->GeometryProgram._Current->Base,
+ ctx->Const.MaxGeometryTextureImageUnits,
+ st->state.geometry_samplers,
+ &st->state.num_geometry_samplers);
+*/
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index fefa59860..e88675d4e 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -254,84 +254,81 @@ update_single_texture(struct st_context *st,
}
+
static void
-update_vertex_textures(struct st_context *st)
+update_textures(struct st_context *st,
+ unsigned shader_stage,
+ const struct gl_program *prog,
+ unsigned max_units,
+ struct pipe_sampler_view **sampler_views,
+ unsigned *num_textures)
{
- const struct gl_context *ctx = st->ctx;
- struct gl_vertex_program *vprog = ctx->VertexProgram._Current;
- GLuint su;
+ const GLuint old_max = *num_textures;
+ GLbitfield samplers_used = prog->SamplersUsed;
+ GLuint unit;
- if (!vprog->Base.SamplersUsed && st->state.num_vertex_textures == 0)
+ if (samplers_used == 0x0 && old_max == 0)
return;
- st->state.num_vertex_textures = 0;
+ *num_textures = 0;
/* loop over sampler units (aka tex image units) */
- for (su = 0; su < ctx->Const.MaxTextureImageUnits; su++) {
+ for (unit = 0; unit < max_units; unit++, samplers_used >>= 1) {
struct pipe_sampler_view *sampler_view = NULL;
- if (vprog->Base.SamplersUsed & (1 << su)) {
- GLboolean retval;
- GLuint texUnit;
- texUnit = vprog->Base.SamplerUnits[su];
+ if (samplers_used & 1) {
+ const GLuint texUnit = prog->SamplerUnits[unit];
+ GLboolean retval;
retval = update_single_texture(st, &sampler_view, texUnit);
if (retval == GL_FALSE)
continue;
- st->state.num_vertex_textures = su + 1;
+ *num_textures = unit + 1;
+ }
+ else if (samplers_used == 0 && unit >= old_max) {
+ /* if we've reset all the old views and we have no more new ones */
+ break;
}
- pipe_sampler_view_reference(&st->state.sampler_vertex_views[su],
- sampler_view);
- }
- if (ctx->Const.MaxVertexTextureImageUnits > 0) {
- GLuint numUnits = MIN2(st->state.num_vertex_textures,
- ctx->Const.MaxVertexTextureImageUnits);
- cso_set_vertex_sampler_views(st->cso_context,
- numUnits,
- st->state.sampler_vertex_views);
+ pipe_sampler_view_reference(&(sampler_views[unit]), sampler_view);
}
+
+ cso_set_sampler_views(st->cso_context,
+ shader_stage,
+ MIN2(*num_textures, max_units),
+ sampler_views);
}
+
static void
-update_fragment_textures(struct st_context *st)
+update_vertex_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
- struct gl_fragment_program *fprog = ctx->FragmentProgram._Current;
- GLuint su;
- int old_max = st->state.num_textures;
- GLbitfield samplers_used = fprog->Base.SamplersUsed;
-
- st->state.num_textures = 0;
-
- /* loop over sampler units (aka tex image units) */
- for (su = 0; su < ctx->Const.MaxTextureImageUnits; su++, samplers_used >>= 1) {
- struct pipe_sampler_view *sampler_view = NULL;
-
- if (samplers_used & 1) {
- GLboolean retval;
- GLuint texUnit;
- texUnit = fprog->Base.SamplerUnits[su];
-
- retval = update_single_texture(st, &sampler_view, texUnit);
- if (retval == GL_FALSE)
- continue;
+ if (ctx->Const.MaxVertexTextureImageUnits > 0) {
+ update_textures(st,
+ PIPE_SHADER_VERTEX,
+ &ctx->VertexProgram._Current->Base,
+ ctx->Const.MaxVertexTextureImageUnits,
+ st->state.vertex_sampler_views,
+ &st->state.num_vertex_textures);
+ }
+}
- st->state.num_textures = su + 1;
- } else if (samplers_used == 0 && su >= old_max) {
- /* if we've reset all the old views and we have no more new ones */
- break;
- }
- pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view);
- }
+static void
+update_fragment_textures(struct st_context *st)
+{
+ const struct gl_context *ctx = st->ctx;
- cso_set_fragment_sampler_views(st->cso_context,
- st->state.num_textures,
- st->state.sampler_views);
+ update_textures(st,
+ PIPE_SHADER_FRAGMENT,
+ &ctx->FragmentProgram._Current->Base,
+ ctx->Const.MaxTextureImageUnits,
+ st->state.fragment_sampler_views,
+ &st->state.num_fragment_textures);
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index c26058874..3c17bd6c3 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -454,8 +454,8 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
assert(height <= (GLsizei)maxSize);
cso_save_rasterizer(cso);
- cso_save_samplers(cso);
- cso_save_fragment_sampler_views(cso);
+ cso_save_samplers(cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(cso, PIPE_SHADER_FRAGMENT);
cso_save_viewport(cso);
cso_save_fragment_shader(cso);
cso_save_stream_outputs(cso);
@@ -480,23 +480,26 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* user samplers, plus our bitmap sampler */
{
struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
- uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_samplers);
+ uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_fragment_samplers);
uint i;
- for (i = 0; i < st->state.num_samplers; i++) {
- samplers[i] = &st->state.samplers[i];
+ for (i = 0; i < st->state.num_fragment_samplers; i++) {
+ samplers[i] = &st->state.fragment_samplers[i];
}
samplers[fpv->bitmap_sampler] =
&st->bitmap.samplers[sv->texture->target != PIPE_TEXTURE_RECT];
- cso_set_samplers(cso, num, (const struct pipe_sampler_state **) samplers);
+ cso_set_samplers(cso, PIPE_SHADER_FRAGMENT, num,
+ (const struct pipe_sampler_state **) samplers);
}
/* user textures, plus the bitmap texture */
{
struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
- uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_textures);
- memcpy(sampler_views, st->state.sampler_views, sizeof(sampler_views));
+ uint num = MAX2(fpv->bitmap_sampler + 1,
+ st->state.num_fragment_textures);
+ memcpy(sampler_views, st->state.fragment_sampler_views,
+ sizeof(sampler_views));
sampler_views[fpv->bitmap_sampler] = sv;
- cso_set_fragment_sampler_views(cso, num, sampler_views);
+ cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, num, sampler_views);
}
/* viewport state: viewport matching window dims */
@@ -535,8 +538,8 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* restore state */
cso_restore_rasterizer(cso);
- cso_restore_samplers(cso);
- cso_restore_fragment_sampler_views(cso);
+ cso_restore_samplers(cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(cso, PIPE_SHADER_FRAGMENT);
cso_restore_viewport(cso);
cso_restore_fragment_shader(cso);
cso_restore_vertex_shader(cso);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c
index 3cd8756f2..e731b6b5e 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_clear.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c
@@ -217,6 +217,7 @@ clear_with_quad(struct gl_context *ctx,
cso_save_stencil_ref(st->cso_context);
cso_save_depth_stencil_alpha(st->cso_context);
cso_save_rasterizer(st->cso_context);
+ cso_save_sample_mask(st->cso_context);
cso_save_viewport(st->cso_context);
cso_save_fragment_shader(st->cso_context);
cso_save_stream_outputs(st->cso_context);
@@ -277,7 +278,7 @@ clear_with_quad(struct gl_context *ctx,
cso_set_vertex_elements(st->cso_context, 2, st->velems_util_draw);
cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
-
+ cso_set_sample_mask(st->cso_context, ~0);
cso_set_rasterizer(st->cso_context, &st->clear.raster);
/* viewport state: viewport matching window dims */
@@ -313,6 +314,7 @@ clear_with_quad(struct gl_context *ctx,
cso_restore_stencil_ref(st->cso_context);
cso_restore_depth_stencil_alpha(st->cso_context);
cso_restore_rasterizer(st->cso_context);
+ cso_restore_sample_mask(st->cso_context);
cso_restore_viewport(st->cso_context);
cso_restore_fragment_shader(st->cso_context);
cso_restore_vertex_shader(st->cso_context);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index f288a9632..88068ac60 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -679,8 +679,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_save_rasterizer(cso);
cso_save_viewport(cso);
- cso_save_samplers(cso);
- cso_save_fragment_sampler_views(cso);
+ cso_save_samplers(cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(cso, PIPE_SHADER_FRAGMENT);
cso_save_fragment_shader(cso);
cso_save_stream_outputs(cso);
cso_save_vertex_shader(cso);
@@ -751,11 +751,11 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
sampler.normalized_coords = normalized;
- cso_single_sampler(cso, 0, &sampler);
+ cso_single_sampler(cso, PIPE_SHADER_FRAGMENT, 0, &sampler);
if (num_sampler_view > 1) {
- cso_single_sampler(cso, 1, &sampler);
+ cso_single_sampler(cso, PIPE_SHADER_FRAGMENT, 1, &sampler);
}
- cso_single_sampler_done(cso);
+ cso_single_sampler_done(cso, PIPE_SHADER_FRAGMENT);
}
/* viewport state: viewport matching window dims */
@@ -778,7 +778,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
/* texture state: */
- cso_set_fragment_sampler_views(cso, num_sampler_view, sv);
+ cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, num_sampler_view, sv);
/* Compute Gallium window coords (y=0=top) with pixel zoom.
* Recall that these coords are transformed by the current
@@ -804,8 +804,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* restore state */
cso_restore_rasterizer(cso);
cso_restore_viewport(cso);
- cso_restore_samplers(cso);
- cso_restore_fragment_sampler_views(cso);
+ cso_restore_samplers(cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(cso, PIPE_SHADER_FRAGMENT);
cso_restore_fragment_shader(cso);
cso_restore_vertex_shader(cso);
cso_restore_geometry_shader(cso);
diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c
index 6b7c047ed..2f9516178 100644
--- a/mesalib/src/mesa/state_tracker/st_context.c
+++ b/mesalib/src/mesa/state_tracker/st_context.c
@@ -248,8 +248,14 @@ static void st_destroy_context_priv( struct st_context *st )
st_destroy_drawpix(st);
st_destroy_drawtex(st);
- for (i = 0; i < Elements(st->state.sampler_views); i++) {
- pipe_sampler_view_release(st->pipe, &st->state.sampler_views[i]);
+ for (i = 0; i < Elements(st->state.fragment_sampler_views); i++) {
+ pipe_sampler_view_release(st->pipe,
+ &st->state.fragment_sampler_views[i]);
+ }
+
+ for (i = 0; i < Elements(st->state.vertex_sampler_views); i++) {
+ pipe_sampler_view_release(st->pipe,
+ &st->state.vertex_sampler_views[i]);
}
if (st->default_texture) {
diff --git a/mesalib/src/mesa/state_tracker/st_context.h b/mesalib/src/mesa/state_tracker/st_context.h
index cdac5a1c7..0dfd81c1b 100644
--- a/mesalib/src/mesa/state_tracker/st_context.h
+++ b/mesalib/src/mesa/state_tracker/st_context.h
@@ -98,23 +98,23 @@ struct st_context
struct pipe_blend_state blend;
struct pipe_depth_stencil_alpha_state depth_stencil;
struct pipe_rasterizer_state rasterizer;
- struct pipe_sampler_state samplers[PIPE_MAX_SAMPLERS];
- struct pipe_sampler_state vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS];
+ struct pipe_sampler_state fragment_samplers[PIPE_MAX_SAMPLERS];
+ struct pipe_sampler_state vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS];
struct pipe_clip_state clip;
struct {
void *ptr;
unsigned size;
} constants[PIPE_SHADER_TYPES];
struct pipe_framebuffer_state framebuffer;
- struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
- struct pipe_sampler_view *sampler_vertex_views[PIPE_MAX_VERTEX_SAMPLERS];
+ struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
+ struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
struct pipe_scissor_state scissor;
struct pipe_viewport_state viewport;
unsigned sample_mask;
- GLuint num_samplers;
+ GLuint num_fragment_samplers;
GLuint num_vertex_samplers;
- GLuint num_textures;
+ GLuint num_fragment_textures;
GLuint num_vertex_textures;
GLuint poly_stipple[32]; /**< In OpenGL's bottom-to-top order */
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index fcd69b18d..66627acb6 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4790,7 +4790,7 @@ get_mesa_program(struct gl_context *ctx,
struct gl_shader_program *shader_program,
struct gl_shader *shader)
{
- glsl_to_tgsi_visitor* v = new glsl_to_tgsi_visitor();
+ glsl_to_tgsi_visitor* v;
struct gl_program *prog;
GLenum target;
const char *target_string;
@@ -4822,6 +4822,7 @@ get_mesa_program(struct gl_context *ctx,
if (!prog)
return NULL;
prog->Parameters = _mesa_new_parameter_list();
+ v = new glsl_to_tgsi_visitor();
v->ctx = ctx;
v->prog = prog;
v->shader_program = shader_program;
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 698d386d4..3c9090e66 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -1036,15 +1036,15 @@ SyncComputeBracketValues(SyncCounter * pCounter)
pnewltval = &psci->bracket_less;
}
else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
- XSyncValueLessThan(pTrigger->test_value,
- psci->bracket_greater)) {
+ XSyncValueGreaterThan(pTrigger->test_value,
+ psci->bracket_less)) {
/*
* The value is exactly equal to our threshold. We want one
- * more event in the positive direction to ensure we pick up
- * when the value *exceeds* this threshold.
+ * more event in the negative direction to ensure we pick up
+ * when the value is less than this threshold.
*/
- psci->bracket_greater = pTrigger->test_value;
- pnewgtval = &psci->bracket_greater;
+ psci->bracket_less = pTrigger->test_value;
+ pnewltval = &psci->bracket_less;
}
}
else if (pTrigger->test_type == XSyncPositiveTransition &&
@@ -1056,15 +1056,15 @@ SyncComputeBracketValues(SyncCounter * pCounter)
pnewgtval = &psci->bracket_greater;
}
else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
- XSyncValueGreaterThan(pTrigger->test_value,
- psci->bracket_less)) {
+ XSyncValueLessThan(pTrigger->test_value,
+ psci->bracket_greater)) {
/*
* The value is exactly equal to our threshold. We want one
- * more event in the negative direction to ensure we pick up
- * when the value is less than this threshold.
+ * more event in the positive direction to ensure we pick up
+ * when the value *exceeds* this threshold.
*/
- psci->bracket_less = pTrigger->test_value;
- pnewltval = &psci->bracket_less;
+ psci->bracket_greater = pTrigger->test_value;
+ pnewgtval = &psci->bracket_greater;
}
}
} /* end for each trigger */
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 93129b30b..9483180a7 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1892,6 +1892,12 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
if (normal_end)
listener->state = LISTENER_HAS_END;
}
+ else if (ev->device_event.flags & TOUCH_ACCEPT) {
+ /* Touch has been accepted by its owner, which is not this listener */
+ if (listener->state != LISTENER_HAS_END)
+ rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
+ listener->state = LISTENER_HAS_END;
+ }
out:
return rc;
diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c
index eac2586ed..7e3075551 100644
--- a/xorg-server/Xi/extinit.c
+++ b/xorg-server/Xi/extinit.c
@@ -158,25 +158,25 @@ static struct dev_type {
Atom type;
const char *name;
} dev_type[] = {
- {
- 0, XI_KEYBOARD}, {
- 0, XI_MOUSE}, {
- 0, XI_TABLET}, {
- 0, XI_TOUCHSCREEN}, {
- 0, XI_TOUCHPAD}, {
- 0, XI_BARCODE}, {
- 0, XI_BUTTONBOX}, {
- 0, XI_KNOB_BOX}, {
- 0, XI_ONE_KNOB}, {
- 0, XI_NINE_KNOB}, {
- 0, XI_TRACKBALL}, {
- 0, XI_QUADRATURE}, {
- 0, XI_ID_MODULE}, {
- 0, XI_SPACEBALL}, {
- 0, XI_DATAGLOVE}, {
- 0, XI_EYETRACKER}, {
- 0, XI_CURSORKEYS}, {
-0, XI_FOOTMOUSE}};
+ {0, XI_KEYBOARD},
+ {0, XI_MOUSE},
+ {0, XI_TABLET},
+ {0, XI_TOUCHSCREEN},
+ {0, XI_TOUCHPAD},
+ {0, XI_BARCODE},
+ {0, XI_BUTTONBOX},
+ {0, XI_KNOB_BOX},
+ {0, XI_ONE_KNOB},
+ {0, XI_NINE_KNOB},
+ {0, XI_TRACKBALL},
+ {0, XI_QUADRATURE},
+ {0, XI_ID_MODULE},
+ {0, XI_SPACEBALL},
+ {0, XI_DATAGLOVE},
+ {0, XI_EYETRACKER},
+ {0, XI_CURSORKEYS},
+ {0, XI_FOOTMOUSE}
+};
CARD8 event_base[numInputClasses];
XExtEventInfo EventInfo[32];
diff --git a/xorg-server/Xi/xiproperty.c b/xorg-server/Xi/xiproperty.c
index 86429c1d9..39c55f823 100644
--- a/xorg-server/Xi/xiproperty.c
+++ b/xorg-server/Xi/xiproperty.c
@@ -49,132 +49,131 @@ static struct dev_properties {
Atom type;
const char *name;
} dev_properties[] = {
- {
- 0, XI_PROP_ENABLED}, {
- 0, XI_PROP_XTEST_DEVICE}, {
- 0, XATOM_FLOAT}, {
- 0, ACCEL_PROP_PROFILE_NUMBER}, {
- 0, ACCEL_PROP_CONSTANT_DECELERATION}, {
- 0, ACCEL_PROP_ADAPTIVE_DECELERATION}, {
- 0, ACCEL_PROP_VELOCITY_SCALING}, {
- 0, AXIS_LABEL_PROP}, {
- 0, AXIS_LABEL_PROP_REL_X}, {
- 0, AXIS_LABEL_PROP_REL_Y}, {
- 0, AXIS_LABEL_PROP_REL_Z}, {
- 0, AXIS_LABEL_PROP_REL_RX}, {
- 0, AXIS_LABEL_PROP_REL_RY}, {
- 0, AXIS_LABEL_PROP_REL_RZ}, {
- 0, AXIS_LABEL_PROP_REL_HWHEEL}, {
- 0, AXIS_LABEL_PROP_REL_DIAL}, {
- 0, AXIS_LABEL_PROP_REL_WHEEL}, {
- 0, AXIS_LABEL_PROP_REL_MISC}, {
- 0, AXIS_LABEL_PROP_REL_VSCROLL}, {
- 0, AXIS_LABEL_PROP_REL_HSCROLL}, {
- 0, AXIS_LABEL_PROP_ABS_X}, {
- 0, AXIS_LABEL_PROP_ABS_Y}, {
- 0, AXIS_LABEL_PROP_ABS_Z}, {
- 0, AXIS_LABEL_PROP_ABS_RX}, {
- 0, AXIS_LABEL_PROP_ABS_RY}, {
- 0, AXIS_LABEL_PROP_ABS_RZ}, {
- 0, AXIS_LABEL_PROP_ABS_THROTTLE}, {
- 0, AXIS_LABEL_PROP_ABS_RUDDER}, {
- 0, AXIS_LABEL_PROP_ABS_WHEEL}, {
- 0, AXIS_LABEL_PROP_ABS_GAS}, {
- 0, AXIS_LABEL_PROP_ABS_BRAKE}, {
- 0, AXIS_LABEL_PROP_ABS_HAT0X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT0Y}, {
- 0, AXIS_LABEL_PROP_ABS_HAT1X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT1Y}, {
- 0, AXIS_LABEL_PROP_ABS_HAT2X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT2Y}, {
- 0, AXIS_LABEL_PROP_ABS_HAT3X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT3Y}, {
- 0, AXIS_LABEL_PROP_ABS_PRESSURE}, {
- 0, AXIS_LABEL_PROP_ABS_DISTANCE}, {
- 0, AXIS_LABEL_PROP_ABS_TILT_X}, {
- 0, AXIS_LABEL_PROP_ABS_TILT_Y}, {
- 0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH}, {
- 0, AXIS_LABEL_PROP_ABS_VOLUME}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION}, {
- 0, AXIS_LABEL_PROP_ABS_MT_POSITION_X}, {
- 0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE}, {
- 0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID}, {
- 0, AXIS_LABEL_PROP_ABS_MT_PRESSURE}, {
- 0, AXIS_LABEL_PROP_ABS_MISC}, {
- 0, BTN_LABEL_PROP}, {
- 0, BTN_LABEL_PROP_BTN_UNKNOWN}, {
- 0, BTN_LABEL_PROP_BTN_WHEEL_UP}, {
- 0, BTN_LABEL_PROP_BTN_WHEEL_DOWN}, {
- 0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT}, {
- 0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT}, {
- 0, BTN_LABEL_PROP_BTN_0}, {
- 0, BTN_LABEL_PROP_BTN_1}, {
- 0, BTN_LABEL_PROP_BTN_2}, {
- 0, BTN_LABEL_PROP_BTN_3}, {
- 0, BTN_LABEL_PROP_BTN_4}, {
- 0, BTN_LABEL_PROP_BTN_5}, {
- 0, BTN_LABEL_PROP_BTN_6}, {
- 0, BTN_LABEL_PROP_BTN_7}, {
- 0, BTN_LABEL_PROP_BTN_8}, {
- 0, BTN_LABEL_PROP_BTN_9}, {
- 0, BTN_LABEL_PROP_BTN_LEFT}, {
- 0, BTN_LABEL_PROP_BTN_RIGHT}, {
- 0, BTN_LABEL_PROP_BTN_MIDDLE}, {
- 0, BTN_LABEL_PROP_BTN_SIDE}, {
- 0, BTN_LABEL_PROP_BTN_EXTRA}, {
- 0, BTN_LABEL_PROP_BTN_FORWARD}, {
- 0, BTN_LABEL_PROP_BTN_BACK}, {
- 0, BTN_LABEL_PROP_BTN_TASK}, {
- 0, BTN_LABEL_PROP_BTN_TRIGGER}, {
- 0, BTN_LABEL_PROP_BTN_THUMB}, {
- 0, BTN_LABEL_PROP_BTN_THUMB2}, {
- 0, BTN_LABEL_PROP_BTN_TOP}, {
- 0, BTN_LABEL_PROP_BTN_TOP2}, {
- 0, BTN_LABEL_PROP_BTN_PINKIE}, {
- 0, BTN_LABEL_PROP_BTN_BASE}, {
- 0, BTN_LABEL_PROP_BTN_BASE2}, {
- 0, BTN_LABEL_PROP_BTN_BASE3}, {
- 0, BTN_LABEL_PROP_BTN_BASE4}, {
- 0, BTN_LABEL_PROP_BTN_BASE5}, {
- 0, BTN_LABEL_PROP_BTN_BASE6}, {
- 0, BTN_LABEL_PROP_BTN_DEAD}, {
- 0, BTN_LABEL_PROP_BTN_A}, {
- 0, BTN_LABEL_PROP_BTN_B}, {
- 0, BTN_LABEL_PROP_BTN_C}, {
- 0, BTN_LABEL_PROP_BTN_X}, {
- 0, BTN_LABEL_PROP_BTN_Y}, {
- 0, BTN_LABEL_PROP_BTN_Z}, {
- 0, BTN_LABEL_PROP_BTN_TL}, {
- 0, BTN_LABEL_PROP_BTN_TR}, {
- 0, BTN_LABEL_PROP_BTN_TL2}, {
- 0, BTN_LABEL_PROP_BTN_TR2}, {
- 0, BTN_LABEL_PROP_BTN_SELECT}, {
- 0, BTN_LABEL_PROP_BTN_START}, {
- 0, BTN_LABEL_PROP_BTN_MODE}, {
- 0, BTN_LABEL_PROP_BTN_THUMBL}, {
- 0, BTN_LABEL_PROP_BTN_THUMBR}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_PEN}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_RUBBER}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_BRUSH}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_PENCIL}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_FINGER}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_MOUSE}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_LENS}, {
- 0, BTN_LABEL_PROP_BTN_TOUCH}, {
- 0, BTN_LABEL_PROP_BTN_STYLUS}, {
- 0, BTN_LABEL_PROP_BTN_STYLUS2}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, {
- 0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, {
- 0, BTN_LABEL_PROP_BTN_GEAR_UP}, {
- 0, XI_PROP_TRANSFORM}
+ {0, XI_PROP_ENABLED},
+ {0, XI_PROP_XTEST_DEVICE},
+ {0, XATOM_FLOAT},
+ {0, ACCEL_PROP_PROFILE_NUMBER},
+ {0, ACCEL_PROP_CONSTANT_DECELERATION},
+ {0, ACCEL_PROP_ADAPTIVE_DECELERATION},
+ {0, ACCEL_PROP_VELOCITY_SCALING},
+ {0, AXIS_LABEL_PROP},
+ {0, AXIS_LABEL_PROP_REL_X},
+ {0, AXIS_LABEL_PROP_REL_Y},
+ {0, AXIS_LABEL_PROP_REL_Z},
+ {0, AXIS_LABEL_PROP_REL_RX},
+ {0, AXIS_LABEL_PROP_REL_RY},
+ {0, AXIS_LABEL_PROP_REL_RZ},
+ {0, AXIS_LABEL_PROP_REL_HWHEEL},
+ {0, AXIS_LABEL_PROP_REL_DIAL},
+ {0, AXIS_LABEL_PROP_REL_WHEEL},
+ {0, AXIS_LABEL_PROP_REL_MISC},
+ {0, AXIS_LABEL_PROP_REL_VSCROLL},
+ {0, AXIS_LABEL_PROP_REL_HSCROLL},
+ {0, AXIS_LABEL_PROP_ABS_X},
+ {0, AXIS_LABEL_PROP_ABS_Y},
+ {0, AXIS_LABEL_PROP_ABS_Z},
+ {0, AXIS_LABEL_PROP_ABS_RX},
+ {0, AXIS_LABEL_PROP_ABS_RY},
+ {0, AXIS_LABEL_PROP_ABS_RZ},
+ {0, AXIS_LABEL_PROP_ABS_THROTTLE},
+ {0, AXIS_LABEL_PROP_ABS_RUDDER},
+ {0, AXIS_LABEL_PROP_ABS_WHEEL},
+ {0, AXIS_LABEL_PROP_ABS_GAS},
+ {0, AXIS_LABEL_PROP_ABS_BRAKE},
+ {0, AXIS_LABEL_PROP_ABS_HAT0X},
+ {0, AXIS_LABEL_PROP_ABS_HAT0Y},
+ {0, AXIS_LABEL_PROP_ABS_HAT1X},
+ {0, AXIS_LABEL_PROP_ABS_HAT1Y},
+ {0, AXIS_LABEL_PROP_ABS_HAT2X},
+ {0, AXIS_LABEL_PROP_ABS_HAT2Y},
+ {0, AXIS_LABEL_PROP_ABS_HAT3X},
+ {0, AXIS_LABEL_PROP_ABS_HAT3Y},
+ {0, AXIS_LABEL_PROP_ABS_PRESSURE},
+ {0, AXIS_LABEL_PROP_ABS_DISTANCE},
+ {0, AXIS_LABEL_PROP_ABS_TILT_X},
+ {0, AXIS_LABEL_PROP_ABS_TILT_Y},
+ {0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH},
+ {0, AXIS_LABEL_PROP_ABS_VOLUME},
+ {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION},
+ {0, AXIS_LABEL_PROP_ABS_MT_POSITION_X},
+ {0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y},
+ {0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE},
+ {0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID},
+ {0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID},
+ {0, AXIS_LABEL_PROP_ABS_MT_PRESSURE},
+ {0, AXIS_LABEL_PROP_ABS_MISC},
+ {0, BTN_LABEL_PROP},
+ {0, BTN_LABEL_PROP_BTN_UNKNOWN},
+ {0, BTN_LABEL_PROP_BTN_WHEEL_UP},
+ {0, BTN_LABEL_PROP_BTN_WHEEL_DOWN},
+ {0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT},
+ {0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT},
+ {0, BTN_LABEL_PROP_BTN_0},
+ {0, BTN_LABEL_PROP_BTN_1},
+ {0, BTN_LABEL_PROP_BTN_2},
+ {0, BTN_LABEL_PROP_BTN_3},
+ {0, BTN_LABEL_PROP_BTN_4},
+ {0, BTN_LABEL_PROP_BTN_5},
+ {0, BTN_LABEL_PROP_BTN_6},
+ {0, BTN_LABEL_PROP_BTN_7},
+ {0, BTN_LABEL_PROP_BTN_8},
+ {0, BTN_LABEL_PROP_BTN_9},
+ {0, BTN_LABEL_PROP_BTN_LEFT},
+ {0, BTN_LABEL_PROP_BTN_RIGHT},
+ {0, BTN_LABEL_PROP_BTN_MIDDLE},
+ {0, BTN_LABEL_PROP_BTN_SIDE},
+ {0, BTN_LABEL_PROP_BTN_EXTRA},
+ {0, BTN_LABEL_PROP_BTN_FORWARD},
+ {0, BTN_LABEL_PROP_BTN_BACK},
+ {0, BTN_LABEL_PROP_BTN_TASK},
+ {0, BTN_LABEL_PROP_BTN_TRIGGER},
+ {0, BTN_LABEL_PROP_BTN_THUMB},
+ {0, BTN_LABEL_PROP_BTN_THUMB2},
+ {0, BTN_LABEL_PROP_BTN_TOP},
+ {0, BTN_LABEL_PROP_BTN_TOP2},
+ {0, BTN_LABEL_PROP_BTN_PINKIE},
+ {0, BTN_LABEL_PROP_BTN_BASE},
+ {0, BTN_LABEL_PROP_BTN_BASE2},
+ {0, BTN_LABEL_PROP_BTN_BASE3},
+ {0, BTN_LABEL_PROP_BTN_BASE4},
+ {0, BTN_LABEL_PROP_BTN_BASE5},
+ {0, BTN_LABEL_PROP_BTN_BASE6},
+ {0, BTN_LABEL_PROP_BTN_DEAD},
+ {0, BTN_LABEL_PROP_BTN_A},
+ {0, BTN_LABEL_PROP_BTN_B},
+ {0, BTN_LABEL_PROP_BTN_C},
+ {0, BTN_LABEL_PROP_BTN_X},
+ {0, BTN_LABEL_PROP_BTN_Y},
+ {0, BTN_LABEL_PROP_BTN_Z},
+ {0, BTN_LABEL_PROP_BTN_TL},
+ {0, BTN_LABEL_PROP_BTN_TR},
+ {0, BTN_LABEL_PROP_BTN_TL2},
+ {0, BTN_LABEL_PROP_BTN_TR2},
+ {0, BTN_LABEL_PROP_BTN_SELECT},
+ {0, BTN_LABEL_PROP_BTN_START},
+ {0, BTN_LABEL_PROP_BTN_MODE},
+ {0, BTN_LABEL_PROP_BTN_THUMBL},
+ {0, BTN_LABEL_PROP_BTN_THUMBR},
+ {0, BTN_LABEL_PROP_BTN_TOOL_PEN},
+ {0, BTN_LABEL_PROP_BTN_TOOL_RUBBER},
+ {0, BTN_LABEL_PROP_BTN_TOOL_BRUSH},
+ {0, BTN_LABEL_PROP_BTN_TOOL_PENCIL},
+ {0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH},
+ {0, BTN_LABEL_PROP_BTN_TOOL_FINGER},
+ {0, BTN_LABEL_PROP_BTN_TOOL_MOUSE},
+ {0, BTN_LABEL_PROP_BTN_TOOL_LENS},
+ {0, BTN_LABEL_PROP_BTN_TOUCH},
+ {0, BTN_LABEL_PROP_BTN_STYLUS},
+ {0, BTN_LABEL_PROP_BTN_STYLUS2},
+ {0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP},
+ {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP},
+ {0, BTN_LABEL_PROP_BTN_GEAR_DOWN},
+ {0, BTN_LABEL_PROP_BTN_GEAR_UP},
+ {0, XI_PROP_TRANSFORM}
};
static long XIPropHandlerID = 1;
@@ -771,6 +770,8 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
&new_value, checkonly);
if (checkonly && rc != Success) {
free(new_value.data);
+ if (add)
+ XIDestroyDeviceProperty(prop);
return rc;
}
}
diff --git a/xorg-server/config/wscons.c b/xorg-server/config/wscons.c
index 7a5e8cc10..fb114bd71 100644
--- a/xorg-server/config/wscons.c
+++ b/xorg-server/config/wscons.c
@@ -53,8 +53,10 @@ struct nameint {
int val;
char *name;
} kbdenc[] = {
- KB_OVRENC, KB_ENCTAB, {
-0}};
+ KB_OVRENC,
+ KB_ENCTAB,
+ {0}
+};
struct nameint kbdvar[] = {
{KB_NODEAD | KB_SG, "de_nodeadkeys"},
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 12fb28e60..dc79e4820 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -1600,7 +1600,7 @@ if test "x$XORG" = xyes; then
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
- XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+ XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
dnl ==================================================================
dnl symbol visibility
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index afd37fe94..fc13f46a0 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -437,11 +437,11 @@ static const struct {
RESTYPE type;
Mask access_mode;
} xidfields[] = {
- {
- GCTile, RT_PIXMAP, DixReadAccess}, {
- GCStipple, RT_PIXMAP, DixReadAccess}, {
- GCFont, RT_FONT, DixUseAccess}, {
-GCClipMask, RT_PIXMAP, DixReadAccess},};
+ {GCTile, RT_PIXMAP, DixReadAccess},
+ {GCStipple, RT_PIXMAP, DixReadAccess},
+ {GCFont, RT_FONT, DixUseAccess},
+ {GCClipMask, RT_PIXMAP, DixReadAccess},
+};
int
ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32)
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index b0a4455a4..9a350388b 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1646,6 +1646,8 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
if (adj != 0.0 && axis != -1) {
adj *= pDev->valuator->axes[axis].scroll.increment;
+ if (!valuator_mask_isset(&mask, axis))
+ valuator_mask_set(&mask, axis, 0);
add_to_scroll_valuator(pDev, &mask, axis, adj);
type = MotionNotify;
buttons = 0;
diff --git a/xorg-server/dix/pixmap.c b/xorg-server/dix/pixmap.c
index 9163e99eb..241881262 100644
--- a/xorg-server/dix/pixmap.c
+++ b/xorg-server/dix/pixmap.c
@@ -148,6 +148,10 @@ PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave)
pixmap->drawable.height, depth, 0,
pixmap->devKind, NULL);
+ /* have the slave pixmap take a reference on the master pixmap
+ later we destroy them both at the same time */
+ pixmap->refcnt++;
+
spix->master_pixmap = pixmap;
ret = slave->SetSharedPixmapBacking(spix, handle);
diff --git a/xorg-server/dix/tables.c b/xorg-server/dix/tables.c
index 705ef0d4d..686cddd7d 100644
--- a/xorg-server/dix/tables.c
+++ b/xorg-server/dix/tables.c
@@ -58,364 +58,529 @@ SOFTWARE.
#include "swaprep.h"
#include "swapreq.h"
-int (*InitialVector[3]) (ClientPtr /* client */
- ) = {
-0, ProcInitialConnection, ProcEstablishConnection};
+int (*InitialVector[3]) (ClientPtr /* client */) = {
+ 0,
+ ProcInitialConnection,
+ ProcEstablishConnection
+};
-int (*ProcVector[256]) (ClientPtr /* client */
- ) = {
- ProcBadRequest, ProcCreateWindow, ProcChangeWindowAttributes, ProcGetWindowAttributes, ProcDestroyWindow, ProcDestroySubwindows, /* 5 */
- ProcChangeSaveSet, ProcReparentWindow, ProcMapWindow, ProcMapSubwindows, ProcUnmapWindow, /* 10 */
- ProcUnmapSubwindows, ProcConfigureWindow, ProcCirculateWindow, ProcGetGeometry, ProcQueryTree, /* 15 */
- ProcInternAtom, ProcGetAtomName, ProcChangeProperty, ProcDeleteProperty, ProcGetProperty, /* 20 */
- ProcListProperties, ProcSetSelectionOwner, ProcGetSelectionOwner, ProcConvertSelection, ProcSendEvent, /* 25 */
- ProcGrabPointer, ProcUngrabPointer, ProcGrabButton, ProcUngrabButton, ProcChangeActivePointerGrab, /* 30 */
- ProcGrabKeyboard, ProcUngrabKeyboard, ProcGrabKey, ProcUngrabKey, ProcAllowEvents, /* 35 */
- ProcGrabServer, ProcUngrabServer, ProcQueryPointer, ProcGetMotionEvents, ProcTranslateCoords, /* 40 */
- ProcWarpPointer, ProcSetInputFocus, ProcGetInputFocus, ProcQueryKeymap, ProcOpenFont, /* 45 */
- ProcCloseFont, ProcQueryFont, ProcQueryTextExtents, ProcListFonts, ProcListFontsWithInfo, /* 50 */
- ProcSetFontPath, ProcGetFontPath, ProcCreatePixmap, ProcFreePixmap, ProcCreateGC, /* 55 */
- ProcChangeGC, ProcCopyGC, ProcSetDashes, ProcSetClipRectangles, ProcFreeGC, /* 60 */
- ProcClearToBackground, ProcCopyArea, ProcCopyPlane, ProcPolyPoint, ProcPolyLine, /* 65 */
- ProcPolySegment, ProcPolyRectangle, ProcPolyArc, ProcFillPoly, ProcPolyFillRectangle, /* 70 */
- ProcPolyFillArc, ProcPutImage, ProcGetImage, ProcPolyText, ProcPolyText, /* 75 */
- ProcImageText8, ProcImageText16, ProcCreateColormap, ProcFreeColormap, ProcCopyColormapAndFree, /* 80 */
- ProcInstallColormap, ProcUninstallColormap, ProcListInstalledColormaps, ProcAllocColor, ProcAllocNamedColor, /* 85 */
- ProcAllocColorCells, ProcAllocColorPlanes, ProcFreeColors, ProcStoreColors, ProcStoreNamedColor, /* 90 */
- ProcQueryColors, ProcLookupColor, ProcCreateCursor, ProcCreateGlyphCursor, ProcFreeCursor, /* 95 */
- ProcRecolorCursor, ProcQueryBestSize, ProcQueryExtension, ProcListExtensions, ProcChangeKeyboardMapping, /* 100 */
- ProcGetKeyboardMapping, ProcChangeKeyboardControl, ProcGetKeyboardControl, ProcBell, ProcChangePointerControl, /* 105 */
- ProcGetPointerControl, ProcSetScreenSaver, ProcGetScreenSaver, ProcChangeHosts, ProcListHosts, /* 110 */
- ProcChangeAccessControl, ProcChangeCloseDownMode, ProcKillClient, ProcRotateProperties, ProcForceScreenSaver, /* 115 */
- ProcSetPointerMapping, ProcGetPointerMapping, ProcSetModifierMapping, ProcGetModifierMapping, ProcBadRequest, /* 120 */
- ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */
-ProcBadRequest,
- ProcNoOperation,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest};
+int (*ProcVector[256]) (ClientPtr /* client */) = {
+ ProcBadRequest,
+ ProcCreateWindow,
+ ProcChangeWindowAttributes,
+ ProcGetWindowAttributes,
+ ProcDestroyWindow,
+ ProcDestroySubwindows, /* 5 */
+ ProcChangeSaveSet,
+ ProcReparentWindow,
+ ProcMapWindow,
+ ProcMapSubwindows,
+ ProcUnmapWindow, /* 10 */
+ ProcUnmapSubwindows,
+ ProcConfigureWindow,
+ ProcCirculateWindow,
+ ProcGetGeometry,
+ ProcQueryTree, /* 15 */
+ ProcInternAtom,
+ ProcGetAtomName,
+ ProcChangeProperty,
+ ProcDeleteProperty,
+ ProcGetProperty, /* 20 */
+ ProcListProperties,
+ ProcSetSelectionOwner,
+ ProcGetSelectionOwner,
+ ProcConvertSelection,
+ ProcSendEvent, /* 25 */
+ ProcGrabPointer,
+ ProcUngrabPointer,
+ ProcGrabButton,
+ ProcUngrabButton,
+ ProcChangeActivePointerGrab, /* 30 */
+ ProcGrabKeyboard,
+ ProcUngrabKeyboard,
+ ProcGrabKey,
+ ProcUngrabKey,
+ ProcAllowEvents, /* 35 */
+ ProcGrabServer,
+ ProcUngrabServer,
+ ProcQueryPointer,
+ ProcGetMotionEvents,
+ ProcTranslateCoords, /* 40 */
+ ProcWarpPointer,
+ ProcSetInputFocus,
+ ProcGetInputFocus,
+ ProcQueryKeymap,
+ ProcOpenFont, /* 45 */
+ ProcCloseFont,
+ ProcQueryFont,
+ ProcQueryTextExtents,
+ ProcListFonts,
+ ProcListFontsWithInfo, /* 50 */
+ ProcSetFontPath,
+ ProcGetFontPath,
+ ProcCreatePixmap,
+ ProcFreePixmap,
+ ProcCreateGC, /* 55 */
+ ProcChangeGC,
+ ProcCopyGC,
+ ProcSetDashes,
+ ProcSetClipRectangles,
+ ProcFreeGC, /* 60 */
+ ProcClearToBackground,
+ ProcCopyArea,
+ ProcCopyPlane,
+ ProcPolyPoint,
+ ProcPolyLine, /* 65 */
+ ProcPolySegment,
+ ProcPolyRectangle,
+ ProcPolyArc,
+ ProcFillPoly,
+ ProcPolyFillRectangle, /* 70 */
+ ProcPolyFillArc,
+ ProcPutImage,
+ ProcGetImage,
+ ProcPolyText,
+ ProcPolyText, /* 75 */
+ ProcImageText8,
+ ProcImageText16,
+ ProcCreateColormap,
+ ProcFreeColormap,
+ ProcCopyColormapAndFree, /* 80 */
+ ProcInstallColormap,
+ ProcUninstallColormap,
+ ProcListInstalledColormaps,
+ ProcAllocColor,
+ ProcAllocNamedColor, /* 85 */
+ ProcAllocColorCells,
+ ProcAllocColorPlanes,
+ ProcFreeColors,
+ ProcStoreColors,
+ ProcStoreNamedColor, /* 90 */
+ ProcQueryColors,
+ ProcLookupColor,
+ ProcCreateCursor,
+ ProcCreateGlyphCursor,
+ ProcFreeCursor, /* 95 */
+ ProcRecolorCursor,
+ ProcQueryBestSize,
+ ProcQueryExtension,
+ ProcListExtensions,
+ ProcChangeKeyboardMapping, /* 100 */
+ ProcGetKeyboardMapping,
+ ProcChangeKeyboardControl,
+ ProcGetKeyboardControl,
+ ProcBell,
+ ProcChangePointerControl, /* 105 */
+ ProcGetPointerControl,
+ ProcSetScreenSaver,
+ ProcGetScreenSaver,
+ ProcChangeHosts,
+ ProcListHosts, /* 110 */
+ ProcChangeAccessControl,
+ ProcChangeCloseDownMode,
+ ProcKillClient,
+ ProcRotateProperties,
+ ProcForceScreenSaver, /* 115 */
+ ProcSetPointerMapping,
+ ProcGetPointerMapping,
+ ProcSetModifierMapping,
+ ProcGetModifierMapping,
+ ProcBadRequest, /* 120 */
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest, /* 125 */
+ ProcBadRequest,
+ ProcNoOperation,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest
+};
-int (*SwappedProcVector[256]) (ClientPtr /* client */
- ) = {
- ProcBadRequest, SProcCreateWindow, SProcChangeWindowAttributes, SProcResourceReq, /* GetWindowAttributes */
- SProcResourceReq, /* DestroyWindow */
- SProcResourceReq, /* 5 DestroySubwindows */
- SProcResourceReq, /* SProcChangeSaveSet, */
- SProcReparentWindow, SProcResourceReq, /* MapWindow */
- SProcResourceReq, /* MapSubwindows */
- SProcResourceReq, /* 10 UnmapWindow */
- SProcResourceReq, /* UnmapSubwindows */
- SProcConfigureWindow, SProcResourceReq, /* SProcCirculateWindow, */
- SProcResourceReq, /* GetGeometry */
- SProcResourceReq, /* 15 QueryTree */
- SProcInternAtom, SProcResourceReq, /* SProcGetAtomName, */
- SProcChangeProperty, SProcDeleteProperty, SProcGetProperty, /* 20 */
- SProcResourceReq, /* SProcListProperties, */
- SProcSetSelectionOwner, SProcResourceReq, /* SProcGetSelectionOwner, */
- SProcConvertSelection, SProcSendEvent, /* 25 */
- SProcGrabPointer, SProcResourceReq, /* SProcUngrabPointer, */
- SProcGrabButton, SProcUngrabButton, SProcChangeActivePointerGrab, /* 30 */
- SProcGrabKeyboard, SProcResourceReq, /* SProcUngrabKeyboard, */
- SProcGrabKey, SProcUngrabKey, SProcResourceReq, /* 35 SProcAllowEvents, */
- SProcSimpleReq, /* SProcGrabServer, */
- SProcSimpleReq, /* SProcUngrabServer, */
- SProcResourceReq, /* SProcQueryPointer, */
- SProcGetMotionEvents, SProcTranslateCoords, /*40 */
- SProcWarpPointer, SProcSetInputFocus, SProcSimpleReq, /* SProcGetInputFocus, */
- SProcSimpleReq, /* QueryKeymap, */
- SProcOpenFont, /* 45 */
- SProcResourceReq, /* SProcCloseFont, */
- SProcResourceReq, /* SProcQueryFont, */
- SProcResourceReq, /* SProcQueryTextExtents, */
- SProcListFonts, SProcListFontsWithInfo, /* 50 */
- SProcSetFontPath, SProcSimpleReq, /* GetFontPath, */
- SProcCreatePixmap, SProcResourceReq, /* SProcFreePixmap, */
- SProcCreateGC, /* 55 */
- SProcChangeGC, SProcCopyGC, SProcSetDashes, SProcSetClipRectangles, SProcResourceReq, /* 60 SProcFreeGC, */
- SProcClearToBackground, SProcCopyArea, SProcCopyPlane, SProcPoly, /* PolyPoint, */
- SProcPoly, /* 65 PolyLine */
- SProcPoly, /* PolySegment, */
- SProcPoly, /* PolyRectangle, */
- SProcPoly, /* PolyArc, */
- SProcFillPoly, SProcPoly, /* 70 PolyFillRectangle */
- SProcPoly, /* PolyFillArc, */
- SProcPutImage, SProcGetImage, SProcPolyText, SProcPolyText, /* 75 */
- SProcImageText, SProcImageText, SProcCreateColormap, SProcResourceReq, /* SProcFreeColormap, */
- SProcCopyColormapAndFree, /* 80 */
- SProcResourceReq, /* SProcInstallColormap, */
- SProcResourceReq, /* SProcUninstallColormap, */
- SProcResourceReq, /* SProcListInstalledColormaps, */
- SProcAllocColor, SProcAllocNamedColor, /* 85 */
- SProcAllocColorCells, SProcAllocColorPlanes, SProcFreeColors, SProcStoreColors, SProcStoreNamedColor, /* 90 */
- SProcQueryColors, SProcLookupColor, SProcCreateCursor, SProcCreateGlyphCursor, SProcResourceReq, /* 95 SProcFreeCursor, */
- SProcRecolorCursor, SProcQueryBestSize, SProcQueryExtension, SProcSimpleReq, /* ListExtensions, */
- SProcChangeKeyboardMapping, /* 100 */
- SProcSimpleReq, /* GetKeyboardMapping, */
- SProcChangeKeyboardControl, SProcSimpleReq, /* GetKeyboardControl, */
- SProcSimpleReq, /* Bell, */
- SProcChangePointerControl, /* 105 */
- SProcSimpleReq, /* GetPointerControl, */
- SProcSetScreenSaver, SProcSimpleReq, /* GetScreenSaver, */
- SProcChangeHosts, SProcSimpleReq, /* 110 ListHosts, */
- SProcSimpleReq, /* SProcChangeAccessControl, */
- SProcSimpleReq, /* SProcChangeCloseDownMode, */
- SProcResourceReq, /* SProcKillClient, */
- SProcRotateProperties, SProcSimpleReq, /* 115 ForceScreenSaver */
- SProcSimpleReq, /* SetPointerMapping, */
- SProcSimpleReq, /* GetPointerMapping, */
- SProcSimpleReq, /* SetModifierMapping, */
- SProcSimpleReq, /* GetModifierMapping, */
- ProcBadRequest, /* 120 */
- ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */
-ProcBadRequest,
- SProcNoOperation,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest,
- ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest};
+int (*SwappedProcVector[256]) (ClientPtr /* client */) = {
+ ProcBadRequest,
+ SProcCreateWindow,
+ SProcChangeWindowAttributes,
+ SProcResourceReq, /* GetWindowAttributes */
+ SProcResourceReq, /* DestroyWindow */
+ SProcResourceReq, /* 5 DestroySubwindows */
+ SProcResourceReq, /* SProcChangeSaveSet, */
+ SProcReparentWindow,
+ SProcResourceReq, /* MapWindow */
+ SProcResourceReq, /* MapSubwindows */
+ SProcResourceReq, /* 10 UnmapWindow */
+ SProcResourceReq, /* UnmapSubwindows */
+ SProcConfigureWindow,
+ SProcResourceReq, /* SProcCirculateWindow, */
+ SProcResourceReq, /* GetGeometry */
+ SProcResourceReq, /* 15 QueryTree */
+ SProcInternAtom,
+ SProcResourceReq, /* SProcGetAtomName, */
+ SProcChangeProperty,
+ SProcDeleteProperty,
+ SProcGetProperty, /* 20 */
+ SProcResourceReq, /* SProcListProperties, */
+ SProcSetSelectionOwner,
+ SProcResourceReq, /* SProcGetSelectionOwner, */
+ SProcConvertSelection,
+ SProcSendEvent, /* 25 */
+ SProcGrabPointer,
+ SProcResourceReq, /* SProcUngrabPointer, */
+ SProcGrabButton,
+ SProcUngrabButton,
+ SProcChangeActivePointerGrab, /* 30 */
+ SProcGrabKeyboard,
+ SProcResourceReq, /* SProcUngrabKeyboard, */
+ SProcGrabKey,
+ SProcUngrabKey,
+ SProcResourceReq, /* 35 SProcAllowEvents, */
+ SProcSimpleReq, /* SProcGrabServer, */
+ SProcSimpleReq, /* SProcUngrabServer, */
+ SProcResourceReq, /* SProcQueryPointer, */
+ SProcGetMotionEvents,
+ SProcTranslateCoords, /*40 */
+ SProcWarpPointer,
+ SProcSetInputFocus,
+ SProcSimpleReq, /* SProcGetInputFocus, */
+ SProcSimpleReq, /* QueryKeymap, */
+ SProcOpenFont, /* 45 */
+ SProcResourceReq, /* SProcCloseFont, */
+ SProcResourceReq, /* SProcQueryFont, */
+ SProcResourceReq, /* SProcQueryTextExtents, */
+ SProcListFonts,
+ SProcListFontsWithInfo, /* 50 */
+ SProcSetFontPath,
+ SProcSimpleReq, /* GetFontPath, */
+ SProcCreatePixmap,
+ SProcResourceReq, /* SProcFreePixmap, */
+ SProcCreateGC, /* 55 */
+ SProcChangeGC,
+ SProcCopyGC,
+ SProcSetDashes,
+ SProcSetClipRectangles,
+ SProcResourceReq, /* 60 SProcFreeGC, */
+ SProcClearToBackground,
+ SProcCopyArea,
+ SProcCopyPlane,
+ SProcPoly, /* PolyPoint, */
+ SProcPoly, /* 65 PolyLine */
+ SProcPoly, /* PolySegment, */
+ SProcPoly, /* PolyRectangle, */
+ SProcPoly, /* PolyArc, */
+ SProcFillPoly,
+ SProcPoly, /* 70 PolyFillRectangle */
+ SProcPoly, /* PolyFillArc, */
+ SProcPutImage,
+ SProcGetImage,
+ SProcPolyText,
+ SProcPolyText, /* 75 */
+ SProcImageText,
+ SProcImageText,
+ SProcCreateColormap,
+ SProcResourceReq, /* SProcFreeColormap, */
+ SProcCopyColormapAndFree, /* 80 */
+ SProcResourceReq, /* SProcInstallColormap, */
+ SProcResourceReq, /* SProcUninstallColormap, */
+ SProcResourceReq, /* SProcListInstalledColormaps, */
+ SProcAllocColor,
+ SProcAllocNamedColor, /* 85 */
+ SProcAllocColorCells,
+ SProcAllocColorPlanes,
+ SProcFreeColors,
+ SProcStoreColors,
+ SProcStoreNamedColor, /* 90 */
+ SProcQueryColors,
+ SProcLookupColor,
+ SProcCreateCursor,
+ SProcCreateGlyphCursor,
+ SProcResourceReq, /* 95 SProcFreeCursor, */
+ SProcRecolorCursor,
+ SProcQueryBestSize,
+ SProcQueryExtension,
+ SProcSimpleReq, /* ListExtensions, */
+ SProcChangeKeyboardMapping, /* 100 */
+ SProcSimpleReq, /* GetKeyboardMapping, */
+ SProcChangeKeyboardControl,
+ SProcSimpleReq, /* GetKeyboardControl, */
+ SProcSimpleReq, /* Bell, */
+ SProcChangePointerControl, /* 105 */
+ SProcSimpleReq, /* GetPointerControl, */
+ SProcSetScreenSaver,
+ SProcSimpleReq, /* GetScreenSaver, */
+ SProcChangeHosts,
+ SProcSimpleReq, /* 110 ListHosts, */
+ SProcSimpleReq, /* SProcChangeAccessControl, */
+ SProcSimpleReq, /* SProcChangeCloseDownMode, */
+ SProcResourceReq, /* SProcKillClient, */
+ SProcRotateProperties,
+ SProcSimpleReq, /* 115 ForceScreenSaver */
+ SProcSimpleReq, /* SetPointerMapping, */
+ SProcSimpleReq, /* GetPointerMapping, */
+ SProcSimpleReq, /* SetModifierMapping, */
+ SProcSimpleReq, /* GetModifierMapping, */
+ ProcBadRequest, /* 120 */
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest, /* 125 */
+ ProcBadRequest,
+ SProcNoOperation,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest,
+ ProcBadRequest
+};
EventSwapPtr EventSwapVector[MAXEVENTS] = {
(EventSwapPtr) SErrorEvent,
@@ -423,32 +588,32 @@ EventSwapPtr EventSwapVector[MAXEVENTS] = {
SKeyButtonPtrEvent,
SKeyButtonPtrEvent,
SKeyButtonPtrEvent,
- SKeyButtonPtrEvent, /* 5 */
+ SKeyButtonPtrEvent, /* 5 */
SKeyButtonPtrEvent,
SEnterLeaveEvent,
SEnterLeaveEvent,
SFocusEvent,
- SFocusEvent, /* 10 */
+ SFocusEvent, /* 10 */
SKeymapNotifyEvent,
SExposeEvent,
SGraphicsExposureEvent,
SNoExposureEvent,
- SVisibilityEvent, /* 15 */
+ SVisibilityEvent, /* 15 */
SCreateNotifyEvent,
SDestroyNotifyEvent,
SUnmapNotifyEvent,
SMapNotifyEvent,
- SMapRequestEvent, /* 20 */
+ SMapRequestEvent, /* 20 */
SReparentEvent,
SConfigureNotifyEvent,
SConfigureRequestEvent,
SGravityEvent,
- SResizeRequestEvent, /* 25 */
+ SResizeRequestEvent, /* 25 */
SCirculateEvent,
SCirculateEvent,
SPropertyEvent,
SSelectionClearEvent,
- SSelectionRequestEvent, /* 30 */
+ SSelectionRequestEvent, /* 30 */
SSelectionNotifyEvent,
SColormapEvent,
SClientMessageEvent,
@@ -554,37 +719,37 @@ ReplySwapPtr ReplySwapVector[256] = {
ReplyNotSwappd,
(ReplySwapPtr) SGetWindowAttributesReply,
ReplyNotSwappd,
- ReplyNotSwappd, /* 5 */
+ ReplyNotSwappd, /* 5 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 10 */
+ ReplyNotSwappd, /* 10 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
(ReplySwapPtr) SGetGeometryReply,
- (ReplySwapPtr) SQueryTreeReply, /* 15 */
+ (ReplySwapPtr) SQueryTreeReply, /* 15 */
(ReplySwapPtr) SInternAtomReply,
(ReplySwapPtr) SGetAtomNameReply,
ReplyNotSwappd,
ReplyNotSwappd,
- (ReplySwapPtr) SGetPropertyReply, /* 20 */
+ (ReplySwapPtr) SGetPropertyReply, /* 20 */
(ReplySwapPtr) SListPropertiesReply,
ReplyNotSwappd,
(ReplySwapPtr) SGetSelectionOwnerReply,
ReplyNotSwappd,
- ReplyNotSwappd, /* 25 */
- (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */
+ ReplyNotSwappd, /* 25 */
+ (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 30 */
- (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */
+ ReplyNotSwappd, /* 30 */
+ (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 35 */
+ ReplyNotSwappd, /* 35 */
ReplyNotSwappd,
ReplyNotSwappd,
(ReplySwapPtr) SQueryPointerReply,
@@ -594,7 +759,7 @@ ReplySwapPtr ReplySwapVector[256] = {
ReplyNotSwappd,
(ReplySwapPtr) SGetInputFocusReply,
(ReplySwapPtr) SQueryKeymapReply,
- ReplyNotSwappd, /* 45 */
+ ReplyNotSwappd, /* 45 */
ReplyNotSwappd,
(ReplySwapPtr) SQueryFontReply,
(ReplySwapPtr) SQueryTextExtentsReply,
@@ -604,32 +769,32 @@ ReplySwapPtr ReplySwapVector[256] = {
(ReplySwapPtr) SGetFontPathReply,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 55 */
+ ReplyNotSwappd, /* 55 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 60 */
+ ReplyNotSwappd, /* 60 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 65 */
+ ReplyNotSwappd, /* 65 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 70 */
+ ReplyNotSwappd, /* 70 */
ReplyNotSwappd,
ReplyNotSwappd,
(ReplySwapPtr) SGetImageReply,
ReplyNotSwappd,
- ReplyNotSwappd, /* 75 */
+ ReplyNotSwappd, /* 75 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 80 */
+ ReplyNotSwappd, /* 80 */
ReplyNotSwappd,
ReplyNotSwappd,
(ReplySwapPtr) SListInstalledColormapsReply,
@@ -639,44 +804,44 @@ ReplySwapPtr ReplySwapVector[256] = {
(ReplySwapPtr) SAllocColorPlanesReply,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 90 */
+ ReplyNotSwappd, /* 90 */
(ReplySwapPtr) SQueryColorsReply,
(ReplySwapPtr) SLookupColorReply,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 95 */
+ ReplyNotSwappd, /* 95 */
ReplyNotSwappd,
(ReplySwapPtr) SQueryBestSizeReply,
- (ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */
+ (ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */
(ReplySwapPtr) SListExtensionsReply,
- ReplyNotSwappd, /* 100 */
+ ReplyNotSwappd, /* 100 */
(ReplySwapPtr) SGetKeyboardMappingReply,
ReplyNotSwappd,
(ReplySwapPtr) SGetKeyboardControlReply,
ReplyNotSwappd,
- ReplyNotSwappd, /* 105 */
+ ReplyNotSwappd, /* 105 */
(ReplySwapPtr) SGetPointerControlReply,
ReplyNotSwappd,
(ReplySwapPtr) SGetScreenSaverReply,
ReplyNotSwappd,
- (ReplySwapPtr) SListHostsReply, /* 110 */
+ (ReplySwapPtr) SListHostsReply, /* 110 */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
- ReplyNotSwappd, /* 115 */
- (ReplySwapPtr) SGenericReply, /* SetPointerMapping */
+ ReplyNotSwappd, /* 115 */
+ (ReplySwapPtr) SGenericReply, /* SetPointerMapping */
(ReplySwapPtr) SGetPointerMappingReply,
- (ReplySwapPtr) SGenericReply, /* SetModifierMapping */
+ (ReplySwapPtr) SGenericReply, /* SetModifierMapping */
(ReplySwapPtr) SGetModifierMappingReply, /* 119 */
- ReplyNotSwappd, /* 120 */
- ReplyNotSwappd, /* 121 */
- ReplyNotSwappd, /* 122 */
- ReplyNotSwappd, /* 123 */
- ReplyNotSwappd, /* 124 */
- ReplyNotSwappd, /* 125 */
- ReplyNotSwappd, /* 126 */
- ReplyNotSwappd, /* NoOperation */
+ ReplyNotSwappd, /* 120 */
+ ReplyNotSwappd, /* 121 */
+ ReplyNotSwappd, /* 122 */
+ ReplyNotSwappd, /* 123 */
+ ReplyNotSwappd, /* 124 */
+ ReplyNotSwappd, /* 125 */
+ ReplyNotSwappd, /* 126 */
+ ReplyNotSwappd, /* NoOperation */
ReplyNotSwappd,
ReplyNotSwappd,
ReplyNotSwappd,
diff --git a/xorg-server/glx/extension_string.c b/xorg-server/glx/extension_string.c
index ee9864e64..544ca1f5e 100644
--- a/xorg-server/glx/extension_string.c
+++ b/xorg-server/glx/extension_string.c
@@ -87,7 +87,7 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(SGIX_fbconfig), VER(1,3), Y, },
{ GLX(SGIX_pbuffer), VER(1,3), Y, },
{ GLX(SGIX_visual_select_group), VER(0,0), Y, },
- { GLX(INTEL_swap_event), VER(1,4), N, },
+ { GLX(INTEL_swap_event), VER(0,0), N, },
{ NULL }
/* *INDENT-ON* */
};
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 0436e2cff..01597849e 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -44,6 +44,7 @@
#include "privates.h"
#include <os.h>
#include "extinit.h"
+#include "glx_extinit.h"
#include "unpack.h"
#include "glxutil.h"
#include "glxext.h"
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index ca0e5254b..4ed3f9c59 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -178,7 +178,7 @@ static char GLXServerExtensions[] =
"GLX_SGIS_multisample "
#endif
"GLX_SGIX_fbconfig "
- "GLX_SGIX_pbuffer " "GLX_MESA_copy_sub_buffer " "GLX_INTEL_swap_event";
+ "GLX_SGIX_pbuffer " "GLX_MESA_copy_sub_buffer ";
static Bool
glxCloseScreen(ScreenPtr pScreen)
diff --git a/xorg-server/hw/dmx/glxProxy/glxext.c b/xorg-server/hw/dmx/glxProxy/glxext.c
index 812222195..e72a040ed 100644
--- a/xorg-server/hw/dmx/glxProxy/glxext.c
+++ b/xorg-server/hw/dmx/glxProxy/glxext.c
@@ -45,6 +45,7 @@
#include "micmap.h"
#include "glxswap.h"
#include "extinit.h"
+#include "glx_extinit.h"
/*
** Forward declarations.
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 772d9b75a..978fd93ef 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -418,23 +418,22 @@ ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations)
struct {
int width, height;
} sizes[] = {
- {
- 1600, 1200}, {
- 1400, 1050}, {
- 1280, 960}, {
- 1280, 1024}, {
- 1152, 864}, {
- 1024, 768}, {
- 832, 624}, {
- 800, 600}, {
- 720, 400}, {
- 480, 640}, {
- 640, 480}, {
- 640, 400}, {
- 320, 240}, {
- 240, 320}, {
- 160, 160}, {
- 0, 0}
+ {1600, 1200},
+ {1400, 1050},
+ {1280, 960},
+ {1280, 1024},
+ {1152, 864},
+ {1024, 768},
+ {832, 624},
+ {800, 600},
+ {720, 400},
+ {480, 640},
+ {640, 480},
+ {640, 400},
+ {320, 240},
+ {240, 320},
+ {160, 160},
+ {0, 0}
};
EPHYR_LOG("mark");
@@ -561,6 +560,8 @@ ephyrRandRSetConfig(ScreenPtr pScreen,
if (wasEnabled)
KdEnableScreen(pScreen);
+ RRScreenSizeNotify(pScreen);
+
return TRUE;
bail4:
@@ -593,6 +594,43 @@ ephyrRandRInit(ScreenPtr pScreen)
pScrPriv->rrSetConfig = ephyrRandRSetConfig;
return TRUE;
}
+
+static Bool
+ephyrResizeScreen (ScreenPtr pScreen,
+ int newwidth,
+ int newheight)
+{
+ KdScreenPriv(pScreen);
+ KdScreenInfo *screen = pScreenPriv->screen;
+ RRScreenSize size = {0};
+ Bool ret;
+ int t;
+
+ if (screen->randr & (RR_Rotate_90|RR_Rotate_270)) {
+ t = newwidth;
+ newwidth = newheight;
+ newheight = t;
+ }
+
+ if (newwidth == screen->width && newheight == screen->height) {
+ return FALSE;
+ }
+
+ size.width = newwidth;
+ size.height = newheight;
+
+ ret = ephyrRandRSetConfig (pScreen, screen->randr, 0, &size);
+ if (ret) {
+ RROutputPtr output;
+
+ output = RRFirstOutput(pScreen);
+ if (!output)
+ return FALSE;
+ RROutputSetModes(output, NULL, 0, 0);
+ }
+
+ return ret;
+}
#endif
Bool
@@ -941,6 +979,14 @@ ephyrPoll(void)
break;
#endif /* XF86DRI */
+#ifdef RANDR
+ case EPHYR_EV_CONFIGURE:
+ ephyrResizeScreen(screenInfo.screens[ev.data.configure.screen],
+ ev.data.configure.width,
+ ev.data.configure.height);
+ break;
+#endif /* RANDR */
+
default:
break;
}
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c
index f313afa5a..b13e8c796 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -351,7 +351,11 @@ hostx_init(void)
attr.event_mask =
ButtonPressMask
| ButtonReleaseMask
- | PointerMotionMask | KeyPressMask | KeyReleaseMask | ExposureMask;
+ | PointerMotionMask
+ | KeyPressMask
+ | KeyReleaseMask
+ | ExposureMask
+ | StructureNotifyMask;
EPHYR_DBG("mark");
@@ -712,12 +716,14 @@ __asm int 3;
XResizeWindow(HostX.dpy, host_screen->win, width, height);
/* Ask the WM to keep our size static */
- size_hints = XAllocSizeHints();
- size_hints->max_width = size_hints->min_width = width;
- size_hints->max_height = size_hints->min_height = height;
- size_hints->flags = PMinSize | PMaxSize;
- XSetWMNormalHints(HostX.dpy, host_screen->win, size_hints);
- XFree(size_hints);
+ if (host_screen->win_pre_existing == None) {
+ size_hints = XAllocSizeHints();
+ size_hints->max_width = size_hints->min_width = width;
+ size_hints->max_height = size_hints->min_height = height;
+ size_hints->flags = PMinSize | PMaxSize;
+ XSetWMNormalHints(HostX.dpy, host_screen->win, size_hints);
+ XFree(size_hints);
+ }
XMapWindow(HostX.dpy, host_screen->win);
@@ -1028,6 +1034,22 @@ hostx_get_event(EphyrHostXEvent * ev)
ev->data.key_up.scancode = xev.xkey.keycode;
return 1;
+ case ConfigureNotify:
+ {
+ struct EphyrHostScreen *host_screen =
+ host_screen_from_window(xev.xconfigure.window);
+
+ if (host_screen && host_screen->win_pre_existing != None) {
+ ev->type = EPHYR_EV_CONFIGURE;
+ ev->data.configure.width = xev.xconfigure.width;
+ ev->data.configure.height = xev.xconfigure.height;
+ ev->data.configure.window = xev.xconfigure.window;
+ ev->data.configure.screen = host_screen->mynum;
+ return 1;
+ }
+
+ return 0;
+ }
default:
break;
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h
index c1e1133c0..1b91e5162 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.h
+++ b/xorg-server/hw/kdrive/ephyr/hostx.h
@@ -51,7 +51,8 @@ typedef enum EphyrHostXEventType {
EPHYR_EV_MOUSE_RELEASE,
EPHYR_EV_KEY_PRESS,
EPHYR_EV_KEY_RELEASE,
- EPHYR_EV_EXPOSE
+ EPHYR_EV_EXPOSE,
+ EPHYR_EV_CONFIGURE,
} EphyrHostXEventType;
/* I can't believe it's not a KeySymsRec. */
@@ -93,6 +94,13 @@ struct EphyrHostXEvent {
int window;
} expose;
+ struct configure {
+ int width;
+ int height;
+ int screen;
+ int window;
+ } configure;
+
} data;
int key_state;
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index ee6895ca0..ab77c23aa 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -732,22 +732,22 @@ KdSetSubpixelOrder(ScreenPtr pScreen, Rotation randr)
int subpixel_order;
Rotation direction;
} orders[] = {
- {
- SubPixelHorizontalRGB, RR_Rotate_0}, {
- SubPixelHorizontalBGR, RR_Rotate_180}, {
- SubPixelVerticalRGB, RR_Rotate_270}, {
- SubPixelVerticalBGR, RR_Rotate_90},};
+ {SubPixelHorizontalRGB, RR_Rotate_0},
+ {SubPixelHorizontalBGR, RR_Rotate_180},
+ {SubPixelVerticalRGB, RR_Rotate_270},
+ {SubPixelVerticalBGR, RR_Rotate_90},
+ };
static struct {
int bit;
int normal;
int reflect;
} reflects[] = {
- {
- RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR}, {
- RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB}, {
- RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR}, {
- RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB},};
+ {RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR},
+ {RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB},
+ {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR},
+ {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB},
+ };
/* map subpixel to direction */
for (i = 0; i < 4; i++)
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index 76424c1c5..2a6fec9a7 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -1057,7 +1057,7 @@ KdGetOptions(InputOption **options, char *string)
if (strchr(string, '=')) {
tam_key = (strchr(string, '=') - string);
- key = strndup(string, tam_key);
+ key = strndup(string, tam_key + 1);
if (!key)
goto out;
diff --git a/xorg-server/hw/xfree86/dixmods/glxmodule.c b/xorg-server/hw/xfree86/dixmods/glxmodule.c
index 5a9e84529..c0c611401 100644
--- a/xorg-server/hw/xfree86/dixmods/glxmodule.c
+++ b/xorg-server/hw/xfree86/dixmods/glxmodule.c
@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "globals.h"
#include "glxserver.h"
#include "extinit.h"
+#include "glx_extinit.h"
static MODULESETUPPROTO(glxSetup);
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 63feed51a..23f589cdc 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -409,6 +409,11 @@ DRI2DrawableGone(pointer p, XID id)
dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL);
}
+ if (pPriv->prime_slave_pixmap) {
+ (*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
+ (*pPriv->prime_slave_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap);
+ }
+
if (pPriv->buffers != NULL) {
for (i = 0; i < pPriv->bufferCount; i++)
destroy_buffer(pDraw, pPriv->buffers[i], pPriv->prime_id);
@@ -811,8 +816,9 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
if (pPriv->prime_slave_pixmap->master_pixmap == mpix)
return &pPriv->prime_slave_pixmap->drawable;
else {
- (*master->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
+ (*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
(*slave->DestroyPixmap)(pPriv->prime_slave_pixmap);
+ pPriv->prime_slave_pixmap = NULL;
}
}
diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c
index 5fbea38f8..64c69bb8a 100644
--- a/xorg-server/hw/xfree86/loader/loader.c
+++ b/xorg-server/hw/xfree86/loader/loader.c
@@ -195,13 +195,12 @@ LoaderGetABIVersion(const char *abiclass)
const char *name;
int version;
} classes[] = {
- {
- ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, {
- ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, {
- ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, {
- ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, {
- ABI_CLASS_FONT, LoaderVersionInfo.fontVersion}, {
- NULL, 0}
+ {ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion},
+ {ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion},
+ {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion},
+ {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion},
+ {ABI_CLASS_FONT, LoaderVersionInfo.fontVersion},
+ {NULL, 0}
};
int i;
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index 2628409d2..154f684c4 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -734,9 +734,6 @@ xf86CrtcCloseScreen(ScreenPtr screen)
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
- if (crtc->randr_crtc->scanout_pixmap)
- RRCrtcDetachScanoutPixmap(crtc->randr_crtc);
-
crtc->randr_crtc = NULL;
}
/* detach any providers */
@@ -2073,12 +2070,13 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
/*
* If there's no preferred mode, but only one monitor, pick the
- * biggest mode for its aspect ratio, assuming one exists.
+ * biggest mode for its aspect ratio or 4:3, assuming one exists.
*/
if (!ret)
do {
int i = 0;
float aspect = 0.0;
+ DisplayModePtr a = NULL, b = NULL;
/* count the number of enabled outputs */
for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++);
@@ -2092,8 +2090,11 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
aspect = (float) config->output[p]->mm_width /
(float) config->output[p]->mm_height;
+ a = bestModeForAspect(config, enabled, 4.0/3.0);
if (aspect)
- preferred_match[p] = bestModeForAspect(config, enabled, aspect);
+ b = bestModeForAspect(config, enabled, aspect);
+
+ preferred_match[p] = biggestMode(a, b);
if (preferred_match[p])
ret = TRUE;
diff --git a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c
index 781c806bc..bead1265a 100644
--- a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c
+++ b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c
@@ -184,105 +184,96 @@ static const struct did_dmt {
short w, h, r, f;
} did_dmt[] = {
/* byte 3 */
- {
- 640, 350, 85, 0}, {
- 640, 400, 85, 0}, {
- 720, 400, 85, 0}, {
- 640, 480, 60, 0}, {
- 640, 480, 72, 0}, {
- 640, 480, 75, 0}, {
- 640, 480, 85, 0}, {
- 800, 600, 56, 0},
+ {640, 350, 85, 0},
+ {640, 400, 85, 0},
+ {720, 400, 85, 0},
+ {640, 480, 60, 0},
+ {640, 480, 72, 0},
+ {640, 480, 75, 0},
+ {640, 480, 85, 0},
+ {800, 600, 56, 0},
/* byte 4 */
- {
- 800, 600, 60, 0}, {
- 800, 600, 72, 0}, {
- 800, 600, 75, 0}, {
- 800, 600, 85, 0}, {
- 800, 600, 120, RB}, {
- 848, 480, 60, 0}, {
- 1024, 768, 43, INT}, {
- 1024, 768, 60, 0},
+ {800, 600, 60, 0},
+ {800, 600, 72, 0},
+ {800, 600, 75, 0},
+ {800, 600, 85, 0},
+ {800, 600, 120, RB},
+ {848, 480, 60, 0},
+ {1024, 768, 43, INT},
+ {1024, 768, 60, 0},
/* byte 5 */
- {
- 1024, 768, 70, 0}, {
- 1024, 768, 75, 0}, {
- 1024, 768, 85, 0}, {
- 1024, 768, 120, RB}, {
- 1152, 864, 75, 0}, {
- 1280, 768, 60, RB}, {
- 1280, 768, 60, 0}, {
- 1280, 768, 75, 0},
+ {1024, 768, 70, 0},
+ {1024, 768, 75, 0},
+ {1024, 768, 85, 0},
+ {1024, 768, 120, RB},
+ {1152, 864, 75, 0},
+ {1280, 768, 60, RB},
+ {1280, 768, 60, 0},
+ {1280, 768, 75, 0},
/* byte 6 */
- {
- 1280, 768, 85, 0}, {
- 1280, 768, 120, RB}, {
- 1280, 800, 60, RB}, {
- 1280, 800, 60, 0}, {
- 1280, 800, 75, 0}, {
- 1280, 800, 85, 0}, {
- 1280, 800, 120, RB}, {
- 1280, 960, 60, 0},
+ {1280, 768, 85, 0},
+ {1280, 768, 120, RB},
+ {1280, 800, 60, RB},
+ {1280, 800, 60, 0},
+ {1280, 800, 75, 0},
+ {1280, 800, 85, 0},
+ {1280, 800, 120, RB},
+ {1280, 960, 60, 0},
/* byte 7 */
- {
- 1280, 960, 85, 0}, {
- 1280, 960, 120, RB}, {
- 1280, 1024, 60, 0}, {
- 1280, 1024, 75, 0}, {
- 1280, 1024, 85, 0}, {
- 1280, 1024, 120, RB}, {
- 1360, 768, 60, 0}, {
- 1360, 768, 120, RB},
+ {1280, 960, 85, 0},
+ {1280, 960, 120, RB},
+ {1280, 1024, 60, 0},
+ {1280, 1024, 75, 0},
+ {1280, 1024, 85, 0},
+ {1280, 1024, 120, RB},
+ {1360, 768, 60, 0},
+ {1360, 768, 120, RB},
/* byte 8 */
- {
- 1400, 1050, 60, RB}, {
- 1400, 1050, 60, 0}, {
- 1400, 1050, 75, 0}, {
- 1400, 1050, 85, 0}, {
- 1400, 1050, 120, RB}, {
- 1440, 900, 60, RB}, {
- 1440, 900, 60, 0}, {
- 1440, 900, 75, 0},
+ {1400, 1050, 60, RB},
+ {1400, 1050, 60, 0},
+ {1400, 1050, 75, 0},
+ {1400, 1050, 85, 0},
+ {1400, 1050, 120, RB},
+ {1440, 900, 60, RB},
+ {1440, 900, 60, 0},
+ {1440, 900, 75, 0},
/* byte 9 */
- {
- 1440, 900, 85, 0}, {
- 1440, 900, 120, RB}, {
- 1600, 1200, 60, 0}, {
- 1600, 1200, 65, 0}, {
- 1600, 1200, 70, 0}, {
- 1600, 1200, 75, 0}, {
- 1600, 1200, 85, 0}, {
- 1600, 1200, 120, RB},
+ {1440, 900, 85, 0},
+ {1440, 900, 120, RB},
+ {1600, 1200, 60, 0},
+ {1600, 1200, 65, 0},
+ {1600, 1200, 70, 0},
+ {1600, 1200, 75, 0},
+ {1600, 1200, 85, 0},
+ {1600, 1200, 120, RB},
/* byte a */
- {
- 1680, 1050, 60, RB}, {
- 1680, 1050, 60, 0}, {
- 1680, 1050, 75, 0}, {
- 1680, 1050, 85, 0}, {
- 1680, 1050, 120, RB}, {
- 1792, 1344, 60, 0}, {
- 1792, 1344, 75, 0}, {
- 1792, 1344, 120, RB},
+ {1680, 1050, 60, RB},
+ {1680, 1050, 60, 0},
+ {1680, 1050, 75, 0},
+ {1680, 1050, 85, 0},
+ {1680, 1050, 120, RB},
+ {1792, 1344, 60, 0},
+ {1792, 1344, 75, 0},
+ {1792, 1344, 120, RB},
/* byte b */
- {
- 1856, 1392, 60, 0}, {
- 1856, 1392, 75, 0}, {
- 1856, 1392, 120, RB}, {
- 1920, 1200, 60, RB}, {
- 1920, 1200, 60, 0}, {
- 1920, 1200, 75, 0}, {
- 1920, 1200, 85, 0}, {
- 1920, 1200, 120, RB},
+ {1856, 1392, 60, 0},
+ {1856, 1392, 75, 0},
+ {1856, 1392, 120, RB},
+ {1920, 1200, 60, RB},
+ {1920, 1200, 60, 0},
+ {1920, 1200, 75, 0},
+ {1920, 1200, 85, 0},
+ {1920, 1200, 120, RB},
/* byte c */
- {
- 1920, 1440, 60, 0}, {
- 1920, 1440, 75, 0}, {
- 1920, 1440, 120, RB}, {
- 2560, 1600, 60, RB}, {
- 2560, 1600, 60, 0}, {
- 2560, 1600, 75, 0}, {
- 2560, 1600, 85, 0}, {
-2560, 1600, 120, RB},};
+ {1920, 1440, 60, 0},
+ {1920, 1440, 75, 0},
+ {1920, 1440, 120, RB},
+ {2560, 1600, 60, RB},
+ {2560, 1600, 60, 0},
+ {2560, 1600, 75, 0},
+ {2560, 1600, 85, 0},
+ {2560, 1600, 120, RB},
+};
static void
didVesaTiming(int scrn, unsigned char *x, MonPtr mon)
diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c
index 258ada5b4..4ee862da0 100644
--- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c
+++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c
@@ -513,14 +513,14 @@ DDCModeDoInterlaceQuirks(DisplayModePtr mode)
static const struct {
int w, h;
} cea_interlaced[] = {
- {
- 1920, 1080}, {
- 720, 480}, {
- 1440, 480}, {
- 2880, 480}, {
- 720, 576}, {
- 1440, 576}, {
- 2880, 576},};
+ {1920, 1080},
+ {720, 480},
+ {1440, 480},
+ {2880, 480},
+ {720, 576},
+ {1440, 576},
+ {2880, 576},
+ };
static const int n_modes =
sizeof(cea_interlaced) / sizeof(cea_interlaced[0]);
int i;
@@ -668,68 +668,62 @@ static const struct {
short r;
short rb;
} EstIIIModes[] = {
- /* byte 6 */
- {
- 640, 350, 85, 0}, {
- 640, 400, 85, 0}, {
- 720, 400, 85, 0}, {
- 640, 480, 85, 0}, {
- 848, 480, 60, 0}, {
- 800, 600, 85, 0}, {
- 1024, 768, 85, 0}, {
- 1152, 864, 75, 0},
+ /* byte 6 */
+ {640, 350, 85, 0},
+ {640, 400, 85, 0},
+ {720, 400, 85, 0},
+ {640, 480, 85, 0},
+ {848, 480, 60, 0},
+ {800, 600, 85, 0},
+ {1024, 768, 85, 0},
+ {1152, 864, 75, 0},
/* byte 7 */
- {
- 1280, 768, 60, 1}, {
- 1280, 768, 60, 0}, {
- 1280, 768, 75, 0}, {
- 1280, 768, 85, 0}, {
- 1280, 960, 60, 0}, {
- 1280, 960, 85, 0}, {
- 1280, 1024, 60, 0}, {
- 1280, 1024, 85, 0},
+ {1280, 768, 60, 1},
+ {1280, 768, 60, 0},
+ {1280, 768, 75, 0},
+ {1280, 768, 85, 0},
+ {1280, 960, 60, 0},
+ {1280, 960, 85, 0},
+ {1280, 1024, 60, 0},
+ {1280, 1024, 85, 0},
/* byte 8 */
- {
- 1360, 768, 60, 0}, {
- 1440, 900, 60, 1}, {
- 1440, 900, 60, 0}, {
- 1440, 900, 75, 0}, {
- 1440, 900, 85, 0}, {
- 1400, 1050, 60, 1}, {
- 1400, 1050, 60, 0}, {
- 1400, 1050, 75, 0},
+ {1360, 768, 60, 0},
+ {1440, 900, 60, 1},
+ {1440, 900, 60, 0},
+ {1440, 900, 75, 0},
+ {1440, 900, 85, 0},
+ {1400, 1050, 60, 1},
+ {1400, 1050, 60, 0},
+ {1400, 1050, 75, 0},
/* byte 9 */
- {
- 1400, 1050, 85, 0}, {
- 1680, 1050, 60, 1}, {
- 1680, 1050, 60, 0}, {
- 1680, 1050, 75, 0}, {
- 1680, 1050, 85, 0}, {
- 1600, 1200, 60, 0}, {
- 1600, 1200, 65, 0}, {
- 1600, 1200, 70, 0},
+ {1400, 1050, 85, 0},
+ {1680, 1050, 60, 1},
+ {1680, 1050, 60, 0},
+ {1680, 1050, 75, 0},
+ {1680, 1050, 85, 0},
+ {1600, 1200, 60, 0},
+ {1600, 1200, 65, 0},
+ {1600, 1200, 70, 0},
/* byte 10 */
- {
- 1600, 1200, 75, 0}, {
- 1600, 1200, 85, 0}, {
- 1792, 1344, 60, 0}, {
- 1792, 1344, 85, 0}, {
- 1856, 1392, 60, 0}, {
- 1856, 1392, 75, 0}, {
- 1920, 1200, 60, 1}, {
- 1920, 1200, 60, 0},
+ {1600, 1200, 75, 0},
+ {1600, 1200, 85, 0},
+ {1792, 1344, 60, 0},
+ {1792, 1344, 85, 0},
+ {1856, 1392, 60, 0},
+ {1856, 1392, 75, 0},
+ {1920, 1200, 60, 1},
+ {1920, 1200, 60, 0},
/* byte 11 */
- {
- 1920, 1200, 75, 0}, {
- 1920, 1200, 85, 0}, {
- 1920, 1440, 60, 0}, {
- 1920, 1440, 75, 0},
+ {1920, 1200, 75, 0},
+ {1920, 1200, 85, 0},
+ {1920, 1440, 60, 0},
+ {1920, 1440, 75, 0},
/* fill up last byte */
- {
- 0,0,0,0}, {
- 0,0,0,0}, {
- 0,0,0,0}, {
- 0,0,0,0}, };
+ {0,0,0,0},
+ {0,0,0,0},
+ {0,0,0,0},
+ {0,0,0,0},
+};
static DisplayModePtr
DDCModesFromEstIII(unsigned char *est)
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index 4be0ea32f..3530abf24 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -60,6 +60,9 @@ typedef struct _xf86RandR12Info {
* See https://bugs.freedesktop.org/show_bug.cgi?id=21554
*/
xf86EnterVTProc *orig_EnterVT;
+
+ Bool panning;
+ ConstrainCursorHarderProcPtr orig_ConstrainCursorHarder;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
#ifdef RANDR_12_INTERFACE
@@ -665,6 +668,10 @@ xf86RandR12SetConfig(ScreenPtr pScreen,
return TRUE;
}
+#define PANNING_ENABLED(crtc) \
+ ((crtc)->panningTotalArea.x2 > (crtc)->panningTotalArea.x1 || \
+ (crtc)->panningTotalArea.y2 > (crtc)->panningTotalArea.y1)
+
static Bool
xf86RandR12ScreenSetSize(ScreenPtr pScreen,
CARD16 width,
@@ -676,6 +683,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
WindowPtr pRoot = pScreen->root;
PixmapPtr pScrnPix;
Bool ret = FALSE;
+ Bool panning = FALSE;
int c;
if (xf86RandR12Key) {
@@ -696,8 +704,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
- if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 ||
- crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
+ if (PANNING_ENABLED (crtc)) {
if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1)
crtc->panningTotalArea.x2 += width - pScreen->width;
if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1)
@@ -708,6 +715,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
crtc->panningTrackingArea.y2 += height - pScreen->height;
xf86RandR13VerifyPanningArea(crtc, width, height);
xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY);
+ panning = TRUE;
}
}
@@ -903,6 +911,7 @@ xf86RandR12CloseScreen(ScreenPtr pScreen)
randrp = XF86RANDRINFO(pScreen);
#if RANDR_12_INTERFACE
xf86ScreenToScrn(pScreen)->EnterVT = randrp->orig_EnterVT;
+ pScreen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder;
#endif
free(randrp);
@@ -1216,6 +1225,7 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
}
xf86RandR13VerifyPanningArea(crtc, pScreen->width, pScreen->height);
xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY);
+ randrp->panning = PANNING_ENABLED (crtc);
/*
* Save the last successful setting for EnterVT
*/
@@ -1650,6 +1660,7 @@ xf86RandR13SetPanning(ScreenPtr pScreen,
BoxRec oldTotalArea;
BoxRec oldTrackingArea;
INT16 oldBorder[4];
+ Bool oldPanning = randrp->panning;
if (crtc->version < 2)
return FALSE;
@@ -1667,6 +1678,7 @@ xf86RandR13SetPanning(ScreenPtr pScreen,
if (xf86RandR13VerifyPanningArea(crtc, pScreen->width, pScreen->height)) {
xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY);
+ randrp->panning = PANNING_ENABLED (crtc);
return TRUE;
}
else {
@@ -1674,6 +1686,7 @@ xf86RandR13SetPanning(ScreenPtr pScreen,
memcpy(&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec));
memcpy(&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec));
memcpy(crtc->panningBorder, oldBorder, 4 * sizeof(INT16));
+ randrp->panning = oldPanning;
return FALSE;
}
}
@@ -1762,8 +1775,6 @@ xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen,
RRProviderPtr provider,
RRProviderPtr source_provider)
{
-
-
if (!source_provider) {
if (provider->output_source) {
ScreenPtr cmScreen = pScreen->current_master;
@@ -1859,6 +1870,21 @@ xf86CrtcSetScanoutPixmap(RRCrtcPtr randr_crtc, PixmapPtr pixmap)
return crtc->funcs->set_scanout_pixmap(crtc, pixmap);
}
+static void
+xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y)
+{
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(screen);
+
+ if (randrp->panning)
+ return;
+
+ if (randrp->orig_ConstrainCursorHarder) {
+ screen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder;
+ screen->ConstrainCursorHarder(dev, screen, mode, x, y);
+ screen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder;
+ }
+}
+
static Bool
xf86RandR12Init12(ScreenPtr pScreen)
{
@@ -1895,6 +1921,10 @@ xf86RandR12Init12(ScreenPtr pScreen)
randrp->orig_EnterVT = pScrn->EnterVT;
pScrn->EnterVT = xf86RandR12EnterVT;
+ randrp->panning = FALSE;
+ randrp->orig_ConstrainCursorHarder = pScreen->ConstrainCursorHarder;
+ pScreen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder;
+
if (!xf86RandR12CreateObjects12(pScreen))
return FALSE;
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
index a8a4164e0..b1938cf0d 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -21,21 +21,19 @@ static struct {
u_int apmBsd;
pmEvent xf86;
} bsdToXF86Array[] = {
- {
- APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
- APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
- APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
- APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+ {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+ {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+ {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#ifdef APM_CAPABILITY_CHANGE
- {
- APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
#endif
};
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 10251f38e..22943855b 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -54,21 +54,19 @@ static struct {
u_int apmBsd;
pmEvent xf86;
} bsdToXF86Array[] = {
- {
- APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
- APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
- APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
- APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+ {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+ {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+ {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#ifdef APM_CAPABILITY_CHANGE
- {
- APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
#endif
};
diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
index b75308aa1..826000712 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
@@ -403,16 +403,16 @@ sparcPromAssignNodes(void)
int devId;
char *prefix;
} procFbPrefixes[] = {
- {
- SBUS_DEVICE_BW2, "BWtwo"}, {
- SBUS_DEVICE_CG14, "CGfourteen"}, {
- SBUS_DEVICE_CG6, "CGsix"}, {
- SBUS_DEVICE_CG3, "CGthree"}, {
- SBUS_DEVICE_FFB, "Creator"}, {
- SBUS_DEVICE_FFB, "Elite 3D"}, {
- SBUS_DEVICE_LEO, "Leo"}, {
- SBUS_DEVICE_TCX, "TCX"}, {
- 0, NULL},};
+ {SBUS_DEVICE_BW2, "BWtwo"},
+ {SBUS_DEVICE_CG14, "CGfourteen"},
+ {SBUS_DEVICE_CG6, "CGsix"},
+ {SBUS_DEVICE_CG3, "CGthree"},
+ {SBUS_DEVICE_FFB, "Creator"},
+ {SBUS_DEVICE_FFB, "Elite 3D"},
+ {SBUS_DEVICE_LEO, "Leo"},
+ {SBUS_DEVICE_TCX, "TCX"},
+ {0, NULL},
+ };
while (fscanf(f, "%d %63s\n", &fbNum, buffer) == 2) {
for (i = 0; procFbPrefixes[i].devId; i++)
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
index a37331e52..387934099 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
@@ -42,26 +42,23 @@ static struct {
apm_event_t apmLinux;
pmEvent xf86;
} LinuxToXF86[] = {
- {
- APM_SYS_STANDBY, XF86_APM_SYS_STANDBY}, {
- APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_LOW_BATTERY, XF86_APM_LOW_BATTERY}, {
- APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND, XF86_APM_USER_SUSPEND}, {
- APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_SYS_STANDBY, XF86_APM_SYS_STANDBY},
+ {APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_LOW_BATTERY, XF86_APM_LOW_BATTERY},
+ {APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND, XF86_APM_USER_SUSPEND},
+ {APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#if defined(APM_CAPABILITY_CHANGED)
- {
- APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED},
#endif
#if 0
- {
- APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED}, {
- APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED}
+ {APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED},
+ {APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED}
#endif
};
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
index 4ff64649a..b6a1432f6 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
@@ -97,21 +97,19 @@ static struct {
u_int apmBsd;
pmEvent xf86;
} sunToXF86Array[] = {
- {
- APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
- APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
- APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
- APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
- APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
- APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
- APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
- APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
- APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
- APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
- APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+ {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+ {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+ {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+ {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+ {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+ {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+ {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+ {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+ {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+ {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+ {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
#ifdef APM_CAPABILITY_CHANGE
- {
- APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+ {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
#endif
};
diff --git a/xorg-server/hw/xquartz/pbproxy/x-selection.m b/xorg-server/hw/xquartz/pbproxy/x-selection.m
index 13d5e13ad..57ddb743a 100644
--- a/xorg-server/hw/xquartz/pbproxy/x-selection.m
+++ b/xorg-server/hw/xquartz/pbproxy/x-selection.m
@@ -1499,7 +1499,7 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete,
/* Allocation */
-- init
+- (id) init
{
unsigned long pixel;
diff --git a/xorg-server/hw/xquartz/pseudoramiX.c b/xorg-server/hw/xquartz/pseudoramiX.c
index c650dd723..23dbc7328 100644
--- a/xorg-server/hw/xquartz/pseudoramiX.c
+++ b/xorg-server/hw/xquartz/pseudoramiX.c
@@ -37,7 +37,6 @@
#include <dix-config.h>
#endif
-#include "darwin.h"
#include "pseudoramiX.h"
#include "extnsionst.h"
#include "extinit.h"
@@ -46,6 +45,9 @@
#include <X11/extensions/panoramiXproto.h>
#include "globals.h"
+#define TRACE PseudoramiXTrace("TRACE " __FILE__ ":%s",__FUNCTION__)
+#define DEBUG_LOG PseudoramiXDebug
+
Bool noPseudoramiXExtension = FALSE;
extern int
@@ -96,6 +98,26 @@ static int pseudoramiXScreensAllocated = 0;
static int pseudoramiXNumScreens = 0;
static unsigned long pseudoramiXGeneration = 0;
+static void
+PseudoramiXTrace(const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ LogVMessageVerb(X_NONE, 10, format, ap);
+ va_end(ap);
+}
+
+static void
+PseudoramiXDebug(const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ LogVMessageVerb(X_NONE, 3, format, ap);
+ va_end(ap);
+}
+
// Add a PseudoramiX screen.
// The rest of the X server will know nothing about this screen.
// Can be called before or after extension init.
@@ -133,7 +155,7 @@ PseudoramiXExtensionInit(void)
if (noPseudoramiXExtension) return;
- TRACE();
+ TRACE;
/* Even with only one screen we need to enable PseudoramiX to allow
dynamic screen configuration changes. */
@@ -170,7 +192,7 @@ PseudoramiXExtensionInit(void)
void
PseudoramiXResetScreens(void)
{
- TRACE();
+ TRACE;
pseudoramiXNumScreens = 0;
}
@@ -178,7 +200,7 @@ PseudoramiXResetScreens(void)
static void
PseudoramiXResetProc(ExtensionEntry *extEntry)
{
- TRACE();
+ TRACE;
PseudoramiXResetScreens();
}
@@ -187,7 +209,7 @@ PseudoramiXResetProc(ExtensionEntry *extEntry)
static int
ProcPseudoramiXQueryVersion(ClientPtr client)
{
- TRACE();
+ TRACE;
return ProcPanoramiXQueryVersion(client);
}
@@ -201,7 +223,7 @@ ProcPseudoramiXGetState(ClientPtr client)
xPanoramiXGetStateReply rep;
register int rc;
- TRACE();
+ TRACE;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
@@ -212,10 +234,11 @@ ProcPseudoramiXGetState(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.state = !noPseudoramiXExtension;
+ rep.window = stuff->window;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
- swaps(&rep.state);
+ swapl(&rep.window);
}
WriteToClient(client, sizeof(xPanoramiXGetStateReply),&rep);
return Success;
@@ -230,7 +253,7 @@ ProcPseudoramiXGetScreenCount(ClientPtr client)
xPanoramiXGetScreenCountReply rep;
register int rc;
- TRACE();
+ TRACE;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
@@ -241,10 +264,11 @@ ProcPseudoramiXGetScreenCount(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.ScreenCount = pseudoramiXNumScreens;
+ rep.window = stuff->window;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
- swaps(&rep.ScreenCount);
+ swapl(&rep.window);
}
WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply),&rep);
return Success;
@@ -259,7 +283,10 @@ ProcPseudoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
register int rc;
- TRACE();
+ TRACE;
+
+ if (stuff->screen >= pseudoramiXNumScreens)
+ return BadMatch;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
@@ -274,11 +301,15 @@ ProcPseudoramiXGetScreenSize(ClientPtr client)
// was screenInfo.screens[stuff->screen]->width;
rep.height = pseudoramiXScreens[stuff->screen].h;
// was screenInfo.screens[stuff->screen]->height;
+ rep.window = stuff->window;
+ rep.screen = stuff->screen;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
- swaps(&rep.width);
- swaps(&rep.height);
+ swapl(&rep.width);
+ swapl(&rep.height);
+ swapl(&rep.window);
+ swapl(&rep.screen);
}
WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply),&rep);
return Success;
@@ -291,7 +322,7 @@ ProcPseudoramiXIsActive(ClientPtr client)
/* REQUEST(xXineramaIsActiveReq); */
xXineramaIsActiveReply rep;
- TRACE();
+ TRACE;
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
@@ -360,7 +391,7 @@ static int
ProcPseudoramiXDispatch(ClientPtr client)
{
REQUEST(xReq);
- TRACE();
+ TRACE;
switch (stuff->data) {
case X_PanoramiXQueryVersion:
return ProcPseudoramiXQueryVersion(client);
@@ -388,7 +419,7 @@ SProcPseudoramiXQueryVersion(ClientPtr client)
{
REQUEST(xPanoramiXQueryVersionReq);
- TRACE();
+ TRACE;
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
@@ -400,7 +431,7 @@ SProcPseudoramiXGetState(ClientPtr client)
{
REQUEST(xPanoramiXGetStateReq);
- TRACE();
+ TRACE;
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
@@ -412,7 +443,7 @@ SProcPseudoramiXGetScreenCount(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenCountReq);
- TRACE();
+ TRACE;
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
@@ -424,7 +455,7 @@ SProcPseudoramiXGetScreenSize(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenSizeReq);
- TRACE();
+ TRACE;
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
@@ -436,7 +467,7 @@ SProcPseudoramiXIsActive(ClientPtr client)
{
REQUEST(xXineramaIsActiveReq);
- TRACE();
+ TRACE;
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
@@ -448,7 +479,7 @@ SProcPseudoramiXQueryScreens(ClientPtr client)
{
REQUEST(xXineramaQueryScreensReq);
- TRACE();
+ TRACE;
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
@@ -460,7 +491,7 @@ SProcPseudoramiXDispatch(ClientPtr client)
{
REQUEST(xReq);
- TRACE();
+ TRACE;
switch (stuff->data) {
case X_PanoramiXQueryVersion:
diff --git a/xorg-server/hw/xquartz/xpr/xprEvent.c b/xorg-server/hw/xquartz/xpr/xprEvent.c
index 73bcc930d..398177ca8 100644
--- a/xorg-server/hw/xquartz/xpr/xprEvent.c
+++ b/xorg-server/hw/xquartz/xpr/xprEvent.c
@@ -59,13 +59,6 @@
#include "rootlessWindow.h"
#include "xprEvent.h"
-/* This is important enough to declare here if building against an old
- * libXplugin, so we pick it up whenever libXplugin starts to support it.
- */
-#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION < 6
-extern xp_error xp_window_bring_all_to_front(void) __attribute__((weak_import));
-#endif
-
Bool
QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
{
@@ -86,21 +79,18 @@ QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
/* There's no need to do xp_window_bring_all_to_front on Leopard,
* and we don't care about the result, so just do it async.
*/
-#if defined(HAVE_LIBDISPATCH)
-#if (defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED >= 6) || \
- (!defined(XPLUGIN_VERSION_MIN_REQUIRED) && defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 6)
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- xp_window_bring_all_to_front();
- });
-#else
- if (&xp_window_bring_all_to_front) {
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- xp_window_bring_all_to_front();
- });
- } else {
- RootlessOrderAllWindows(e->data[0]);
- }
-#endif
+#if defined(HAVE_LIBDISPATCH) && defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 6
+# if defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED < 6
+ if (&xp_window_bring_all_to_front) {
+# endif
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ xp_window_bring_all_to_front();
+ });
+# if defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED < 6
+ } else {
+ RootlessOrderAllWindows(e->data[0]);
+ }
+# endif
#else
RootlessOrderAllWindows(e->data[0]);
#endif
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 98dcd6909..45c8ec28a 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -54,6 +54,7 @@ typedef HRESULT (__stdcall * SHGETFOLDERPATHPROC)(HWND hwndOwner,
DWORD dwFlags, LPTSTR pszPath);
#endif
+#include "glx_extinit.h"
/*
* References to external symbols
*/
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index 8ab464af7..830d00e19 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -174,18 +174,17 @@ struct __GLXWinConfig {
#ifdef _DEBUG
void GLWIN_DEBUG_HWND(HWND hwnd)
{
- if (glxWinDebugSettings.dumpHWND)
- {
- char buffer[1024];
- RECT Rect;
- HDC hDc=GetDC(hwnd);
+ if (glxWinDebugSettings.dumpHWND) {
+ char buffer[1024];
+ RECT Rect;
+ HDC hDc=GetDC(hwnd);
- if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0;
- GetWindowRect(hwnd,&Rect);
+ if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0;
+ GetWindowRect(hwnd,&Rect);
- GLWIN_DEBUG_MSG("Got HWND %p (hdc %p) for window '%s' (%d,%d,%d,%d)", hwnd, hDc, buffer, Rect.left, Rect.top, Rect.right, Rect.bottom);
- ReleaseDC(hwnd,hDc);
- }
+ GLWIN_DEBUG_MSG("Got HWND %p (hdc %p) for window '%s' (%d,%d,%d,%d)", hwnd, hDc, buffer, Rect.left, Rect.top, Rect.right, Rect.bottom);
+ ReleaseDC(hwnd,hDc);
+ }
}
void GLWIN_HDC_DEBUG_MSG(const char *Message, HDC hDc, HWND hwnd)
@@ -481,7 +480,7 @@ void
glxWinPushNativeProvider(void)
{
if (g_fNativeGl)
- GlxPushProvider(&__glXWGLProvider);
+ GlxPushProvider(&__glXWGLProvider);
}
/* ---------------------------------------------------------------------- */
@@ -511,12 +510,11 @@ glxWinScreenSwapInterval(__GLXdrawable * drawable, int interval)
static LRESULT CALLBACK GlxWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- if (uMsg== WM_NCHITTEST)
- {
- return HTTRANSPARENT;
- }
- else
- return DefWindowProc(hwnd, uMsg, wParam, lParam);
+ if (uMsg== WM_NCHITTEST) {
+ return HTTRANSPARENT;
+ }
+ else
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
/*
@@ -637,11 +635,10 @@ glxWinScreenProbe(ScreenPtr pScreen)
// we must set a pixel format before we can create a context, just use the first one...
SetPixelFormat(hdc, 1, NULL);
hglrc = wglCreateContext(hdc);
- if (!wglMakeCurrent(hdc, hglrc))
- {
+ if (!wglMakeCurrent(hdc, hglrc)) {
DWORD ErrorCode=GetLastError();
ErrorF("wglMakeCurrent error: %x dc %p ctx %p\n", ErrorCode,hdc,hglrc);
- }
+ }
// initialize wgl extension proc pointers (don't call them before here...)
// (but we need to have a current context for them to be resolvable)
@@ -865,9 +862,8 @@ glxWinRealizeWindow(WindowPtr pWin)
pScreen->RealizeWindow = glxWinRealizeWindow;
// Check if ze need to move the window\n
- if (pWinPriv->fWglUsed && pWinPriv->hWnd)
- {
- ShowWindow(pWinPriv->hWnd,SW_SHOWNOACTIVATE);
+ if (pWinPriv->fWglUsed && pWinPriv->hWnd) {
+ ShowWindow(pWinPriv->hWnd,SW_SHOWNOACTIVATE);
}
return result;
}
@@ -901,7 +897,6 @@ glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pScreen->CopyWindow = screenPriv->CopyWindow;
pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc);
pScreen->CopyWindow = glxWinCopyWindow;
-
}
static Bool
@@ -918,13 +913,13 @@ glxWinPositionWindow(WindowPtr pWin, int x, int y)
if (pWinPriv->fWglUsed && pWinPriv->hWnd)
{
- MoveWindow(pWinPriv->hWnd,
- pWin->drawable.x,
- pWin->drawable.y,
- pWin->drawable.width,
- pWin->drawable.height,
- FALSE);
- winDebug("Move window %x, %x, %d, %d, %d, %d\n",pWinPriv->hWnd,GetParent(pWinPriv->hWnd), pWin->drawable.x, pWin->drawable.y, pWin->drawable.width, pWin->drawable.height);
+ MoveWindow(pWinPriv->hWnd,
+ pWin->drawable.x,
+ pWin->drawable.y,
+ pWin->drawable.width,
+ pWin->drawable.height,
+ FALSE);
+ winDebug("Move window %x, %x, %d, %d, %d, %d\n",pWinPriv->hWnd,GetParent(pWinPriv->hWnd), pWin->drawable.x, pWin->drawable.y, pWin->drawable.width, pWin->drawable.height);
}
return result;
}
@@ -1163,24 +1158,24 @@ glxWinSetPixelFormat(__GLXWinContext * gc, HDC hdc, int bppOverride,
GLXWinConfig *winConfig = (GLXWinConfig *) config;
- WindowPtr pWin;
- __GLXWinDrawable *drawPriv = (__GLXWinDrawable *)gc->base.drawPriv;
- pWin = (WindowPtr) drawPriv->base.pDraw;
- {
- winWindowPriv(pWin);
- if (pWinPriv->OpenGlWindow)
+ WindowPtr pWin;
+ __GLXWinDrawable *drawPriv = (__GLXWinDrawable *)gc->base.drawPriv;
+ pWin = (WindowPtr) drawPriv->base.pDraw;
{
- ErrorF("Not Setting pixel format to %d on hdc %x for window %x (not allowed on windows)\n",winConfig->pixelFormatIndex,hdc,pWinPriv->hWnd);
- return TRUE; /* Pixel format is already set on this window so it cannot be changed anymore */
+ winWindowPriv(pWin);
+ if (pWinPriv->OpenGlWindow)
+ {
+ ErrorF("Not Setting pixel format to %d on hdc %x for window %x (not allowed on windows)\n",winConfig->pixelFormatIndex,hdc,pWinPriv->hWnd);
+ return TRUE; /* Pixel format is already set on this window so it cannot be changed anymore */
+ }
}
- }
- GLWIN_DEBUG_MSG("glxWinSetPixelFormat: pixelFormatIndex %d", winConfig->pixelFormatIndex);
+ GLWIN_DEBUG_MSG("glxWinSetPixelFormat: pixelFormatIndex %d", winConfig->pixelFormatIndex);
/*
Normally, we can just use the the pixelFormatIndex corresponding
to the fbconfig which has been specified by the client
- */
- /*
+ */
+ /*
However, in certain special cases this pixel format will be incompatible with the
use we are going to put it to, so we need to re-evaluate the pixel format to use:
@@ -1246,51 +1241,49 @@ glxWinSetPixelFormat(__GLXWinContext * gc, HDC hdc, int bppOverride,
fbConfigToPixelFormatIndex(hdc, gc->base.config,
drawableTypeOverride, winScreen);
if (pixelFormat != 0) {
- GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat);
+ GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat);
- ErrorF("Setting pixel format 3 to %d on hdc %x\n",pixelFormat,hdc);
- if (!SetPixelFormat(hdc, pixelFormat, NULL)) {
- ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
- return FALSE;
- }
- return TRUE;
- }
- else
- {
- /* There was an error choose some default for the moment */
- PIXELFORMATDESCRIPTOR pfd = {
- sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
- 1, // version number
- PFD_DRAW_TO_WINDOW | // support window
- PFD_SUPPORT_OPENGL | // support OpenGL
- PFD_DOUBLEBUFFER, // double buffered
- PFD_TYPE_RGBA, // RGBA type
- 24, // 24-bit color depth
- 0, 0, 0, 0, 0, 0, // color bits ignored
- 0, // no alpha buffer
- 0, // shift bit ignored
- 0, // no accumulation buffer
- 0, 0, 0, 0, // accum bits ignored
- 32, // 32-bit z-buffer
- 0, // no stencil buffer
- 0, // no auxiliary buffer
- PFD_MAIN_PLANE, // main layer
- 0, // reserved
- 0, 0, 0 // layer masks ignored
- };
- int iPixelFormat;
+ ErrorF("Setting pixel format 3 to %d on hdc %x\n",pixelFormat,hdc);
+ if (!SetPixelFormat(hdc, pixelFormat, NULL)) {
+ ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
+ return FALSE;
+ }
+ return TRUE;
+ }
+ else {
+ /* There was an error choose some default for the moment */
+ PIXELFORMATDESCRIPTOR pfd = {
+ sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
+ 1, // version number
+ PFD_DRAW_TO_WINDOW | // support window
+ PFD_SUPPORT_OPENGL | // support OpenGL
+ PFD_DOUBLEBUFFER, // double buffered
+ PFD_TYPE_RGBA, // RGBA type
+ 24, // 24-bit color depth
+ 0, 0, 0, 0, 0, 0, // color bits ignored
+ 0, // no alpha buffer
+ 0, // shift bit ignored
+ 0, // no accumulation buffer
+ 0, 0, 0, 0, // accum bits ignored
+ 32, // 32-bit z-buffer
+ 0, // no stencil buffer
+ 0, // no auxiliary buffer
+ PFD_MAIN_PLANE, // main layer
+ 0, // reserved
+ 0, 0, 0 // layer masks ignored
+ };
+ int iPixelFormat;
- // get the best available match of pixel format for the device context
- iPixelFormat = ChoosePixelFormat(hdc, &pfd);
+ // get the best available match of pixel format for the device context
+ iPixelFormat = ChoosePixelFormat(hdc, &pfd);
- ErrorF("Setting pixel format 4 to %d on hdc %x\n",iPixelFormat,hdc);
- // make that the pixel format of the device context
- if (!SetPixelFormat(hdc, iPixelFormat, &pfd))
- {
- ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
- return FALSE;
- }
- }
+ ErrorF("Setting pixel format 4 to %d on hdc %x\n",iPixelFormat,hdc);
+ // make that the pixel format of the device context
+ if (!SetPixelFormat(hdc, iPixelFormat, &pfd)) {
+ ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
+ return FALSE;
+ }
+ }
}
return TRUE;
}
@@ -1325,52 +1318,51 @@ glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HWND *hwnd)
return NULL;
}
- if (!gc->hDC)
- {
- winWindowPriv(pWin);
+ if (!gc->hDC) {
+ winWindowPriv(pWin);
- hdc = GetDC(*hwnd);
+ hdc = GetDC(*hwnd);
- if (hdc == NULL)
- ErrorF("GetDC error: %s: hwnd %x, gc %p, gc->ctx %p ,gc->hwnd %p\n", glxWinErrorMessage(), *hwnd, gc, gc->ctx, gc->hwnd);
+ if (hdc == NULL)
+ ErrorF("GetDC error: %s: hwnd %x, gc %p, gc->ctx %p ,gc->hwnd %p\n", glxWinErrorMessage(), *hwnd, gc, gc->ctx, gc->hwnd);
- glxWinSetPixelFormat(gc, hdc, 0, GLX_WINDOW_BIT);
- pWinPriv->OpenGlWindow=TRUE; /* Identify it as an opengl window, also used to check if the pixel format is already set */
- gc->ctx = wglCreateContext(hdc);
- }
+ glxWinSetPixelFormat(gc, hdc, 0, GLX_WINDOW_BIT);
+ pWinPriv->OpenGlWindow=TRUE; /* Identify it as an opengl window, also used to check if the pixel format is already set */
+ gc->ctx = wglCreateContext(hdc);
+ }
#ifdef _DEBUG
- if (glxWinDebugSettings.enableTrace)
- GLWIN_DEBUG_HWND(*hwnd);
+ if (glxWinDebugSettings.enableTrace)
+ GLWIN_DEBUG_HWND(*hwnd);
- GLWIN_TRACE_MSG
- ("for context %p (native ctx %p), hWnd changed from %p to %p",
- gc, gc->ctx, gc->hwnd, *hwnd);
+ GLWIN_TRACE_MSG
+ ("for context %p (native ctx %p), hWnd changed from %p to %p",
+ gc, gc->ctx, gc->hwnd, *hwnd);
#endif
- if (gc->hwnd!=*hwnd)
- ErrorF("Window changed handle from %x to %x\n", gc->hwnd, *hwnd);
+ if (gc->hwnd!=*hwnd)
+ ErrorF("Window changed handle from %x to %x\n", gc->hwnd, *hwnd);
- gc->hwnd = *hwnd;
+ gc->hwnd = *hwnd;
}
break;
case GLX_DRAWABLE_PBUFFER:
{
- hdc = wglGetPbufferDCARBWrapper(draw->hPbuffer);
+ hdc = wglGetPbufferDCARBWrapper(draw->hPbuffer);
- if (hdc == NULL)
+ if (hdc == NULL)
ErrorF("GetDC (pbuffer) error: %s\n", glxWinErrorMessage());
- gc->ctx = wglCreateContext(hdc);
+ gc->ctx = wglCreateContext(hdc);
}
break;
case GLX_DRAWABLE_PIXMAP:
{
- hdc = draw->dibDC;
+ hdc = draw->dibDC;
#ifdef _DEBUG
- if (glxWinDebugSettings.dumpDC)
- GLWIN_DEBUG_MSG("Got PIXMAP HDC %p for window %p", hdc, *hwnd);
+ if (glxWinDebugSettings.dumpDC)
+ GLWIN_DEBUG_MSG("Got PIXMAP HDC %p for window %p", hdc, *hwnd);
#endif
}
break;
@@ -1387,7 +1379,7 @@ glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HWND *hwnd)
GLWIN_HDC_DEBUG_MSG("Got HDC %p for window %p", hdc, *hwnd);
#endif
- return hdc;
+ return hdc;
}
static void
@@ -1462,7 +1454,7 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw)
case GLX_DRAWABLE_PBUFFER:
{
- WindowPtr pWin = (WindowPtr) draw->base.pDraw;
+ WindowPtr pWin = (WindowPtr) draw->base.pDraw;
if (draw->hPbuffer == NULL) {
__GLXscreen *screen;
glxWinScreen *winScreen;
@@ -1548,7 +1540,7 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw)
draw->pOldBits = ((PixmapPtr) draw->base.pDraw)->devPrivate.ptr;
((PixmapPtr) draw->base.pDraw)->devPrivate.ptr = pBits;
- ((PixmapPtr)draw->base.pDraw)->refcnt++; /* Increment reference count to be sure it is not freed before the glxdrawable is destroyed */
+ ((PixmapPtr)draw->base.pDraw)->refcnt++; /* Increment reference count to be sure it is not freed before the glxdrawable is destroyed */
// Select the DIB into the DC
draw->hOldDIB = SelectObject(draw->dibDC, draw->hDIB);
@@ -1580,8 +1572,8 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw)
gc->hDC = glxWinMakeDC(gc, draw, &hwnd);
if (gc->ctx == NULL) {
- glxWinReleaseDC(hwnd, gc->hDC, draw);
- gc->hDC=0;
+ glxWinReleaseDC(hwnd, gc->hDC, draw);
+ gc->hDC=0;
ErrorF("wglCreateContext error: %s\n", glxWinErrorMessage());
return;
@@ -1632,7 +1624,7 @@ glxWinContextMakeCurrent(__GLXcontext * base)
if (gc->ctx == NULL) {
ErrorF("glxWinContextMakeCurrent: Native context is NULL\n");
- drawPriv->drawContext = NULL; /* clear last active context because we return error */
+ drawPriv->drawContext = NULL; /* clear last active context because we return error */
return FALSE;
}
@@ -1644,8 +1636,7 @@ glxWinContextMakeCurrent(__GLXcontext * base)
to one DC and reading from the other
*/
gc->hreadDC = glxWinMakeDC(gc, (__GLXWinDrawable *)gc->base.readPriv, &gc->hreadwnd);
- if (gc->hreadDC == NULL)
- {
+ if (gc->hreadDC == NULL) {
ErrorF("glxWinMakeDC failed for readDC\n");
drawPriv->drawContext = NULL; /* clear last active context because we return error */
return FALSE;
@@ -1659,20 +1650,18 @@ glxWinContextMakeCurrent(__GLXcontext * base)
}
else {
/* Otherwise, just use wglMakeCurrent */
- if (!gc->hDC)
- {
- /* It probably has been release by loseCurrent, so create it again */
- gc->hDC = glxWinMakeDC(gc, drawPriv, &gc->hwnd);
- }
- ret = wglMakeCurrent(gc->hDC, gc->ctx);
- if (!ret) {
- DWORD ErrorCode=GetLastError();
- ErrorF("wglMakeCurrent error: %x dc %p ctx %p\n", ErrorCode,gc->hDC,gc->ctx);
- if (!ErrorCode)
- {
- ErrorF("Error code was 0, assuming no error.\n");
- ret=TRUE;
- }
+ if (!gc->hDC) {
+ /* It probably has been release by loseCurrent, so create it again */
+ gc->hDC = glxWinMakeDC(gc, drawPriv, &gc->hwnd);
+ }
+ ret = wglMakeCurrent(gc->hDC, gc->ctx);
+ if (!ret) {
+ DWORD ErrorCode=GetLastError();
+ ErrorF("wglMakeCurrent error: %x dc %p ctx %p\n", ErrorCode,gc->hDC,gc->ctx);
+ if (!ErrorCode) {
+ ErrorF("Error code was 0, assuming no error.\n");
+ ret=TRUE;
+ }
}
}
@@ -1741,7 +1730,7 @@ glxWinContextDestroy(__GLXcontext * base)
__GLXWinContext *gc = (__GLXWinContext *) base;
if (gc != NULL) {
- __GLXWinDrawable *drawPriv = (__GLXWinDrawable *)gc->base.drawPriv;
+ __GLXWinDrawable *drawPriv = (__GLXWinDrawable *)gc->base.drawPriv;
GLWIN_DEBUG_MSG("GLXcontext %p destroyed (native ctx %p)", base,
gc->ctx);
@@ -1822,13 +1811,13 @@ glxWinCreateContext(__GLXscreen * screen,
static int
GetShift(int Mask)
{
- int Shift=0;
+ int Shift = 0;
- while ((Mask&1)==0) {
- Shift++;
- Mask>>=1;
- }
- return Shift;
+ while ((Mask &1) == 0) {
+ Shift++;
+ Mask >>=1;
+ }
+ return Shift;
}
static int
@@ -1878,14 +1867,14 @@ fbConfigToPixelFormat(__GLXconfig * mode, PIXELFORMATDESCRIPTOR * pfdret,
pfd.cAlphaShift = GetShift(mode->alphaMask);
if (mode->visualType == GLX_TRUE_COLOR) {
- pfd.iPixelType = PFD_TYPE_RGBA;
- pfd.dwVisibleMask =
- (pfd.cRedBits << pfd.cRedShift) | (pfd.cGreenBits << pfd.cGreenShift) |
- (pfd.cBlueBits << pfd.cBlueShift) | (pfd.cAlphaBits << pfd.cAlphaShift);
+ pfd.iPixelType = PFD_TYPE_RGBA;
+ pfd.dwVisibleMask =
+ (pfd.cRedBits << pfd.cRedShift) | (pfd.cGreenBits << pfd.cGreenShift) |
+ (pfd.cBlueBits << pfd.cBlueShift) | (pfd.cAlphaBits << pfd.cAlphaShift);
}
else {
- pfd.iPixelType = PFD_TYPE_COLORINDEX;
- pfd.dwVisibleMask = mode->transparentIndex;
+ pfd.iPixelType = PFD_TYPE_COLORINDEX;
+ pfd.dwVisibleMask = mode->transparentIndex;
}
pfd.cAccumBits =
@@ -2128,25 +2117,25 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen * screen)
/* EXT_visual_info / GLX 1.2 */
if (pfd.iPixelType == PFD_TYPE_COLORINDEX) {
c->base.visualType = GLX_STATIC_COLOR;
- c->base.transparentRed = GLX_NONE;
- c->base.transparentGreen = GLX_NONE;
- c->base.transparentBlue = GLX_NONE;
- c->base.transparentAlpha = GLX_NONE;
- c->base.transparentIndex = pfd.dwVisibleMask;
- c->base.transparentPixel = GLX_TRANSPARENT_INDEX;
+ c->base.transparentRed = GLX_NONE;
+ c->base.transparentGreen = GLX_NONE;
+ c->base.transparentBlue = GLX_NONE;
+ c->base.transparentAlpha = GLX_NONE;
+ c->base.transparentIndex = pfd.dwVisibleMask;
+ c->base.transparentPixel = GLX_TRANSPARENT_INDEX;
}
else {
- c->base.visualType = GLX_TRUE_COLOR;
- c->base.transparentRed =
- (pfd.dwVisibleMask&c->base.redMask) >> pfd.cRedShift;
- c->base.transparentGreen =
- (pfd.dwVisibleMask&c->base.greenMask) >> pfd.cGreenShift;
- c->base.transparentBlue =
- (pfd.dwVisibleMask&c->base.blueMask) >> pfd.cBlueShift;
- c->base.transparentAlpha =
- (pfd.dwVisibleMask&c->base.alphaMask) >> pfd.cAlphaShift;
- c->base.transparentIndex = GLX_NONE;
- c->base.transparentPixel = GLX_TRANSPARENT_RGB;
+ c->base.visualType = GLX_TRUE_COLOR;
+ c->base.transparentRed =
+ (pfd.dwVisibleMask & c->base.redMask) >> pfd.cRedShift;
+ c->base.transparentGreen =
+ (pfd.dwVisibleMask & c->base.greenMask) >> pfd.cGreenShift;
+ c->base.transparentBlue =
+ (pfd.dwVisibleMask & c->base.blueMask) >> pfd.cBlueShift;
+ c->base.transparentAlpha =
+ (pfd.dwVisibleMask & c->base.alphaMask) >> pfd.cAlphaShift;
+ c->base.transparentIndex = GLX_NONE;
+ c->base.transparentPixel = GLX_TRANSPARENT_RGB;
}
/* ARB_multisample / SGIS_multisample */
@@ -2350,10 +2339,10 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
/* fill in configs */
for (i = 0; i < numConfigs; i++) {
- int sizevalues=num_attrs*sizeof(int);
- int *values=(int*)_alloca(sizevalues);
+ int sizevalues=num_attrs*sizeof(int);
+ int *values=(int*)_alloca(sizevalues);
- memset(values,0,sizevalues);
+ memset(values,0,sizevalues);
c = &(result[i]);
c->base.next = NULL;
diff --git a/xorg-server/hw/xwin/winclipboardwndproc.c b/xorg-server/hw/xwin/winclipboardwndproc.c
index d932082b7..28348ac45 100644
--- a/xorg-server/hw/xwin/winclipboardwndproc.c
+++ b/xorg-server/hw/xwin/winclipboardwndproc.c
@@ -110,6 +110,8 @@ winProcessXEventsTimeout(HWND hwnd, int iWindow, Display * pDisplay,
remainingTime = dwStopTime - GetTickCount();
tv.tv_sec = remainingTime / 1000;
tv.tv_usec = (remainingTime % 1000) * 1000;
+ winDebug("winProcessXEventsTimeout () - %d milliseconds left\n",
+ remainingTime);
/* Break out if no time left */
if (remainingTime <= 0)
@@ -122,8 +124,8 @@ winProcessXEventsTimeout(HWND hwnd, int iWindow, Display * pDisplay,
NULL, /* No exception mask */
&tv); /* Timeout */
if (iReturn < 0) {
- ErrorF ("winProcessXEventsTimeout - Call to select () failed: %d (%x). "
- "Bailing.\n", iReturn, WSAGetLastError());
+ ErrorF("winProcessXEventsTimeout - Call to select () failed: %d (%x). "
+ "Bailing.\n", iReturn, WSAGetLastError());
break;
}
@@ -133,11 +135,19 @@ winProcessXEventsTimeout(HWND hwnd, int iWindow, Display * pDisplay,
/* Exit when we see that server is shutting down */
iReturn = winClipboardFlushXEvents(hwnd,
iWindow, pDisplay, fUseUnicode, TRUE);
+
+ winDebug
+ ("winProcessXEventsTimeout () - winClipboardFlushXEvents returned %d\n",
+ iReturn);
+
if (WIN_XEVENTS_NOTIFY == iReturn) {
/* Bail out if notify processed */
return iReturn;
}
}
+ else {
+ winDebug("winProcessXEventsTimeout - Spurious wake\n");
+ }
}
return WIN_XEVENTS_SUCCESS;
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index 3100ea640..0612ca6a1 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -553,7 +553,6 @@ winCreateWindowsWindow(WindowPtr pWin)
if (iX == CW_USEDEFAULT) {
winAdjustXWindow(pWin, hWnd);
}
-
/* Change style back to popup, already placed... */
SetWindowLongPtr(hWnd, GWL_STYLE,
WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
@@ -644,7 +643,7 @@ winUpdateWindowsWindow(WindowPtr pWin)
HWND hWnd = pWinPriv->hWnd;
#if CYGMULTIWINDOW_DEBUG
- winDebug ("winUpdateWindowsWindow\n");
+ winDebug("winUpdateWindowsWindow\n");
#endif
/* Check if the Windows window's parents have been destroyed */
@@ -663,45 +662,40 @@ winUpdateWindowsWindow(WindowPtr pWin)
UpdateWindow(pWinPriv->hWnd);
}
else if (hWnd != NULL) {
- if (pWinPriv->fWglUsed)
- {
- /* We do not need to destroy the window but to reparent it and move it to the
- correct place when it is an opengl window */
- int offsetx;
- int offsety;
- HWND hParentWnd;
- WindowPtr pParent=pWin->parent;
-
- while (pParent)
- {
- winWindowPriv(pParent);
- hParentWnd=pWinPriv->hWnd;
- if (hParentWnd)
- break;
- pParent=pParent->parent;
- }
+ if (pWinPriv->fWglUsed) {
+ /* We do not need to destroy the window but to reparent it and move it to the
+ correct place when it is an opengl window */
+ int offsetx;
+ int offsety;
+ HWND hParentWnd;
+ WindowPtr pParent=pWin->parent;
+
+ while (pParent) {
+ winWindowPriv(pParent);
+ hParentWnd=pWinPriv->hWnd;
+ if (hParentWnd)
+ break;
+ pParent=pParent->parent;
+ }
- if (pParent)
- {
- offsetx=pParent->drawable.x;
- offsety=pParent->drawable.y;
+ if (pParent) {
+ offsetx=pParent->drawable.x;
+ offsety=pParent->drawable.y;
+ }
+ else {
+ offsetx=0;
+ offsety=0;
+ }
+ winDebug ("-winUpdateWindowsWindow: %x changing parent to %x and moving to %d,%d\n",pWinPriv->hWnd,hParentWnd,pWin->drawable.x-offsetx,pWin->drawable.y-offsety);
+ SetParent(pWinPriv->hWnd,hParentWnd);
+ SetWindowPos(pWinPriv->hWnd,NULL,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW);
}
- else
- {
- offsetx=0;
- offsety=0;
+ else {
+ /* Destroy the Windows window if its parents are destroyed */
+ /* First check if we need to release the DC when it is an opengl window */
+ winDestroyWindowsWindow (pWin);
+ assert (pWinPriv->hWnd == NULL);
}
- winDebug ("-winUpdateWindowsWindow: %x changing parent to %x and moving to %d,%d\n",pWinPriv->hWnd,hParentWnd,pWin->drawable.x-offsetx,pWin->drawable.y-offsety);
- SetParent(pWinPriv->hWnd,hParentWnd);
- SetWindowPos(pWinPriv->hWnd,NULL,pWin->drawable.x-offsetx,pWin->drawable.y-offsety,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW);
- }
- else
- {
- /* Destroy the Windows window if its parents are destroyed */
- /* First check if we need to release the DC when it is an opengl window */
- winDestroyWindowsWindow (pWin);
- assert (pWinPriv->hWnd == NULL);
- }
}
#if CYGMULTIWINDOW_DEBUG
@@ -723,7 +717,7 @@ winGetWindowID(WindowPtr pWin)
FindClientResourcesByType(c, RT_WINDOW, winFindWindow, &wi);
#if CYGMULTIWINDOW_DEBUG
- winDebug ("winGetWindowID - Window ID: %d\n", wi.id);
+ winDebug("winGetWindowID - Window ID: %d\n", wi.id);
#endif
return wi.id;
@@ -758,11 +752,11 @@ winReorderWindowsMultiWindow(void)
DWORD dwCurrentProcessID = GetCurrentProcessId();
DWORD dwWindowProcessID = 0;
- winDebug ("winReorderWindowsMultiWindow\n");
+ winDebug("winReorderWindowsMultiWindow\n");
if (fRestacking) {
/* It is a recusive call so immediately exit */
- winDebug ("winReorderWindowsMultiWindow - "
+ winDebug("winReorderWindowsMultiWindow - "
"exit because fRestacking == TRUE\n");
return;
}
@@ -816,7 +810,7 @@ winMinimizeWindow(Window id)
winPrivScreenPtr pScreenPriv = NULL;
winScreenInfo *pScreenInfo = NULL;
- winDebug ("winMinimizeWindow\n");
+ winDebug("winMinimizeWindow\n");
dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient,
DixUnknownAccess);
@@ -859,7 +853,7 @@ winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion)
winScreenPriv(pScreen);
- winDebug ("CopyWindowMultiWindow\n");
+ winDebug("CopyWindowMultiWindow\n");
WIN_UNWRAP(CopyWindow);
(*pScreen->CopyWindow) (pWin, oldpt, oldRegion);
@@ -877,7 +871,7 @@ winMoveWindowMultiWindow(WindowPtr pWin, int x, int y,
winScreenPriv(pScreen);
- winDebug ("MoveWindowMultiWindow to (%d, %d)\n", x, y);
+ winDebug("MoveWindowMultiWindow to (%d, %d)\n", x, y);
WIN_UNWRAP(MoveWindow);
(*pScreen->MoveWindow) (pWin, x, y, pSib, kind);
@@ -895,7 +889,7 @@ winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w,
winScreenPriv(pScreen);
- winDebug ("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h);
+ winDebug("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h);
WIN_UNWRAP(ResizeWindow);
(*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
@@ -925,10 +919,10 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
#define WIDTH(rc) (rc.right - rc.left)
#define HEIGHT(rc) (rc.bottom - rc.top)
- winDebug ("winAdjustXWindow\n");
+ winDebug("winAdjustXWindow\n");
if (IsIconic(hwnd)) {
- winDebug ("\timmediately return because the window is iconized\n");
+ winDebug("\timmediately return because the window is iconized\n");
/*
* If the Windows window is minimized, its WindowRect has
* meaningless values so we don't adjust X window to it.
@@ -963,7 +957,7 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
if (EqualRect(&rcDraw, &rcWin)) {
/* Bail if no adjust is needed */
- winDebug ("\treturn because already adjusted\n");
+ winDebug("\treturn because already adjusted\n");
return 0;
}
@@ -983,7 +977,7 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
vlist[1] = pDraw->y + dY - wBorderWidth(pWin);
vlist[2] = pDraw->width + dW;
vlist[3] = pDraw->height + dH;
- winDebug ("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1],
+ winDebug("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1],
vlist[2], vlist[3]);
return ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight,
vlist, wClient(pWin));
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 88109ceab..662664b8a 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -676,9 +676,9 @@ winMultiWindowWMProc(void *pArg)
UpdateName(pWMInfo, pNode->msg.iWindow);
UpdateIcon(pWMInfo, pNode->msg.iWindow);
{
- HWND zstyle = HWND_NOTOPMOST;
- winApplyHints (pWMInfo->pDisplay, pNode->msg.iWindow, pNode->msg.hwndWindow, &zstyle);
- winUpdateWindowPosition (pNode->msg.hwndWindow, TRUE, &zstyle);
+ HWND zstyle = HWND_NOTOPMOST;
+ winApplyHints (pWMInfo->pDisplay, pNode->msg.iWindow, pNode->msg.hwndWindow, &zstyle);
+ winUpdateWindowPosition (pNode->msg.hwndWindow, TRUE, &zstyle);
}
break;
@@ -823,7 +823,7 @@ winMultiWindowXMsgProc(void *pArg)
pthread_exit(NULL);
}
- winDebug ("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
+ winDebug("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
/* Grab the server started mutex - pause until we get it */
iReturn = pthread_mutex_lock(pProcArg->ppmServerStarted);
@@ -833,12 +833,12 @@ winMultiWindowXMsgProc(void *pArg)
pthread_exit(NULL);
}
- winDebug ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
+ winDebug("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
/* Release the server started mutex */
pthread_mutex_unlock(pProcArg->ppmServerStarted);
- winDebug ("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
+ winDebug("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
/* Install our error handler */
XSetErrorHandler(winMultiWindowXMsgProcErrorHandler);
@@ -865,7 +865,7 @@ winMultiWindowXMsgProc(void *pArg)
winGetDisplayName(pszDisplay, (int)pProcArg->dwScreen);
/* Print the display connection string */
- winDebug ("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
+ winDebug("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
/* Use our generated cookie for authentication */
winSetAuthorization();
@@ -878,8 +878,8 @@ winMultiWindowXMsgProc(void *pArg)
/* Try to open the display */
pProcArg->pDisplay = XOpenDisplay(pszDisplay);
if (pProcArg->pDisplay == NULL) {
- winDebug ("winMultiWindowXMsgProc - Could not open display, try: %d, "
- "sleeping: %d\n", iRetries + 1, WIN_CONNECT_DELAY);
+ winDebug("winMultiWindowXMsgProc - Could not open display, try: %d, "
+ "sleeping: %d\n", iRetries + 1, WIN_CONNECT_DELAY);
++iRetries;
sleep(WIN_CONNECT_DELAY);
continue;
@@ -896,8 +896,8 @@ winMultiWindowXMsgProc(void *pArg)
pthread_exit(NULL);
}
- winDebug ("winMultiWindowXMsgProc - XOpenDisplay () returned and "
- "successfully opened the display.\n");
+ winDebug("winMultiWindowXMsgProc - XOpenDisplay () returned and "
+ "successfully opened the display.\n");
/* Check if another window manager is already running */
#ifdef XWIN_MULTIWINDOWINTWM
@@ -1089,7 +1089,7 @@ winMultiWindowXMsgProc(void *pArg)
else if (event.type == ClientMessage
&& event.xclient.message_type == atmWmChange
&& event.xclient.data.l[0] == IconicState) {
- winDebug ("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
+ winDebug("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
memset(&msg, 0, sizeof(msg));
@@ -1195,7 +1195,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit(NULL);
}
- winDebug ("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n");
+ winDebug("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n");
/* Grab our garbage mutex to satisfy pthread_cond_wait */
iReturn = pthread_mutex_lock(pProcArg->ppmServerStarted);
@@ -1205,12 +1205,12 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit(NULL);
}
- winDebug ("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
+ winDebug("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
/* Release the server started mutex */
pthread_mutex_unlock(pProcArg->ppmServerStarted);
- winDebug ("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
+ winDebug("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
/* Install our error handler */
XSetErrorHandler(winMultiWindowWMErrorHandler);
@@ -1237,7 +1237,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
winGetDisplayName(pszDisplay, (int)pProcArg->dwScreen);
/* Print the display connection string */
- winDebug ("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
+ winDebug("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
/* Use our generated cookie for authentication */
winSetAuthorization();
@@ -1265,8 +1265,8 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pthread_exit(NULL);
}
- winDebug ("winInitMultiWindowWM - XOpenDisplay () returned and "
- "successfully opened the display.\n");
+ winDebug("winInitMultiWindowWM - XOpenDisplay () returned and "
+ "successfully opened the display.\n");
/* Create some atoms */
pWMInfo->atmWmProtos = XInternAtom(pWMInfo->pDisplay,
@@ -1297,7 +1297,7 @@ winSendMessageToWM(void *pWMInfo, winWMMessagePtr pMsg)
{
WMMsgNodePtr pNode;
- winDebug ("winSendMessageToWM ()\n");
+ winDebug("winSendMessageToWM ()\n");
pNode = (WMMsgNodePtr) malloc(sizeof(WMMsgNodeRec));
if (pNode != NULL) {
@@ -1323,18 +1323,18 @@ winMultiWindowWMErrorHandler(Display * pDisplay, XErrorEvent * pErr)
}
XGetErrorText(pDisplay, pErr->error_code, pszErrorMsg, sizeof(pszErrorMsg));
- ErrorF ("winMultiWindowWMErrorHandler - ERROR: %s\n"
- " errorCode %d\n"
- " serial %d\n"
- " resourceID 0x%x\n"
- " majorCode %d\n"
- " minorCode %d\n"
- , pszErrorMsg
- , pErr->error_code
- , pErr->serial
- , pErr->resourceid
- , pErr->request_code
- , pErr->minor_code);
+ ErrorF("winMultiWindowWMErrorHandler - ERROR: %s\n"
+ " errorCode %d\n"
+ " serial %d\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -1372,18 +1372,18 @@ winMultiWindowXMsgProcErrorHandler(Display * pDisplay, XErrorEvent * pErr)
char pszErrorMsg[100];
XGetErrorText(pDisplay, pErr->error_code, pszErrorMsg, sizeof(pszErrorMsg));
- ErrorF ("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n"
- " errorCode %d\n"
- " serial %d\n"
- " resourceID 0x%x\n"
- " majorCode %d\n"
- " minorCode %d\n"
- , pszErrorMsg
- , pErr->error_code
- , pErr->serial
- , pErr->resourceid
- , pErr->request_code
- , pErr->minor_code);
+ ErrorF("winMultiWindowXMsgProcErrorHandler - ERROR: %s\n"
+ " errorCode %d\n"
+ " serial %d\n"
+ " resourceID 0x%x\n"
+ " majorCode %d\n"
+ " minorCode %d\n"
+ , pszErrorMsg
+ , pErr->error_code
+ , pErr->serial
+ , pErr->resourceid
+ , pErr->request_code
+ , pErr->minor_code);
return 0;
}
@@ -1415,10 +1415,10 @@ winMultiWindowXMsgProcIOErrorHandler(Display * pDisplay)
static void
winMultiWindowThreadExit(void *arg)
{
- AbortDDX(EXIT_ERR_ABORT);
+ AbortDDX(EXIT_ERR_ABORT);
- /* multiwindow client thread has exited, stop server as well */
- TerminateProcess(GetCurrentProcess(),1);
+ /* multiwindow client thread has exited, stop server as well */
+ TerminateProcess(GetCurrentProcess(),1);
}
/*
* Catch RedirectError to detect other window manager running
@@ -1471,7 +1471,7 @@ CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen,
void
winDeinitMultiWindowWM(void)
{
- winDebug ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
+ winDebug("winDeinitMultiWindowWM - Noting shutdown in progress\n");
g_shutdown = TRUE;
}
@@ -1627,13 +1627,11 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle)
#define APPLICATION_ID_FORMAT "%s.vcxsrv.%s"
#define APPLICATION_ID_UNKNOWN "unknown"
- if (class_hint.res_class)
- {
- asprintf (&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, class_hint.res_class);
+ if (class_hint.res_class) {
+ asprintf (&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, class_hint.res_class);
}
- else
- {
- asprintf (&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, APPLICATION_ID_UNKNOWN);
+ else {
+ asprintf (&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, APPLICATION_ID_UNKNOWN);
}
winSetAppID (hWnd, application_id);
@@ -1694,8 +1692,8 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle)
if (!IsWindow (hWnd))
{
- ErrorF("Windows window 0x%x has become invalid, so returning without applying hints\n",hWnd);
- return;
+ ErrorF("Windows window 0x%x has become invalid, so returning without applying hints\n",hWnd);
+ return;
}
if (winMultiWindowGetWMNormalHints(pWin, &SizeHints))
diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h
index ffb744e66..8757f15e2 100644
--- a/xorg-server/hw/xwin/winwindow.h
+++ b/xorg-server/hw/xwin/winwindow.h
@@ -162,9 +162,6 @@ winTaskbarDestroy (void);
void
winSetAppID (HWND hWnd, const char* AppID);
-/*
- * winmultiwindowicons.c
- */
#endif /* XWIN_MULTIWINDOW */
#endif
diff --git a/xorg-server/include/extinit.h b/xorg-server/include/extinit.h
index 6c5337fc2..7f4718f2f 100644
--- a/xorg-server/include/extinit.h
+++ b/xorg-server/include/extinit.h
@@ -83,7 +83,6 @@ extern void GEExtensionInit(void);
#ifdef GLXEXT
extern _X_EXPORT Bool noGlxExtension;
-extern void GlxExtensionInit(void);
#endif
#ifdef PANORAMIX
diff --git a/xorg-server/include/glx_extinit.h b/xorg-server/include/glx_extinit.h
new file mode 100644
index 000000000..ad4741dd1
--- /dev/null
+++ b/xorg-server/include/glx_extinit.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+ * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall not
+ * be used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from the XFree86 Project.
+ */
+
+#ifndef GLX_EXT_INIT_H
+#define GLX_EXT_INIT_H
+
+/* this is separate due to sdksyms pulling in extinit.h */
+#ifdef GLXEXT
+extern void GlxExtensionInit(void);
+#endif
+
+#endif
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index ae28ac567..3e3d97011 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -1245,6 +1245,7 @@ OsBlockSignals(void)
#ifdef SIG_BLOCK
static sig_atomic_t sigio_blocked;
+static sigset_t PreviousSigIOMask;
#endif
/**
@@ -1257,13 +1258,13 @@ OsBlockSIGIO(void)
#ifdef SIGIO
#ifdef SIG_BLOCK
if (sigio_blocked++ == 0) {
- sigset_t set, old;
+ sigset_t set;
int ret;
sigemptyset(&set);
sigaddset(&set, SIGIO);
- sigprocmask(SIG_BLOCK, &set, &old);
- ret = sigismember(&old, SIGIO);
+ sigprocmask(SIG_BLOCK, &set, &PreviousSigIOMask);
+ ret = sigismember(&PreviousSigIOMask, SIGIO);
return ret;
} else
#endif
@@ -1279,11 +1280,7 @@ OsReleaseSIGIO(void)
#ifdef SIGIO
#ifdef SIG_BLOCK
if (--sigio_blocked == 0) {
- sigset_t set;
-
- sigemptyset(&set);
- sigaddset(&set, SIGIO);
- sigprocmask(SIG_UNBLOCK, &set, NULL);
+ sigprocmask(SIG_SETMASK, &PreviousSigIOMask, 0);
} else if (sigio_blocked < 0) {
BUG_WARN(sigio_blocked < 0);
sigio_blocked = 0;
diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c
index ae1218e0e..c0fa709a0 100644
--- a/xorg-server/randr/rrmode.c
+++ b/xorg-server/randr/rrmode.c
@@ -89,8 +89,10 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen)
}
mode->mode.id = FakeClientID(0);
- if (!AddResource(mode->mode.id, RRModeType, (pointer) mode))
+ if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) {
+ free(newModes);
return NULL;
+ }
modes = newModes;
modes[num_modes++] = mode;
diff --git a/xorg-server/randr/rrproperty.c b/xorg-server/randr/rrproperty.c
index dc4a9f7a3..dcc640e29 100644
--- a/xorg-server/randr/rrproperty.c
+++ b/xorg-server/randr/rrproperty.c
@@ -216,6 +216,8 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
!pScrPriv->rrOutputSetProperty(output->pScreen, output,
prop->propertyName, &new_value)) {
free(new_value.data);
+ if (add)
+ RRDestroyOutputProperty(prop);
return BadValue;
}
free(prop_value->data);
@@ -340,12 +342,18 @@ RRConfigureOutputProperty(RROutputPtr output, Atom property,
/*
* ranges must have even number of values
*/
- if (range && (num_values & 1))
+ if (range && (num_values & 1)) {
+ if (add)
+ RRDestroyOutputProperty(prop);
return BadMatch;
+ }
new_values = malloc(num_values * sizeof(INT32));
- if (!new_values && num_values)
+ if (!new_values && num_values) {
+ if (add)
+ RRDestroyOutputProperty(prop);
return BadAlloc;
+ }
if (num_values)
memcpy(new_values, values, num_values * sizeof(INT32));
diff --git a/xorg-server/randr/rrproviderproperty.c b/xorg-server/randr/rrproviderproperty.c
index a24d9d784..be54f259e 100644
--- a/xorg-server/randr/rrproviderproperty.c
+++ b/xorg-server/randr/rrproviderproperty.c
@@ -216,6 +216,8 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
if (pending && pScrPriv->rrProviderSetProperty &&
!pScrPriv->rrProviderSetProperty(provider->pScreen, provider,
prop->propertyName, &new_value)) {
+ if (add)
+ RRDestroyProviderProperty(prop);
free(new_value.data);
return BadValue;
}
@@ -342,12 +344,18 @@ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
/*
* ranges must have even number of values
*/
- if (range && (num_values & 1))
+ if (range && (num_values & 1)) {
+ if (add)
+ RRDestroyProviderProperty(prop);
return BadMatch;
+ }
new_values = malloc(num_values * sizeof(INT32));
- if (!new_values && num_values)
+ if (!new_values && num_values) {
+ if (add)
+ RRDestroyProviderProperty(prop);
return BadAlloc;
+ }
if (num_values)
memcpy(new_values, values, num_values * sizeof(INT32));
diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c
index 63e2a318b..86a19757b 100644
--- a/xorg-server/randr/rrxinerama.c
+++ b/xorg-server/randr/rrxinerama.c
@@ -156,6 +156,7 @@ static int
RRXineramaScreenCount(ScreenPtr pScreen)
{
int i, n;
+ ScreenPtr slave;
n = 0;
if (rrGetScrPriv(pScreen)) {
@@ -164,6 +165,15 @@ RRXineramaScreenCount(ScreenPtr pScreen)
if (RRXineramaCrtcActive(pScrPriv->crtcs[i]))
n++;
}
+
+ xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+ rrScrPrivPtr pSlavePriv;
+ pSlavePriv = rrGetScrPriv(slave);
+ for (i = 0; i < pSlavePriv->numCrtcs; i++)
+ if (RRXineramaCrtcActive(pSlavePriv->crtcs[i]))
+ n++;
+ }
+
return n;
}
@@ -307,6 +317,7 @@ ProcRRXineramaQueryScreens(ClientPtr client)
xXineramaQueryScreensReply rep;
ScreenPtr pScreen = screenInfo.screens[RR_XINERAMA_SCREEN];
int n = 0;
+ int i;
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
@@ -329,8 +340,8 @@ ProcRRXineramaQueryScreens(ClientPtr client)
WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep);
if (n) {
+ ScreenPtr slave;
rrScrPriv(pScreen);
- int i;
int has_primary = 0;
if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) {
@@ -346,6 +357,13 @@ ProcRRXineramaQueryScreens(ClientPtr client)
}
RRXineramaWriteCrtc(client, pScrPriv->crtcs[i]);
}
+
+ xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+ rrScrPrivPtr pSlavePriv;
+ pSlavePriv = rrGetScrPriv(slave);
+ for (i = 0; i < pSlavePriv->numCrtcs; i++)
+ RRXineramaWriteCrtc(client, pSlavePriv->crtcs[i]);
+ }
}
return Success;
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index aa018c962..34f53fc1e 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -23,11 +23,9 @@ INCLUDES += -I$(top_srcdir)/hw/xfree86/parser \
endif
TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
-if XORG
if SPECIAL_DTRACE_OBJECTS
TEST_LDADD += $(OS_LIB) $(DIX_LIB)
endif
-endif
xkb_LDADD=$(TEST_LDADD)
input_LDADD=$(TEST_LDADD)
diff --git a/xorg-server/test/os.c b/xorg-server/test/os.c
index 1460a34d6..8f1107ded 100644
--- a/xorg-server/test/os.c
+++ b/xorg-server/test/os.c
@@ -28,6 +28,21 @@
#include <signal.h>
#include "os.h"
+static int last_signal = 0;
+static int expect_signal = 0;
+
+static void sighandler(int signal)
+{
+ assert(expect_signal);
+ expect_signal = 0;
+ if (!last_signal)
+ raise(signal);
+ OsBlockSignals();
+ OsReleaseSignals();
+ last_signal = 1;
+ expect_signal = 1;
+}
+
static int
sig_is_blocked(int sig)
{
@@ -118,7 +133,27 @@ static void block_sigio_test(void)
assert(sig_is_blocked(SIGIO));
OsReleaseSignals();
assert(!sig_is_blocked(SIGIO));
+#endif
+}
+static void block_sigio_test_nested(void)
+{
+#ifdef SIG_BLOCK
+ /* Check for bug releasing SIGIO during SIGIO signal handling.
+ test case:
+ raise signal
+ → in signal handler:
+ raise signal
+ OsBlockSignals()
+ OsReleaseSignals()
+ tail guard
+ tail guard must be hit.
+ */
+ sighandler_t old_handler;
+ old_handler = signal(SIGIO, sighandler);
+ expect_signal = 1;
+ assert(raise(SIGIO) == 0);
+ assert(signal(SIGIO, old_handler) == sighandler);
#endif
}
@@ -126,5 +161,6 @@ int
main(int argc, char **argv)
{
block_sigio_test();
+ block_sigio_test_nested();
return 0;
}
diff --git a/xorg-server/xkeyboard-config/symbols/de b/xorg-server/xkeyboard-config/symbols/de
index 5e412f6a0..9793952d6 100644
--- a/xorg-server/xkeyboard-config/symbols/de
+++ b/xorg-server/xkeyboard-config/symbols/de
@@ -26,7 +26,7 @@ xkb_symbols "basic" {
key <AD03> { [ e, E, EuroSign, EuroSign ] };
key <AD06> { [ z, Z, leftarrow, yen ] };
key <AD11> { [udiaeresis, Udiaeresis, dead_diaeresis, dead_abovering ] };
- key <AD12> { [ plus, asterisk, dead_tilde, dead_macron ] };
+ key <AD12> { [ plus, asterisk, asciitilde, macron ] };
key <AC02> { [ s, S, U017F, U1E9E ] };
key <AC07> { [ j, J, dead_belowdot, dead_abovedot ] };