aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* r600/sfn: use new temp register allocation when loading single value temporariesGert Wollny2020-04-211-2/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Count only literals that are not inline to split instruction groupsGert Wollny2020-04-211-1/+11
| | | | | | | | An instruction group can only support 4 distinct literals, but inline constants count into this number, so skip them when counting. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix using the result of a fetch instruction in next fetchGert Wollny2020-04-211-0/+11
| | | | | | | | | The result of a fetch instruction can't be used as source in the same CF block, so force a new CF block when the result would be used in the same vertex fetch block. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix handling of GS inputsGert Wollny2020-04-211-0/+3
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Handle b2b1 like it was a movGert Wollny2020-04-211-0/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix null pointer deref in live range evalationGert Wollny2020-04-211-2/+4
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/nir: Pin interpolation results to channelGert Wollny2020-04-213-0/+11
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Implementing instructions blocksGert Wollny2020-04-2112-36/+199
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix setting alignments when lowering UBOsGert Wollny2020-04-211-1/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Reduce array limit for scratch usageGert Wollny2020-04-211-1/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600: Dump a few more variables when requestedGert Wollny2020-04-211-0/+32
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* st/omx: fix gcc warningsPierre-Eric Pelloux-Prayer2020-04-211-3/+3
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
* gallium/utils: silence strncpy warningPierre-Eric Pelloux-Prayer2020-04-211-1/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
* iris/bufmgr: Add support for MMAP_OFFSET ioctl.Rafael Antognolli2020-04-201-1/+51
| | | | | | | | | | | | | Use the new DRM_IOCTL_I915_GEM_MMAP_OFFSET ioctl when available. [[email protected]: iris port] Signed-off-by: Jordan Justen <[email protected]> v2: Update getparam check (Ken). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1675>
* iris/bufmgr: Factor out GEM_MMAP ioctl from mmap_cpu and mmap_wc.Rafael Antognolli2020-04-201-30/+31
| | | | | | | | | | | | | | | We want to add a new ioctl for mmap'ing buffers, so let's avoid duplicating that code on both functions by extracting it from them first. [[email protected]: iris port] Signed-off-by: Jordan Justen <[email protected]> v2: Rename helper function names (Ken). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1675>
* radeonsi: skip vs output optimizations for some outputsPierre-Eric Pelloux-Prayer2020-04-201-1/+12
| | | | | | | | | | If PT_SPRITE_TEX is enabled, PS inputs are overriden at runtime so we can't apply the vs output optim. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2747 Fixes: 3ec9975555d ("radeonsi: eliminate trivial constant VS outputs") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4559>
* Fix promotion of floats to doublesAlbert Astals Cid2020-04-184-22/+22
| | | | | | | | | Use the f variants of the math functions if the input parameter is a float, saves converting from float to double and running the double variant of the math function for gaining no precision at all Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3969>
* radeonsi: don't assume ctx is always a threaded_contextPierre-Eric Pelloux-Prayer2020-04-171-1/+1
| | | | | | Fixes: dcb1e8fef8a ("radeonsi: use thread_context::bytes_mapped_limit") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4587>
* nv50,nvc0: update with latest capsIlia Mirkin2020-04-162-1/+15
| | | | | | | | | One notable change is that DRAW_INFO_START_WITH_USER_INDICES is enabled. An audit of the code indicates that it should work, and a number of piglit tests exercising glMultiDrawElements continue to function. Signed-off-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4520>
* clover: Check if the detected clang libraries are usableJan Vesely2020-04-161-2/+27
| | | | | | | | | | | | | | | | | clang-cpp.so is broken in LLVM-9 and doesn't exist in LLVM<9, however meson will find and try to use system libraries in these cases. v2: Use helper variable to dedpulicate test code Move second test inside the condition to avoid testing good clang-cpp twice v3: Check for cross compilation v4: style fixes Fixes: ff1a3a00cb37d84ab9a563f0aa241714876f56b4 Signed-off-by: Jan Vesely <[email protected]> Tested-by: Karol Herbst <[email protected]> Acked-by: Karol Herbst <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4457>
* iris: Enable EXT_depth_bounds_test extension.Rafael Antognolli2020-04-161-0/+2
| | | | | | | | | | | | It was implemented in 1df871f8ff753dd234def380ea0e20d7e81cad9e, but to really enable it we need to enable PIPE_CAP_DEPTH_BOUNDS_TEST. v2: Add release notes (Ian). Suggested-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4540>
* wgl: silence some cast-warningsErik Faye-Lund2020-04-162-4/+4
| | | | | | | | | | These casts cause warnings on x64. We're passing integers through pointers, which works fine. So let's make the casts a bit more explicit, to silence that warning. Reviewed-by: Brian Paul <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
* winsys/amdgpu: Retrieve WC flags from imported buffers.Bas Nieuwenhuizen2020-04-164-0/+25
| | | | | | | | | | | | | | | | Otherwise reading from an imported mapped GTT+WC linear texture is painfully slow. Sadly no radeon winsys implementation, as I don't know a suitable kernel driver operation. Hit this in vaGetImage with an image imported from minigbm (which we are switching to allocate WC for SCANOUT images). Cc: <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4542>
* zink: be less picky about tiled resourcesErik Faye-Lund2020-04-161-5/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2678>
* st/dri: make sure software color-buffers are linearErik Faye-Lund2020-04-161-1/+1
| | | | | | | | | | | | Otherwise, we might end up with a tiling-capable driver creating a tiled resource here instead of linear. This is currently possible with Zink, although we currently force all display-targets to be linear. But that doesn't seem like a good idea in the long run, so let's loosen this restriction. Acked-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2678>
* virgl: Use ETC2 formats directly when possible.Lepton Wu2020-04-163-0/+25
| | | | | | | | | Don't emulate them with uncompressed formats if the host support them since uncompressed formats like GL_R16 could be not available on GLES hosts. Signed-off-by: Lepton Wu <[email protected]> Reviewed-by: Gert Wollny <[email protected]>
* radeonsi: use thread_context::bytes_mapped_limitPierre-Eric Pelloux-Prayer2020-04-161-3/+11
| | | | | | | | Limit the amount of "in-flight" mapping to 1/4 of the total RAM. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2735 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4508>
* gallium/u_threaded: flush batch when hitting mapping limitPierre-Eric Pelloux-Prayer2020-04-162-0/+24
| | | | | | | | | | | | | | | tc_transfer_map maps buffers directly, but the unmap operation is executed in the driver thread. When an application does a lot of map/unmap operations, without flushing, this increase the RAM used (and eventually get the app killed by the oom-killer). This commit allows tc to keep track of how many bytes were mapped during the current batch. When this estimation becomes higher than a threshold, we flush the batch. See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2735 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4508>
* nvc0: enable GL_NV_viewport_array2Ilia Mirkin2020-04-158-2/+21
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* st/mesa: add support for GL_NV_viewport_array2Ilia Mirkin2020-04-151-0/+4
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* gallium: add PIPE_CAP_VIEWPORT_MASKIlia Mirkin2020-04-153-0/+3
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* gallium: add TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVEIlia Mirkin2020-04-153-0/+9
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* gallium: add TGSI_SEMANTIC_VIEWPORT_MASKIlia Mirkin2020-04-153-0/+9
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* Revert "nvc0: fix line width on GM20x+"Karol Herbst2020-04-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a0e57432b76c32f2109dab0ad3df0ba03967441c. It's unclear what caused the test to fail back then. Now it's seems to be reversed. I tested with a close enough piglit and mesa branch and wasn't able to reproduce the same test result I've got in some older piglit runs. Fixes: dEQP-GLES2.functional.rasterization.primitives.lines_wide dEQP-GLES2.functional.rasterization.primitives.line_strip_wide dEQP-GLES2.functional.rasterization.primitives.line_loop_wide dEQP-GLES2.functional.rasterization.limits.points dEQP-GLES2.functional.clipping.line.wide_line_z_clip dEQP-GLES2.functional.clipping.line.wide_line_z_clip_viewport_center dEQP-GLES2.functional.clipping.line.wide_line_z_clip_viewport_corner dEQP-GLES2.functional.clipping.line.wide_line_clip dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner dEQP-GLES2.functional.clipping.line.wide_line_attrib_clip dEQP-GLES2.functional.polygon_offset.default_result_depth_clamp dEQP-GLES2.functional.polygon_offset.default_factor_1_slope dEQP-GLES2.functional.polygon_offset.fixed16_result_depth_clamp dEQP-GLES2.functional.polygon_offset.fixed16_factor_1_slope Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4575>
* iris: make BATCH_SZ smaller by BATCH_RESERVED bytesPaulo Zanoni2020-04-152-7/+7
| | | | | | | | | | | | | Iris allocates gem buffers using buckets of allocation sizes that are page aligned. We always ask for batch buffers of size BATCH_SZ + BATCH_RESERVED, which is not page aligned: we ask for 65552 bytes, which ends up in the bucket of size 81920, resulting in 20% unused space. Adjust things so there is no waste of space: BATCH_SZ + BATCH_RESERVED is now 65536. Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>
* iris: remove useless bo->gtt_offset assignmentPaulo Zanoni2020-04-151-1/+0
| | | | | | | | | We assign a real value a few lines below, and none of the lines in between rely on the zeroed bo->gtt_offset value. Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>
* iris: remove unnecessary forward declarationPaulo Zanoni2020-04-151-4/+0
| | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>
* iris: remove hole from struct iris_boPaulo Zanoni2020-04-151-12/+12
| | | | | | | | | | | | | | | | | This decreases the size of the struct on a 64bit machine from 144 to 136. While that's not a lot, this is one of the structs that we're allocating all the time. For a full Aztec run on BDW we allocate this struct 3273 times, and we can have up to 3259 of them live at the same time. So we end up saving just a little over 6 pages for this benchmark. Spotted this while trying to add another bool for an unrelated feature. Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4561>
* llvmpipe/nir: free the nir shaderDave Airlie2020-04-161-0/+2
| | | | | | Fixes: 18f896e55d96 (llvmpipe: add initial nir support) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>
* draw/tess: free the NIRDave Airlie2020-04-161-1/+5
| | | | | | Fixes: 0d02a7b8ca794 (draw: add main tessellation code) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>
* draw: free the NIR IR.Dave Airlie2020-04-162-4/+11
| | | | | | | | | Not sure how I missed this, the ownership was a bit blurry, free the NIR. Fixes: bf12bc2dd7a2 (draw: add nir info gathering and building support) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>
* freedreno/turnip: Update GRAS_LAYER_CNTL to GRAS_MAX_LAYER_INDEXBrian Ho2020-04-151-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | After some experimentation, I believe that GRAS_LAYER_CNTL is actually just a count register storing the number of layers in the render target. While debugging cube_array geometry tests, I noticed that the blob was setting an unknown 0x8 to LAYER_CNTL, so I checked the value of LAYER_CNTL for various layer sizes: 1: LAYER_CNTL=0 2: LAYER_CNTL=1 3: LAYER_CNTL=2 4: LAYER_CNTL=3 9: LAYER_CNTL=8 256: LAYER_CNTL=255 2000: LAYER_CNTL=1999 Seems like this register just stores a count of the largest layer that can be written to via gl_Layer. This commit updates the reg docs, freedreno's gs implementation, and turnip's gs implementation. Fixes dEQP-VK.geometry.layered.cube_array.* Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4541>
* gallium: initialize viewport swizzle in cso_set_viewport_dimsKarol Herbst2020-04-151-0/+4
| | | | | | | | Fixes: dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_* and more Fixes: 4137a79c2a7e ("gallium: add viewport swizzling state and cap") Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4567>
* nvc0: enable ASTC and ETC on GM20BKarol Herbst2020-04-151-5/+3
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4554>
* clover: expose cl_arm_shared_virtual_memory for devices with SVM supportKarol Herbst2020-04-151-1/+2
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
* clover: implement cl_arm_shared_virtual_memoryKarol Herbst2020-04-156-54/+287
| | | | | | | | | | | | | | | v2: use static array to keep name -> func mapping v3: use unordered_map v4: handle ARM constants reorder dispatch table wrap enqueue APIs as the command value differs between khr and arm v5: move declarations into dispatch.hpp handle CL_MEM_USES_SVM_POINTER_ARM in clGetMemObjectInfo v6: breaking long lines Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
* clover: implement SVM functions for devices with fine grained system SVM supportKarol Herbst2020-04-156-20/+259
| | | | | | | | | | | | | | | | | | all of the functionality can be mapped to malloc/free if the device supports fine grained system SVM. v2: fix some API bugs found with the OpenCL CTS v3: remove validate_even_wait_list improve implementation of clSetKernelExecInfo make clEnqueueSVMFree spec compliant rename can_emulate_non_system_svm to has_system_svm and make it a member method improve validation in clEnqueueSVMMemFill handle CL_MEM_USES_SVM_POINTER in clGetMemObjectInfo v4: break long lines and other minor cosmetic adjustments Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
* clover: implement clSetKernelArgSVMPointerKarol Herbst2020-04-153-3/+29
| | | | | | | | | | | | | | | it is pretty much identical to a clSetKernelArg for a scalar field, except it is only valid for global and constant memory pointers. Also the type equals void* on the Host, so we can just check the size of it. v2: prefer using target_size to extend the pointer value v3: handle more corner cases in combiation to clSetKernelArg Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
* clover: implement CL_DEVICE_SVM_CAPABILITIESKarol Herbst2020-04-153-0/+28
| | | | | | | | | | | | v2: without supporting userptrs SVM can't be implemented as it's impossible to ensure memory consistency with HOST_PTR buffers v3: fix comment style v4: fixes typo in comment Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
* clover: add stubs for SVMKarol Herbst2020-04-154-10/+117
| | | | | | | | | | | | | | | although most of those are 2.0 core functions, there is cl_arm_shared_virtual_memory to expose those in a 1.2 context. But we should be able to expose this extension with 1.1 as well as there is no technicaly reason why this shouldn't work. v2: move svm functions into existing files v3: rename func args to match convention Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>