summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-12-12nv50: report 15 max inputs for fragment programsIlia Mirkin1-1/+1
First off, nv50_program only has 16 in/out varyings. However reporting 16 makes 'm' become 68 in nv50_fp_linkage_validate with the varying-packing-simple piglit test. (Subverting the assert makes it compile but fail.) With this patch, varying-packing-simple passes. See: https://bugs.freedesktop.org/show_bug.cgi?id=69155 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit bad8871e524cf518bc5da4ac52c1618a115054a7)
2013-12-12nouveau: Fix compiler warning regressionMaarten Lankhorst1-4/+0
cfg is now unused, remove it. Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5576ad11ed922fad641e630fbb9b199f6434f528)
2013-12-12swrast: fix readback regression since inversion fixDave Airlie1-1/+1
This readback from the frontbuffer with swrast was broken, that bug just made it more obviously broken, this fixes it by inverting the sub image gets. Also fixes a few other piglits. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72327 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72325 (for 9.2 the patches this depends on were asked to be backported separately in an email). Cc: "9.2" "10.0" mesa-stable@lists.fedoraproject.org Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 0b16042377a6981ff9bba92387889524a3547b3f)
2013-12-12Enable throttling in SwapBuffersAxel Davy1-1/+13
flush_with_flags, when available, allows the driver to throttle. Using this suppress input lag issues that can be observed in heavy rendering situations on non-intel cards. Signed-off-by: Axel Davy <axel.davy@ens.fr> Cc: "10.0" mesa-stable@lists.freedesktop.org (cherry picked from commit afcce46fd505da51883000249ef29dd69f1d7791)
2013-12-12egl/wayland: Send commit after flushing the driver contextKristian Høgsberg1-2/+1
This typically won't make a difference, since we only send the requests at wl_display_flush() time. There might be a small race with another thread calling wl_display_flush() after our commit request, but before we flush the DRI driver. Moving the commit below the DRI driver flush call looks more natural and eliminates the small race. Cc: "10.0" mesa-stable@lists.freedesktop.org (cherry picked from commit 33eb5eabeec0c17e81b6bb11be703701e4025d4e)
2013-12-12egl/wayland: Flush the wl_display at the end of SwapBuffersAxel Davy1-0/+2
We would like the compositor to receive the commited buffer as soon as possible, so it has the time to treat it, and release old ones. We shouldn't rely on the client to flush the queue for us. Signed-off-by: Axel Davy <axel.davy@ens.fr> Cc: "10.0" mesa-stable@lists.freedesktop.org (cherry picked from commit 402bf6e8d098b64390277b229f7fae769e4449e5)
2013-12-09egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffersKristian Høgsberg1-2/+2
If we're not using EGL_EXT_swap_buffers_with_damage, we have to damage the full extent. EGL operates on buffer coordinates, but wl_surface.damage takes surface coordinates. EGL doesn't know the buffer transformation (rotated or scaled) and can't post accurate damage in surface coordinates. The damage event however is clipped to the surface extents so we can just damage the maximum rectangle. In case of EGL_EXT_swap_buffers_with_damage, the application knows the buffer transform and is expected to pass in rectangles in surface space. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70250 Cc: "10.0" mesa-stable@lists.freedesktop.org Tested-by: U. Artie Eoff <ullysses.a.eoff@intel.com> (cherry picked from commit bce64c6c83122b1f4a684cc7890c7a61d2f9ffd7)
2013-12-09dri megadriver_stub: add compatibility for older DRI loadersJordan Justen1-0/+126
To help the transition period when DRI loaders are being updated to support the newer __driDriverExtensions_foo mechanism, we populate __driDriverExtensions with the extensions returned by __driDriverExtensions_foo during a library contructor function. We find the driver foo's name by using the dladdr function which gives the path of the dynamic library's name that was being loaded. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Keith Packard <keithp@keithp.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 4859d492b25cba61f43bb883d878d6388be742be)
2013-12-09r300/compiler/tests: Fix line length check in test parserTom Stellard1-1/+3
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9a5ce0c4c971a8511574e10dd3ef37eebbe65ce7)
2013-12-09r300/compiler/tests: Fix segfaultTom Stellard1-6/+5
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 1896431f7933e727a0f75c0e0a2da4c580a04a72)
2013-12-09nouveau/video: update a few more h264 picparm field namesIlia Mirkin1-16/+17
Based on comments by Benjamin Morris <bmorris@nvidia.com> in http://lists.freedesktop.org/archives/nouveau/2013-December/015328.html This adds setting of is_long_term, and updates a few field names we were unclear about. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2cd2b9705e722d94091ce8ff6ff56a44dd8d5cc6)
2013-12-09nouveau/video: update h264 picparm field names based on usageIlia Mirkin1-15/+13
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 78525dae8ae4daf785e89ba8a334e4ec3be8a334)
2013-12-09nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)Ilia Mirkin2-7/+2
Create the ref_bo without any storage type flags set for now. The issue probably arises from our use of the additional buffer space at the end of the ref_bo. It should probably be split up in the future. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Martin Peres <martin.peres@labri.fr> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e01ba9d6b049d5eee8c125e3ec43b4539c26e4d7)
2013-12-09glsl: Don't emit empty declaration warning for a struct specifierIan Romanick1-1/+1
The intention is that things like int; will generate a warning. However, we were also accidentally emitting the same warning for things like struct Foo { int x; }; Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68838 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Aras Pranckevicius <aras@unity3d.com> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 758658850bd5ba64bf2e8c04516ea1292aedcfc3)
2013-12-06nv50: wait on the buf's fence before sticking it into pushbufIlia Mirkin2-0/+12
This resolves some rendering issues in source games. See https://bugs.freedesktop.org/show_bug.cgi?id=64323 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 0e5bf8565106833e1a678ebdae81fdf1657391c9)
2013-12-06nouveau: avoid leaking fences while waitingIlia Mirkin1-6/+5
This fixes a memory leak in some situations. Also avoids emitting an extra fence if the kick handler does the call to nouveau_fence_next itself. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ce6dd69697ae62d9336bbd4f5808bc4d75cdcc04)
2013-12-06nv50: Fix GPU_READING/WRITING bit removalIlia Mirkin2-3/+3
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> CC: "9.1, 9.2, 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit c45cf6199fc493538cef33125c8a97a892e2ca83)
2013-12-06Remove a057b83 from the pick listIan Romanick1-0/+5
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-12-06mesa: don't leak performance monitors on context destroyIlia Mirkin3-0/+23
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 267679be84de5bc9d2bd0fccb1712bc5cddb6be7)
2013-12-06automake: include only one copy VERSION in tarballEmil Velikov1-1/+0
The VERSION file is tracked by git (git ls-files), thus adding it to EXTRA_FILES will result in a duplicate copy within the final tarball. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230 Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reported-by: Patrick Steinhardt <ps@pks.im> Tested-by: Patrick Steinhardt <ps@pks.im> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 507c2356e3caa3b7da98787ae2de96c7bca0089e)
2013-12-06i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)Chad Versace1-24/+11
The BSpec states that the aligment for the non-msrt clear rectangle must be doubled; the BSpec does not restricit the workaround to specific hardware. Commit 9a1a67b applied the workaround to Haswell GT3. Commit 8b659ce expanded the workaround to all Haswell variants. This commit expands it to all hardware. No Piglit regressions on Ivybridge 0x0166. No fixes either. I know no Ivybridge nor Baytrail bug related to this workaround. However, the BSpec says the extra alignment is required, so let's do it. v2: Apply to all hardware, not just gen7. CC: "9.2, 10.0" <mesa-stable@lists.freedesktop.org> CC: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 998018d7be1380f055fb577b0782004657cc9509)
2013-12-06i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTsChad Versace1-6/+12
Pre-patch, the workaround was applied to only HSW GT3. However, the workaround also fixes render corruption on the HSW GT1 Chromebook, codenamed Falco. Also, update the BSpec quote that discusses the workaround to reflect the latest BSpec. The BSpec states that the workaround is required for Ivybridge and Baytrail as well as Haswell. But, we apply the workaround to only Haswell because (a) we suspect that is the only hardware where it is actually required and (b) we haven't yet validated the workaround for the other hardware. CC: "9.2, 10.0" <mesa-stable@lists.freedesktop.org> CC: Anuj Phogat <anuj.phogat@gmail.com> OTC-Tracker: CHRMOS-812 Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 8b659cef3a244b1acdbbca0beb704a66b6bc2fbc)
2013-12-06i965/gen6: Fix multisample resolve blits for luminance/intensity 32F formats.Paul Berry1-0/+15
On gen6, multisamble resolve blits use the SAMPLE message to blend together the 4 samples for each texel. For some reason, SAMPLE doesn't blend together the proper samples when the source format is L32_FLOAT or I32_FLOAT, resulting in blocky artifacts. To work around this problem, sample from the source surface using R32_FLOAT. This shouldn't affect rendering correctness, because when doing these resolve blits, the destination format is R32_FLOAT, so the channel replication done by L32_FLOAT and I32_FLOAT is unnecessary. Fixes piglit tests on Sandy Bridge: - spec/ARB_texture_float/multisample-formats 2 GL_ARB_texture_float - spec/ARB_texture_float/multisample-formats 4 GL_ARB_texture_float No piglit regressions on Sandy Bridge. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70601 Cc: Kenneth Graunke <kenneth@whitecape.org> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit c4cf487315f1f5375534f1677177983fa496d577)
2013-12-06st/xa: Bump major version number to 2Thomas Hellstrom1-1/+1
For some reason this was left out when the version was changed... Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2013-11-30docs: Add 10.0 release md5sumsIan Romanick1-1/+3
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-11-30mesa: Bump version to 10.0 (final)mesa-10.0Ian Romanick1-1/+1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-11-30docs: Update release notes for 10.0Ian Romanick1-2/+70
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-11-28i965: Always reserve binding table space for at least one render target.Kenneth Graunke1-1/+4
In brw_update_renderbuffer_surfaces(), if there are no color draw buffers, we always set up a null render target at surface index 0 so we have something to use with the FB write marking the end of thread. However, when we recently began computing surface indexes dynamically, we failed to reserve space for it. This meant that the first texture would be assigned surface index 0, and our closing FB write would clobber the texture. Fixes Piglit's EXT_packed_depth_stencil/fbo-blit-d24s8 test on Gen4-5, which regressed as of commit 4e5306453da6a1c076309e543ec92d999e02f67a ("i965/fs: Dynamically set up the WM binding table offsets.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70605 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Tested-by: lu hua <huax.lu@intel.com> Cc: "10.0" mesa-stable@lists.freedesktop.org (cherry picked from commit c4815f6cd6f659acd361f1b4cf63473a46ca7de9)
2013-11-28dri: Allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in driCreateContextAttribsIan Romanick1-2/+4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reported-by: Zhenyu Wang <zhenyuw@linux.intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 73e9aa9e3f73d69ce4f0b68e74702d67842a230c)
2013-11-28i965: Only enable __DRI2_ROBUSTNESS if kernel support is availableIan Romanick3-19/+40
This is a squash of the following two cherry-picked patches: i965: Only enable __DRI2_ROBUSTNESS if kernel support is available Rather than always advertising the extension but failing to create a context with reset notifiction, just don't advertise it. I don't know why it didn't occur to me to do it this way in the first place. NOTE: Kristian requested that I provide a follow-up for master that dynamically generates the list of DRI extensions instead of selected between two hardcoded lists. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9b1c68638d8096304d3c4e0cceb97bb4dc61acc5) and i965: Properly reject __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS when __DRI2_ROBUSTNESS is not enabled Only allow __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS in brwCreateContext if intelInitScreen2 also enabled __DRI2_ROBUSTNESS (thereby enabling GLX_ARB_create_context). This fixes a regression in the piglit test "glx/GLX_ARB_create_context/invalid flag" v2: Remove commented debug code. Noticed by Jordan. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reported-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 53a65e547c0bf769fff48b4ccb41d1477daa70de)
2013-11-28i965: Bump libdrm requirementIan Romanick1-1/+1
drm_intel_get_reset_stats is only available in libdrm-2.4.48, and libdrm-2.4.49 contains an important bug fix in that function. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit cb728bb028d782d5619e3da63afeeaf0b68507d0)
2013-11-26glsl: Initialize _mesa_glsl_parse_state::atomic_counter_offsets before using it.Francisco Jerez1-0/+2
Cc: Ian Romanick <ian.d.romanick@intel.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 6b2b4cc8857a9163055c4e9c8007d53a9e668e75)
2013-11-26glsl: Fix lowering of direct assignment in lower_clip_distance.Paul Berry1-0/+5
In commit 065da16 (glsl: Convert lower_clip_distance_visitor to be an ir_rvalue_visitor), we failed to notice that since lower_clip_distance_visitor overrides visit_leave(ir_assignment *), ir_rvalue_visitor::visit_leave(ir_assignment *) wasn't getting called. As a result, clip distance dereferences appearing directly on the right hand side of an assignment (not in a subexpression) weren't getting properly lowered. This caused an ir_dereference_variable node to be left in the IR that referred to the old gl_ClipDistance variable. However, since the lowering pass replaces gl_ClipDistance with gl_ClipDistanceMESA, this turned into a dangling pointer when the IR got reparented. Prior to the introduction of geometry shaders, this bug was unlikely to arise, because (a) reading from gl_ClipDistance[i] in the fragment shader was rare, and (b) when it happened, it was likely that it would either appear in a subexpression, or be hoisted into a subexpression by tree grafting. However, in a geometry shader, we're likely to see a statement like this, which would trigger the bug: gl_ClipDistance[i] = gl_in[j].gl_ClipDistance[i]; This patch causes lower_clip_distance_visitor::visit_leave(ir_assignment *) to call the base class visitor, so that the right hand side of the assignment is properly lowered. Fixes piglit test: - spec/glsl-1.50/execution/geometry/clip-distance-itemized-copy Cc: Ian Romanick <idr@freedesktop.org> Cc: "9.2" <mesa-stable@lists.freedesktop.org> Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 9dfcb05fa649ee7a573eab3d16851ebd4cb96010)
2013-11-26i965/gs: Set GS prog_data to NULL if there is no GS program.Paul Berry1-0/+7
The previous commit fixes a bug wherein we would incorrectly refer to stale geometry shader prog_data when no geometry shader was active. This patch reduces the likelihood of that sort of bug occurring in the future by setting prog_data to NULL whenever there is no GS program. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 37bdde1087584f4c1839e14db75c157b83246ebd)
2013-11-26i965/gs: Properly skip GS binding table upload when no GS active.Paul Berry1-1/+1
Previously, in brw_gs_upload_binding_table(), we checked whether brw->gs.prog_data was NULL in order to determine whether a geometry shader was active. This didn't work: brw->gs.prog_data starts off as NULL, but it is set to non-NULL when a geometry shader program is built, and then never set to NULL again. As a result, if we called brw_gs_upload_binding_table() while there was no geometry shader active, but a geometry shader had previously been active, it would refer to a stale (and possibly freed) prog_data structure. This patch fixes the problem by modifying brw_gs_upload_binding_table() to use the proper technique to determine whether a geometry shader is active: by checking whether brw->geometry_program is NULL. This fixes the crash reported in comment 2 of bug 71870 (the incorrect rendering remains, however). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71870 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 2714ca81b9bad3dec3894fac97f34502c80b1697)
2013-11-26radeon/compute: Unconditionally inline all functions v2Tom Stellard1-2/+20
We need to do this until function calls are supported. v2: - Fix loop conditional https://bugs.freedesktop.org/show_bug.cgi?id=64225 CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ddc77c5092b6f782327a7014b320f31f5f4e8e93)
2013-11-26i965: Use __attribute__((flatten)) on fast tiled teximage code.Kenneth Graunke1-2/+8
The fast tiled texture upload code does not compile with GCC 4.8's -Og optimization flag. memcpy() has the always_inline attribute set. This poses a problem, since {x,y}tile_copy_faster calls it indirectly via {x,y}tile_copy, and {x,y}tile_copy normally aren't inlined at -Og. Using __attribute__((flatten)) tells GCC to inline every function call inside the function, which I believe was the author's intent. Fix suggested by Alexander Monakov. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit ad542a10c5f2284c05036f1df8ce5b69bea66e50)
2013-11-26gbm/dri: hide extension loader symbolsMaarten Lankhorst1-2/+2
They should not be exposed. Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5455c818b558cdc618441988434eb2755cd98b67)
2013-11-23mesa: Bump version to 10.0.0-rc2mesa-10.0-rc2Ian Romanick1-1/+1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-11-23Remove 068a073 from the pick listIan Romanick1-0/+5
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-11-23i965: Fix streamed state dumping/annotation after the blorp-flush change.Eric Anholt1-1/+0
I think I was thinking of the batch command packet cache when I pasted this in, but this counter is only used for dumping out streamed state for INTEL_DEBUG=batch and for putting annotations in our aub files. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 5891f981452c1c5ed45b5a7e5fe54a9884ced2b6)
2013-11-23mesa: Implement GL_FRAMEBUFFER_ATTACHMENT_LAYERED query.Paul Berry1-0/+12
From section 6.1.18 (Renderbuffer Object Queries) of the GL 3.2 spec, under the heading "If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is TEXTURE, then": If pname is FRAMEBUFFER_ATTACHMENT_LAYERED, then params will contain TRUE if an entire level of a three-dimesional texture, cube map texture, or one-or two-dimensional array texture is attached. Otherwise, params will contain FALSE. Fixes piglit tests: - spec/!OpenGL 3.2/layered-rendering/framebuffer-layered-attachments - spec/!OpenGL 3.2/layered-rendering/framebuffertexture-defaults Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> v2: Don't include "EXT" in the error message, since this query only makes sensen in context versions that have adopted glGetFramebufferAttachmentParameteriv(). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit ec79c05cbfb7c68fbef7447e1744423c00f26654)
2013-11-23mesa: Fix texture target validation for glFramebufferTexture()Paul Berry1-12/+47
Previously we were using the code path for validating glFramebufferTextureLayer(). But glFramebufferTexture() allows additional texture types. Fixes piglit tests: - spec/!OpenGL 3.2/layered-rendering/gl-layer-cube-map - spec/!OpenGL 3.2/layered-rendering/framebuffertexture Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> v2: Clarify comment above framebuffer_texture(). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit af1471dc04cc89822bab2c253c808880dd47c25a)
2013-11-23i965: Fix fast clear of depth buffers.Paul Berry1-2/+10
From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes the fast depth clear path. Fixes piglit test "spec/!OpenGL 3.2/layered-rendering/clear-depth". Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 08315233509f1fa7dc1e877aed2a8517296cf86e)
2013-11-23i965: Fix blorp clear of layered framebuffers.Paul Berry1-7/+19
From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes the blorp clear path for color buffers. Fixes piglit test "spec/!OpenGL 3.2/layered-rendering/clear-color". Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit c1019670ea89505ea7411629c052d662c8eb6be6)
2013-11-23i965: refactor blorp clear code in preparation for layered clears.Paul Berry1-53/+66
Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 1ec5365429b46a39a06186092502c8e66fb4140e)
2013-11-23mesa: Track number of layers in layered framebuffers.Paul Berry5-6/+21
In order to properly clear layered framebuffers, we need to know how many layers they have. The easiest way to do this is to record it in the gl_framebuffer struct when we check framebuffer completeness. This patch replaces the gl_framebuffer::Layered boolean with a gl_framebuffer::NumLayers integer, which is 0 if the framebuffer is not layered, and equal to the number of layers otherwise. v2: Remove gl_framebuffer::Layered and make gl_framebuffer::NumLayers always have a defined value. Fix factor of 6 error in the number of layers in a cube map array. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 95140740ad1c6cd8a34002c307556f5c49a34589)
2013-11-23radeonsi/compute: Fix LDS size calculationTom Stellard1-1/+16
We need to include the number of LDS bytes allocated by the state tracker. CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 1bdb99330ac68003a9ee6c963f46bddb03b9073d)
2013-11-23r600g/compute: Add a work-around for flushing issues on CaymanTom Stellard3-1/+17
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> https://bugs.freedesktop.org/show_bug.cgi?id=69321 CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7a30cd7085b6879d3858f5c1a6945fbe30c818a6)
2013-11-23glsl: Fix interstage uniform interface block link error detection.Paul Berry3-32/+62
Previously, we checked for interstage uniform interface block link errors in validate_interstage_interface_blocks(), which is only called on pairs of adjacent shader stages. Therefore, we failed to detect uniform interface block mismatches between non-adjacent shader stages. Before the introduction of geometry shaders, this wasn't a problem, because the only supported shader stages were vertex and fragment shaders, therefore they were always adjacent. However, now that we allow a program to contain vertex, geometry, and fragment shaders, that is no longer the case. Fixes piglit test "skip-stage-uniform-block-array-size-mismatch". Cc: "10.0" <mesa-stable@lists.freedesktop.org> v2: Rename validate_interstage_interface_blocks() to validate_interstage_inout_blocks() to reflect the fact that it no longer validates uniform blocks. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> v3: Make validate_interstage_inout_blocks() skip uniform blocks. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 544e3129c5addeb6c9539339782dd54616ef0499)