aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radv: flush f32->f16 conversion denormals to zero. (v2)Dave Airlie2017-05-032-4/+41
| | | | | | | | | | | | | | | SPIR-V defines the f32->f16 operation as flushing denormals to 0, this compares the class using amd class opcode. Thanks to Matt Arsenault for figuring it out. This fix is VI+ only, add a TODO for SI/CIK. This fixes: dEQP-VK.spirv_assembly.instruction.compute.opquantize.flush_to_zero Acked-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Add userspace fence buffer per context.Bas Nieuwenhuizen2017-05-034-37/+44
| | | | | | | | | | Having it in the winsys didn't work when multiple devices use the same winsys, as we then have multiple contexts per queue, and each context counts separately. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 7b9963a28f4 "radv: Enable userspace fence checking."
* radv: enable lower_sub to fix loop unrolling.Dave Airlie2017-05-031-0/+1
| | | | | | | | | | Loop unroll asserts if it hits a sub, we don't really want to lower subs as llvm handles these things, but do this for now, until we can fix loop unroll to work with subs. Fixes: 14ae0bfa5 (radv: Add NIR loop unrolling) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Don't set dynamic state for pipelines with rasterizer dicard.Bas Nieuwenhuizen2017-05-031-6/+9
| | | | | | | | | | | | All of the dynamic states apply to rasterization & fragment processing, so we don't need to set them if we don't rasterize. We don't clear the dirty flags for them though, so we don't miss any updates for the next pipeline with rasterization. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 76603aa90b8 "radv: Drop the default viewport when 0 viewports are given."
* radv: flush more stages when semaphore are waiting.Dave Airlie2017-05-032-3/+23
| | | | | | | | | | | | | | | This still doesn't give us complete pWaitDstStageMask support, but it should provide enough to be correct if not as efficent as possible. If we have wait semaphores we must flush between submits and flush the shaders as well. This fixes the remaining fails in: dEQP-VK.synchronization.op.single_queue.semaphore.*ssbo* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: set vector_elements to 1 for samplersSamuel Pitoiset2017-05-022-16/+6
| | | | | | | | | | | | | | | | I don't see any reasons why vector_elements is 1 for images and 0 for samplers. This increases consistency and allows to clean up some code a bit. This will also help for ARB_bindless_texture. No piglit regressions with RadeonSI. This time the Intel CI system doesn't report any failures. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* vc4: Use runtime CPU detection for whether NEON is available.Eric Anholt2017-05-022-14/+16
| | | | | | | | This will allow Raspbian's ARMv6 builds to take advantage of the new NEON code, and could prevent problems if vc4 ends up getting used on a v7 CPU without NEON. v2: Drop dead NEON_SUFFIX (noted by Erik Faye-Lund)
* vc4: Use a wrapper file to set VC4_BUILD_NEON instead of CFLAGS.Eric Anholt2017-05-024-8/+31
| | | | | | | | | Android.mk was setting the flag across the entire driver, so we didn't have non-NEON versions getting built. This was going to be a problem with the next commit, when I start auto-detecting NEON support and use the non-NEON version when appropriate. Reviewed-by: Rob Herring <[email protected]>
* gallium: Enable ARM NEON CPU detection.Eric Anholt2017-05-023-0/+46
| | | | | | | | | | | | | | | | | | I wrote this code with reference to pixman, though I've only decided to cover Linux (what I'm testing) and Android (seems obvious enough). Linux has getauxval() as a cleaner interface to the /proc entry, but it's more glibc-specific and I didn't want to add detection for that. This will be used to enable NEON at runtime on ARMv6 builds of vc4. v2: Actually initialize the temp vars in the Android path (noticed by daniels) v3: Actually pull in the cpufeatures library (change by robher). Use O_CLOEXEC. Break out of the loop when we find our feature. v4: Drop VFP code, which was confused about what it was detecting and not actually used yet. Reviewed-by: Grazvydas Ignotas <[email protected]>
* radv: fix stencil only clears.Dave Airlie2017-05-031-0/+3
| | | | | | | | | | | | | | | If we are clearing stencil only, we still need to provide a a valid Z output from the vertex shader, we can't rely on the depth clear value having any meaning, as we use this for the position output, and it could get clipped, so we don't end up clearing anything. Fixes: dEQP-VK.renderpass.simple.stencil since I added S8 support. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* renderonly: use drmIoctlPhilipp Zabel2017-05-021-4/+3
| | | | | | | | | | | To restart interrupted system calls, use drmIoctl. Fixes: 848b49b288f ("gallium: add renderonly library") CC: <[email protected]> Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* renderonly: drop resources on destroyPhilipp Zabel2017-05-023-3/+13
| | | | | | | | | | | | | The renderonly_scanout holds a reference on its prime pipe resource, which should be released when it is destroyed. If it was created by renderonly_create_kms_dumb_buffer_for_resource, the dumb BO also has to be destroyed. Fixes: 848b49b288f ("gallium: add renderonly library") CC: <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* renderonly: close transfer prime_fdPhilipp Zabel2017-05-021-0/+2
| | | | | | | | | | | | prime_fd is only used to transfer the scanout buffer to the GPU inside renderonly_create_kms_dumb_buffer_for_resource. It should be closed immediately to avoid leaking the DMA-BUF file handle. Fixes: 848b49b288f ("gallium: add renderonly library") CC: <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* radv/wsi: report presentation error per image requestDave Airlie2017-05-031-6/+13
| | | | | | | | | | | | This ports 0fcb92c17dee681bd39c08ddf0abc358a27337c7 anv: wsi: report presentation error per image request This fixes: dEQP-VK.wsi.xlib.incremental_present.scale_none.* Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: minor pahole related improvements.Dave Airlie2017-05-033-5/+5
| | | | | | | This just reduces the structs by 4-8 bytes each. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/image: resize some surface members.Dave Airlie2017-05-031-3/+3
| | | | | | | Oops meant to be part of previous series. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop unused surface level members.Dave Airlie2017-05-032-6/+0
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/image: drop blk_dDave Airlie2017-05-033-3/+1
| | | | | | | This was pretty much unused. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: remove some members of radeon surface.Dave Airlie2017-05-034-48/+40
| | | | | | | | We would be storing this info twice per image, no need to, remove it from the surface struct. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move some image info into a separate struct.Dave Airlie2017-05-0313-80/+90
| | | | | | | This is to rework the surface code like radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: provide a helper for comparing an image extents.Dave Airlie2017-05-032-2/+11
| | | | | | | | This just makes it easier to do the follow in cleanups of the surface. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gbm/dri: Fix sign-extension in modifier queryDaniel Stone2017-05-021-1/+1
| | | | | | | | | | | | | When we were assembling the unsigned 64-bit query return from its two signed 32-bit component parts, the lower half was getting sign-extended into the top half. Be more explicit about what we want to do. Fixes gbm_bo_get_modifier() returning ((1 << 64) - 1) rather than ((1 << 56) - 1), i.e. DRM_FORMAT_MOD_INVALID. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* nir: Pick just the channels we want for bitmap and drawpixels lowering.Eric Anholt2017-05-022-2/+6
| | | | | | | | | | | | NIR now validates that SSA references use the same number of channels as are in the SSA value. v2: Reword commit message, since the commit didn't land before the validation change did. Fixes: 370d68babcbb ("nir/validate: Validate that bit sizes and components always match") Reviewed-by: Jason Ekstrand <[email protected]> (v1) Cc: <[email protected]>
* anv/tests: Create a dummy instance as well as deviceJason Ekstrand2017-05-014-4/+16
| | | | | | | | | This fixes crashes caused by 35e626bd0e59e7ce9fd97ccef66b2468c09206a4 which made us start referencing the instance in the allocators. With this commit, the tests now happily pass again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100877 Tested-by: Vinson Lee <[email protected]>
* radv: Use correct stage for ready bit.Bas Nieuwenhuizen2017-05-021-9/+24
| | | | | | | | Set the bit in the same stage as the timestamp, instead always at top of pipe. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Tested-by: Grazvydas Ignotas <[email protected]>
* radv: Add top of pipe timestamp queries.Bas Nieuwenhuizen2017-05-022-12/+27
| | | | | | | Does not fix brokenness with the ready bit. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add NIR loop unrolling.Bas Nieuwenhuizen2017-05-021-0/+10
| | | | | | | | Not much effect on dota2/talos, but positive on deferred. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* i965: Solve Android native fence fd double closeRandy Xu2017-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Android native fence in i965 has two fds: _EGLSync::SyncFd and brw_fence::sync_fd. The semantics of __DRI2fenceExtensionRec::create_fence_fd are unclear on whether the DRI driver takes ownership of the incoming fd (which is the same incoming fd from eglCreateSync). i965 did take ownership, but all other Mesa drivers do not; instead, they dup the incoming fd. As a result, _EGLSync::SyncFd and brw_fence::sync_fd were the same fd, and both egl_dri2 and i965 believed they owned it. On eglDestroySync, that led to a double-close. Fix the double-close by making brw_dri_create_fence_fd dup the incoming fd, just like the other drivers do. Signed-off-by: Randy Xu <[email protected]> Test: Run Vulkan and GLES stress test and no crash. Fixes: 6403e376511 ("i965/sync: Implement fences based on Linux sync_file") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]> [chadv: Polish the commit message] Cc: [email protected]
* vc4: Only build the NEON code on arm32.Eric Anholt2017-05-011-2/+2
| | | | | | | | | | | NEON is sufficiently different on arm64 that we can't just reuse this code. Disable it on arm64 for now. v2: Use PIPE_ARCH_ARM instead, as __ARM_ARCH may be 8 for a 32-bit build for a v8 CPU. Signed-off-by: Eric Anholt <[email protected]> Cc: <[email protected]>
* gm107/ir: add a missing assertion in emitISCADD()Samuel Pitoiset2017-05-011-0/+2
| | | | | | | For consistency, similar to the other emitters. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* i965: Don't allocate uniform space for samplersTimothy Arceri2017-05-011-1/+1
| | | | | | | | | | | | | | Samplers are encoded into the instruction word, so there's no need to make space in the uniform file. Previously matrix_columns and vector_elements were set to 0, making this else case a no-op. Commit 75a31a20af26 changed that, causing malloc corruption in thousands of tests on i965. Fixes: 75a31a20af26 ("glsl: set vector_elements to 1 for samplers") Reviewed-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100871
* egl: initialise dummy_thread via _eglInitThreadInfoEmil Velikov2017-04-291-9/+4
| | | | | | | | | | | Considering we cannot make dummy_thread a constant we might as well, initialise by the same function that handles the actual thread info. This way we don't need to worry about mismatch between the initialiser and initialising function. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: polish dri2_to_egl_attribute_map[]Emil Velikov2017-04-291-50/+18
| | | | | | | | Annotate the array as static const and use C99 initialiser to populate it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* gallium/targets: fix bool setting on BE architecturesIlia Mirkin2017-04-298-11/+11
| | | | | | | | | | | | | val_bool and val_int are in a union. val_bool gets the first byte, which happens to work on LE when setting via the int, but breaks on BE. By setting the value properly, we are able to use DRI3 on BE architectures. Tested by running glxgears with a NV34 in a G5 PPC. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] [Emil Velikov: squash the vmwgfx hunk] Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* st/wgl: whitespace, formatting fixes in stw_pixelformat.cBrian Paul2017-04-281-72/+62
| | | | Trivial.
* st/wgl: allow WGL_BIND_TO_TEXTURE_RGB_ARB for RGBA visualsCharmaine Lee2017-04-281-2/+2
| | | | | | | | | | | We do not need to restrict WGL_BIND_TO_TEXTURE_RGB_ARB to RGB visuals only. It can be supported with RGBA visuals as well. This fixes the early exit of cinebench-r15-test trace. Tested with cinebench-r15, piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* st/wgl: use ARRAY_SIZE() macro in wglChoosePixelFormatARB()Brian Paul2017-04-281-1/+1
| | | | Trivial.
* st/wgl: whitespace/formatting fixes in stw_ext_pixelformat.cBrian Paul2017-04-281-59/+52
| | | | Trivial.
* svga: implement sRGB rendering for imported surfacesNeha Bhende2017-04-281-2/+9
| | | | | | | | | | If texture is imported and templ format is sRGB, use compatible sRGB format to the imported texture format while creating surface view. tested with MTT piglit, glretrace, viewperf and conform Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: add function svga_linear_to_srgb()Neha Bhende2017-04-282-0/+29
| | | | | | | | This function will return compatible svga srgb format for corresponding linear format Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* glx: add missing sRGB attribute check in fbconfigs_compatible()Neha Bhende2017-04-281-0/+1
| | | | | | | | This patch will allow driver to choose srgb capable FBconfig if GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB attribute is 1 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: Add a more elaborate format compatibility determination v2Thomas Hellstrom2017-04-283-41/+93
| | | | | | | | | | | | | | dri3 is a bit sloppy about its format compatibility requirements, so add a possibility to import xrgb surfaces as argb textures and vice versa. At the same time, make the svga_texture_from_handle() function a bit more readable and fix the error path where we leaked a winsys surface. v2: Addressed review comments by Brian. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* swr/rast: add memory api to SwrGetInterface()Tim Rowley2017-04-286-28/+54
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: use gather instruction for odd format fetchTim Rowley2017-04-281-46/+9
| | | | | | | Small fetch performance optimization - use gather instruction for odd format fetch instead of slow emulated code. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: enable SIMD16 8x2 tile backendTim Rowley2017-04-281-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add SwrInit() to init backend/memory tablesTim Rowley2017-04-285-22/+26
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: increment depth/stencil tile pointer in SIMD16 BETim Rowley2017-04-281-1/+1
| | | | | | | Misplaced #endif preventing depth and stencil hot tile pointers from incrementing in SIMD16 8x2 configuration of BackendPixelRate. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add SwrGetInterface() function to return apiTim Rowley2017-04-283-44/+151
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: enable per-warp scratch space for CSTim Rowley2017-04-288-8/+33
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: reduce simd{16}vertex stack for VS outputTim Rowley2017-04-282-16/+54
| | | | | | | | | | | | | | | Frontend - reduce simdvertex/simd16vertex stack usage for VS output in ProcessDraw, fixes stack overflow in some of the deeper call stacks under SIMD16. 1. Move the vertex store out of PA_FACTORY, and off the stack 2. Allocate the vertex store out of the aligned heap (pointer is temporarily stored in TLS, but will be migrated to thread pool along with other frontend temporary buffers). 3. Grow the vertex store as necessary for the number of verts per primitive, in chunks of 8/4 simdvertex/simd16vertex Reviewed-by: Bruce Cherniak <[email protected]>