aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: free last_read/write tables in mir_create_dependency_graphUrja Rannikko2019-12-061-0/+3
| | | | | Signed-off-by: Urja Rannikko <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Rename SET_VALUE to WRITE_VALUEAlyssa Rosenzweig2019-12-065-25/+25
| | | | | | | | | See https://lists.freedesktop.org/archives/dri-devel/2019-December/247601.html Write value emphasises that it's just a generic write primitive. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Update SET_VALUE with information from igtAlyssa Rosenzweig2019-12-063-7/+26
| | | | | | | It's not a tiler specific initialization; it's a generic GPU-side write primitive that may be used for tiler reset on midgard. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* turnip: implement border colorJonathan Marek2019-12-053-17/+89
| | | | | | | | | Fixes the deqp fails in: dEQP-VK.pipeline.sampler.*border* (minus 1d array/d24 cases which fail for other reasons) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: improve emit_texturesJonathan Marek2019-12-051-55/+76
| | | | | | | | | Two things: * Texture/sampler pointers aligned to the size of texture/sampler state * Returning errors instead of crashing on OOM Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: add function to allocate aligned memory in a substream csJonathan Marek2019-12-053-0/+47
| | | | | | | To use with texture states that need alignment (texconst, sampler, border) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* glsl/nir: iterate the system values list when adding varyingsTimothy Arceri2019-12-051-25/+36
| | | | | | | | | | | | Iterate the system values list when adding varyings to the program resource list in the NIR linker. This is needed to avoid CTS regressions when using the NIR to build the GLSL resource list in an upcoming series. Presumably it also fixes a bug with the current ARB_gl_spirv support. Fixes: ffdb44d3a0a2 ("nir/linker: Add inputs/outputs to the program resource list") Reviewed-by: Alejandro Piñeiro <[email protected]>
* llvmpipe: enable support for primitives generated outside streamoutDave Airlie2019-12-063-0/+9
| | | | | | This enables the draw support when the queries are enabled. Reviewed-by: Roland Scheidegger <[email protected]>
* draw: add support for collecting primitives generated outside streamoutDave Airlie2019-12-064-1/+28
| | | | | | | GL/gallium require gathering primitives generated outside streamout stats. This introduces the draw interfaces to enabling collecting this. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: disable occlusion queries when requested by state trackerDave Airlie2019-12-062-1/+3
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: add queries disabled flagDave Airlie2019-12-062-0/+5
| | | | | | | This flag is set when the state tracker request queries be disabled for meta operations. Reviewed-by: Roland Scheidegger <[email protected]>
* main: Change u_mmAllocMem align2 from bytes (old API) to bits (new API)Kenneth Graunke2019-12-051-1/+1
| | | | | | | | | | | The main and Gallium implementations were recently merged, and the align2 parameter in the Gallium one is in bits. execmem.c expected bytes still. This led to every call here asserting. Fixes: b6fd679a9e("mesa/main/util: moving gallium u_mm to util, remove main/mm") Reviewed-by: Alejandro Piñeiro <[email protected]> Tested-by: Clayton Craft <[email protected]>
* util/atomic: Add p_atomic_add_return for the unlocked pathJason Ekstrand2019-12-051-1/+1
| | | | | Fixes: 385d13f26d2 "util/atomic: Add a _return variant of p_atomic_add" Reviewed-by: Ilia Mirkin <[email protected]>
* anv: Implement VK_KHR_buffer_device_addressJason Ekstrand2019-12-052-7/+53
| | | | | | | | | The primary difference between the KHR and EXT versions of the extension is that the KHR provides the address at AllocateMemory time for replay so we can replay it safely without moving to a sparse address model. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use a pNext loop in AllocateMemoryJason Ekstrand2019-12-051-25/+45
| | | | | | | | | This function has a lot of possible extensions and some of them we can easily handle on-the-fly so it's easier to just have a loop than to find each structure manually. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Add allocator support for client-visible addressesJason Ekstrand2019-12-056-10/+107
| | | | | | | | | | When a BO is flagged as having a client visible address, we put it in its own heap. We also support the client explicitly specifying an address in said heap. If an address collision happens, we return false from anv_vma_alloc which turns into a VK_ERROR_OUT_OF_DEVICE_MEMORY. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* util/vma: Add a function to allocate a particular address rangeJason Ekstrand2019-12-052-0/+41
| | | | | | | | | | | This new function lets you request to remove a specific address range from the allocator. It returns true on success and leaves the allocator unmodified and returns false on failure. It doesn't need to return an offset because, if it succeeds, the offset passed in is the allocated offset. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* util/vma: Factor out the hole splitting part of util_vma_heap_allocJason Ekstrand2019-12-051-43/+48
| | | | | Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Add an explicit_address parameter to anv_device_alloc_boJason Ekstrand2019-12-056-7/+26
| | | | | | | | | | We already have a mechanism for specifying that we want a fixed address provided by the driver internals. We're about to let the client start specifying addresses in some very special scenarios as well so we want to pass this through to the allocation function. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Stop advertising two heaps just for the VF cache WAJason Ekstrand2019-12-052-67/+6
| | | | | Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Set up VMA heaps independently from memory heapsJason Ekstrand2019-12-052-31/+16
| | | | | | | | | Our VMA allocations are really independent from the memory heaps we expose via the API. The only thing that really matters is the GTT size so we can make the high heap the right size. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Stop tracking VMA allocationsJason Ekstrand2019-12-052-13/+5
| | | | | | | | | | util_vma_heap_alloc will already return 0 if it doesn't have enough space. The only thing the vma_*_available tracking was doing was preventing us from allocating too much on any given heap. Now that we're tracking that in the heap itself, we can drop these. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Disallow allocating above heap sizesJason Ekstrand2019-12-051-9/+27
| | | | | | | | | We're already tracking the amount of memory used in each heap. This commit just makes us start rejecting memory allocations if the heap would grow too large. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* util/atomic: Add a _return variant of p_atomic_addJason Ekstrand2019-12-051-2/+15
| | | | | Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Don't leak when set_tiling failsJason Ekstrand2019-12-051-3/+4
| | | | | | Fixes: a44744e01d73 "anv: Require a dedicated allocation for..." Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use PIPE_CONTROL flushes to implement the gen8 VF cache WAJason Ekstrand2019-12-056-20/+245
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Apply cache flushes after setting index/draw VBsJason Ekstrand2019-12-051-2/+35
| | | | | Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Always invalidate the VF cache in BeginCommandBufferJason Ekstrand2019-12-051-2/+1
| | | | | | | | | | I think the reason why we only do this for primaries is that we didn't expect to have blorp calls in secondaries. However, you are allowed to have a full render pass in a secondary command buffer so resolves and clears can end up in there. We should just always invalidate. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* blorp: Pass the VB size to the VF cache workaroundJason Ekstrand2019-12-054-6/+10
| | | | | Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Add a has_softpin booleanJason Ekstrand2019-12-052-3/+6
| | | | | | | | This separates "has" from "use" which will make the next commit a bit cleaner. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Drop bo_flags from anv_bo_poolJason Ekstrand2019-12-053-14/+3
| | | | | | | | | In ee77938733cd, we started using the BO cache for anv_bo_pool and stopped using the bo_flags parameter. However, we never dropped it from the struct or the init function. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* glsl/tests: Use splitlines() instead of strip()Michel Dänzer2019-12-051-2/+2
| | | | | | | | | strip() removes leading and trailing newlines, but leaves newlines between multiple lines in the string. This could cause failures when comparing the output of cross-compiled Windows binaries (producing Windows-style newlines) to the expected output with Unix-style newlines. Reviewed-by: Dylan Baker <[email protected]>
* android: radeonsi: fix build after vl refactoring (v2)Mauro Rossi2019-12-053-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | vl functions moved from radeonsi to gallium/auxiliary/vl have left android build of radeonsi in broken state. libmesa_galliumvl static is need to build readeonsi, gallium_dri building rules are reworked to avoid multiple symbols and libmesa_galliumvl static dependency is needed in radeonsi. Here is the changelog: - android: gallium/auxiliary: add libmesa_galliumvl static - android: gallium_dri: move libmesa_gallium to static to prevent multiple symbols - android: radeonsi: fix build after vl refactoring Fixes the following building error: external/mesa/src/gallium/drivers/radeonsi/si_uvd.c:47: error: undefined reference to 'vl_video_buffer_create_as_resource' clang.real: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 86e60bc ("radeonsi: remove si_vid_join_surfaces and use combined planar allocations") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* intel/compiler: force simd8 when dual src blending on gen8Tapani Pälli2019-12-051-0/+10
| | | | | | | | | | | | | Patch introduces option to force simd8 and uses it as a workaround for dual source blending issues seen with skqp (skia testsuite) on gen8. Fixes following Piglit test on gen8 platforms: arb_blend_func_extended-dual-src-blending-issue-1917 Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1917 Signed-off-by: Tapani Pälli <[email protected]> c: <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/compiler: add newline to limit_dispatch_width messageTapani Pälli2019-12-051-1/+1
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* turnip: Add support for compute shaders.Eric Anholt2019-12-043-28/+332
| | | | | | | | | | | | | | Since compute shares the FS state with graphics, we have to re-upload the pipeline state when switching between compute dispatch and graphics draws. We could potentially expose graphics and compute as separate queues and then we wouldn't need pipeline state management, but the closed driver exposes a single queue and consistency with them is probably good. So far I'm emitting texture/ibo state as IBs that we jump to. This is kind of silly when we could just emit it directly in our CS, but that's a refactor we can do later. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Move pipeline BO list adding to BindPipeline.Eric Anholt2019-12-041-8/+7
| | | | | | | We only need to do it once when we bind, rather than having to check at every draw call. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Sanity check that we're adding valid BOs to the list.Eric Anholt2019-12-041-0/+2
| | | | | | | I tripped over this during CS enabling when my program BO wasn't set up. Easier to debug this way than the kernel telling us a 0 handle is invalid. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Add a helper function for getting tu_buffer iovas.Eric Anholt2019-12-043-5/+9
| | | | | | Easier than remembering to add all 3 offsets. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Refactor the graphics pipeline create implementation.Eric Anholt2019-12-041-15/+31
| | | | | | | The loop over the pipelines to create (and the failure handling) was noisy, and the stub for compute setup looked nicer to me. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Add basic SSBO support.Eric Anholt2019-12-044-2/+80
| | | | | | | | | | This is enough to pass dEQP-VK.binding_model.shader_access.primary_cmd_buf.storage_buffer.fragment.single_descriptor.* with fragmentStoresAndAtomics set, and thus to be able to start working on compute. I haven't enabled that flag yet, because it also implies image load/store support, which I haven't filled in. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Reuse tu6_stage2opcode() more.Eric Anholt2019-12-041-6/+3
| | | | | | A bit of cleanup for adding more stages later. Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Drop redefinition of VALIDREG now that it's in ir3.h.Eric Anholt2019-12-041-3/+0
| | | | | | Fixes: 937b9055698b ("freedreno/ir3: fix neverball assert in case of unused VS inputs") Reviewed-by: Jonathan Marek <[email protected]>
* turnip: Fix unused variable warnings.Eric Anholt2019-12-042-7/+0
| | | | Reviewed-by: Jonathan Marek <[email protected]>
* glsl: make use of active_shader_mask when building resource listTimothy Arceri2019-12-051-12/+1
| | | | | | | This allows us to avoid walking the entire IR looking for used uniforms. Reviewed-by: Tapani Pälli <[email protected]>
* glsl: don't set uniform block as used when its notTimothy Arceri2019-12-052-2/+10
| | | | | | | | | | | The spec requires unused uniform block to be set as active in the program resource list. To support this we tell opt dead code not to remove them. However we can mark them as unused internally and avoid unnecessarily state changes. This change is also required for the folowing clean-up patch. Reviewed-by: Tapani Pälli <[email protected]>
* glsl: move calculate_array_size_and_stride() to link_uniforms.cppTimothy Arceri2019-12-052-216/+218
| | | | | | | | This is where all the other uniform values are populated so it makes much more sense here. Moving it will also allow us to better share code between the NIR and GLSL IR resource list builders. Reviewed-by: Tapani Pälli <[email protected]>
* anv: Fix error message format stringIan Romanick2019-12-041-5/+2
| | | | | | | | See also 246261f0addf Reviewed-by: Eric Engestrom <[email protected]> CID: 1455892 Fixes: 246261f0add ("anv: prepare the driver for delayed submissions")
* mesa: Silence unused parameter warningIan Romanick2019-12-049-14/+14
| | | | | | | | | | | | | Unused since e4da8b9c331 ("mesa/compiler: rework tear down of builtin/types"). src/mesa/main/context.c: In function ‘_mesa_free_context_data’: src/mesa/main/context.c:1321:54: warning: unused parameter ‘destroy_compiler_types’ [-Wunused-parameter] 1321 | _mesa_free_context_data(struct gl_context *ctx, bool destroy_compiler_types) | ^ Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa: Silence 'left shift of negative value' warning in BPTC compression codeIan Romanick2019-12-041-4/+3
| | | | | | | | | | | | | | src/util/format/../../mesa/main/texcompress_bptc_tmp.h:830:31: warning: left shift of negative value [-Wshift-negative-value] 830 | value |= (~(int32_t) 0) << n_bits; | ^~ v2: Rewrite to just shift left then shift right. Based on conversation with Neil in https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2792#note_320272, this should be fine. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> [v1] Reviewed-by: Neil Roberts <[email protected]>