aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesalib/src/glsl/Makefile.sources2
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp1
-rw-r--r--mesalib/src/glsl/ir_optimization.h1
-rw-r--r--mesalib/src/glsl/linker.cpp11
-rw-r--r--mesalib/src/glsl/lower_discard_flow.cpp144
-rw-r--r--mesalib/src/glsl/opt_discard_simplification.cpp205
-rw-r--r--mesalib/src/glsl/test_optpass.cpp2
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp10
-rw-r--r--mesalib/src/mesa/main/version.c12
-rw-r--r--xorg-server/Xi/chgptr.h6
-rw-r--r--xorg-server/dix/enterleave.h8
-rw-r--r--xorg-server/dix/events.c2
-rw-r--r--xorg-server/dix/ptrveloc.c3
-rw-r--r--xorg-server/exa/exa.c3
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.h3
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86xv.c1
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvmc.c2
-rw-r--r--xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h4
-rw-r--r--xorg-server/include/dixevents.h7
-rw-r--r--xorg-server/include/input.h3
-rw-r--r--xorg-server/include/resource.h3
-rw-r--r--xorg-server/mi/miinitext.c59
-rw-r--r--xorg-server/miext/shadow/shrotpackYX.h3
-rw-r--r--xorg-server/randr/randrstr.h19
-rw-r--r--xorg-server/randr/rrtransform.h7
-rw-r--r--xorg-server/xfixes/region.c1
-rw-r--r--xorg-server/xkb/xkbAccessX.c1
-rw-r--r--xorg-server/xkb/xkbActions.c1
29 files changed, 193 insertions, 333 deletions
diff --git a/mesalib/src/glsl/Makefile.sources b/mesalib/src/glsl/Makefile.sources
index 5621e42b2..fba03604c 100644
--- a/mesalib/src/glsl/Makefile.sources
+++ b/mesalib/src/glsl/Makefile.sources
@@ -51,6 +51,7 @@ LIBGLSL_CXX_FILES := \
loop_unroll.cpp \
lower_clip_distance.cpp \
lower_discard.cpp \
+ lower_discard_flow.cpp \
lower_if_to_cond_assign.cpp \
lower_instructions.cpp \
lower_jumps.cpp \
@@ -72,7 +73,6 @@ LIBGLSL_CXX_FILES := \
opt_dead_code.cpp \
opt_dead_code_local.cpp \
opt_dead_functions.cpp \
- opt_discard_simplification.cpp \
opt_function_inlining.cpp \
opt_if_simplification.cpp \
opt_noop_swizzle.cpp \
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index 6f1c86b43..46f21dd07 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -1044,7 +1044,6 @@ do_common_optimization(exec_list *ir, bool linked,
progress = do_structure_splitting(ir) || progress;
}
progress = do_if_simplification(ir) || progress;
- progress = do_discard_simplification(ir) || progress;
progress = do_copy_propagation(ir) || progress;
progress = do_copy_propagation_elements(ir) || progress;
if (linked)
diff --git a/mesalib/src/glsl/ir_optimization.h b/mesalib/src/glsl/ir_optimization.h
index 356783583..c435d7717 100644
--- a/mesalib/src/glsl/ir_optimization.h
+++ b/mesalib/src/glsl/ir_optimization.h
@@ -66,6 +66,7 @@ bool do_tree_grafting(exec_list *instructions);
bool do_vec_index_to_cond_assign(exec_list *instructions);
bool do_vec_index_to_swizzle(exec_list *instructions);
bool lower_discard(exec_list *instructions);
+void lower_discard_flow(exec_list *instructions);
bool lower_instructions(exec_list *instructions, unsigned what_to_lower);
bool lower_noise(exec_list *instructions);
bool lower_variable_index_to_cond_assign(exec_list *instructions,
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index 6ba297237..bdab499f0 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -2296,6 +2296,17 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
prog->LinkStatus = true;
}
+ /* Implement the GLSL 1.30+ rule for discard vs infinite loops Do
+ * it before optimization because we want most of the checks to get
+ * dropped thanks to constant propagation.
+ */
+ if (max_version >= 130) {
+ struct gl_shader *sh = prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ if (sh) {
+ lower_discard_flow(sh->ir);
+ }
+ }
+
/* Do common optimization before assigning storage for attributes,
* uniforms, and varyings. Later optimization could possibly make
* some of that unused.
diff --git a/mesalib/src/glsl/lower_discard_flow.cpp b/mesalib/src/glsl/lower_discard_flow.cpp
new file mode 100644
index 000000000..d385c1435
--- /dev/null
+++ b/mesalib/src/glsl/lower_discard_flow.cpp
@@ -0,0 +1,144 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
+/** @file lower_discard_flow.cpp
+ *
+ * Implements the GLSL 1.30 revision 9 rule for fragment shader
+ * discard handling:
+ *
+ * "Control flow exits the shader, and subsequent implicit or
+ * explicit derivatives are undefined when this control flow is
+ * non-uniform (meaning different fragments within the primitive
+ * take different control paths)."
+ *
+ * There seem to be two conflicting things here. "Control flow exits
+ * the shader" sounds like the discarded fragments should effectively
+ * jump to the end of the shader, but that breaks derivatives in the
+ * case of uniform control flow and causes rendering failure in the
+ * bushes in Unigine Tropics.
+ *
+ * The question, then, is whether the intent was "loops stop at the
+ * point that the only active channels left are discarded pixels" or
+ * "discarded pixels become inactive at the point that control flow
+ * returns to the top of a loop". This implements the second
+ * interpretation.
+ */
+
+#include "glsl_types.h"
+#include "ir.h"
+#include "program/hash_table.h"
+
+class lower_discard_flow_visitor : public ir_hierarchical_visitor {
+public:
+ lower_discard_flow_visitor(ir_variable *discarded)
+ : discarded(discarded)
+ {
+ mem_ctx = ralloc_parent(discarded);
+ }
+
+ ~lower_discard_flow_visitor()
+ {
+ }
+
+ ir_visitor_status visit_enter(ir_discard *ir);
+ ir_visitor_status visit_enter(ir_loop_jump *ir);
+ ir_visitor_status visit_enter(ir_loop *ir);
+ ir_visitor_status visit_enter(ir_function_signature *ir);
+
+ ir_if *generate_discard_break();
+
+ ir_variable *discarded;
+ void *mem_ctx;
+};
+
+ir_visitor_status
+lower_discard_flow_visitor::visit_enter(ir_loop_jump *ir)
+{
+ if (ir->mode != ir_loop_jump::jump_continue)
+ return visit_continue;
+
+ ir->insert_before(generate_discard_break());
+
+ return visit_continue;
+}
+
+ir_visitor_status
+lower_discard_flow_visitor::visit_enter(ir_discard *ir)
+{
+ ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded);
+ ir_rvalue *rhs = new(mem_ctx) ir_constant(true);
+ ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, rhs);
+ ir->insert_before(assign);
+
+ return visit_continue;
+}
+
+ir_visitor_status
+lower_discard_flow_visitor::visit_enter(ir_loop *ir)
+{
+ ir->body_instructions.push_tail(generate_discard_break());
+
+ return visit_continue;
+}
+
+ir_visitor_status
+lower_discard_flow_visitor::visit_enter(ir_function_signature *ir)
+{
+ if (strcmp(ir->function_name(), "main") != 0)
+ return visit_continue;
+
+ ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(discarded);
+ ir_rvalue *rhs = new(mem_ctx) ir_constant(false);
+ ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, rhs);
+ ir->body.push_head(assign);
+
+ return visit_continue;
+}
+
+ir_if *
+lower_discard_flow_visitor::generate_discard_break()
+{
+ ir_rvalue *if_condition = new(mem_ctx) ir_dereference_variable(discarded);
+ ir_if *if_inst = new(mem_ctx) ir_if(if_condition);
+
+ ir_instruction *br = new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_break);
+ if_inst->then_instructions.push_tail(br);
+
+ return if_inst;
+}
+
+void
+lower_discard_flow(exec_list *ir)
+{
+ void *mem_ctx = ir;
+
+ ir_variable *var = new(mem_ctx) ir_variable(glsl_type::bool_type,
+ "discarded",
+ ir_var_temporary);
+
+ ir->push_head(var);
+
+ lower_discard_flow_visitor v(var);
+
+ visit_list_elements(&v, ir);
+}
diff --git a/mesalib/src/glsl/opt_discard_simplification.cpp b/mesalib/src/glsl/opt_discard_simplification.cpp
deleted file mode 100644
index ba4981bae..000000000
--- a/mesalib/src/glsl/opt_discard_simplification.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * 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 (including the next
- * paragraph) 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,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS 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.
- */
-
-/**
- * \file opt_discard_simplification.cpp
- *
- * This pass simplifies if-statements and loops containing unconditional
- * discards.
- *
- * Case 1: Both branches contain unconditional discards:
- * -----------------------------------------------------
- *
- * if (cond) {
- * s1;
- * discard;
- * s2;
- * } else {
- * s3;
- * discard;
- * s4;
- * }
- *
- * becomes:
- *
- * discard
- *
- * Case 2: The "then" clause contains an unconditional discard:
- * ------------------------------------------------------------
- *
- * if (cond) {
- * s1;
- * discard;
- * s2;
- * } else {
- * s3;
- * }
- *
- * becomes:
- *
- * if (cond) {
- * discard;
- * } else {
- * s3;
- * }
- *
- * Case 3: The "else" clause contains an unconditional discard:
- * ------------------------------------------------------------
- *
- * if (cond) {
- * s1;
- * } else {
- * s2;
- * discard;
- * s3;
- * }
- *
- * becomes:
- *
- * if (cond) {
- * s1;
- * } else {
- * discard;
- * }
- */
-
-#include "glsl_types.h"
-#include "ir.h"
-
-class discard_simplifier : public ir_hierarchical_visitor {
-public:
- discard_simplifier()
- {
- this->progress = false;
- }
-
- ir_visitor_status visit_enter(ir_if *);
- ir_visitor_status visit_enter(ir_loop *);
- ir_visitor_status visit_enter(ir_assignment *);
-
- bool progress;
-};
-
-static ir_discard *
-find_unconditional_discard(exec_list &instructions)
-{
- foreach_list(n, &instructions) {
- ir_instruction *ir = (ir_instruction *)n;
-
- if (ir->ir_type == ir_type_return ||
- ir->ir_type == ir_type_loop_jump)
- return NULL;
-
- /* So far, this code doesn't know how to look inside of flow
- * control to see if a discard later on at this level is
- * unconditional.
- */
- if (ir->ir_type == ir_type_if ||
- ir->ir_type == ir_type_loop)
- return NULL;
-
- ir_discard *discard = ir->as_discard();
- if (discard != NULL && discard->condition == NULL)
- return discard;
- }
- return NULL;
-}
-
-static bool
-is_only_instruction(ir_discard *discard)
-{
- return (discard->prev->is_head_sentinel() &&
- discard->next->is_tail_sentinel());
-}
-
-/* We only care about the top level instructions, so don't descend
- * into expressions.
- */
-ir_visitor_status
-discard_simplifier::visit_enter(ir_assignment *ir)
-{
- (void) ir;
- return visit_continue_with_parent;
-}
-
-ir_visitor_status
-discard_simplifier::visit_enter(ir_if *ir)
-{
- ir_discard *then_discard = find_unconditional_discard(ir->then_instructions);
- ir_discard *else_discard = find_unconditional_discard(ir->else_instructions);
-
- if (then_discard == NULL && else_discard == NULL)
- return visit_continue;
-
- /* If both branches result in discard, replace whole if with discard. */
- if (then_discard != NULL && else_discard != NULL) {
- this->progress = true;
- ir->replace_with(then_discard);
- return visit_continue_with_parent;
- }
-
- /* Otherwise, one branch has a discard. */
- if (then_discard != NULL && !is_only_instruction(then_discard)) {
- this->progress = true;
- ir->then_instructions.make_empty();
- ir->then_instructions.push_tail(then_discard);
- } else if (else_discard != NULL && !is_only_instruction(else_discard)) {
- this->progress = true;
- ir->else_instructions.make_empty();
- ir->else_instructions.push_tail(else_discard);
- }
-
- visit_list_elements(this, &ir->then_instructions);
- return visit_continue_with_parent;
-}
-
-ir_visitor_status
-discard_simplifier::visit_enter(ir_loop *ir)
-{
- ir_discard *discard = find_unconditional_discard(ir->body_instructions);
-
- if (discard) {
- ir->replace_with(discard);
- return visit_continue_with_parent;
- }
-
- return visit_continue;
-}
-
-bool
-do_discard_simplification(exec_list *instructions)
-{
- /* Look for a top-level unconditional discard */
- ir_discard *discard = find_unconditional_discard(*instructions);
- if (discard != NULL) {
- instructions->make_empty();
- instructions->push_tail(discard);
- return true;
- }
-
- discard_simplifier v;
-
- visit_list_elements(&v, instructions);
-
- return v.progress;
-}
diff --git a/mesalib/src/glsl/test_optpass.cpp b/mesalib/src/glsl/test_optpass.cpp
index 6abafb5d3..31f65c3d2 100644
--- a/mesalib/src/glsl/test_optpass.cpp
+++ b/mesalib/src/glsl/test_optpass.cpp
@@ -98,8 +98,6 @@ do_optimization(struct exec_list *ir, const char *optimization)
return do_lower_texture_projection(ir);
} else if (strcmp(optimization, "do_if_simplification") == 0) {
return do_if_simplification(ir);
- } else if (strcmp(optimization, "do_discard_simplification") == 0) {
- return do_discard_simplification(ir);
} else if (sscanf(optimization, "lower_if_to_cond_assign ( %d ) ",
&int_0) == 1) {
return lower_if_to_cond_assign(ir, int_0);
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index da41ee84c..08d330a52 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -782,6 +782,16 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
return;
}
+ /* GL_INVALID_VALUE is generated if `transpose' is not GL_FALSE.
+ * http://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml */
+ if (ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2) {
+ if (transpose) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glUniformMatrix(matrix transpose is not GL_FALSE)");
+ return;
+ }
+ }
+
if (ctx->Shader.Flags & GLSL_UNIFORMS) {
log_uniform(values, GLSL_TYPE_FLOAT, components, vectors, count,
bool(transpose), shProg, location, uni);
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c
index 607230b5e..90afecb5d 100644
--- a/mesalib/src/mesa/main/version.c
+++ b/mesalib/src/mesa/main/version.c
@@ -259,7 +259,11 @@ compute_version_es1(struct gl_context *ctx)
ctx->VersionString = (char *) malloc(max);
if (ctx->VersionString) {
_mesa_snprintf(ctx->VersionString, max,
- "OpenGL ES-CM 1.%d Mesa " MESA_VERSION_STRING,
+ "OpenGL ES-CM 1.%d Mesa " MESA_VERSION_STRING
+#ifdef MESA_GIT_SHA1
+ " (" MESA_GIT_SHA1 ")"
+#endif
+ ,
ctx->VersionMinor);
}
}
@@ -289,7 +293,11 @@ compute_version_es2(struct gl_context *ctx)
ctx->VersionString = (char *) malloc(max);
if (ctx->VersionString) {
_mesa_snprintf(ctx->VersionString, max,
- "OpenGL ES 2.0 Mesa " MESA_VERSION_STRING);
+ "OpenGL ES 2.0 Mesa " MESA_VERSION_STRING
+#ifdef MESA_GIT_SHA1
+ " (" MESA_GIT_SHA1 ")"
+#endif
+ );
}
}
diff --git a/xorg-server/Xi/chgptr.h b/xorg-server/Xi/chgptr.h
index 47265b3bc..275511ffc 100644
--- a/xorg-server/Xi/chgptr.h
+++ b/xorg-server/Xi/chgptr.h
@@ -39,10 +39,4 @@ int ProcXChangePointerDevice(ClientPtr /* client */
void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */
);
-void SendEventToAllWindows(DeviceIntPtr /* dev */ ,
- Mask /* mask */ ,
- xEvent * /* ev */ ,
- int /* count */
- );
-
#endif /* CHGPTR_H */
diff --git a/xorg-server/dix/enterleave.h b/xorg-server/dix/enterleave.h
index c1729f8da..c937c0e7f 100644
--- a/xorg-server/dix/enterleave.h
+++ b/xorg-server/dix/enterleave.h
@@ -31,13 +31,12 @@
#ifndef ENTERLEAVE_H
#define ENTERLEAVE_H
+#include <dix.h> /* DoFocusEvents() */
+
extern void DoEnterLeaveEvents(DeviceIntPtr pDev,
int sourceid,
WindowPtr fromWin, WindowPtr toWin, int mode);
-extern void DoFocusEvents(DeviceIntPtr pDev,
- WindowPtr fromWin, WindowPtr toWin, int mode);
-
extern void EnterLeaveEvent(DeviceIntPtr mouse,
int type,
int mode, int detail, WindowPtr pWin, Window child);
@@ -61,9 +60,6 @@ extern void LeaveWindow(DeviceIntPtr dev);
extern void CoreFocusEvent(DeviceIntPtr kbd,
int type, int mode, int detail, WindowPtr pWin);
-extern void DeviceFocusEvent(DeviceIntPtr kbd,
- int type, int mode, int detail, WindowPtr pWin);
-
extern void SetFocusIn(DeviceIntPtr kbd, WindowPtr win);
extern void SetFocusOut(DeviceIntPtr dev);
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 9496b6f19..83ae5c965 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -349,8 +349,6 @@ IsFloating(DeviceIntPtr dev)
*/
extern int lastEvent;
-extern int DeviceMotionNotify;
-
#define CantBeFiltered NoEventMask
/**
* Event masks for each event type.
diff --git a/xorg-server/dix/ptrveloc.c b/xorg-server/dix/ptrveloc.c
index acbb479c1..a788575ca 100644
--- a/xorg-server/dix/ptrveloc.c
+++ b/xorg-server/dix/ptrveloc.c
@@ -61,10 +61,7 @@
****************************************************************************/
/* fwds */
-int
- SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
static double
-
SimpleSmoothProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity,
double threshold, double acc);
static PointerAccelerationProfileFunc
diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c
index 754c8305a..e22f2f022 100644
--- a/xorg-server/exa/exa.c
+++ b/xorg-server/exa/exa.c
@@ -483,9 +483,6 @@ static void
exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
static void
- exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
-
-static void
exaDestroyClip(GCPtr pGC);
const GCFuncs exaGCFuncs = {
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index 6c2f29309..293798aa0 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -552,9 +552,6 @@ void
KdEnableInput(void);
void
- ProcessInputEvents(void);
-
-void
KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration);
/* kmode.c */
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index e16fe78f2..66cdf675a 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -702,8 +702,6 @@ KdKbdCtrl(DeviceIntPtr pDevice, KeybdCtrl * ctrl)
ki->bellDuration = ctrl->bell_duration;
}
-extern KeybdCtrl defaultKeyboardControl;
-
static int
KdKeyboardProc(DeviceIntPtr pDevice, int onoff)
{
diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c
index 88e2f314b..0e5b0cf0f 100644
--- a/xorg-server/hw/xfree86/common/xf86xv.c
+++ b/xorg-server/hw/xfree86/common/xf86xv.c
@@ -51,7 +51,6 @@
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvproto.h>
#include "xvdix.h"
-#include "xvmodproc.h"
#include "xf86xvpriv.h"
diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.c b/xorg-server/hw/xfree86/common/xf86xvmc.c
index e58465289..7321efa43 100644
--- a/xorg-server/hw/xfree86/common/xf86xvmc.c
+++ b/xorg-server/hw/xfree86/common/xf86xvmc.c
@@ -40,8 +40,6 @@
#include "resource.h"
#include "dixstruct.h"
-#include "xvmodproc.h"
-
#include "xf86xvpriv.h"
#include "xf86xvmc.h"
diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
index be51e559d..009054760 100644
--- a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
+++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
@@ -3,6 +3,8 @@
#include <dix-config.h>
#endif
+#ifndef XVMODPROC_H
+#define XVMODPROC_H
#include "xvmcext.h"
extern DevPrivateKey (*XvGetScreenKeyProc) (void);
@@ -11,3 +13,5 @@ extern int (*XvScreenInitProc) (ScreenPtr);
extern int (*XvMCScreenInitProc) (ScreenPtr, int, XvMCAdaptorPtr);
extern void XvRegister(void);
+
+#endif /* XVMODPROC_H */
diff --git a/xorg-server/include/dixevents.h b/xorg-server/include/dixevents.h
index c8f384ea5..d4729697c 100644
--- a/xorg-server/include/dixevents.h
+++ b/xorg-server/include/dixevents.h
@@ -77,11 +77,4 @@ extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */ );
extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */ );
-#ifdef PANORAMIX
-extern _X_EXPORT void PostSyntheticMotion(DeviceIntPtr pDev,
- int x,
- int y,
- int screen, unsigned long time);
-#endif
-
#endif /* DIXEVENTS_H */
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 991d64813..bcf98a63e 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -472,6 +472,9 @@ extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
extern _X_EXPORT void QueueProximityEvents(DeviceIntPtr pDev,
int type, const ValuatorMask *mask);
+#ifdef PANORAMIX
+_X_EXPORT
+#endif
extern void PostSyntheticMotion(DeviceIntPtr pDev,
int x, int y, int screen, unsigned long time);
diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h
index 19f46d108..4a8dc3169 100644
--- a/xorg-server/include/resource.h
+++ b/xorg-server/include/resource.h
@@ -177,9 +177,6 @@ typedef void (*FindTypeSubResources)(pointer /* value */,
FindAllRes /* func */,
pointer /* cdata */);
-extern _X_EXPORT void SetResourceTypeErrorValue(RESTYPE /*type */ ,
- int /*errorValue */ );
-
extern _X_EXPORT SizeType GetResourceTypeSizeFunc(
RESTYPE /*type*/);
diff --git a/xorg-server/mi/miinitext.c b/xorg-server/mi/miinitext.c
index 6ceae0537..ca21b6fe5 100644
--- a/xorg-server/mi/miinitext.c
+++ b/xorg-server/mi/miinitext.c
@@ -93,64 +93,6 @@ SOFTWARE.
#include "micmap.h"
#include "globals.h"
-extern Bool noTestExtensions;
-
-#ifdef COMPOSITE
-extern Bool noCompositeExtension;
-#endif
-#ifdef DBE
-extern Bool noDbeExtension;
-#endif
-#ifdef DPMSExtension
-extern Bool noDPMSExtension;
-#endif
-#ifdef GLXEXT
-extern Bool noGlxExtension;
-#endif
-#ifdef SCREENSAVER
-extern Bool noScreenSaverExtension;
-#endif
-#ifdef MITSHM
-extern Bool noMITShmExtension;
-#endif
-#ifdef RANDR
-extern Bool noRRExtension;
-#endif
-extern Bool noRenderExtension;
-
-#ifdef XCSECURITY
-extern Bool noSecurityExtension;
-#endif
-#ifdef RES
-extern Bool noResExtension;
-#endif
-#ifdef XF86BIGFONT
-extern Bool noXFree86BigfontExtension;
-#endif
-#ifdef XFreeXDGA
-extern Bool noXFree86DGAExtension;
-#endif
-#ifdef XF86DRI
-extern Bool noXFree86DRIExtension;
-#endif
-#ifdef XF86VIDMODE
-extern Bool noXFree86VidModeExtension;
-#endif
-#ifdef XFIXES
-extern Bool noXFixesExtension;
-#endif
-#ifdef PANORAMIX
-extern Bool noPanoramiXExtension;
-#endif
-#ifdef INXQUARTZ
-extern Bool noPseudoramiXExtension;
-#endif
-#ifdef XSELINUX
-extern Bool noSELinuxExtension;
-#endif
-#ifdef XV
-extern Bool noXvExtension;
-#endif
extern Bool noGEExtension;
#ifndef XFree86LOADER
@@ -265,7 +207,6 @@ extern void DamageExtensionInit(INITARGS);
#ifdef COMPOSITE
extern void CompositeExtensionInit(INITARGS);
#endif
-extern void GEExtensionInit(INITARGS);
/* The following is only a small first step towards run-time
* configurable extensions.
diff --git a/xorg-server/miext/shadow/shrotpackYX.h b/xorg-server/miext/shadow/shrotpackYX.h
index 57fcf22fa..f3df6c549 100644
--- a/xorg-server/miext/shadow/shrotpackYX.h
+++ b/xorg-server/miext/shadow/shrotpackYX.h
@@ -54,9 +54,6 @@
#endif
void
- FUNC(ScreenPtr pScreen, shadowBufPtr pBuf);
-
-void
FUNC(ScreenPtr pScreen, shadowBufPtr pBuf)
{
RegionPtr damage = shadowDamage(pBuf);
diff --git a/xorg-server/randr/randrstr.h b/xorg-server/randr/randrstr.h
index 273885de7..1c0e9d4db 100644
--- a/xorg-server/randr/randrstr.h
+++ b/xorg-server/randr/randrstr.h
@@ -575,25 +575,6 @@ extern _X_EXPORT void
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
/*
- * Compute the complete transformation matrix including
- * client-specified transform, rotation/reflection values and the crtc
- * offset.
- *
- * Return TRUE if the resulting transform is not a simple translation.
- */
-extern _X_EXPORT Bool
-
-RRTransformCompute(int x,
- int y,
- int width,
- int height,
- Rotation rotation,
- RRTransformPtr rr_transform,
- PictTransformPtr transform,
- struct pict_f_transform *f_transform,
- struct pict_f_transform *f_inverse);
-
-/*
* Return crtc transform
*/
extern _X_EXPORT RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc);
diff --git a/xorg-server/randr/rrtransform.h b/xorg-server/randr/rrtransform.h
index efce7e0d7..2269b4cb7 100644
--- a/xorg-server/randr/rrtransform.h
+++ b/xorg-server/randr/rrtransform.h
@@ -57,6 +57,13 @@ RRTransformSetFilter(RRTransformPtr dst,
extern _X_EXPORT Bool
RRTransformCopy(RRTransformPtr dst, RRTransformPtr src);
+/*
+ * Compute the complete transformation matrix including
+ * client-specified transform, rotation/reflection values and the crtc
+ * offset.
+ *
+ * Return TRUE if the resulting transform is not a simple translation.
+ */
extern _X_EXPORT Bool
RRTransformCompute(int x,
diff --git a/xorg-server/xfixes/region.c b/xorg-server/xfixes/region.c
index 624109de1..0acbadae2 100644
--- a/xorg-server/xfixes/region.c
+++ b/xorg-server/xfixes/region.c
@@ -27,7 +27,6 @@
#include "xfixesint.h"
#include "scrnintstr.h"
#include <picturestr.h>
-extern int RenderErrBase;
#include <regionstr.h>
#include <gcstruct.h>
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index 111bf9f40..95e28e789 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/xkb/xkbAccessX.c
@@ -694,7 +694,6 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd)
/* */
/************************************************************************/
extern int xkbDevicePrivateIndex;
-extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
void
ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse)
{
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index 5ec1ed5c6..1adb38921 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -47,7 +47,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
DevPrivateKeyRec xkbDevicePrivateKeyRec;
-void XkbFakeDeviceButton(DeviceIntPtr dev, Bool press, int button);
static void XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags, int x,
int y);