summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-01docs: add sha256 checksums for 17.0.717.0Emil Velikov1-1/+2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-01docs: add release notes for 17.0.7mesa-17.0.7Emil Velikov1-0/+144
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-01Update version to 17.0.7Emil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-31mesa: Avoid leaking surface in st_renderbuffer_deleteBartosz Tomczyk1-2/+8
v2: add comment in code Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100741 Fixes: a5e733c6b52 mesa: drop current draw/read buffer when ctx is released Reviewed-by: Rob Clark <robdclark@gmail.com> (v1) Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit fd6c2a3f3eb7f5f3077fb95b1441ddaa43b806fe) [Emil Velikov: s/CurrentClientDispatch/CurrentDispatch/] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/mesa/main/context.c
2017-05-31egl/wayland: select the format based on the interface usedEmil Velikov1-1/+2
Rather than misleadingly depending on DRI2 for the WL_DRM vs WL_SHM formats, use the wl_drm and wl_shm interface respectively. Fixes: a1727aa75ed ("egl/wayland: Don't use DRM format codes for SHM") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 6ef0fc400c690362b66add9c3533fae5f21d2cae)
2017-05-31radv: automake: list shared libraries after the static onesEmil Velikov1-18/+15
Analogous to previous commit - the compiler can discard xcb + wayland libs, since there is no user (the static libraries) before it on the command line. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> (cherry picked from commit 2b6ad89d8695c6b87c113eda198a65389bae9f3a)
2017-05-31anv: automake: list shared libraries after the static onesEmil Velikov1-15/+14
The compiler can discard the shared ones from the link chain, since there is no user (the static libraries) before it on the command line. Cc: mesa-stable@lists.freedesktop.org Reported-by: Laurent Carlier <lordheavym@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> (cherry picked from commit 3e8790bff096a1a56bd1a3046c556a7f93b68ca8)
2017-05-31i965: Round copy size to the nearest block in intel_miptree_copyJason Ekstrand1-2/+2
The width and height of the copy don't have to be aligned to the block size if they specify the right or bottom edges of the image. (See also the comment and asserts right above). We need to round them up when we do the division in order to get it 100% right. Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 0901d0bc4c78313eaaf29dff74c6a7bf5514f75b)
2017-05-31i965/blorp: Do and end-of-pipe sync on both sides of fast-clear opsJason Ekstrand1-18/+38
We've discovered in the Vulkan driver that simply doing the end-of-pipe sync afterwards is insufficient. The specific requirement stated in the PRM is that you have to do one every time you transition between the tree modes of "clear", "render", and "resolve". This is GL, so we could track it but any attempt to do so would most likely get it wrong. For now, it's easier to just assume that every fast-clear op is an island and do the sync both before and after. This also removes the unneeded flush and stall after slow-clear operations. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 441cd7a81d6fb90dacf8ae441b438d9fe7db19eb)
2017-05-26egl/wayland: Ensure we get a back bufferDaniel Stone1-1/+9
Commit 9ca6711faa03 changed the Wayland winsys to only block for the frame callback inside SwapBuffers, rather than get_back_bo. get_back_bo would perform a single non-blocking Wayland event dispatch, to try to find any release events which we had pulled off the wire but not actually processed. The blocking dispatch was moved to SwapBuffers. This removed a guarantee that we would've processed all events inside get_back_bo(), and introduced a failure whereby the server could've sent a buffer release event, but we wouldn't have read it. In clients unconstrained by SwapInterval (rendering ~as fast as possible), which were being displayed directly without composition (buffer release delayed), this could lead to get_back_bo() failing because there were no free buffers available to it. The drawing rightly failed, but this was papered over because of the path in eglSwapBuffers() which attempts to guarantee a BO, in order to support calling SwapBuffers twice in a row with no rendering actually having been performed. Since eglSwapBuffers will perform a blocking dispatch of Wayland events, a buffer release would have arrived by that point, and we could then choose a buffer to post to the server. The effect was that frames were displayed out-of-order, since we grabbed a frame with random past content to display to the compositor. Ideally get_back_bo() failing should store a failure flag inside the surface and cause the next SwapBuffers to fail, but for the meantime, restore the correct behaviour such that get_back_bo() no longer fails. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Eero Tamminen <eero.t.tamminen@intel.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98833 Fixes: 9ca6711faa03 ("Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers"") (cherry picked from commit 1f2d0093bf5084f65a923582881dc74153c804a4)
2017-05-26egl/wayland: Use per-surface event queuesDaniel Stone2-27/+68
During display initialisation, we need a separate event queue to handle the registry events, which is correctly handled. But we also need separate per-surface event queues to handle swapchain-related events, such as surface frame events and buffer release events. This avoids two surfaces from the same EGLDisplay, both current on separate threads, dispatching each other's events. Create separate per-surface event queues, create wl_surface and wl_drm proxy wrapper objects per surface, so we eliminate the race around sending events to the wrong queue. swrast buffers do not need a dedicated proxy wrapper, as the wl_shm_pool used to create the wl_buffers, being transient, can itself be assigned to a queue. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: 36b9976e1f99 ("egl/wayland: Avoid race conditions when on non-main thread") Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 03dd9a88b0be17ff0ce91e92f6902a9a85ba584a) Squashed with: egl/wayland: verify event queue was allocated We're already verified that 'window' wasn't NULL, I'm guessing this allocation error is about the newly created queue. CID: 1409754 Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues") Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> (cherry picked from commit 30dc56bb5b313ae67c6e8648e23bb38c8e737488)
2017-05-26egl/wayland: Don't open-code roundtripDaniel Stone1-25/+1
wl_display_roundtrip_queue() exists and can replace roundtrip(). The API was introduced with wayland 1.6, while we currently require 1.11. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 8118bc269f39ea0b965752ea89b886b28094db42)
2017-05-26vulkan/wsi/wayland: Use proxy wrappers for swapchainDaniel Stone1-18/+44
Though most swapchain operations used a queue, they were racy in that the object was created with the queue only set later, meaning that its event could potentially be dispatched from the default queue in between these two steps. Use proxy wrappers to avoid this race, also assigning wl_buffers created for the swapchain to the event queue. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 5034c615582add2be9309dc1d7383fb0daba6dd3) [Emil Velikov: wsi_wl_swapchain is missing surface_version, move image_count] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/vulkan/wsi/wsi_common_wayland.c Squahed with: vulkan/wsi/wayland: Fix proxy wrappers for swapchain recreation Before the swapchain event queue is destroyed, all proxy objects that reference it must be dropped. Otherwise we risk a use-after-free if a frame callback event or buffer release events are received afterwards. This happens when an application destroys and recreates a swapchain in FIFO mode between two frames without using the VkSwapchainCreateInfoKHR::oldSwapchain mechanism to keep the old swapchain until after the next redraw. Fixes: 5034c615582a ("vulkan/wsi/wayland: Use proxy wrappers for swapchain") Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 1586768e7475a2732650f0ec2738b4e8429e4b40) [Emil Velikov: image_count is not in base] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/vulkan/wsi/wsi_common_wayland.c
2017-05-26vulkan/wsi/wayland: Use per-display event queueDaniel Stone1-12/+32
Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit c902a1957d079941823006d56b6810e1e85be4b0)
2017-05-26vulkan/wsi/wayland: Remove roundtrip when creating imageDaniel Stone1-1/+0
There's no need to call wl_display_roundtrip() after trying to create a buffer through wl_drm; if it succeeds then everything is fine, and if it fails, then we get a fatal protocol error so can't recover anyway. Additionally, doing a roundtrip on the default / main application queue, is destructive anyway, so would need to be its own queue. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit afe8c8a2997950cd63076b7c9eba39e1858fee43)
2017-05-26vulkan: Fix Wayland uninitialised registryDaniel Stone1-4/+5
Untangle the exit cleanup paths so we don't try to use the registry variable before it's been initialised. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit d9a8bba7f44f7042f0bbd659d0ed342236423dd3)
2017-05-26nvc0/ir: SHLADD's middle source must be an immediateIlia Mirkin1-0/+2
The instruction encodings only allow for immediates. Don't try to replace a zero (which is dumb to have in that op in any case) with RZ. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 82e77d4e4484b5d4f6a7b4751a17c882e6d2ad69)
2017-05-26st/va: fix misplaced closing bracketEmil Velikov1-1/+1
It's been like this since the code was introduced. Fixes: 86eb4131a90 (st/va: add headless support, i.e. VA_DISPLAY_DRM) Cc: <mesa-stable@lists.freedesktop.org> Cc: Julien Isorce <julien.isorce@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> (cherry picked from commit aaea53c2c02e4d5352ce3d08dfd43b2676d32000)
2017-05-26i965/formats: Update the three-channel DXT1 mappingsNanley Chery2-13/+4
The procedure for decompressing an opaque DXT1 OpenGL format is dependant on the comparison of two colors stored in the first 32 bits of the compressed block. Here's the specified OpenGL behavior for reference: The RGB color for a texel at location (x,y) in the block is given by: RGB0, if color0 > color1 and code(x,y) == 0 RGB1, if color0 > color1 and code(x,y) == 1 (2*RGB0+RGB1)/3, if color0 > color1 and code(x,y) == 2 (RGB0+2*RGB1)/3, if color0 > color1 and code(x,y) == 3 RGB0, if color0 <= color1 and code(x,y) == 0 RGB1, if color0 <= color1 and code(x,y) == 1 (RGB0+RGB1)/2, if color0 <= color1 and code(x,y) == 2 BLACK, if color0 <= color1 and code(x,y) == 3 The sampling operation performed on an opaque DXT1 Intel format essentially hard-codes the comparison result of the two colors as color0 > color1. This means that the behavior is incompatible with OpenGL. This is stated in the SKL PRM, Vol 5: Memory Views: Opaque Textures (DXT1_RGB) Texture format DXT1_RGB is identical to DXT1, with the exception that the One-bit Alpha encoding is removed. Color 0 and Color 1 are not compared, and the resulting texel color is derived strictly from the Opaque Color Encoding. The alpha channel defaults to 1.0. Programming Note Context: Opaque Textures (DXT1_RGB) The behavior of this format is not compliant with the OGL spec. The opaque and non-opaque DXT1 OpenGL formats are specified to be decoded in exactly the same way except the BLACK value must have a transparent alpha channel in the latter. Use the four-channel BC1 Intel formats with the alpha set to 1 to provide the behavior required by the spec. Note that the alpha is already set to 1 for RGB formats in brw_get_texture_swizzle(). v2: Provide a more detailed commit message (Kenneth Graunke). v3: Ensure the alpha channel is set to 1 for DXT1 formats. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100925 Cc: <mesa-stable@lists.freedesktop.org> Acked-by: Tapani Pälli <tapani.palli@intel.com> (v1) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com> (cherry picked from commit 688ddb85c8c3357d8e1e9d360c74cd728b128d98) [Emil Velikov: attribute for BRW to ISL format rename] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/mesa/drivers/dri/i965/brw_surface_formats.c
2017-05-26anv/formats: Update the three-channel BC1 mappingsNanley Chery1-2/+2
The procedure for decompressing an opaque BC1 Vulkan format is dependant on the comparison of two colors stored in the first 32 bits of the compressed block. Here's the specified OpenGL (and Vulkan) behavior for reference: The RGB color for a texel at location (x,y) in the block is given by: RGB0, if color0 > color1 and code(x,y) == 0 RGB1, if color0 > color1 and code(x,y) == 1 (2*RGB0+RGB1)/3, if color0 > color1 and code(x,y) == 2 (RGB0+2*RGB1)/3, if color0 > color1 and code(x,y) == 3 RGB0, if color0 <= color1 and code(x,y) == 0 RGB1, if color0 <= color1 and code(x,y) == 1 (RGB0+RGB1)/2, if color0 <= color1 and code(x,y) == 2 BLACK, if color0 <= color1 and code(x,y) == 3 The sampling operation performed on an opaque DXT1 Intel format essentially hard-codes the comparison result of the two colors as color0 > color1. This means that the behavior is incompatible with OpenGL and Vulkan. This is stated in the SKL PRM, Vol 5: Memory Views: Opaque Textures (DXT1_RGB) Texture format DXT1_RGB is identical to DXT1, with the exception that the One-bit Alpha encoding is removed. Color 0 and Color 1 are not compared, and the resulting texel color is derived strictly from the Opaque Color Encoding. The alpha channel defaults to 1.0. Programming Note Context: Opaque Textures (DXT1_RGB) The behavior of this format is not compliant with the OGL spec. The opaque and non-opaque BC1 Vulkan formats are specified to be decoded in exactly the same way except the BLACK value must have a transparent alpha channel in the latter. Use the four-channel BC1 Intel formats with the alpha set to 1 to provide the behavior required by the spec. v2 (Kenneth Graunke): - Provide a more detailed commit message. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100925 Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com> (cherry picked from commit 56458cb168bf79ae51ba1efc3acec15874cc34a9)
2017-05-26gallivm: Make sure module has the correct data layout when pass manager runsTom Stellard1-16/+18
The datalayout for modules was purposely not being set in order to work around the fact that the ExecutionEngine requires that the module's datalayout matches the datalayout of the TargetMachine that the ExecutionEngine is using. When the pass manager runs on a module with no datalayout, it uses the default datalayout which is little-endian. This causes problems on big-endian targets, because some optimizations that are legal on little-endian or illegal on big-endian. To resolve this, we set the datalayout prior to running the pass manager, and then clear it before creating the ExectionEngine. This patch fixes a lot of piglit tests on big-endian ppc64. Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 14e525a4d70649eb10185bebd2aef9dc339fb5e6)
2017-05-26egl: Partially revert 23c86c74, fix eglMakeCurrentChad Versace1-19/+0
Fixes regressions in Android CtsVerifier.apk on Intel Chrome OS devices due to incorrect error handling in eglMakeCurrent. See below on how to confirm the regression is fixed. This partially reverts commit 23c86c74cc450a23848b85cfe914376caede1cdf Author: Chad Versace <chadversary@chromium.org> Subject: egl: Emit error when EGLSurface is lost The problem with commit 23c86c74 is that, once an EGLSurface became lost, the app could never unbind the bad surface. Each attempt to unbind the bad surface with eglMakeCurrent failed with EGL_BAD_CURRENT_SURFACE. Specificaly, the bad commit added the error handling below. #2 and #3 were right, but #1 was wrong. 1. eglMakeCurrent emits EGL_BAD_CURRENT_SURFACE if the calling thread has unflushed commands and either previous surface is no longer valid. 2. eglMakeCurrent emits EGL_BAD_NATIVE_WINDOW if either new surface is no longer valid. 3. eglSwapBuffers emits EGL_BAD_NATIVE_WINDOW if the swapped surface is no longer valid. Whe I wrote the bad commit, I misunderstood the EGL spec language for #1. The correct behavior is, if I understand correctly now, is below. This patch doesn't implement the correct behavior, though, it just reverts the broken behavior. - Assume a bound EGLSurface is no longer valid. - Assume the bound EGLContext has unflushed commands. - The app calls eglMakeCurrent. The spec requires eglMakeCurrent to implicitly flush. After flushing, eglMakeCurrent emits EGL_BAD_CURRENT_SURFACE and does *not* alter the thread's current bindings. - If the app calls eglMakeCurrent again, and the app inserts no commands into the GL command stream between the two eglMakeCurrent calls, then this second eglMakeCurrent succeeds without emitting an error. How to confirm this fixes the regression: Download android-cts-verifier-7.1_r5-linux_x86-x86.zip from source.android.com, unpack, and `adb install CtsVerifier.apk`. Run test "Projection Cube". Click the Pass button (a green checkmark). Then run test "Projection Widget". Confirm that widgets are visible and that logcat does not complain about eglMakeCurrent failure. Then confirm there are no regressions in the cts-traded module that commit 263243b1 fixed: cts-tf > run cts --skip-preconditions --skip-device-info \ -m CtsCameraTestCases \ -t android.hardware.camera2.cts.RobustnessTest Tested with Chrome OS board "reef". Fixes: 23c86c74 (egl: Emit error when EGLSurface is lost) Acked-by: Tapani Pälli <tapani.palli@intel.com> Cc: "17.1" <mesa-stable@lists.freedesktop.org> Cc: Tomasz Figa <tfiga@chromium.org> Cc: Nicolas Boichat <drinkcat@chromium.org> Cc: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 8f62d21bd72059d723f4626f76de6fec4a569616)
2017-05-26i965/vec4: load dvec3/4 uniforms first in the push constant bufferSamuel Iglesias Gonsálvez1-27/+80
Reorder the uniforms to load first the dvec4-aligned variables in the push constant buffer and then push the vec4-aligned ones. It takes into account that the relocated uniforms should be aligned to their channel size. This fixes a bug were the dvec3/4 might be loaded one part on a GRF and the rest in next GRF, so the region parameters to read that could break the HW rules. v2: - Fix broken logic. - Add a comment to explain what should be needed to optimise the usage of the push constant buffer slots, as this patch does not pack the uniforms. v3: - Implemented the push constant buffer usage optimization. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Cc: "17.1" <mesa-stable@lists.freedesktop.org> Acked-by: Francisco Jerez <currojerez@riseup.net> (cherry picked from commit e69e5c7006da80af62c9ef08dec215b3b4b30946)
2017-05-26i965/vec4: fix swizzle and writemask when loading an uniform with constant ↵Samuel Iglesias Gonsálvez1-4/+11
offset It was setting XYWZ swizzle and writemask to all uniforms, no matter if they were a vector or scalar, so this can lead to problems when loading them to the push constant buffer. Moreover, 'shift' calculation was designed to calculate the offset in DWORDS, but it doesn't take into account DFs, so the calculated swizzle for the later ones was wrong. The indirect case is not changed because MOV INDIRECT will write to all components. Added an assert to verify that these uniforms are aligned. v2: - Fix 'shift' calculation (Curro) - Set both swizzle and writemask. - Add assert(shift == 0) for the indirect case. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Cc: "17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Francisco Jerez <currojerez@riseup.net> (cherry picked from commit 8aa6ada8384a961b37dfefec7f9e40e5a4e27ce7)
2017-05-26i965/vec4/gs: restore the uniform values which was overwritten by failed ↵Samuel Iglesias Gonsálvez1-0/+26
vec4_gs_visitor execution We are going to add a packing feature to reduce the usage of the push constant buffer. One of the consequences is that 'nr_params' would be modified by vec4_visitor's run call, so we need to restore it if one of them failed before executing the fallback ones. Same thing happens to the uniforms values that would be reordered afterwards. Fixes GL45-CTS.arrays_of_arrays_gl.InteractionFunctionCalls2 when the dvec4 alignment and packing patch is applied. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Cc: "17.1" <mesa-stable@lists.freedesktop.org> Acked-by: Francisco Jerez <currojerez@riseup.net> (cherry picked from commit 354f7f2cb9c7206e12646c79d8ff5becbaffa61b)
2017-05-26vc4: Don't allocate new BOs to avoid synchronization when they're shared.Eric Anholt1-1/+2
If X11 did a software fallback to the entire screen, we would throw out the BO the screen is scanning out from and allocate a new one. Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit e8ea42d245cb6adc7f16ee4e96fd89d905d2163a)
2017-05-26glxglvnddispatch: Add missing dispatch for GetDriverConfigHans de Goede2-0/+15
Together with some fixes to xdriinfo this fixes xdriinfo not working with glvnd. Since apps (xdriinfo) expect GetDriverConfig to work without going to need through the dance to setup a glxcontext (which is a reasonable expectation IMHO), the dispatch for this ends up significantly different then any other dispatch function. This patch gets the job done, but I'm not really happy with how this patch turned out, suggestions for a better fix are welcome. Cc: Kyle Brenneman <kbrenneman@nvidia.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 84f764a7591715104b28c035c837ce9fd86157ad)
2017-05-26intel/isl/gen7: Use stencil vertical alignment of 8 instead of 4Pohjolainen, Topi1-23/+5
The reasoning Chad gave in the comment for choosing a valign of 4 is entirely bunk. The fact that you have to multiply pitch by 2 is completely unrelated to the halign/valign parameters used for texture layout. (Not completely unrelated. W-tiling is just Y-tiling with a bit of extra swizzling which turns 8x8 W-tiled chunks into 16x4 y-tiled chunks so it makes everything easier if miplevels are always aligned to 8x8.) The fact that RENDER_SURFACE_STATE::SurfaceVerticalAlignmet doesn't have a VALIGN_8 option doesn't matter since this is gen7 and you can't do stencil texturing anyway. v2 (Jason Ekstrand): - Delete most of Chad's comment and add a more descriptive commit message. Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Chad Versace <chadversary@chromium.org> (cherry picked from commit 236f17a9f73935db6cddafd91e53a5fae34aae6e)
2017-05-26etnaviv: stop oversizing buffer resourcesLucas Stach1-1/+1
PIPE_BUFFER is a target enum, not a binding. This caused the driver to up-align the height of buffer resources, leading to largely oversizing those resources. This is especially bad, as the buffer resources used by the upload manager are already 1MB in size. Height alignment meant that those would result in 4 to 8MB big BOs. Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit 8173d7d9e8b40cc9415811ad13924daa04a73646)
2017-05-26renderonly: Initialize fields of struct winsys_handle.Eric Anholt1-0/+1
vc4 was rejecting renderonly's import, because the offset field was nonzero. Fixes: 848b49b288f ("gallium: add renderonly library") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commit c98f03c6ebaca82c265b2f3242aed5c6a3c5dcd8)
2017-05-13docs: add sha256 checksums for 17.0.6Andres Gomez1-1/+2
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-05-12docs: add release notes for 17.0.6mesa-17.0.6Andres Gomez1-0/+185
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-05-12Update version to 17.0.6Andres Gomez1-1/+1
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-05-12cherry-ignore: rejected commitsAndres Gomez1-0/+16
stable: rejected commits. Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-05-12cherry-ignore: fix regression in descriptor set freeing.Andres Gomez1-0/+2
fixes: Fixes earlier commit 126d5ad which did not land in branch Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-05-12cherry-ignore: 17.1 nominations onlyAndres Gomez1-0/+39
stable: 17.1 nominations only. Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-05-12radeonsi: apply the tess+GS hang workaround to Polaris12 as wellMarek Olšák1-1/+2
Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit ee5908396e4b0d4be64d8bc486d25c2e95b7fd71) [Andres Gomez: resolve trivial conflicts] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/gallium/drivers/radeonsi/si_state_draw.c
2017-05-12radv: enable POLARIS12 support.Dave Airlie3-0/+7
This just adds the chip in the right places. We don't set the partial_vs_wave workaround, as radeonsi doesn't, but have to confirm it's not required. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit a096d8d3f7a8c6dffc91b2ac1794fdd215c054d3) [Andres Gomez: dropped code that didn't make it for 17.0] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/amd/vulkan/radv_device.c
2017-05-12radeonsi: fix gl_PrimitiveID in tessellation with instanced draws on SINicolai Hähnle1-0/+14
Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit f16b7558632d1d2d355a8251e969b8fc41f9c1e8)
2017-05-12freedreno/a3xx: fix hang w/ large render targets and small gmemRob Clark3-0/+7
Possibly other gen's have a similar limit. Fixes glmark2 -b shadow with larger resolutions on devices with small gmem (for example, fullscreen 1080p on 8x16/db410c). Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Rob Clark <robdclark@gmail.com> (cherry picked from commit 6050d5bf3d8d0043386de35cad4efa77e8be957e)
2017-05-12scons: update for LLVM 4.0Ben Boeckel1-2/+20
LLVMDemangle, LLVMGlobalISel, and LLVMDebugInfoMSF are new. Also update the comment to add irreader to the list of components. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Chuck Atkins <chuck.atkins@kitware.com> Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 58f51f0754d736e76248e075bd25424ff4b64b46)
2017-05-12nir/lower_tex: Fix minor error in YUV color conversion matrixJohnson Lin1-3/+3
The matrix used for YCbCr to RGB is listed in: https://en.wikipedia.org/wiki/YCbCr There was an error in converting the offsets from integers to unorm values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. With this fix, the CSC result is bit aligned with wikipedia's conversion result and FFMPeg's result. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100854 Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (cherry picked from commit a6fb943f3eb86ca501a7e7b8d4621ba215f91133)
2017-05-12egl/android: Mark surface as lost when dequeueBuffer failsChad Versace1-1/+11
This ensures that future calls to eglSwapBuffers and eglMakeCurrent emit an error. This patch is part of a series for fixing android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface on Chrome OS x86 devices. Cc: mesa-stable@lists.freedesktop.org Cc: Tomasz Figa <tfiga@chromium.org> Cc: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit e5eace586848511f4ceaffaa2d45131c31c45ae0) Squashed with commit: egl/android: Set EGLSurface.Lost to EGL_TRUE/EGL_FALSE Lost is an EGLBoolean, so we should assign it to EGL_TRUE/EGL_FALSE, not true/false. Fixes: e5eace58684 ("egl/android: Mark surface as lost when dequeueBuffer fails") Fixes: 0212db35040 ("egl/android: Cancel any outstanding ANativeBuffer in surface destructor") Reviewed-by: Chad Versace <chadversary@chromium.org> (cherry picked from commit 63b12b0c77759a0244416cd1406c2bf50e7c01ec)
2017-05-12egl/android: Cancel any outstanding ANativeBuffer in surface destructorChad Versace1-4/+9
That is, call ANativeWindow::cancelBuffer in droid_destroy_surface(). This should prevent application deadlock when the app destroys the EGLSurface after EGL has acquired a buffer from SurfaceFlinger (ANativeWindow::dequeueBuffer) but before EGL has released it (ANativeWindow::enqueueBuffer). This patch is part of a series for fixing android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface on Chrome OS x86 devices. Cc: mesa-stable@lists.freedesktop.org Cc: Tomasz Figa <tfiga@chromium.org> Cc: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 0212db350407e1331ff23f04136684cf2b7396cf)
2017-05-12egl: Emit error when EGLSurface is lostChad Versace3-0/+42
Add a new bool, _EGLSurface::Lost, and check it in eglMakeCurrent and eglSwapBuffers. The EGL 1.5 spec says that those functions emit errors when the native surface is no longer valid. This patch just updates core EGL. No driver sets _EGLSurface::Lost yet. I discovered that Mesa failed to detect lost surfaces while debugging an Android CTS camera test, android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface. This patch doesn't fix the test though, though, because the test expects EGL_BAD_SURFACE when the surface becomes lost, and this patch actually complies with the EGL spec. If I interpreted the EGL spec correctly, EGL_BAD_NATIVE_WINDOW or EGL_BAD_CURRENT_SURFACE is the correct error. Cc: mesa-stable@lists.freedesktop.org Cc: Tomasz Figa <tfiga@chromium.org> Cc: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 23c86c74cc450a23848b85cfe914376caede1cdf)
2017-05-12glx: glX_proto_send.py: use correct compile guard GLX_INDIRECT_RENDERINGEmil Velikov2-4/+4
The code itself has nothing to do with shared glapi, thus having it behind GLX_SHARED_GLAPI is misleading. Use GLX_INDIRECT_RENDERING instead. The latter macro is set at global scope by the Autotools and Scons build systems. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 6177d60a374a3d48969fcb062ac1d82465850cb4)
2017-05-12mesa/dri: always link against shared glapiEmil Velikov1-7/+9
Analogous to previous commit. Check with the extensive commit description and bug report referenced. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 51accecce7755be9b7eb1baadaec7e4b7d1011af)
2017-05-12gallium/dri: always link against shared glapiEmil Velikov1-3/+3
In the early days of Xorg and Mesa we had multiple providers of the GLAPI. All of those were the ones responsible for dlopening the DRI module. Hence it was perfectly fine, and actually expected, for the DRI modules to have unresolved symbols. Since then we've moved the API to a separate shared library and no other libraries provide the symbols. Here comes the picky part: It's possible that one uses old Xorg (where libglx.so provides the GLAPI) and new Mesa (with DRI modules linking against libglapi.so). That should still work, since the the libglx.so symbols will take precedence over the libglapi.so ones. I've verified this while running 1.14 series Xorg alongside this (and next) patch. It may seem a bit fragile, but that's of reasonably OK since all of the affected Xorg versions have been EOL for years. The final one being the 1.14 series, which saw its final bug fix release 1.14.7 in June 2014. To ensure that the binaries do not have unresolved symbols add -no-undefined and $(LD_NO_UNDEFINED), just like we do everywhere else throughout mesa. Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428 Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 79a26b663acdffc3f21d6e37f3334495aed16ae5)
2017-05-12egl/platform/drm: Don't take display ownership until gbm is initializedAdam Jackson1-1/+1
If the gbm_create_device() call here actually did fail, any subsequent eglTerminate on the display would segfault. Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit f258815c7d4187fd83f6944943e78206a6cdc4cb)
2017-05-12anv: vkBindImageMemory() should return VK_ERROR_OUT_OF_{HOST,DEVICE}_MEMORY ↵Samuel Iglesias Gonsálvez1-1/+1
on failure According to the spec we get VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY on vkBindImageMemory failure. Fixes returned value changed by b546c9d. Fixes: b546c9d ("anv: anv_gem_mmap() returns MAP_FAILED as mapping error") Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 939b015736d5091faeabde4f5a373e6a1612c5ed)