summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Handle partial loads/stores of tiled textures.Eric Anholt2018-08-083-60/+155
| | | | | | | | | | | | | | | | Previously, we would load out the tile-aligned area, update the raster copy, and store it back. This was a huge cost for XPutImage calls to the screen under glamor. Instead, implement a general load/store path that walks over the source x/y writing into the corresponding pixel of the destination (using clever math from https://fgiesen.wordpress.com/2011/01/17/texture-tiling-and-swizzling/). If things are aligned, we go through the previous utile-at-a-time loop. Improves x11perf -putimage10 performance by 139.777% +/- 2.83464% (n=5) Improves x11perf -putimage100 performance by 383.908% +/- 22.6297% (n=11) Improves x11perf -getimage10 performance by 2.75731% +/- 0.585054% (n=145)
* vc4: Compile the LT image helper per cpp we might load/store.Eric Anholt2018-08-081-2/+31
| | | | | | | | For the partial load/store support I'm about to add, we want the memcpy to be compiled out to a single load/store. This should also eliminate the calls to vc4_utile_width/height(). Improves x11perf -putimage100 performance by 3.76344% +/- 1.16978% (n=15)
* vc4: Refactor to reuse the LT tile walking code.Eric Anholt2018-08-081-24/+34
|
* wayland/egl: update surface size on window resizeJuan A. Suarez Romero2018-08-081-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to EGL 1.5 spec, section 3.10.1.1 ("Native Window Resizing"): "If the native window corresponding to _surface_ has been resized prior to the swap, _surface_ must be resized to match. _surface_ will normally be resized by the EGL implementation at the time the native window is resized. If the implementation cannot do this transparently to the client, then *eglSwapBuffers* must detect the change and resize surface prior to copying its pixels to the native window." So far, resizing a native window in Wayland/EGL was interpreted in Mesa as a request to resize, which is not executed until the first draw call. And hence, surface size is not updated until executing it. Thus, querying the surface size with eglQuerySurface() after a window resize still returns the old values. This commit updates the surface size values as soon as the resize is done, even when the real resize is done in the draw call. This makes the semantics that any native window resize request take effect inmediately, and if user calls eglQuerySurface() it will return the new resized values. v2: update surface size if there isn't a back surface (Daniel) CC: Daniel Stone <[email protected]> CC: [email protected] Reviewed-by: Daniel Stone <[email protected]>
* wayland/egl: initialize window surface size to window sizeJuan A. Suarez Romero2018-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a windows surface with eglCreateWindowSurface(), the width and height returned by eglQuerySurface(EGL_{WIDTH,HEIGHT}) is invalid until buffers are updated (like calling glClear()). But according to EGL 1.5 spec, section 3.5.6 ("Surface Attributes"): "Querying EGL_WIDTH and EGL_HEIGHT returns respectively the width and height, in pixels, of the surface. For a window or pixmap surface, these values are initially equal to the width and height of the native window or pixmap with respect to which the surface was created" This fixes dEQP-EGL.functional.color_clears.* CTS tests v2: - Do not modify attached_{width,height} (Daniel) - Do not update size on resizing window (Brendan) CC: Daniel Stone <[email protected]> CC: Brendan King <[email protected]> CC: [email protected] Tested-by: Eric Engestrom <[email protected]> Tested-by: Chad Versace <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* travis: make drivers explicit in Meson targetsJuan A. Suarez Romero2018-08-081-3/+14
| | | | | | | | | | | Like in the autotools target, make the list of drivers to be built in each of the Meson targets explicit. This will help to identify missing dependencies and other issues more easily. CC: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* svga: use pipe_sampler_view::target in svga_set_sampler_views()Brian Paul2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | instead of the underlying texture's target. This fixes an issue where the TGSI sampler type was not agreeing with the sampler view target/type. In particular, this fixes a Mint 19 XFCE desktop scaling issue because the TGSI code was using a RECT sampler but the sampler view's underlying texture was PIPE_TEXTURE_2D. We want to use the sampler view's type rather than the underlying resource, as we do for the view's surface format. No piglit regressions. VMware issue 2156696. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: use SVGA3D_RS_FILLMODE for vgpu9Brian Paul2018-08-083-26/+37
| | | | | | | | | | | | | I'm not sure why we didn't support this in the past, but fillmode is supported by all renderers nowadays. Also fix the logic in svga_create_rasterizer_state() to avoid a few swtnl case. No piglit regressions Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add TGSI_SEMANTIC_FACE switch case in svga_swtnl_update_vdecl()Brian Paul2018-08-081-0/+1
| | | | | | | | Fixes failed assertion running Piglit polygon-mode-face test. Though, the test still does not pass. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* xlib: remove unused Fake_glXGetAGPOffsetMESA() functionBrian Paul2018-08-081-10/+0
| | | | | | To silence compiler warning. Reviewed-by: Emil Velikov <[email protected]>
* gl.h: define GLeglImageOES depending on GL_EXT_EGL_image_storageBrian Paul2018-08-081-1/+1
| | | | | | | | | | | To avoid duplicate typedef with the definition in glext.h V2: test for both GL_OES_EGL_image and GL_EXT_EGL_image_storage in case both the GL and GLES headers are included. Per Emil. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107488 Tested-by: Vinson Lee <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* Android: copy -fno*math* options from the autotools buildEmil Velikov2018-08-081-0/+2
| | | | | | | | | | | | Add -fno-math-errno and -fno-trapping-math to the build. Mesa does not depend on the functionality provided, thus this should result in slightly faster code and smaller binaries. Cc: Tapani Pälli <[email protected]> Cc: Rob Herring <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Tapani Pälli <[email protected]>
* autotools: use correct gl.pc LIBS when using glvndEmil Velikov2018-08-082-1/+10
| | | | | | | | | This is more of a hack, since glvnd itself should be providing the file. Until that happens, ensure the libs is correctly set to -lGL CC: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* glx: automake: add egl.pc/headers TODO when using glvndEmil Velikov2018-08-081-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* egl: automake: add egl.pc/headers TODO when using glvndEmil Velikov2018-08-081-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* autotools: error out when building with mangling and glvndEmil Velikov2018-08-081-0/+3
| | | | | | | | | | It's not a thing that can work, nor is a wise idea to attempt. v2: Tweak error message (Dylan) CC: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (v1)
* autotools: error out when using the broken --with-{gl, osmesa}-lib-nameEmil Velikov2018-08-081-6/+6
| | | | | | | | | | The toggles were broken with the introduction of --enable-mangling. Fixing that up might be possible, but it's not worth the complexity since one can rename the libraries at any point. CC: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* meson: recommend building the surfaceless platformEmil Velikov2018-08-081-1/+1
| | | | | | | | | | It has no special requirements, size and build-time is effectively zero. v2: Rebase Signed-off-by: Emil Velikov <[email protected]> Acked-by: Dylan Baker <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* automake: require shared glapi when using DRI based libGLEmil Velikov2018-08-082-4/+3
| | | | | | | | | This has been a requirement for ages, yet it seems like we never explicitly errored out during configure. CC: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* ttn: remove {varying_slot, frag_result}_to_tgsi_semantic helpersEmil Velikov2018-08-082-79/+0
| | | | | | | | The respective drivers have been updated and the helpers are no longer needed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* travis: remove libedit-dev dependency in LLVM 6.0 targetsJuan A. Suarez Romero2018-08-081-6/+0
| | | | | | | | | | In LLVM <6.0 we added explicitly libedit-dev, as it was required to satisfy apt dependencies. In LLVM 6.0, this is not required anymore, so let's remove it. CC: Emil Velikov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl_to_tgsi: plumb image writable through to driverErik Faye-Lund2018-08-082-5/+15
| | | | | | | | | | | The virgl driver cares about the writable-flag on image definitions, because it re-emits GLSL from the TGSI. However, so far it was hardcoded to true in glsl_to_tgsi, which cause problems when virglrenderer is running on top of GLES 3.1, where not all formats are supported for writable images. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* vc4: Fix vc4_fence_server_sync() on pre-syncobj kernels.Eric Anholt2018-08-071-1/+2
| | | | | | | | | We won't have an FD if we're just having the server wait on a fence created by eglCreateSyncKHR(). Our seqno fences will happen in order, so server-side waits are no-ops in that case. Fixes dEQP-EGL.functional.sharing.gles2.multithread.simple_egl_server_sync.buffers.gen_delete Fixes: b0acc3a5628c ("broadcom/vc4: Native fence fd support")
* vc4: Ignore samplers for finding uniform offsets.Eric Anholt2018-08-071-3/+14
| | | | | | | | | | Fixes: dEQP-GLES2.shaders.struct.uniform.sampler_array_fragment dEQP-GLES2.shaders.struct.uniform.sampler_array_vertex dEQP-GLES2.shaders.struct.uniform.sampler_nested_fragment dEQP-GLES2.shaders.struct.uniform.sampler_nested_vertex Cc: [email protected]
* vc4: Extend dumping of uniforms in QIR and in the command stream.Eric Anholt2018-08-073-13/+68
| | | | Similar to what I did for V3D, provide some description of the uniforms.
* vc4: Pull uinfo->data[i] dereference out to the top of the loop.Eric Anholt2018-08-071-20/+18
| | | | | | Reduces the size of vc4_uniforms.o by about 10%. We would basically always end up loading the cachline of uinfo->data[i] anyway, so it should be good for performance as well as making the code a bit cleaner.
* vc4: Make sure to emit a tile coordinates between two MSAA loads.Eric Anholt2018-08-071-12/+11
| | | | | | | | | | The HW only executes a load once the tile coordinates packet happens, and only tracks one at a time, so by emitting our two MSAA loads back to back we would end up with an undefined color or Z buffer. The simulator doesn't seem to care, but sync up the RCL generation with the kernel anyway. Fixes dEQP-EGL.functional.render.multi_context.gles2.rgb888_window
* vc4: Respect a sampler view's first_layer field.Eric Anholt2018-08-071-1/+3
| | | | | | | Fixes texturing from EGL images created from cubemap faces, as in dEQP-EGL.functional.image.create.gles2_cubemap_negative_x_rgba_texture Cc: [email protected]
* virgl: add ARB_shader_clock supportDave Airlie2018-08-083-2/+4
| | | | Reviewed-by: Erik Faye-Lund <[email protected]>
* python: Specify the template output encodingMathieu Bridon2018-08-072-2/+2
| | | | | | | | | | | | | | | We're trying to write a unicode string (i.e decoded) to a file opened in binary (i.e encoded) mode. In Python 2 this works, because of the automatic conversion between byte and unicode strings. In Python 3 this fails though, as no automatic conversion is attempted. This change makes the scripts compatible with both versions of Python. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Fix rich comparisonsMathieu Bridon2018-08-073-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 <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Use explicit integer divisionsMathieu Bridon2018-08-076-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 <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v2) Reviewed-by: Dylan Baker <[email protected]>
* egl/main: Add bits for EGL_KHR_mutable_render_bufferChad Versace2018-08-075-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 <[email protected]>
* dri: Add param driCreateConfigs(mutable_render_buffer)Chad Versace2018-08-078-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 <[email protected]>
* dri: Define DRI_MutableRenderBuffer extensionsChad Versace2018-08-075-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 <[email protected]>
* egl/dri2: In dri2_make_current, return early on failureChad Versace2018-08-071-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 <[email protected]>
* egl: Simplify queries for EGL_RENDER_BUFFERChad Versace2018-08-075-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 <[email protected]>
* radeonsi: set GLC=1 for all write-only shader resourcesMarek Olšák2018-08-071-2/+19
|
* radeonsi: don't load block dimensions into SGPRs if they are not variableMarek Olšák2018-08-073-7/+7
|
* travis: meson/Vulkan requires LLVM 6.0Juan A. Suarez Romero2018-08-071-3/+5
| | | | | | | | | RADV now requires LLVM 6.0. Fixes: fd1121e8399 ("amd: remove support for LLVM 5.0") CC: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* travis: add ubuntu-toolchain-r-testJuan A. Suarez Romero2018-08-071-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 <[email protected]> CC: Emil Velikov <[email protected]> CC: Dylan Baker <[email protected]> Reviewed-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: set EGL_BAD_NATIVE_PIXMAP in the copy_buffers fallbackEmil Velikov2018-08-071-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 <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/x11: use the no-op dri2_fallback_copy_buffers for swrastEmil Velikov2018-08-071-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 <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: remove unneeded _eglGetNativePlatform checkEmil Velikov2018-08-071-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 <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* travis: use https for all the linksEmil Velikov2018-08-071-6/+6
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* autoconf: stop exporting internal wayland detailsEmil Velikov2018-08-074-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 <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: stop exporting internal wayland detailsEmil Velikov2018-08-072-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 <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: use dependency()+find_program() for wayland-scannerEmil Velikov2018-08-071-1/+2
| | | | | | | | | Helps when the native wayland-scanner is located outside of PATH. Inspired by the xserver code ;-) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* swr: don't export swr_create_screen_internalEmil Velikov2018-08-072-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 <[email protected]> Cc: Tim Rowley <[email protected]> Fixes: f50aa21456d "(swr: build driver proper separate from rasterizer") Signed-off-by: Emil Velikov <[email protected]> Tested-by: Chuck Atkins <[email protected]> Reviewed-By: George Kyriazis <[email protected]<mailto:[email protected]>> Tested-by: Chuck Atkins <[email protected]<mailto:[email protected]>>
* meson: install KHR/khrplatform.h when neededEric Engestrom2018-08-071-1/+1
| | | | | | Fixes: f7d42ee7d319256608ad "include: update GL & GLES headers (v2)" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>