Compare commits
37 Commits
mesa-9.1.6
...
9.1
Author | SHA1 | Date | |
---|---|---|---|
|
3d3cada9c1 | ||
|
7d4a1f508b | ||
|
08ffe9c541 | ||
|
b91b957208 | ||
|
ca2e6012eb | ||
|
32b28b0c17 | ||
|
15204c3840 | ||
|
d227751144 | ||
|
8c753e01e4 | ||
|
a6b6ad7d17 | ||
|
68473d07d4 | ||
|
5bddd3f392 | ||
|
64d3c2b7d5 | ||
|
b10122ac03 | ||
|
398c705c3d | ||
|
c6d5d39147 | ||
|
66f8724ef4 | ||
|
ce10cafee0 | ||
|
4a8d1c5ef2 | ||
|
5af672491a | ||
|
2e8bcfa56d | ||
|
fa5554fce7 | ||
|
c910c620ef | ||
|
895663a24f | ||
|
7e32aff8fd | ||
|
ac93b20390 | ||
|
4cdda60fb8 | ||
|
01419c0f42 | ||
|
1dd4b0e6ad | ||
|
0437388d59 | ||
|
7b4b012c49 | ||
|
7ff9d952f2 | ||
|
11611881ca | ||
|
93670a73ff | ||
|
0dbbfa054c | ||
|
4589a8a0f3 | ||
|
ebc926a206 |
@@ -36,7 +36,7 @@ check-local:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
PACKAGE_VERSION=9.1.6
|
||||
PACKAGE_VERSION=9.1.7
|
||||
PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
|
||||
PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
|
||||
|
||||
|
@@ -64,3 +64,9 @@ a3dcab43c6b6fed2f35aa0e802be6398985f100c clover: Pass corresponding module::argu
|
||||
829caf410e2c2c6f79902199da5a7900abc16129 clover: Byte-swap kernel arguments when host and device endianness differ.
|
||||
f64c0ca692d3e8c78dd9ae1f015f58f1dfc1c760 clover: Extend kernel arguments for differing host and device data types.
|
||||
df530829f757a8968389427eb26f45a0d46623fa clover: Respect kernel argument alignment restrictions.
|
||||
|
||||
# Memory leak being fixed doesn't exist in 9.1 (as far as I can tell)
|
||||
035bf2198368d3fa69387788a63039d71319f0bf i915,i965: Fix memory leak in try_pbo_upload (v2)
|
||||
|
||||
# This commit depends on other, unspecified commits (does not compile alone)
|
||||
d38765f3c8fbd473b949177cc9698b2cd459902c mesa: Support GL_MAX_VERTEX_OUTPUT_COMPONENTS query with ES3
|
||||
|
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*9\.1.*mesa-stable\)' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate.*9\.1\|CC:.*9\.1.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
@@ -6,7 +6,7 @@ dnl Tell the user about autoconf.html in the --help output
|
||||
m4_divert_once([HELP_END], [
|
||||
See docs/autoconf.html for more details on the options for Mesa.])
|
||||
|
||||
AC_INIT([Mesa], [9.1.6],
|
||||
AC_INIT([Mesa], [9.1.7],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
@@ -30,7 +30,9 @@ because GL_ARB_compatibility is not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
443a2a352667294b53d56cb1a74114e9 MesaLib-9.1.6.tar.bz2
|
||||
08d3069cccd6821e5f33e0840bca0718 MesaLib-9.1.6.tar.gz
|
||||
90aa7a6d9878cdbfcb055312f356d6b9 MesaLib-9.1.6.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
@@ -70,7 +72,7 @@ TBD
|
||||
<p>The full set of changes can be viewed by using the following GIT command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-9.1.4..mesa-9.1.5
|
||||
git log mesa-9.1.5..mesa-9.1.6
|
||||
</pre>
|
||||
|
||||
<p>Andreas Boll (1):</p>
|
||||
|
168
docs/relnotes-9.1.7.html
Normal file
168
docs/relnotes-9.1.7.html
Normal file
@@ -0,0 +1,168 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 9.1.7 Release Notes / October 4, 2013</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.1.7 is a bug fix release which fixes bugs found since the 9.1.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
9e4abf7b7a6db762012c3c9917a8e8c7 MesaLib-9.1.7.tar.bz2
|
||||
f1d4d479d6ce12b9566fdb379960a912 MesaLib-9.1.7.tar.gz
|
||||
abd612bfc5dd478d04fcc630dd7672f2 MesaLib-9.1.7.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55503">Bug 55503</a> - Constant vertex attributes broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61635">Bug 61635</a> - glVertexAttribPointer(id, GL_UNSIGNED_BYTE, GL_FALSE,...) does not work</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65958">Bug 65958</a> - GPU Lockup on Trinity 7500G</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66292">Bug 66292</a> - [SNB/IVB/HSW Bisected]Ogles3conform GL3Tests_depth24_depth24_basic.test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67548">Bug 67548</a> - glGetAttribLocation seems to be broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68195">Bug 68195</a> - piglit tests vs-struct-pad and fs-struct-pad both fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68250">Bug 68250</a> - Automatic mipmap generation with texture compression produces borders that fade to black</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69525">Bug 69525</a> - [GM45, bisected] Piglit tex-shadow2drect fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Deucher (2):</p>
|
||||
<ul>
|
||||
<li>r600g: disable GPUVM by default</li>
|
||||
<li>radeon/winsys: pad IBs to a multiple of 8 DWs</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (2):</p>
|
||||
<ul>
|
||||
<li>docs: Fix a typo in the 9.1.6 release notes</li>
|
||||
<li>mesa: Fix MESA_PATCH version</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>meta: Fix blitting a framebuffer with renderbuffer attachment</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (5):</p>
|
||||
<ul>
|
||||
<li>docs: Add 9.1.6 release md5sums</li>
|
||||
<li>Use -Bsymbolic when linking libEGL.so</li>
|
||||
<li>Update get-pick-list to look specifically for "9.1" in NOTE</li>
|
||||
<li>cherry-ignore: Ignore last two patches in current get-pick-list output</li>
|
||||
<li>Bump version to 9.1.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Gen4: Zero out extra coordinates when using shadow compare</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>nv50: handle pure integer vertex attributes</li>
|
||||
<li>nouveau: initialise the nouveau_transfer maps</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (1):</p>
|
||||
<ul>
|
||||
<li>i965/gen4: Fix fragment program rectangle texture shadow compares.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (11):</p>
|
||||
<ul>
|
||||
<li>mesa: Remove stray debug printfs in attachment completeness code</li>
|
||||
<li>mesa: Validate the layer selection of an array texture too</li>
|
||||
<li>mesa/vbo: Fix handling of attribute 0 in non-compatibilty contexts</li>
|
||||
<li>glsl: Add new overload of program_resource_visitor::visit_field method</li>
|
||||
<li>glsl: Use alignment of container record for its first field</li>
|
||||
<li>mesa: Remove all traces of GL_OES_matrix_get</li>
|
||||
<li>mesa: Don't call driver RenderTexture for really broken textures</li>
|
||||
<li>mesa: Don't call driver RenderTexture for invalid zoffset</li>
|
||||
<li>mesa: Generate a renderbuffer wrapper even if the texture has no image</li>
|
||||
<li>glsl: Move and refine test for unsized arrays in GLSL ES</li>
|
||||
<li>mesa: Don't return any data for GL_SHADER_BINARY_FORMATS</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv30: U8_USCALED only works for size 4</li>
|
||||
<li>nv30: remove no-longer-used formats from table</li>
|
||||
</ul>
|
||||
|
||||
<p>Joakim Sindholt (1):</p>
|
||||
<ul>
|
||||
<li>nvc0: fix blitctx memory leak</li>
|
||||
</ul>
|
||||
|
||||
<p>Johannes Obermayr (1):</p>
|
||||
<ul>
|
||||
<li>st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>meta: Set correct viewport and projection in decompress_texture_image.</li>
|
||||
</ul>
|
||||
|
||||
<p>Maarten Lankhorst (1):</p>
|
||||
<ul>
|
||||
<li>nvc0: restore viewport after blit</li>
|
||||
</ul>
|
||||
|
||||
<p>Rico Schüller (1):</p>
|
||||
<ul>
|
||||
<li>glx: Initialize OpenGL version to 1.0</li>
|
||||
</ul>
|
||||
|
||||
<p>Tiziano Bacocco (1):</p>
|
||||
<ul>
|
||||
<li>nvc0/ir: fix use after free in texture barrier insertion pass</li>
|
||||
</ul>
|
||||
|
||||
<p>Torsten Duwe (1):</p>
|
||||
<ul>
|
||||
<li>wayland-egl.pc requires wayland-client.pc.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -74,7 +74,7 @@ libEGL_la_SOURCES = \
|
||||
|
||||
libEGL_la_LIBADD = \
|
||||
$(EGL_LIB_DEPS)
|
||||
libEGL_la_LDFLAGS = -version-number 1:0 -no-undefined
|
||||
libEGL_la_LDFLAGS = -Wl,-Bsymbolic -version-number 1:0 -no-undefined
|
||||
|
||||
if HAVE_EGL_PLATFORM_X11
|
||||
AM_CFLAGS += -DHAVE_X11_PLATFORM
|
||||
|
@@ -6,5 +6,6 @@ includedir=@includedir@
|
||||
Name: wayland-egl
|
||||
Description: Mesa wayland-egl library
|
||||
Version: @VERSION@
|
||||
Requires: wayland-client
|
||||
Libs: -L${libdir} -lwayland-egl
|
||||
Cflags: -I${includedir}
|
||||
|
@@ -266,6 +266,7 @@ nouveau_buffer_cache(struct nouveau_context *nv, struct nv04_resource *buf)
|
||||
tx.base.box.x = 0;
|
||||
tx.base.box.width = buf->base.width0;
|
||||
tx.bo = NULL;
|
||||
tx.map = NULL;
|
||||
|
||||
if (!buf->data)
|
||||
if (!nouveau_buffer_malloc(buf))
|
||||
@@ -624,6 +625,7 @@ nouveau_buffer_migrate(struct nouveau_context *nv,
|
||||
tx.base.box.x = 0;
|
||||
tx.base.box.width = buf->base.width0;
|
||||
tx.bo = NULL;
|
||||
tx.map = NULL;
|
||||
if (!nouveau_transfer_staging(nv, &tx, FALSE))
|
||||
return FALSE;
|
||||
nouveau_transfer_write(nv, &tx, 0, tx.base.box.width);
|
||||
|
@@ -111,9 +111,6 @@ nv30_format_info_table[PIPE_FORMAT_COUNT] = {
|
||||
_(R16G16_SNORM , __V_),
|
||||
_(R16G16B16_SNORM , __V_),
|
||||
_(R16G16B16A16_SNORM , __V_),
|
||||
_(R8_USCALED , __V_),
|
||||
_(R8G8_USCALED , __V_),
|
||||
_(R8G8B8_USCALED , __V_),
|
||||
_(R8G8B8A8_USCALED , __V_),
|
||||
_(R16_FLOAT , __V_),
|
||||
_(R16G16_FLOAT , __V_), //S_V_),
|
||||
@@ -160,9 +157,6 @@ nv30_vtxfmt_table[PIPE_FORMAT_COUNT] = {
|
||||
_(R8G8_UNORM , U8_UNORM , 2),
|
||||
_(R8G8B8_UNORM , U8_UNORM , 3),
|
||||
_(R8G8B8A8_UNORM , U8_UNORM , 4),
|
||||
_(R8_USCALED , U8_USCALED , 1),
|
||||
_(R8G8_USCALED , U8_USCALED , 2),
|
||||
_(R8G8B8_USCALED , U8_USCALED , 3),
|
||||
_(R8G8B8A8_USCALED , U8_USCALED , 4),
|
||||
_(R16_SNORM , V16_SNORM , 1),
|
||||
_(R16G16_SNORM , V16_SNORM , 2),
|
||||
|
@@ -40,13 +40,15 @@ nv30_emit_vtxattr(struct nv30_context *nv30, struct pipe_vertex_buffer *vb,
|
||||
const unsigned nc = util_format_get_nr_components(ve->src_format);
|
||||
struct nouveau_pushbuf *push = nv30->base.pushbuf;
|
||||
struct nv04_resource *res = nv04_resource(vb->buffer);
|
||||
const struct util_format_description *desc =
|
||||
util_format_description(ve->src_format);
|
||||
const void *data;
|
||||
float v[4];
|
||||
|
||||
data = nouveau_resource_map_offset(&nv30->base, res, vb->buffer_offset +
|
||||
ve->src_offset, NOUVEAU_BO_RD);
|
||||
|
||||
util_format_read_4f(ve->src_format, v, 0, data, 0, 0, 0, 1, 1);
|
||||
desc->unpack_rgba_float(v, 0, data, 0, 1, 1);
|
||||
|
||||
switch (nc) {
|
||||
case 4:
|
||||
|
@@ -139,10 +139,20 @@ nv50_emit_vtxattr(struct nv50_context *nv50, struct pipe_vertex_buffer *vb,
|
||||
const void *data = (const uint8_t *)vb->user_buffer + ve->src_offset;
|
||||
float v[4];
|
||||
const unsigned nc = util_format_get_nr_components(ve->src_format);
|
||||
const struct util_format_description *desc =
|
||||
util_format_description(ve->src_format);
|
||||
|
||||
assert(vb->user_buffer);
|
||||
|
||||
util_format_read_4f(ve->src_format, v, 0, data, 0, 0, 0, 1, 1);
|
||||
if (desc->channel[0].pure_integer) {
|
||||
if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) {
|
||||
desc->unpack_rgba_sint((int32_t *)v, 0, data, 0, 1, 1);
|
||||
} else {
|
||||
desc->unpack_rgba_uint((uint32_t *)v, 0, data, 0, 1, 1);
|
||||
}
|
||||
} else {
|
||||
desc->unpack_rgba_float(v, 0, data, 0, 1, 1);
|
||||
}
|
||||
|
||||
switch (nc) {
|
||||
case 4:
|
||||
|
@@ -441,6 +441,7 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn)
|
||||
if (i->op == OP_TEXBAR) {
|
||||
if (i->subOp >= max) {
|
||||
delete_Instruction(prog, i);
|
||||
i = NULL;
|
||||
} else {
|
||||
max = i->subOp;
|
||||
if (prev && prev->op == OP_TEXBAR && prev->subOp >= max) {
|
||||
@@ -452,7 +453,7 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn)
|
||||
if (isTextureOp(i->op)) {
|
||||
max++;
|
||||
}
|
||||
if (!i->isNop())
|
||||
if (i && !i->isNop())
|
||||
prev = i;
|
||||
}
|
||||
}
|
||||
|
@@ -97,6 +97,7 @@ nvc0_destroy(struct pipe_context *pipe)
|
||||
nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);
|
||||
|
||||
nvc0_context_unreference_resources(nvc0);
|
||||
nvc0_blitctx_destroy(nvc0);
|
||||
|
||||
#ifdef NVC0_WITH_DRAW_MODULE
|
||||
draw_destroy(nvc0->draw);
|
||||
|
@@ -75,6 +75,7 @@
|
||||
struct nvc0_blitctx;
|
||||
|
||||
boolean nvc0_blitctx_create(struct nvc0_context *);
|
||||
void nvc0_blitctx_destroy(struct nvc0_context *);
|
||||
|
||||
struct nvc0_context {
|
||||
struct nouveau_context base;
|
||||
@@ -169,6 +170,8 @@ struct nvc0_context {
|
||||
|
||||
struct nvc0_blitctx *blit;
|
||||
|
||||
uint32_t vport_int[2];
|
||||
|
||||
#ifdef NVC0_WITH_DRAW_MODULE
|
||||
struct draw_context *draw;
|
||||
#endif
|
||||
|
@@ -243,9 +243,11 @@ nvc0_validate_viewport(struct nvc0_context *nvc0)
|
||||
zmin = vp->translate[2] - fabsf(vp->scale[2]);
|
||||
zmax = vp->translate[2] + fabsf(vp->scale[2]);
|
||||
|
||||
nvc0->vport_int[0] = (w << 16) | x;
|
||||
nvc0->vport_int[1] = (h << 16) | y;
|
||||
BEGIN_NVC0(push, NVC0_3D(VIEWPORT_HORIZ(0)), 2);
|
||||
PUSH_DATA (push, (w << 16) | x);
|
||||
PUSH_DATA (push, (h << 16) | y);
|
||||
PUSH_DATA (push, nvc0->vport_int[0]);
|
||||
PUSH_DATA (push, nvc0->vport_int[1]);
|
||||
BEGIN_NVC0(push, NVC0_3D(DEPTH_RANGE_NEAR(0)), 2);
|
||||
PUSH_DATAf(push, zmin);
|
||||
PUSH_DATAf(push, zmax);
|
||||
|
@@ -937,8 +937,8 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
||||
/* restore viewport */
|
||||
|
||||
BEGIN_NVC0(push, NVC0_3D(VIEWPORT_HORIZ(0)), 2);
|
||||
PUSH_DATA (push, nvc0->framebuffer.width << 16);
|
||||
PUSH_DATA (push, nvc0->framebuffer.height << 16);
|
||||
PUSH_DATA (push, nvc0->vport_int[0]);
|
||||
PUSH_DATA (push, nvc0->vport_int[1]);
|
||||
IMMED_NVC0(push, NVC0_3D(VIEWPORT_TRANSFORM_EN), 1);
|
||||
}
|
||||
|
||||
@@ -1230,6 +1230,13 @@ nvc0_blitctx_create(struct nvc0_context *nvc0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nvc0_blitctx_destroy(struct nvc0_context *nvc0)
|
||||
{
|
||||
if (nvc0->blit)
|
||||
FREE(nvc0->blit);
|
||||
}
|
||||
|
||||
void
|
||||
nvc0_init_surface_functions(struct nvc0_context *nvc0)
|
||||
{
|
||||
|
@@ -27,6 +27,7 @@ AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/gbm/main \
|
||||
-I$(top_srcdir)/include
|
||||
if HAVE_EGL_PLATFORM_WAYLAND
|
||||
AM_CFLAGS += $(WAYLAND_CFLAGS)
|
||||
AM_CPPFLAGS += -DHAVE_WAYLAND_PLATFORM
|
||||
endif
|
||||
|
||||
|
@@ -382,7 +382,7 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
|
||||
&ws->info.r600_ib_vm_max_size))
|
||||
ws->info.r600_virtual_address = FALSE;
|
||||
}
|
||||
if (ws->gen == DRV_R600 && !debug_get_bool_option("RADEON_VA", TRUE))
|
||||
if (ws->gen == DRV_R600 && !debug_get_bool_option("RADEON_VA", FALSE))
|
||||
ws->info.r600_virtual_address = FALSE;
|
||||
}
|
||||
|
||||
|
@@ -1904,12 +1904,6 @@ process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size,
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (state->es_shader) {
|
||||
/* Section 10.17 of the GLSL ES 1.00 specification states that unsized
|
||||
* array declarations have been removed from the language.
|
||||
*/
|
||||
_mesa_glsl_error(loc, state, "unsized array declarations are not "
|
||||
"allowed in GLSL ES 1.00.");
|
||||
}
|
||||
|
||||
return glsl_type::get_array_instance(base, length);
|
||||
@@ -3040,6 +3034,33 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
decl->identifier);
|
||||
}
|
||||
|
||||
if (state->es_shader) {
|
||||
const glsl_type *const t = (earlier == NULL)
|
||||
? var->type : earlier->type;
|
||||
|
||||
if (t->is_array() && t->length == 0)
|
||||
/* Section 10.17 of the GLSL ES 1.00 specification states that
|
||||
* unsized array declarations have been removed from the language.
|
||||
* Arrays that are sized using an initializer are still explicitly
|
||||
* sized. However, GLSL ES 1.00 does not allow array
|
||||
* initializers. That is only allowed in GLSL ES 3.00.
|
||||
*
|
||||
* Section 4.1.9 (Arrays) of the GLSL ES 3.00 spec says:
|
||||
*
|
||||
* "An array type can also be formed without specifying a size
|
||||
* if the definition includes an initializer:
|
||||
*
|
||||
* float x[] = float[2] (1.0, 2.0); // declares an array of size 2
|
||||
* float y[] = float[] (1.0, 2.0, 3.0); // declares an array of size 3
|
||||
*
|
||||
* float a[5];
|
||||
* float b[] = a;"
|
||||
*/
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"unsized array declarations are not allowed in "
|
||||
"GLSL ES");
|
||||
}
|
||||
|
||||
/* If the declaration is not a redeclaration, there are a few additional
|
||||
* semantic checks that must be applied. In addition, variable that was
|
||||
* created for the declaration should be added to the IR stream.
|
||||
|
@@ -58,6 +58,15 @@ public:
|
||||
private:
|
||||
virtual void visit_field(const glsl_type *type, const char *name,
|
||||
bool row_major)
|
||||
{
|
||||
(void) type;
|
||||
(void) name;
|
||||
(void) row_major;
|
||||
assert(!"Should not get here.");
|
||||
}
|
||||
|
||||
virtual void visit_field(const glsl_type *type, const char *name,
|
||||
bool row_major, const glsl_type *record_type)
|
||||
{
|
||||
assert(this->index < this->num_variables);
|
||||
|
||||
@@ -85,7 +94,9 @@ private:
|
||||
v->IndexName = v->Name;
|
||||
}
|
||||
|
||||
unsigned alignment = type->std140_base_alignment(v->RowMajor);
|
||||
const unsigned alignment = record_type
|
||||
? record_type->std140_base_alignment(v->RowMajor)
|
||||
: type->std140_base_alignment(v->RowMajor);
|
||||
unsigned size = type->std140_size(v->RowMajor);
|
||||
|
||||
this->offset = glsl_align(this->offset, alignment);
|
||||
@@ -107,6 +118,10 @@ private:
|
||||
|
||||
virtual void visit_field(const glsl_struct_field *field)
|
||||
{
|
||||
/* FINISHME: When support for doubles (dvec4, etc.) is added to the
|
||||
* FINISHME: compiler, this may be incorrect for a structure in a UBO
|
||||
* FINISHME: like struct s { struct { float f } s1; dvec4 v; };.
|
||||
*/
|
||||
this->offset = glsl_align(this->offset,
|
||||
field->type->std140_base_alignment(false));
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ program_resource_visitor::process(const glsl_type *type, const char *name)
|
||||
|| (type->is_array() && type->fields.array->is_interface()));
|
||||
|
||||
char *name_copy = ralloc_strdup(NULL, name);
|
||||
recursion(type, &name_copy, strlen(name), false);
|
||||
recursion(type, &name_copy, strlen(name), false, NULL);
|
||||
ralloc_free(name_copy);
|
||||
}
|
||||
|
||||
@@ -77,24 +77,25 @@ program_resource_visitor::process(ir_variable *var)
|
||||
/* Only strdup the name if we actually will need to modify it. */
|
||||
if (t->is_record() || (t->is_array() && t->fields.array->is_record())) {
|
||||
char *name = ralloc_strdup(NULL, var->name);
|
||||
recursion(var->type, &name, strlen(name), false);
|
||||
recursion(var->type, &name, strlen(name), false, NULL);
|
||||
ralloc_free(name);
|
||||
} else if (t->is_interface()) {
|
||||
char *name = ralloc_strdup(NULL, var->type->name);
|
||||
recursion(var->type, &name, strlen(name), false);
|
||||
recursion(var->type, &name, strlen(name), false, NULL);
|
||||
ralloc_free(name);
|
||||
} else if (t->is_array() && t->fields.array->is_interface()) {
|
||||
char *name = ralloc_strdup(NULL, var->type->fields.array->name);
|
||||
recursion(var->type, &name, strlen(name), false);
|
||||
recursion(var->type, &name, strlen(name), false, NULL);
|
||||
ralloc_free(name);
|
||||
} else {
|
||||
this->visit_field(t, var->name, false);
|
||||
this->visit_field(t, var->name, false, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
program_resource_visitor::recursion(const glsl_type *t, char **name,
|
||||
size_t name_length, bool row_major)
|
||||
size_t name_length, bool row_major,
|
||||
const glsl_type *record_type)
|
||||
{
|
||||
/* Records need to have each field processed individually.
|
||||
*
|
||||
@@ -103,6 +104,9 @@ program_resource_visitor::recursion(const glsl_type *t, char **name,
|
||||
* individually.
|
||||
*/
|
||||
if (t->is_record() || t->is_interface()) {
|
||||
if (record_type == NULL && t->is_record())
|
||||
record_type = t;
|
||||
|
||||
for (unsigned i = 0; i < t->length; i++) {
|
||||
const char *field = t->fields.structure[i].name;
|
||||
size_t new_length = name_length;
|
||||
@@ -118,10 +122,18 @@ program_resource_visitor::recursion(const glsl_type *t, char **name,
|
||||
}
|
||||
|
||||
recursion(t->fields.structure[i].type, name, new_length,
|
||||
t->fields.structure[i].row_major);
|
||||
t->fields.structure[i].row_major, record_type);
|
||||
|
||||
/* Only the first leaf-field of the record gets called with the
|
||||
* record type pointer.
|
||||
*/
|
||||
record_type = NULL;
|
||||
}
|
||||
} else if (t->is_array() && (t->fields.array->is_record()
|
||||
|| t->fields.array->is_interface())) {
|
||||
if (record_type == NULL && t->fields.array->is_record())
|
||||
record_type = t->fields.array;
|
||||
|
||||
for (unsigned i = 0; i < t->length; i++) {
|
||||
size_t new_length = name_length;
|
||||
|
||||
@@ -129,13 +141,26 @@ program_resource_visitor::recursion(const glsl_type *t, char **name,
|
||||
ralloc_asprintf_rewrite_tail(name, &new_length, "[%u]", i);
|
||||
|
||||
recursion(t->fields.array, name, new_length,
|
||||
t->fields.structure[i].row_major);
|
||||
t->fields.structure[i].row_major, record_type);
|
||||
|
||||
/* Only the first leaf-field of the record gets called with the
|
||||
* record type pointer.
|
||||
*/
|
||||
record_type = NULL;
|
||||
}
|
||||
} else {
|
||||
this->visit_field(t, *name, row_major);
|
||||
this->visit_field(t, *name, row_major, record_type);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
program_resource_visitor::visit_field(const glsl_type *type, const char *name,
|
||||
bool row_major,
|
||||
const glsl_type *record_type)
|
||||
{
|
||||
visit_field(type, name, row_major);
|
||||
}
|
||||
|
||||
void
|
||||
program_resource_visitor::visit_field(const glsl_struct_field *field)
|
||||
{
|
||||
@@ -339,6 +364,15 @@ public:
|
||||
private:
|
||||
virtual void visit_field(const glsl_type *type, const char *name,
|
||||
bool row_major)
|
||||
{
|
||||
(void) type;
|
||||
(void) name;
|
||||
(void) row_major;
|
||||
assert(!"Should not get here.");
|
||||
}
|
||||
|
||||
virtual void visit_field(const glsl_type *type, const char *name,
|
||||
bool row_major, const glsl_type *record_type)
|
||||
{
|
||||
assert(!type->is_record());
|
||||
assert(!(type->is_array() && type->fields.array->is_record()));
|
||||
@@ -419,7 +453,9 @@ private:
|
||||
if (this->ubo_block_index != -1) {
|
||||
this->uniforms[id].block_index = this->ubo_block_index;
|
||||
|
||||
unsigned alignment = type->std140_base_alignment(ubo_row_major);
|
||||
const unsigned alignment = record_type
|
||||
? record_type->std140_base_alignment(ubo_row_major)
|
||||
: type->std140_base_alignment(ubo_row_major);
|
||||
this->ubo_byte_offset = glsl_align(this->ubo_byte_offset, alignment);
|
||||
this->uniforms[id].offset = this->ubo_byte_offset;
|
||||
this->ubo_byte_offset += type->std140_size(ubo_row_major);
|
||||
|
@@ -110,6 +110,19 @@ public:
|
||||
void process(const glsl_type *type, const char *name);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Method invoked for each leaf of the variable
|
||||
*
|
||||
* \param type Type of the field.
|
||||
* \param name Fully qualified name of the field.
|
||||
* \param row_major For a matrix type, is it stored row-major.
|
||||
* \param record_type Type of the record containing the field.
|
||||
*
|
||||
* The default implementation just calls the other \c visit_field method.
|
||||
*/
|
||||
virtual void visit_field(const glsl_type *type, const char *name,
|
||||
bool row_major, const glsl_type *record_type);
|
||||
|
||||
/**
|
||||
* Method invoked for each leaf of the variable
|
||||
*
|
||||
@@ -136,7 +149,7 @@ private:
|
||||
* terminating \c NUL character.
|
||||
*/
|
||||
void recursion(const glsl_type *t, char **name, size_t name_length,
|
||||
bool row_major);
|
||||
bool row_major, const glsl_type *record_type);
|
||||
};
|
||||
|
||||
void
|
||||
|
@@ -254,11 +254,11 @@ dri2_create_context_attribs(struct glx_screen *base,
|
||||
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base;
|
||||
__DRIcontext *shared = NULL;
|
||||
|
||||
uint32_t minor_ver = 1;
|
||||
uint32_t major_ver = 2;
|
||||
uint32_t flags = 0;
|
||||
uint32_t minor_ver;
|
||||
uint32_t major_ver;
|
||||
uint32_t flags;
|
||||
unsigned api;
|
||||
int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
|
||||
int reset;
|
||||
uint32_t ctx_attribs[2 * 5];
|
||||
unsigned num_ctx_attribs = 0;
|
||||
|
||||
|
@@ -465,8 +465,13 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
|
||||
uint32_t profile;
|
||||
int render_type = GLX_RGBA_TYPE;
|
||||
|
||||
*major_ver = 1;
|
||||
*minor_ver = 0;
|
||||
*reset = __DRI_CTX_RESET_NO_NOTIFICATION;
|
||||
*flags = 0;
|
||||
*api = __DRI_API_OPENGL;
|
||||
|
||||
if (num_attribs == 0) {
|
||||
*api = __DRI_API_OPENGL;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -477,10 +482,6 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
|
||||
return false;
|
||||
}
|
||||
|
||||
*major_ver = 1;
|
||||
*minor_ver = 0;
|
||||
*reset = __DRI_CTX_RESET_NO_NOTIFICATION;
|
||||
|
||||
for (i = 0; i < num_attribs; i++) {
|
||||
switch (attribs[i * 2]) {
|
||||
case GLX_CONTEXT_MAJOR_VERSION_ARB:
|
||||
@@ -520,7 +521,6 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
|
||||
}
|
||||
}
|
||||
|
||||
*api = __DRI_API_OPENGL;
|
||||
if (!got_profile) {
|
||||
if (*major_ver > 3 || (*major_ver == 3 && *minor_ver >= 2))
|
||||
*api = __DRI_API_OPENGL_CORE;
|
||||
|
@@ -427,11 +427,11 @@ drisw_create_context_attribs(struct glx_screen *base,
|
||||
struct drisw_screen *psc = (struct drisw_screen *) base;
|
||||
__DRIcontext *shared = NULL;
|
||||
|
||||
uint32_t minor_ver = 1;
|
||||
uint32_t major_ver = 0;
|
||||
uint32_t flags = 0;
|
||||
uint32_t minor_ver;
|
||||
uint32_t major_ver;
|
||||
uint32_t flags;
|
||||
unsigned api;
|
||||
int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
|
||||
int reset;
|
||||
uint32_t ctx_attribs[2 * 4];
|
||||
unsigned num_ctx_attribs = 0;
|
||||
|
||||
|
@@ -1876,19 +1876,24 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
|
||||
const GLenum rb_base_format =
|
||||
_mesa_base_tex_format(ctx, colorReadRb->InternalFormat);
|
||||
|
||||
newTex = alloc_texture(tex, srcW, srcH, rb_base_format);
|
||||
setup_copypix_texture(ctx, tex, newTex, srcX, srcY, srcW, srcH,
|
||||
/* Using the exact source rectangle to create the texture does incorrect
|
||||
* linear filtering along the edges. So, allocate the texture extended along
|
||||
* edges by one pixel in x, y directions.
|
||||
*/
|
||||
newTex = alloc_texture(tex, srcW + 2, srcH + 2, rb_base_format);
|
||||
setup_copypix_texture(ctx, tex, newTex,
|
||||
srcX - 1, srcY - 1, srcW + 2, srcH + 2,
|
||||
rb_base_format, filter);
|
||||
/* texcoords (after texture allocation!) */
|
||||
{
|
||||
verts[0].s = 0.0F;
|
||||
verts[0].t = 0.0F;
|
||||
verts[1].s = tex->Sright;
|
||||
verts[1].t = 0.0F;
|
||||
verts[2].s = tex->Sright;
|
||||
verts[2].t = tex->Ttop;
|
||||
verts[3].s = 0.0F;
|
||||
verts[3].t = tex->Ttop;
|
||||
verts[0].s = 1.0F;
|
||||
verts[0].t = 1.0F;
|
||||
verts[1].s = tex->Sright - 1.0F;
|
||||
verts[1].t = 1.0F;
|
||||
verts[2].s = tex->Sright - 1.0F;
|
||||
verts[2].t = tex->Ttop - 1.0F;
|
||||
verts[3].s = 1.0F;
|
||||
verts[3].t = tex->Ttop - 1.0F;
|
||||
|
||||
/* upload new vertex data */
|
||||
_mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
|
||||
@@ -3951,6 +3956,11 @@ decompress_texture_image(struct gl_context *ctx,
|
||||
verts[3].x = 0.0F;
|
||||
verts[3].y = height;
|
||||
|
||||
_mesa_MatrixMode(GL_PROJECTION);
|
||||
_mesa_LoadIdentity();
|
||||
_mesa_Ortho(0.0, width, 0.0, height, -1.0, 1.0);
|
||||
_mesa_set_viewport(ctx, 0, 0, width, height);
|
||||
|
||||
/* upload new vertex data */
|
||||
_mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
|
||||
|
||||
|
@@ -493,15 +493,15 @@ fs_visitor::emit_fragment_program_code()
|
||||
ir_constant_data junk_data;
|
||||
ir->coordinate = new(mem_ctx) ir_constant(coordinate_type, &junk_data);
|
||||
|
||||
coordinate = rescale_texcoord(ir, coordinate,
|
||||
fpi->TexSrcTarget == TEXTURE_RECT_INDEX,
|
||||
fpi->TexSrcUnit, fpi->TexSrcUnit);
|
||||
|
||||
if (fpi->TexShadow) {
|
||||
shadow_c = regoffset(coordinate, 2);
|
||||
ir->shadow_comparitor = new(mem_ctx) ir_constant(0.0f);
|
||||
}
|
||||
|
||||
coordinate = rescale_texcoord(ir, coordinate,
|
||||
fpi->TexSrcTarget == TEXTURE_RECT_INDEX,
|
||||
fpi->TexSrcUnit, fpi->TexSrcUnit);
|
||||
|
||||
fs_inst *inst;
|
||||
if (intel->gen >= 7) {
|
||||
inst = emit_texture_gen7(ir, dst, coordinate, shadow_c, lod, dpdy);
|
||||
|
@@ -786,7 +786,13 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
||||
emit(MOV(fs_reg(MRF, base_mrf + mlen + i), coordinate));
|
||||
coordinate.reg_offset++;
|
||||
}
|
||||
/* gen4's SIMD8 sampler always has the slots for u,v,r present. */
|
||||
|
||||
/* gen4's SIMD8 sampler always has the slots for u,v,r present.
|
||||
* the unused slots must be zeroed.
|
||||
*/
|
||||
for (int i = ir->coordinate->type->vector_elements; i < 3; i++) {
|
||||
emit(MOV(fs_reg(MRF, base_mrf + mlen + i), fs_reg(0.0f)));
|
||||
}
|
||||
mlen += 3;
|
||||
|
||||
if (ir->op == ir_tex) {
|
||||
|
@@ -257,7 +257,6 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_OES_framebuffer_object", o(EXT_framebuffer_object), ES1, 2005 },
|
||||
{ "GL_OES_get_program_binary", o(ARB_shader_objects), ES2, 2008 },
|
||||
{ "GL_OES_mapbuffer", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_matrix_get", o(dummy_true), ES1, 2004 },
|
||||
{ "GL_OES_packed_depth_stencil", o(EXT_packed_depth_stencil), ES1 | ES2, 2007 },
|
||||
{ "GL_OES_point_size_array", o(dummy_true), ES1, 2004 },
|
||||
{ "GL_OES_point_sprite", o(ARB_point_sprite), ES1, 2004 },
|
||||
|
@@ -342,6 +342,28 @@ _mesa_remove_attachment(struct gl_context *ctx,
|
||||
att->Complete = GL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify a couple error conditions that will lead to an incomplete FBO and
|
||||
* may cause problems for the driver's RenderTexture path.
|
||||
*/
|
||||
static bool
|
||||
driver_RenderTexture_is_safe(const struct gl_renderbuffer_attachment *att)
|
||||
{
|
||||
const struct gl_texture_image *const texImage =
|
||||
att->Texture->Image[att->CubeMapFace][att->TextureLevel];
|
||||
|
||||
if (texImage->Width == 0 || texImage->Height == 0 || texImage->Depth == 0)
|
||||
return false;
|
||||
|
||||
if ((texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY
|
||||
&& att->Zoffset >= texImage->Height)
|
||||
|| (texImage->TexObject->Target != GL_TEXTURE_1D_ARRAY
|
||||
&& att->Zoffset >= texImage->Depth))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a renderbuffer which will be set up by the driver to wrap the
|
||||
* texture image slice.
|
||||
@@ -363,8 +385,6 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
|
||||
struct gl_renderbuffer *rb;
|
||||
|
||||
texImage = _mesa_get_attachment_teximage(att);
|
||||
if (!texImage)
|
||||
return;
|
||||
|
||||
rb = att->Renderbuffer;
|
||||
if (!rb) {
|
||||
@@ -383,7 +403,11 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
|
||||
rb->NeedsFinishRenderTexture = ctx->Driver.FinishRenderTexture != NULL;
|
||||
}
|
||||
|
||||
ctx->Driver.RenderTexture(ctx, fb, att);
|
||||
if (!texImage)
|
||||
return;
|
||||
|
||||
if (driver_RenderTexture_is_safe(att))
|
||||
ctx->Driver.RenderTexture(ctx, fb, att);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -660,15 +684,39 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
|
||||
}
|
||||
if (texImage->Width < 1 || texImage->Height < 1) {
|
||||
att_incomplete("teximage width/height=0");
|
||||
printf("texobj = %u\n", texObj->Name);
|
||||
printf("level = %d\n", att->TextureLevel);
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
if (texObj->Target == GL_TEXTURE_3D && att->Zoffset >= texImage->Depth) {
|
||||
att_incomplete("bad z offset");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
|
||||
switch (texObj->Target) {
|
||||
case GL_TEXTURE_3D:
|
||||
if (att->Zoffset >= texImage->Depth) {
|
||||
att_incomplete("bad z offset");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_1D_ARRAY:
|
||||
if (att->Zoffset >= texImage->Height) {
|
||||
att_incomplete("bad 1D-array layer");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
if (att->Zoffset >= texImage->Depth) {
|
||||
att_incomplete("bad 2D-array layer");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
if (att->Zoffset >= texImage->Depth) {
|
||||
att_incomplete("bad cube-array layer");
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
|
||||
@@ -1761,7 +1809,8 @@ check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
|
||||
|
||||
for (i = 0; i < BUFFER_COUNT; i++) {
|
||||
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
|
||||
if (att->Texture && _mesa_get_attachment_teximage(att)) {
|
||||
if (att->Texture && _mesa_get_attachment_teximage(att)
|
||||
&& driver_RenderTexture_is_safe(att)) {
|
||||
ctx->Driver.RenderTexture(ctx, fb, att);
|
||||
}
|
||||
}
|
||||
|
@@ -229,11 +229,6 @@ descriptor=[
|
||||
|
||||
|
||||
{ "apis": ["GLES"], "params": [
|
||||
# XXX: OES_matrix_get
|
||||
[ "MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES", "" ],
|
||||
[ "PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES", "" ],
|
||||
[ "TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES", "" ],
|
||||
|
||||
# OES_point_size_array
|
||||
[ "POINT_SIZE_ARRAY_OES", "ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN)" ],
|
||||
[ "POINT_SIZE_ARRAY_TYPE_OES", "ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM)" ],
|
||||
@@ -308,7 +303,7 @@ descriptor=[
|
||||
[ "MAX_VERTEX_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2" ],
|
||||
[ "MAX_FRAGMENT_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2" ],
|
||||
[ "NUM_SHADER_BINARY_FORMATS", "CONST(0), extra_ARB_ES2_compatibility_api_es2" ],
|
||||
[ "SHADER_BINARY_FORMATS", "CONST(0), extra_ARB_ES2_compatibility_api_es2" ],
|
||||
[ "SHADER_BINARY_FORMATS", "LOC_CUSTOM, TYPE_INVALID, 0, extra_ARB_ES2_compatibility_api_es2" ],
|
||||
|
||||
# GL_ARB_get_program_binary / GL_OES_get_program_binary
|
||||
[ "NUM_PROGRAM_BINARY_FORMATS", "CONST(0), extra_ARB_shader_objects" ],
|
||||
|
@@ -119,12 +119,6 @@ typedef void *GLeglImageOES;
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
#endif
|
||||
|
||||
#ifndef GL_OES_matrix_get
|
||||
#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
|
||||
#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
|
||||
#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
|
||||
#endif
|
||||
|
||||
#ifndef GL_ES_VERSION_2_0
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
|
@@ -34,8 +34,8 @@ struct gl_context;
|
||||
/* Mesa version */
|
||||
#define MESA_MAJOR 9
|
||||
#define MESA_MINOR 1
|
||||
#define MESA_PATCH 4
|
||||
#define MESA_VERSION_STRING "9.1.6"
|
||||
#define MESA_PATCH 7
|
||||
#define MESA_VERSION_STRING "9.1.7"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -441,41 +441,77 @@ recalculate_input_bindings(struct gl_context *ctx)
|
||||
break;
|
||||
|
||||
case VP_ARB:
|
||||
/* GL_ARB_vertex_program or GLSL vertex shader - Only the generic[0]
|
||||
/* There are no shaders in OpenGL ES 1.x, so this code path should be
|
||||
* impossible to reach. The meta code is careful to not use shaders in
|
||||
* ES1.
|
||||
*/
|
||||
assert(ctx->API != API_OPENGLES);
|
||||
|
||||
/* In the compatibility profile of desktop OpenGL, the generic[0]
|
||||
* attribute array aliases and overrides the legacy position array.
|
||||
*
|
||||
* Otherwise, legacy attributes available in the legacy slots,
|
||||
* generic attributes in the generic slots and materials are not
|
||||
* available as per-vertex attributes.
|
||||
*
|
||||
* In all other APIs, only the generic attributes exist, and none of the
|
||||
* slots are considered "magic."
|
||||
*/
|
||||
if (vertexAttrib[VERT_ATTRIB_GENERIC0].Enabled)
|
||||
inputs[0] = &vertexAttrib[VERT_ATTRIB_GENERIC0];
|
||||
else if (vertexAttrib[VERT_ATTRIB_POS].Enabled)
|
||||
inputs[0] = &vertexAttrib[VERT_ATTRIB_POS];
|
||||
else {
|
||||
inputs[0] = &vbo->currval[VBO_ATTRIB_POS];
|
||||
const_inputs |= VERT_BIT_POS;
|
||||
}
|
||||
if (ctx->API == API_OPENGL_COMPAT) {
|
||||
if (vertexAttrib[VERT_ATTRIB_GENERIC0].Enabled)
|
||||
inputs[0] = &vertexAttrib[VERT_ATTRIB_GENERIC0];
|
||||
else if (vertexAttrib[VERT_ATTRIB_POS].Enabled)
|
||||
inputs[0] = &vertexAttrib[VERT_ATTRIB_POS];
|
||||
else {
|
||||
inputs[0] = &vbo->currval[VBO_ATTRIB_POS];
|
||||
const_inputs |= VERT_BIT_POS;
|
||||
}
|
||||
|
||||
for (i = 1; i < VERT_ATTRIB_FF_MAX; i++) {
|
||||
if (vertexAttrib[VERT_ATTRIB_FF(i)].Enabled)
|
||||
inputs[i] = &vertexAttrib[VERT_ATTRIB_FF(i)];
|
||||
else {
|
||||
inputs[i] = &vbo->currval[VBO_ATTRIB_POS+i];
|
||||
for (i = 1; i < VERT_ATTRIB_FF_MAX; i++) {
|
||||
if (vertexAttrib[VERT_ATTRIB_FF(i)].Enabled)
|
||||
inputs[i] = &vertexAttrib[VERT_ATTRIB_FF(i)];
|
||||
else {
|
||||
inputs[i] = &vbo->currval[VBO_ATTRIB_POS+i];
|
||||
const_inputs |= VERT_BIT_FF(i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) {
|
||||
if (vertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled)
|
||||
inputs[VERT_ATTRIB_GENERIC(i)] =
|
||||
&vertexAttrib[VERT_ATTRIB_GENERIC(i)];
|
||||
else {
|
||||
inputs[VERT_ATTRIB_GENERIC(i)] =
|
||||
&vbo->currval[VBO_ATTRIB_GENERIC0+i];
|
||||
const_inputs |= VERT_BIT_GENERIC(i);
|
||||
}
|
||||
}
|
||||
|
||||
inputs[VERT_ATTRIB_GENERIC0] = inputs[0];
|
||||
} else {
|
||||
/* Other parts of the code assume that inputs[0] through
|
||||
* inputs[VERT_ATTRIB_FF_MAX] will be non-NULL. However, in OpenGL
|
||||
* ES 2.0+ or OpenGL core profile, none of these arrays should ever
|
||||
* be enabled.
|
||||
*/
|
||||
for (i = 0; i < VERT_ATTRIB_FF_MAX; i++) {
|
||||
assert(!vertexAttrib[VERT_ATTRIB_FF(i)].Enabled);
|
||||
|
||||
inputs[i] = &vbo->currval[VBO_ATTRIB_POS+i];
|
||||
const_inputs |= VERT_BIT_FF(i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) {
|
||||
if (vertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled)
|
||||
inputs[VERT_ATTRIB_GENERIC(i)] = &vertexAttrib[VERT_ATTRIB_GENERIC(i)];
|
||||
else {
|
||||
inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->currval[VBO_ATTRIB_GENERIC0+i];
|
||||
const_inputs |= VERT_BIT_GENERIC(i);
|
||||
for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) {
|
||||
if (vertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled)
|
||||
inputs[VERT_ATTRIB_GENERIC(i)] =
|
||||
&vertexAttrib[VERT_ATTRIB_GENERIC(i)];
|
||||
else {
|
||||
inputs[VERT_ATTRIB_GENERIC(i)] =
|
||||
&vbo->currval[VBO_ATTRIB_GENERIC0+i];
|
||||
const_inputs |= VERT_BIT_GENERIC(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inputs[VERT_ATTRIB_GENERIC0] = inputs[0];
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user