gles2: Fixed the compilation problem and some bugs.
Previous patch doesn't set the offset to zero for GLESv2 path. Now fix it. This patch also fix a minor problem in pixmap uploading preparation. If the revert is not REVERT_NORMAL, then we don't need to prepare a fbo for it. As current mesa i965 gles2 driver doesn't support to set a A8 texture as a fbo target, we must fix this problem. As some A1/A8 picture need to be uploaded, this is the only place a A8 texture may be attached to a fbo. This patch also enable the shader gradient for GLESv2. The reason we disable it before is that some glsl linker doesn't support link different objects which have cross reference. Now we don't have that problem. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
006fe0e66d
commit
4c27ca4700
|
@ -57,5 +57,8 @@
|
||||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
|
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
|
||||||
|
|
||||||
#define GL_PACK_INVERT_MESA 0x8758
|
#define GL_PACK_INVERT_MESA 0x8758
|
||||||
|
#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
|
||||||
|
#define GL_MAP_READ_BIT 0x0001
|
||||||
|
#define GL_MAP_WRITE_BIT 0x0002
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -612,7 +612,7 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha, int
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!(no_alpha
|
if (!(no_alpha
|
||||||
|| (revert != REVERT_NONE)
|
|| (revert == REVERT_NORMAL)
|
||||||
|| (swap_rb != SWAP_NONE_UPLOADING)
|
|| (swap_rb != SWAP_NONE_UPLOADING)
|
||||||
|| !glamor_priv->yInverted)) {
|
|| !glamor_priv->yInverted)) {
|
||||||
/* We don't need a fbo, a simple texture uploading should work. */
|
/* We don't need a fbo, a simple texture uploading should work. */
|
||||||
|
|
|
@ -1014,10 +1014,8 @@ glamor_composite_rectangles(CARD8 op,
|
||||||
* this will increase performance obviously. */
|
* this will increase performance obviously. */
|
||||||
|
|
||||||
#define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
|
#define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
|
||||||
#ifndef GLAMOR_GLES2
|
|
||||||
#define GLAMOR_GRADIENT_SHADER
|
#define GLAMOR_GRADIENT_SHADER
|
||||||
//#define GLAMOR_TRAPEZOID_SHADER
|
//#define GLAMOR_TRAPEZOID_SHADER
|
||||||
#endif
|
|
||||||
#define GLAMOR_TEXTURED_LARGE_PIXMAP 1
|
#define GLAMOR_TEXTURED_LARGE_PIXMAP 1
|
||||||
#define WALKAROUND_LARGE_TEXTURE_MAP
|
#define WALKAROUND_LARGE_TEXTURE_MAP
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -753,7 +753,9 @@ glamor_setup_composite_vbo(ScreenPtr screen, int n_verts)
|
||||||
GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT);
|
GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT);
|
||||||
assert(glamor_priv->vb != NULL);
|
assert(glamor_priv->vb != NULL);
|
||||||
glamor_priv->vb -= glamor_priv->vbo_offset;
|
glamor_priv->vb -= glamor_priv->vbo_offset;
|
||||||
}
|
} else
|
||||||
|
glamor_priv->vbo_offset = 0;
|
||||||
|
|
||||||
dispatch->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ebo);
|
dispatch->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ebo);
|
||||||
|
|
||||||
dispatch->glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
|
dispatch->glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user