summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-06-06nvc0: don't bother trying to set up compute for gk110+Ilia Mirkin1-3/+4
The nouveau fw currently prints a bunch of errors. No point in seeing those all the time, esp since compute doesn't really work in the first place. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Conflicts: src/gallium/drivers/nouveau/nvc0/nvc0_screen.c (cherry picked from commit ca65fc418f756496d480a9a4566543837a582826)
2014-06-06gk110: add in forgotten code for gk110 isaIlia Mirkin1-0/+13
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Conflicts: src/gallium/drivers/nouveau/nvc0/nvc0_surface.c (cherry picked from commit b9ec766bd02d55c20ff7ce5b95207ea7f6ed1de5)
2014-06-06gk110/ir: fix ISAD emission with register argsIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ed1b9e5721f6c7a74e042eadb31fc5dcb2fc3552)
2014-06-06gk110/ir: fix quadon opcode emissionIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 6e046508a17b7eee24285e94f144a42ded3ebcdc)
2014-06-06gk110/ir: emit texbar the same way that the blob doesIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 73eec47ef81954f7c2bf7c8bf03b300d11d05b82)
2014-06-06nv50/ir: clear subop when folding constant expressionsTobias Klausmann1-0/+1
Some operations (e.g. OP_MUL/OP_MAD/OP_EXTBF) might have a subop set. After folding, make sure that it is cleared Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 3164bfc73418e2e046c7a750eaac8a6d66dfe02d)
2014-06-06i965: Support GL_CLAMP natively on Broadwell.Kenneth Graunke3-4/+13
The new hardware actually supports this OpenGL 1.x feature natively, so we can finally drop our shader workarounds. Not many applications use GL_CLAMP, and most use it unintentionally, but it's trivial to do right, so we should. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 221169693bf1dfdaf46dddc1df318cee992237aa)
2014-06-06i965: Pass brw to translate_wrap_mode().Kenneth Graunke3-8/+9
This lets us do generation checks. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7f3d64a77b9ca6d738f67c7a3dd4499cdf817d79)
2014-06-06i965: Fix copy and pasted values in Broadwell code.Kenneth Graunke1-10/+21
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7913b4b97bab750ffad54e53dec9bbeb56307066)
2014-06-06egl: Check for NULL native_window in eglCreateWindowSurfaceSinclair Yeh1-0/+4
We have customers using NULL as a way to test the robustness of the API. Without this check, EGL will segfault trying to dereference dri2_surf->wl_win->private because wl_win is NULL. This fix adds a check and sets EGL_BAD_NATIVE_WINDOW v2: Incorporated feedback from idr - moved the check to a higher level function. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 91ff0d4c6510dc38f279c586ced17fba917873e7)
2014-06-06r600g,radeonsi: don't use hardware MSAA resolve if dst is fast-clearedMarek Olšák2-2/+5
It doesn't work and our docs say so too. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit d2261918202697febed0de18f66416e273001088)
2014-06-06r600g,radeonsi: disable fast clear if render condition is onMarek Olšák1-0/+3
For some reason, CP DMA doesn't follow the predicate bit if I enable it, so this is the only option. This fixes piglit: spec/NV_conditional_render/clear Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit bf701a84eb000910015a3c3ee9860141cde4990d)
2014-06-06mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.José Fonseca2-2/+12
Same as b026b6bbfe3f15c8a7296ac107dc3d31f74e401e, but COLOR_ARRAY_SIZE/SECONDARY_COLOR_ARRAY_SIZE. Ideally we wouldn't munge the incoming state, so that we wouldn't need to unmunge it back on glGet*. But the array size state is copied and referred in many places, many of which couldn't take an GLenum like GL_BGRA instead of a plain integer. So just hack around on glGet*, to ensure there is no risk of introducing regressions elsewhere. This bug causes problems to Apitrace, resulting in wrong traces. See https://github.com/apitrace/apitrace/issues/261 for details. Tested with piglit arb_vertex_array_bgra-get, which was created for this purpose. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e3e13d6b857b3083e2553457fe30ddfd4eddead4)
2014-06-06mesa/main: Make get_hash.c values constant.José Fonseca1-1/+1
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 53468dee0359a4ec3c9edd334656de0ddc47e477)
2014-06-06egl/main: Fix eglMakeCurrent when releasing context from current thread.Beren Minor1-2/+6
EGL 1.4 Specification says that eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) can be used to release the current thread's ownership on the surfaces and context. MESA's egl implementation was only accepting the parameters when the KHR_surfaceless_context extension is supported. [chadv] Add quote from the EGL 1.4 spec. Cc: "10,1, 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 0ca0d5743fb42a956289a87efd4c8fcda88cf93a)
2014-06-06Revert "glx: load dri driver with RTLD_LOCAL so dlclose never fails to unload"Marek Olšák1-5/+5
This reverts commit e3cc0d90e14e62a0a787b6c07a6df0f5c84039be. It breaks too many apps and completely breaks my desktop too. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79469 We'll probably need to re-release all stable versions after this is committed. Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 0d5ec2c615784929be095951f9269773a790a2dd)
2014-06-06llvmpipe: fix crash when not all attachments are populated in a fbRoland Scheidegger1-3/+9
Framebuffers can have NULL attachments since a while. llvmpipe handled that properly for lp_rast_shade_quads_mask but it seems the change didn't make it to lp_rast_shade_tile. This fixes piglit fbo-drawbuffers-none test (though I need to increase the FB_SIZE from 32 to 256 so the tris cover some tiles fully). https://bugs.freedesktop.org/show_bug.cgi?id=79421 Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 576868140bbb1abd177e7fd122720883d773137e)
2014-05-30i915: add a missing NULL pointer checkLubomir Rintel1-1/+1
mesaVisual can be NULL with configless context since this commit: commit 551d459af421a2eb937e9e16301bb64da4624f89 Author: Neil Roberts <neil@linux.intel.com> Date: Fri Mar 7 18:05:47 2014 +0000 Add the EGL_MESA_configless_context extension ... Previously the i965 and i915 drivers were explicitly creating a zeroed visual whenever 0 is passed for the EGLConfig. We attempt to dereference the visual in i915 and now we don't create a zeroed-out one one it crashes, breaking at least weston in an i915. There's no point in doing so as it would be zero anyway. v2: Fixed a typo in commit message. Added some tags. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1100967 Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 90b5747856dd116e1a7e0fd4a93781400f276c3e)
2014-05-30glapi: Duplicate GLES1 prototypes in glapi_dispatch.cIan Romanick1-0/+57
These prototypes are necessary because GLES1 library builds will create dispatch functions for them. We can't directly include GLES/gl.h because it would conflict the previously-included GL/gl.h. Since GLES1 ABI is not expected to every add more functions, the path of least resistance is to just duplicate the prototypes for the functions that aren't already in desktop OpenGL. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79294 Acked-by: Matt Turner <mattst88@gmail.com> Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7b1aeec9cd8c9b790d452eaf769ccbce51627908)
2014-05-30nvc0: revert mistaken logic to collapse color outputs to the beginningIlia Mirkin1-9/+4
In commit af38ef907, I added a "fix" to color outputs not being assigned correctly when sample mask was being output. This was totally wrong -- the color indices (i.e. "si" values) were the ones that were wrong. Undo that hunk. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 0d699530ff9fe68a1898f875b889422536bfc8e5) Requested-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-05-30mesa/st: fix color outputs in presence of sample mask outputIlia Mirkin1-13/+17
Commit c5d822dad90 added support for sample mask incorrectly. It became treated as a color output, and messed up the color output indices. Revert the hunk that did that, and add explicit support just like for depth/stencil writes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit ab7bd7093dfd18778ece4ed9098666c9ebc68d51) Requested-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-05-30i965: Fix Line Stipple enable bit in 3DSTATE_SF for Haswell.Pavel Popov1-1/+1
Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Pavel Popov <pavel.e.popov@intel.com> (cherry picked from commit d292d40207359cc70c004182484aaa939fd29e59)
2014-05-29glx: load dri driver with RTLD_LOCAL so dlclose never fails to unloadJerome Glisse1-5/+5
There is no reason anymore to load with RTLD_GLOBAL and for some driver this even result in dlclose failing to unload leading to catastrophic failure with swrast fallback. Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Jérôme Glisse <jglisse@redhat.com> (cherry picked from commit e3cc0d90e14e62a0a787b6c07a6df0f5c84039be)
2014-05-29glsl: fix use-after free bug/crash in ast_declarator_list::hir()Brian Paul1-1/+5
The call to get_variable_being_redeclared() may delete 'var' so we can't reference var->name afterward. We fix that by examining the var's name before making that call. Fixes valgrind warnings and possible crash when running the piglit tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test test (and probably others). Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit f9cecca7a6e3d9ff231075381b88d179e153a5a4)
2014-05-29i965: Fix repeated usage of rectangle texture coordinate scaling.Kenneth Graunke1-7/+20
Previously, we set up new entries in the params[] array on every access of a rectangle texture. Unfortunately, we only reserve space for (2 * MaxTextureImageUnits) extra entries, so programs which accessed rectangle textures more times than that would write off the end of the array and likely crash. We don't really have a decent mapping between the index returned by _mesa_add_state_reference and our index into the params array, so we have to manually search for it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78691 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit bb9623a1a8b1884817422752c8dced9f084d4547)
2014-05-29meta/blit: Use gl_FragColor also in the msaa blit shaderTopi Pohjolainen1-1/+1
Fixes framebuffer_blit_functionality_multisampled_to_singlesampled_blit es3 cts test on bdw. Also fixes this on ivb when ivb is forced to use the meta path. No piglit regressions on IVB. Further input from Ken: "Unfortunately, this doesn't fix MRT for integer data. In the single-sampled case, since we're directly copying data, we were read/copy/write data as "float" values, which actually contained the integer bits. Here, we can't do that since we need to process the actual integer data. I do wonder if we could use intBitsToFloat/uintBitsToFloat to stuff the integer bits in the float gl_FragColor output. Just a crazy idea. In the long term (post 10.2), I think we should draft an extension that allows you to do "layout(location = all)" on user-defined fragment shader outputs. (Or some similar syntax.)" Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> (cherry picked from commit a6022e5405a11ef24e3870ca86ffbbb52929ad4f)
2014-05-29i965/meta: Store stencil texturing modeTopi Pohjolainen1-0/+1
Meta path needs to keep the current texture object's state. Fixes the following gles3 cts tests on bdw: framebuffer_blit_functionality_negative_width_blit.test: fail framebuffer_blit_functionality_all_buffer_blit.test: fail framebuffer_blit_functionality_negative_height_blit.test: fail framebuffer_blit_functionality_missing_buffers_blit.test: fail framebuffer_blit_functionality_negative_dimensions_blit.test: fail framebuffer_blit_functionality_minifying_blit.test: fail framebuffer_blit_functionality_magnifying_blit.test: fail Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 57730d67f66f998e8417979b1569ad51f1a75c66)
2014-05-29meta/blit: Add stencil texturing mode save and restoreTopi Pohjolainen2-3/+14
v2 (Ken): Only restore the mode if it has changed. Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit c246828c4d59025bf4e1d5d9de5d9bc5517b3a7b)
2014-05-29Revert "i965: Don't make instructions with a null dest a barrier to scheduling."Matt Turner1-8/+4
This reverts commit 42a26cb5e441a01d5288b299980f23affaad53fe. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78648 (cherry picked from commit 0d3f83f4ad5f66a3ad62f1ec0cdc5029487e92f3)
2014-05-29Revert "i965/fs: Simplify interference scan in register coalescing."Matt Turner1-9/+13
This reverts commit 5ff1e446d44bb9d50f84883c7058635cb070e069. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77704 (cherry picked from commit a39428cf5c973513c5189dec4af34ce1e1582d51)
2014-05-29Revert "i965/fs: Give up in interference check if we see a WHILE."Matt Turner1-1/+1
This reverts commit 55de1c035cbca2b7087b3aa21a8c3dfc900a4ad9. Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit fc025a67198941ea105cb8a22272b4abf38b8616)
2014-05-29Revert "i965/fs: Reduce restrictions on interference in register coalescing."Matt Turner1-0/+13
This reverts commit f770123f58b46459e8dbd27525162ee8ba89f30b. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78692 (cherry picked from commit ccb1ea8a1502286124b48030dac9b898a6c7caaa)
2014-05-29glx: do not leak dri3DisplayEmil Velikov1-0/+4
v2: Do not wrap the code in ifdef HAVE_DRI3 (suggested by Keith) Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit eb2241f8a921a09db13bc453ce97b1f1939add17)
2014-05-29Revert "i965/fs: Change fs_visitor::emit_lrp to use MAC for gen<6"Matt Turner1-4/+7
This reverts commit a6860100b87415ab510d0d210cabfeeccebc9a0a. Why this code didn't work in all circumstances is unknown and without a working Ironlake simulator (which uses a different AUB format) we'll probably never know, short of a lot of experimentation, and spending a bunch of time to try to optimize a few instructions on Ironlake is not time well spent. Moreover, for mix(vec4, vec4, vec4) using the accumulator introduces a dependence between the otherwise independent per-component calculations. Not using the accumulator, even if it means an extra instruction per component might be preferable. We don't know, we don't have data, and we don't have the necessary register on Ironlake for shader_time to tell us. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77707 Acked-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit c2c639ecf667b4b7cf17cfe33dfe710432f2c43a)
2014-05-29Revert "i965/vec4: Change vec4_visitor::emit_lrp to use MAC for gen<6"Matt Turner1-6/+10
This reverts commit 2dfbbeca50b95ccdd714d9baa4411c779f6a20d9 with the comment about MAC and implicit accumulator removed. Why this code didn't work in all circumstances is unknown and without a working Ironlake simulator (which uses a different AUB format) we'll probably never know, short of a lot of experimentation, and spending a bunch of time to try to optimize a few instructions on Ironlake is not time well spent. Moreover, for mix(vec4, vec4, vec4) using the accumulator introduces a dependence between the otherwise independent per-component calculations. Not using the accumulator, even if it means an extra instruction per component might be preferable. We don't know, we don't have data, and we don't have the necessary register on Ironlake for shader_time to tell us. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77703 Acked-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit db42dd89527a42def720c3dd78a6e14402a1a2a2)
2014-05-29nv50/ir/tgsi: optimize KILChristoph Bumiller1-0/+5
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit d479713d25699c168af807ad36068691af11d0e0)
2014-05-29nv50/ir: fix lowering of predicated instructions (without defs)Christoph Bumiller1-1/+4
Note that predicated instructions with defs are still not supported because transformation to SSA doesn't handle them yet. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 452a4151aa1eebbc12b621a465fc452fdb95a08b)
2014-05-29nv50/ir/opt: fix constant folding with saturate modifierChristoph Bumiller1-1/+3
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 3b0867f35b5b294eb0d40524a6bc4c8de888a96f)
2014-05-29nv50/ir/tgsi: TGSI_OPCODE_POW replicates its resultChristoph Bumiller1-1/+5
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2f2d1b3d9b090aeba316d6c425c23e92340b5502)
2014-05-29nv50,nvc0: set constbufs dirty on pipe context switchChristoph Bumiller2-0/+5
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 49eccef06b0b4ca7d7cef0d76c2c251dd679c3bc)
2014-05-29nv50: setup scissors on clear_render_target/depth_stencilChristoph Bumiller1-2/+18
[imirkin: add logic to also clear the "regular" scissors] Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 200382be8576c43a668724c77b0f1b5a80b3adba)
2014-05-29nv50,nvc0: always pull out bufctx on context destructionChristoph Bumiller2-9/+7
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7d11b761f248ebf5cc2c6732e67656f828afb110)
2014-05-23Merge remote-tracking branch 'robclark/freedreno-10.2' into 10.2Ian Romanick29-229/+1847
2014-05-23i965: Properly return *RESET* status in glGetGraphicsResetStatusARBPavel Popov1-5/+13
The glGetGraphicsResetStatusARB from ARB_robustness extension always returns GUILTY_CONTEXT_RESET_ARB and never returns NO_ERROR for guilty context with LOSE_CONTEXT_ON_RESET_ARB strategy. This is because Mesa returns GUILTY_CONTEXT_RESET_ARB if batch_active !=0 whereas kernel driver never reset batch_active and this variable always > 0 for guilty context. The same behaviour also can be observed for batch_pending and INNOCENT_CONTEXT_RESET_ARB. But ARB_robustness spec says: If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset status is repeatedly returned, the context may be in the process of resetting. 8. How should the application react to a reset context event? RESOLVED: For this extension, the application is expected to query the reset status until NO_ERROR is returned. If a reset is encountered, at least one *RESET* status will be returned. Once NO_ERROR is encountered, the application can safely destroy the old context and create a new one. The main problem is the context may be in the process of resetting and in this case a reset status should be repeatedly returned. But looks like the kernel driver returns nonzero active/pending only if the context reset has already been encountered and completed. For this reason the *RESET* status cannot be repeatedly returned and should be returned only once. The reset_count and brw->reset_count variables can be used to control that glGetGraphicsResetStatusARB returns *RESET* status only once for each context. Note the i915 triggers reset_count twice which allows to return correct reset count immediately after active/pending have been incremented. v2 (idr): Trivial reformatting of comments. Signed-off-by: Pavel Popov <pavel.e.popov@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 8dc4a98c44a824630f3cc234136833dbac9a1f4c)
2014-05-23targets/egl-static: add missing line break in ldflagsEmil Velikov1-1/+1
Accidently omitted by commit 7b7944ee1cedeaf. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> (cherry picked from commit e0372239a5b716de21b5f4c7a4a7d8b4a74a51cb)
2014-05-23mesa: Fix unbinding GL_DEPTH_STENCIL_ATTACHMENTJames Legg1-0/+6
glFramebufferRender(..., GL_DEPTH_STENCIL_ATTACHMENT, ..., 0) only detached the depth buffer and not the stencil buffer. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=79115 Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 846c715abb17e13a5d39c565d0995404b6178d98)
2014-05-23meta blit: Set Z texcoord during meta blit to sample the correct layerJordan Justen1-1/+8
If the source renderbuffer has a depth > 0, then send a Z texcoord which is set to the source attachment Z offset. This fixes piglit's gl-3.2-layered-rendering-gl-layer-render with the GL_TEXTURE_2D_MULTISAMPLE_ARRAY case test on i965/gen8. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 57876fee3872f4f224feeeb56eea6d2e10858fe9)
2014-05-23i965: Listen to BRW_NEW_FRAGMENT_PROGRAM for 3DSTATE_PS_BLEND.Kenneth Graunke2-2/+3
brw_color_buffer_write_enabled depends on brw->fragment_program, which means we have to listen to BRW_NEW_FRAGMENT_PROGRAM. On most generations, this was only called from a function that already subscribed. However, on Broadwell, we failed to listen to the necessary event in the atom that emits 3DSTATE_PS_BLEND. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 746921cbb474f2df85232a8f0c10cde8df3349e9)
2014-05-23i965: Use WE_all for FB write header setup on Broadwell.Kenneth Graunke1-6/+7
I forgot to disable writemasking on the OR and MOV which set the render target index and "source 0 alpha present to render target" bit. Using get_element_ud is equivalent and avoids a line-wrap. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7d3985ca6cdd5f2f7ff68b269798d69394164dec)
2014-05-23meta: Use gl_FragColor to output color values to all the draw buffersAnuj Phogat1-11/+4
_mesa_meta_setup_blit_shader() currently generates a fragment shader which, irrespective of the number of draw buffers, writes the color to only one 'out' variable. Current shader rely on an undefined behavior and possibly works by chance. From OpenGL 4.0 spec, page 256: "If a fragment shader writes to gl_FragColor, DrawBuffers specifies a set of draw buffers into which the single fragment color defined by gl_FragColor is written. If a fragment shader writes to gl_FragData, or a user-defined varying out variable, DrawBuffers specifies a set of draw buffers into which each of the multiple output colors defined by these variables are separately written. If a fragment shader writes to none of gl_FragColor, gl_FragData, nor any user defined varying out variables, the values of the fragment colors following shader execution are undefined, and may differ for each fragment color." OpenGL 4.4 spec, page 463, added an additional line in this section: "If some, but not all user-defined output variables are written, the values of fragment colors corresponding to unwritten variables are similarly undefined." V2: Write color output to gl_FragColor instead of writing to multiple 'out' variables. This'll avoid recompiling the shader every time draw buffers count is updated. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 46737cebd337200f8b88ba9081796fa0f94e9143)