aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_priv.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-04 12:18:13 +0100
committermarha <marha@users.sourceforge.net>2014-03-04 12:23:48 +0100
commit45392e4a0642880b569ea5d4a350cdc395a2c7db (patch)
treec3c2a49de903a18c3f8e1bf79684c29337ebcf7c /xorg-server/glamor/glamor_priv.h
parent5ec0616d4e3c4c6095f4975abbe9c21e5b6af967 (diff)
parent321c01267ae1c446f1bd22b642567fcafa016c02 (diff)
downloadvcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.tar.gz
vcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.tar.bz2
vcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 libxcb mesa xserver xcb-proto xkeyboard-config git update 4 Mar 2014 Conflicts: mesalib/src/mapi/glapi/glapi.h mesalib/src/mapi/glapi/glthread.c mesalib/src/mesa/drivers/dri/common/dri_util.c mesalib/src/mesa/main/bufferobj.c xorg-server/dix/dispatch.c xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/winmultiwindowwm.c
Diffstat (limited to 'xorg-server/glamor/glamor_priv.h')
-rw-r--r--xorg-server/glamor/glamor_priv.h48
1 files changed, 16 insertions, 32 deletions
diff --git a/xorg-server/glamor/glamor_priv.h b/xorg-server/glamor/glamor_priv.h
index dc3873013..fe4b42332 100644
--- a/xorg-server/glamor/glamor_priv.h
+++ b/xorg-server/glamor/glamor_priv.h
@@ -35,23 +35,19 @@
#endif
#include "glamor.h"
-#ifdef GLAMOR_GLES2
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#define GLAMOR_DEFAULT_PRECISION "precision mediump float;\n"
-#include "glamor_glext.h"
-#else
-#include <GL/gl.h>
-#include <GL/glext.h>
-#define GLAMOR_DEFAULT_PRECISION
-#endif
+#include <epoxy/gl.h>
+
+#define GLAMOR_DEFAULT_PRECISION \
+ "#ifdef GL_ES\n" \
+ "precision mediump float;\n" \
+ "#endif\n"
#ifdef RENDER
#include "glyphstr.h"
#endif
#include "glamor_debug.h"
+#include "glamor_context.h"
#include <list.h>
@@ -145,13 +141,6 @@ enum gradient_shader {
SHADER_GRADIENT_COUNT,
};
-enum gradient_shader_prog {
- SHADER_GRADIENT_VS_PROG,
- SHADER_GRADIENT_FS_MAIN_PROG,
- SHADER_GRADIENT_FS_GETCOLOR_PROG,
- SHADER_GRADIENT_PROG_COUNT,
-};
-
struct glamor_screen_private;
struct glamor_pixmap_private;
@@ -178,8 +167,6 @@ typedef struct {
uint16_t evict;
} glamor_glyph_cache_t;
-#include "glamor_gl_dispatch.h"
-
struct glamor_saved_procs {
CloseScreenProcPtr close_screen;
CreateGCProcPtr create_gc;
@@ -202,11 +189,7 @@ struct glamor_saved_procs {
SetWindowPixmapProcPtr set_window_pixmap;
};
-#ifdef GLAMOR_GLES2
#define CACHE_FORMAT_COUNT 3
-#else
-#define CACHE_FORMAT_COUNT 2
-#endif
#define CACHE_BUCKET_WCOUNT 4
#define CACHE_BUCKET_HCOUNT 4
@@ -220,8 +203,7 @@ struct glamor_saved_procs {
#define RENDER_IDEL_MAX 32
typedef struct glamor_screen_private {
- struct glamor_gl_dispatch _dispatch;
- int yInverted;
+ Bool yInverted;
unsigned int tick;
enum glamor_gl_flavor gl_flavor;
int has_pack_invert;
@@ -262,9 +244,7 @@ typedef struct glamor_screen_private {
/* glamor gradient, 0 for small nstops, 1 for
large nstops and 2 for dynamic generate. */
GLint gradient_prog[SHADER_GRADIENT_COUNT][3];
- GLint linear_gradient_shaders[SHADER_GRADIENT_PROG_COUNT][3];
int linear_max_nstops;
- GLint radial_gradient_shaders[SHADER_GRADIENT_PROG_COUNT][3];
int radial_max_nstops;
/* glamor trapezoid shader. */
@@ -288,6 +268,8 @@ typedef struct glamor_screen_private {
/* xv */
GLint xv_prog;
+
+ struct glamor_context ctx;
} glamor_screen_private;
typedef enum glamor_access {
@@ -583,9 +565,8 @@ Bool glamor_stipple(PixmapPtr pixmap, PixmapPtr stipple,
unsigned char alu, unsigned long planemask,
unsigned long fg_pixel, unsigned long bg_pixel,
int stipple_x, int stipple_y);
-GLint glamor_compile_glsl_prog(glamor_gl_dispatch *dispatch, GLenum type,
- const char *source);
-void glamor_link_glsl_prog(glamor_gl_dispatch *dispatch, GLint prog);
+GLint glamor_compile_glsl_prog(GLenum type, const char *source);
+void glamor_link_glsl_prog(GLint prog);
void glamor_get_color_4f_from_pixel(PixmapPtr pixmap,
unsigned long fg_pixel, GLfloat *color);
@@ -604,7 +585,7 @@ glamor_pixmap_fbo *glamor_es2_pixmap_read_prepare(PixmapPtr source, int x,
int no_alpha, int revert,
int swap_rb);
-Bool glamor_set_alu(struct glamor_gl_dispatch *dispatch, unsigned char alu);
+Bool glamor_set_alu(ScreenPtr screen, unsigned char alu);
Bool glamor_set_planemask(PixmapPtr pixmap, unsigned long planemask);
Bool glamor_change_window_attributes(WindowPtr pWin, unsigned long mask);
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
@@ -935,6 +916,9 @@ void glamor_composite_rectangles(CARD8 op,
xRenderColor *color,
int num_rects, xRectangle *rects);
+extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen,
+ struct glamor_context *glamor_ctx);
+
/* glamor_xv */
typedef struct {
uint32_t transform_index;