summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-08-07python: Fix rich comparisonsMathieu Bridon3-12/+13
Python 3 doesn't call objects __cmp__() methods any more to compare them. Instead, it requires implementing the rich comparison methods explicitly: __eq__(), __ne(), __lt__(), __le__(), __gt__() and __ge__(). Fortunately Python 2 also supports those. This commit only implements the comparison methods which are actually used by the build scripts. Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-08-07python: Use explicit integer divisionsMathieu Bridon6-16/+19
In Python 2, divisions of integers return an integer: >>> 32 / 4 8 In Python 3 though, they return floats: >>> 32 / 4 8.0 However, Python 3 has an explicit integer division operator: >>> 32 // 4 8 That operator exists on Python >= 2.2, so let's use it everywhere to make the scripts compatible with both Python 2 and 3. In addition, using __future__.division tells Python 2 to behave the same way as Python 3, which helps ensure the scripts produce the same output in both versions of Python. Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> (v2) Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-08-07egl/main: Add bits for EGL_KHR_mutable_render_bufferChad Versace5-4/+93
A follow-up patch enables EGL_KHR_mutable_render_buffer for Android. This patch is separate from the Android patch because I think it's easier to review the platform-independent bits separately. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07dri: Add param driCreateConfigs(mutable_render_buffer)Chad Versace8-13/+19
If set, then the config will have __DRI_ATTRIB_MUTABLE_RENDER_BUFFER, which translates to EGL_MUTABLE_RENDER_BUFFER_BIT_KHR. Not used yet. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07dri: Define DRI_MutableRenderBuffer extensionsChad Versace5-3/+144
Define extensions DRI_MutableRenderBufferDriver and DRI_MutableRenderBufferLoader. These are the two halves for EGL_KHR_mutable_render_buffer. Outside the DRI code there is one additional change. Add gl_config::mutableRenderBuffer to match __DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07egl/dri2: In dri2_make_current, return early on failureChad Versace1-14/+15
This pulls an 'else' block into the function's main body, making the code easier to follow. Without this change, the upcoming EGL_KHR_mutable_render_buffer patch transforms dri2_make_current() into spaghetti. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07egl: Simplify queries for EGL_RENDER_BUFFERChad Versace5-20/+85
There exist *two* queryable EGL_RENDER_BUFFER states in EGL: eglQuerySurface(EGL_RENDER_BUFFER) and eglQueryContext(EGL_RENDER_BUFFER). These changes eliminate potentially very fragile code in the upcoming EGL_KHR_mutable_render_buffer implementation. * eglQuerySurface(EGL_RENDER_BUFFER) The implementation of eglQuerySurface(EGL_RENDER_BUFFER) contained abstruse logic which required comprehending the specification complexities of how the two EGL_RENDER_BUFFER states interact. The function sometimes returned _EGLContext::WindowRenderBuffer, sometimes _EGLSurface::RenderBuffer. Why? The function tried to encode the actual logic from the EGL spec. When did the function return which variable? Go study the EGL spec, hope you understand it, then hope Mesa mutated the EGL_RENDER_BUFFER state in all the correct places. Have fun. To simplify eglQuerySurface(EGL_RENDER_BUFFER), and to improve confidence in its correctness, flatten its indirect logic. For pixmap and pbuffer surfaces, simply return a hard-coded literal value, as the spec suggests. For window surfaces, simply return _EGLSurface::RequestedRenderBuffer. Nothing difficult here. * eglQueryContext(EGL_RENDER_BUFFER) The implementation of this suffered from the same issues as eglQuerySurface, and the solution is the same. confidence in its correctness, flatten its indirect logic. For pixmap and pbuffer surfaces, simply return a hard-coded literal value, as the spec suggests. For window surfaces, simply return _EGLSurface::ActiveRenderBuffer. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07radeonsi: set GLC=1 for all write-only shader resourcesMarek Olšák1-2/+19
2018-08-07radeonsi: don't load block dimensions into SGPRs if they are not variableMarek Olšák3-7/+7
2018-08-07travis: meson/Vulkan requires LLVM 6.0Juan A. Suarez Romero1-3/+5
RADV now requires LLVM 6.0. Fixes: fd1121e8399 ("amd: remove support for LLVM 5.0") CC: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2018-08-07travis: add ubuntu-toolchain-r-testJuan A. Suarez Romero1-0/+4
LLVM 6.0 requires libstc++4.9, which is not available in main Travis repository. v2: LLVM 6.0 requires libstdc+4.9, rather than GCC 4.9 (Jan Vesely) Fixes: fd1121e8399 ("amd: remove support for LLVM 5.0") CC: Marek Olšák <marek.olsak@amd.com> CC: Emil Velikov <emil.velikov@collabora.com> CC: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-08-07egl: set EGL_BAD_NATIVE_PIXMAP in the copy_buffers fallbackEmil Velikov1-1/+2
As the spec says: EGL_BAD_NATIVE_PIXMAP is generated if the implementation does not support native pixmaps. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07egl/x11: use the no-op dri2_fallback_copy_buffers for swrastEmil Velikov1-1/+2
Currently dri2_copy_buffers is used for swrast, which depends on the DRI2_FLUSH extension. Since that's not a thing on software based drivers we crash out. Do the slightly more graceful, thing of returning EGL_FALSE. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07egl: remove unneeded _eglGetNativePlatform checkEmil Velikov1-2/+0
There's little point in calling _eglGetNativePlatform() in eglCopyBuffers. The platform returned should be identical to the one already stored in our _EGLDisplay. In the following corner case, the check is incorrect. The function _eglGetNativePlatform effectively invokes the old-style eglGetDisplay platform selection. Thus if the EGL_PLATFORM platform does not match with the EGL_EXT_platform_* used to create the display we'll error out. Addresses the egl-copy-buffers piglit test. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07travis: use https for all the linksEmil Velikov1-6/+6
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07autoconf: stop exporting internal wayland detailsEmil Velikov4-4/+8
With version v1.15 the "code" option was deprecated in favour of "private-code" or "public-code". Before the interface symbol generated was exported (which is a bad idea since it's internal implementation detail) and others may misuse it. That was the case with libva approx. 1 year ago. Since then libva was fixed, so we can finally hide it by using "private-code" Inspired by similar xserver patch by Adam Jackson. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07meson: stop exporting internal wayland detailsEmil Velikov2-2/+8
With version v1.15 the "code" option was deprecated in favour of "private-code" or "public-code". Before the interface symbol generated was exported (which is a bad idea since it's internal implementation detail) and others may misuse it. That was the case with libva approx. 1 year ago. Since then libva was fixed, so we can finally hide it by using "private-code" Inspired by similar xserver patch by Adam Jackson. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07meson: use dependency()+find_program() for wayland-scannerEmil Velikov1-1/+2
Helps when the native wayland-scanner is located outside of PATH. Inspired by the xserver code ;-) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07swr: don't export swr_create_screen_internalEmil Velikov2-2/+1
With earlier rework the user and provider of the symbol are within the same binary. Thus there's no point in exporting the function. Spotted while reviewing patch from Chuck, that nearly added another unneeded PUBLIC function. Cc: Chuck Atkins <chuck.atkins@kitware.com> Cc: Tim Rowley <timothy.o.rowley@intel.com> Fixes: f50aa21456d "(swr: build driver proper separate from rasterizer") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Chuck Atkins <chuck.atkins@kitware.com> Reviewed-By: George Kyriazis <george.kyriazis@intel.com<mailto:george.kyriazis@intel.com>> Tested-by: Chuck Atkins <chuck.atkins@kitware.com<mailto:chuck.atkins@kitware.com>>
2018-08-07meson: install KHR/khrplatform.h when neededEric Engestrom1-1/+1
Fixes: f7d42ee7d319256608ad "include: update GL & GLES headers (v2)" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-08-07i965: gen_shader_sha1() doesn't use the brw_contextEric Engestrom1-4/+4
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-08-07configure: install KHR/khrplatform.h when neededEric Engestrom1-0/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107511 Fixes: f7d42ee7d319256608ad "include: update GL & GLES headers (v2)" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Tested-by: Brad King <brad.king@kitware.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-08-07intel: don't build tools without -Dtools=intelLionel Landwerlin2-15/+15
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107487 Fixes: 4334196ab325c6w ("intel: tools: simplify meson build") Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-07virgl: update virgl_hw.h from virglrendererErik Faye-Lund1-1/+26
This just makes sure we're currently up-to-date with what virglrenderer has. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Acked-by: Dave Airlie <airlied@redhat.com>
2018-08-07virgl: rename msaa_sample_positions -> sample_locationsErik Faye-Lund2-5/+5
This matches what this field is called in virglrenderer's copy of this. This reduces the diff between the two different versions of virgl_hw.h, and should make it easier to upgrade the file in the future. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Acked-by: Dave Airlie <airlied@redhat.com>
2018-08-06vc4: Fix a leak of the no-vertex-elements workaround BO.Eric Anholt1-0/+2
Fixes: bd1925562ad1 ("vc4: Convert the driver to emitting the shader record using pack macros.")
2018-08-06vc4: Fix context creation when syncobjs aren't supported.Eric Anholt1-2/+6
Noticed when trying to run current Mesa on rpi's downstream kernel. Fixes: b0acc3a5628c ("broadcom/vc4: Native fence fd support")
2018-08-06v3d: Emit the VCM_CACHE_SIZE packet.Eric Anholt6-4/+45
This is needed to ensure that we don't get blocked waiting for VPM space with bin/render overlapping. Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-08-06v3d: Drop "VC5" from the renderer string.Eric Anholt1-1/+1
VC5 isn't a useful name any more, just stick to v3d.
2018-08-06v3d: Avoid spilling that breaks the r5 usage after a ldvary.Eric Anholt1-0/+9
Fixes bad rendering when forcing 2 spills in glxgears. Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-08-06v3d: Make sure that QPU instruction-has-a-dest matches VIR.Eric Anholt2-1/+11
Found when debugging register spilling -- we would try to spill the dest of a STVPMV, inserting spill code after entering the last segment. In fact, we were likely to to choose to do this, given that the STVPMV "dest" temp was never read from, making it cheap to spill. Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-08-06v3d: Wait for TMU writes to complete before continuing after a spill.Eric Anholt1-1/+6
The simulator complained that we had write responses outstanding at shader end. It seems that a TMU read does not guarantee that previous TMU writes by the thread have completed, which surprised me. Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-08-06v3d: Make sure we don't emit a thrsw before the last one finished.Eric Anholt1-2/+13
Found while forcing some spilling, which creates a lot of short tmua->thrsw->ldtmu sequences. Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-08-06v3d: Add some debug code for forcing register spilling.Eric Anholt1-0/+14
This is useful for periodically testing out register spilling to see how it goes on simple shaders, rather than only failing on insanely complicated ones.
2018-08-06drisw: Fix build on Android Nougat, which lacks shm (v2)Chad Versace1-0/+11
In commit cf54bd5e8, dri_sw_winsys.c began using <sys/shm.h> to support the new functions putImageShm, getImageShm in DRI_SWRastLoader. But Android began supporting System V shared memory only in Oreo. Nougat has no shm headers. Fix the build by ifdef'ing out the shm code on Nougat. Fixes: cf54bd5e8 "drisw: use shared memory when possible" Reviewed-by: Dave Airlie <airlied@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@gmail.com>
2018-08-06mesa: fix make check for AMD_framebuffer_multisample_advancedIan Romanick1-0/+8
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107483 Fixes: 3d6900d76ef ("glapi: define AMD_framebuffer_multisample_advanced and add its functions") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: Vinson Lee <vlee@freedesktop.org>
2018-08-06glapi: Fix GLES versioning for AMD_framebuffer_multisample_advanced functionsIan Romanick1-2/+2
The GL_AMD_framebuffer_multisample_advanced spec says: OpenGL ES dependencies: Requires OpenGL ES 3.0. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107483 Fixes: 3d6900d76ef ("glapi: define AMD_framebuffer_multisample_advanced and add its functions") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: Vinson Lee <vlee@freedesktop.org>
2018-08-06meson, install_megadrivers: Also remove stale symlinksGert Wollny1-2/+4
os.path.exists doesn't return True for stale symlinks, but they are in the way later, when a link/file with the same name is to be created. For instance it is conceivable that the pointed to file is replaced by a file with a new name, and then the symlink is dead. To handle this check specifically for all existing symlinks to be removed. (This bugged me for some time with a link libXvMCr600.so always being in the way of installing this file) v2: use only os.lexist and replace all instances of os.exist (Dylan Baker) v3: handle directory check correctly (Eric Engestrom) Fixes: f7f1b30f81e842db6057591470ce3cb6d4fb2795 ("meson: extend install_megadrivers script to handle symmlinking") Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>(v2 minus dir check) Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
2018-08-06anv: add more swapchain formatsTapani Pälli1-5/+11
This change helps with some of the dEQP-VK.wsi.android.* tests that try to create swapchain with using such formats. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
2018-08-04nvc0/ir: return 0 in imageLoad on incomplete texturesKarol Herbst2-3/+31
We already guarded all OP_SULDP against out of bound accesses, but we ended up just reusing whatever value was stored in the dest registers. Fixes CTS test shader_image_load_store.incomplete_textures v2: fix for loads not ending up with predicates (bindless_texture) v3: fix replacing the def Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-08-04gm200/ir: optimize rcp(sqrt) to rsqKarol Herbst1-1/+10
mitigates hurt shaders after adding sqrt: total instructions in shared programs : 5456166 -> 5454825 (-0.02%) total gprs used in shared programs : 647522 -> 647551 (0.00%) total shared used in shared programs : 389120 -> 389120 (0.00%) total local used in shared programs : 21064 -> 21064 (0.00%) total bytes used in shared programs : 58288696 -> 58274448 (-0.02%) local shared gpr inst bytes helped 0 0 0 516 516 hurt 0 0 27 2 2 Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-08-04gm200/ir: add native OP_SQRT supportKarol Herbst4-2/+14
./GpuTest /test=pixmark_piano 1024x640 30sec: 301 -> 327 points shader-db: total instructions in shared programs : 5472103 -> 5456166 (-0.29%) total gprs used in shared programs : 647530 -> 647522 (-0.00%) total shared used in shared programs : 389120 -> 389120 (0.00%) total local used in shared programs : 21064 -> 21064 (0.00%) total bytes used in shared programs : 58459304 -> 58288696 (-0.29%) local shared gpr inst bytes helped 0 0 27 8281 8281 hurt 0 0 21 431 431 v2: use NVISA_GM200_CHIPSET Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-08-04intel: tools: simplify meson buildLionel Landwerlin1-46/+50
Remove the if tools condition and just put it through the install: parameter. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-04intel: aubinator: simplify decodingLionel Landwerlin1-10/+5
Since we don't support streaming an aub file, we can drop the decoding status enum. v2: include stdbool (Eric) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-04intel: common: add missing stdint includeLionel Landwerlin1-0/+2
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-04intel: decoder: remove unused variableLionel Landwerlin1-2/+0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-04intel: tools: aubwrite: reuse canonical address helperLionel Landwerlin1-17/+2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-08-04intel: aubinator: fix read the context/ringLionel Landwerlin1-2/+2
Up to now we've been lucky that the buffer returned was always exactly at the address we requested. Fixes: 144b40db5411 ("intel: aubinator: drop the 1Tb GTT mapping") Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-08-04nir: Transform expressions of b2f(a) and b2f(b) to a == bIan Romanick1-0/+3
All Gen7+ platforms had similar results. (Skylake shown) total instructions in shared programs: 14276886 -> 14276838 (<.01%) instructions in affected programs: 312 -> 264 (-15.38%) helped: 2 HURT: 0 total cycles in shared programs: 532578395 -> 532570985 (<.01%) cycles in affected programs: 682562 -> 675152 (-1.09%) helped: 374 HURT: 4 helped stats (abs) min: 2 max: 200 x̄: 20.39 x̃: 18 helped stats (rel) min: 0.07% max: 11.64% x̄: 1.25% x̃: 1.28% HURT stats (abs) min: 2 max: 114 x̄: 53.50 x̃: 49 HURT stats (rel) min: 0.06% max: 11.70% x̄: 5.02% x̃: 4.15% 95% mean confidence interval for cycles value: -21.30 -17.91 95% mean confidence interval for cycles %-change: -1.30% -1.06% Cycles are helped. Sandy Bridge total instructions in shared programs: 10488123 -> 10488075 (<.01%) instructions in affected programs: 336 -> 288 (-14.29%) helped: 2 HURT: 0 total cycles in shared programs: 150260379 -> 150260439 (<.01%) cycles in affected programs: 4726 -> 4786 (1.27%) helped: 0 HURT: 2 No changes on Iron Lake or GM45. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
2018-08-04nir: Transform expressions of b2f(a) and b2f(b) to a ^^ bIan Romanick1-0/+3
All Gen platforms had pretty similar results. (Skylake shown) total instructions in shared programs: 14276892 -> 14276886 (<.01%) instructions in affected programs: 484 -> 478 (-1.24%) helped: 2 HURT: 0 total cycles in shared programs: 532578397 -> 532578395 (<.01%) cycles in affected programs: 3522 -> 3520 (-0.06%) helped: 1 HURT: 0 Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Thomas Helland <thomashelland90@gmail.com>