summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lima: move damage_rect into lima_submitQiang Yu2020-02-175-27/+33
| | | | | | | | damage_rect is preserved across draws. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: move pp_max_stack_size to lima_submitQiang Yu2020-02-174-12/+12
| | | | | | | | pp_max_stack_size is preserved across draws. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: move resolve into lima_submitQiang Yu2020-02-175-17/+19
| | | | | | | | resolve is preserved across draws. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: move plbu/vs_cmd_array into lima_submitQiang Yu2020-02-176-25/+25
| | | | | | | | | This information is preserved across draws and needed when task submission. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: track write submits of context (v3)Qiang Yu2020-02-174-2/+41
| | | | | | | | | | | | | | | | | We need to flush submit which write to the FBO before read it as texture. v2: rename lima_flush_previous_write_submit to lima_flush_previous_submit_writing_resouce. v3: delay add submit to hash_table to lima_update_submit_wb when really know the render target will be written. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: make lima_submit one time use drop data (v3)Qiang Yu2020-02-177-43/+105
| | | | | | | | | | | | | | | | | | | | lima_submit is created by lima_submit_get() in draw/clear functions and freed after submit to kernel. There is a hash map to find the same lima_submit for color/depth buffer combination if user switch framebuffer w/o flush the command then switch back again. v2: rename lima_flush_submit to lima_flush_submit_accessing_bo. v3: delay flush access submit to lima_update_submit_wb when really know if this submit will write to the target buffer. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: add lima_submit_getQiang Yu2020-02-175-11/+35
| | | | | | | | | | Replace all usage of "ctx->submit" in draw code path with lima_submit_get(). This function will create new submit in the following changes. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: use lima_submit_create_stream_bo for plbu/vs_cmd and pp_stackQiang Yu2020-02-172-12/+9
| | | | | | | | | | | lima_ctx_buff is used cross function calls in draws. But plbu/vs_cmd and pp_stack are used immediately after create. And we need to get rid of "ctx->submit" in the flush code path which exists in lima_ctx_buff. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: adjust pp_stream to use lima_submit_create_stream_boQiang Yu2020-02-172-24/+14
| | | | | | | | | No need to save the bo, just map and va for use in this submit is enough. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: add lima_submit_create_stream_boQiang Yu2020-02-172-11/+26
| | | | | | | | | For creating stream buffer which is used in single submit and freed after the submit is passed to kernel driver. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: pass submit parameter for functions in lima_submic.c (v2)Qiang Yu2020-02-171-54/+76
| | | | | | | | | | | | | | "ctx->submit" won't be used directly, so remove the usage in lima_submit.c by directly passing the submit parameter. And more data in lima_context will be moved to lima_submit, so "ctx" will be replaced by "submit" in those functions. v2: rename lima_submit_flush to lima_do_submit. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: move flush code to lima_submit.cQiang Yu2020-02-173-739/+743
| | | | | | | | Just code move, no content change. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: put hardware related info to lima_gpu.hQiang Yu2020-02-177-172/+211
| | | | | | | | For sharing with multi .c files. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: merge gp/pp submitQiang Yu2020-02-176-75/+74
| | | | | | | | | Use single lima_submit for the submit operation. This is also for moving more information in lima_context to lima_submit. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: move syncobj from lima_submit to lima_contextQiang Yu2020-02-176-48/+58
| | | | | | | | | As there will be multi lima_submit per context, move syncobj out of it. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: add missing resolve check for damage and reloadQiang Yu2020-02-171-3/+3
| | | | | | | | | If color buffer is not touched, we do not need to reload or get damage region from it. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: add render target to submit by dirty buffer flagsQiang Yu2020-02-171-22/+27
| | | | | | | | No need to add un-touched buffer to submit. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: delay plbu head command generation to flush stage (v2)Qiang Yu2020-02-173-17/+17
| | | | | | | | | | | | | | | | Prepare for multi submit in which case only know the plb_index when final flush. Another need for this is proper reload detection: only when flush stage can we know if need to do reload, because user may first clear depth, then color individually, so we don't know if need to pack repload plbu cmd when first clear depth. v2: move lima_update_submit_wb before ctx->resolve change for lima_ctx_dirty to work in lima_submit_wb. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: delay add plb buffer to submit when flushQiang Yu2020-02-171-12/+21
| | | | | | | | | | | | Prepare for multi submit in which case plb buffer is known only when flush. Keep the write back buffer update which is needed for FB dirty track. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: pass array as parameter to PLBU and VS command macrosQiang Yu2020-02-171-10/+12
| | | | | | | | | | Don't assume the ctx parameter, prepare for moving PLBU and VS arrary from lima_context to lima_submit and adding new plbu_cmd_head array. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: remove lima_ctx_buff_va submit flags (v2)Qiang Yu2020-02-174-33/+26
| | | | | | | | | | | | | | We don't have any shared lima_ctx_buff for both GP and PP, so no need to have these flags. v2: still add submit in lima_ctx_buff_va because some bo need to exist cross flush, so not every submit will call lima_ctx_buff_alloc. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: always add texture bo to submitQiang Yu2020-02-172-4/+12
| | | | | | | | | No matter texture desc change, we need to add texture to submit. Otherwise texture may be freed before submit finish. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: use util_copy_framebuffer_stateQiang Yu2020-02-171-9/+2
| | | | | | | | Use this helper to replace self written code. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: remove definition of lima_is_scanoutQiang Yu2020-02-171-1/+0
| | | | | | | | There is no implementation of this function. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* pan/decode: Remove extraneous newlineAlyssa Rosenzweig2020-02-161-1/+1
| | | | | | | | pandecode_log already does this. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Use fprintf instead of printf for constantsAlyssa Rosenzweig2020-02-161-9/+9
| | | | | | | | I was wondering where those constants disappeared to :-) Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 968f36d1fc0 ("pan/midgard: Support disassembling to a file") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Don't crash with constants on unknown opsAlyssa Rosenzweig2020-02-161-0/+4
| | | | | | | | | | | | Just use a dummy name instead.. we can't know a priori what type an unknown op will consume, but we don't want to dereference a null pointer. Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 24360966ab3 ("panfrost/midgard: Prettify embedded constant prints") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Identify stack barrier flagAlyssa Rosenzweig2020-02-162-2/+7
| | | | | | | In case thread local storage is used. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Set xyzx swizzle for load_compute_argAlyssa Rosenzweig2020-02-161-0/+1
| | | | | | | | Probably harmless but the w component doesn't appear valid so let's match the blob... one less bit to be nervous about. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Infer tags entirelyAlyssa Rosenzweig2020-02-161-5/+21
| | | | | | | | We're so close, again marking off a few edge cases is enough to allow us to omit this data entirely. Woot! Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Imply next tagsAlyssa Rosenzweig2020-02-161-10/+41
| | | | | | | | | As long as we can disambiguate a few edge cases, we can imply next tags entirely which cleans up the disassembly a fair bit (though not as much as implying tags entirely would -- we'll get there!) Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Overhaul tag handlingAlyssa Rosenzweig2020-02-168-113/+70
| | | | | | | | We unify disparate metadata about tags into a single structure to ensure information is not left out. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Improve barrier disassemblyAlyssa Rosenzweig2020-02-163-8/+31
| | | | | | | Just move some state from unknowns to actual keywords. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Use dummy tag for empty shadersAlyssa Rosenzweig2020-02-161-2/+2
| | | | | | | Fixes INSTR_INVALID_ENC in dEQP-GLES31.functional.compute.basic.empty Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Fix 32/64 mixed swizzle packingAlyssa Rosenzweig2020-02-161-2/+7
| | | | | | | Occurs in SSBO address computation. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Allow jumping out of a shaderAlyssa Rosenzweig2020-02-161-5/+5
| | | | | | | | | This comes up as a `return;` instruction in a compute shader. We need to use the special tag 1 to signify "break". Fixes numerous INSTR_INVALID_ENC faults in dEQP-GLES31.functional.compute.basic.* Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Implement barriersAlyssa Rosenzweig2020-02-166-2/+37
| | | | | | | | | | | | | Barriers execute on the texture pipeline on Midgard, so let's tentatively handle barrier() as conservatively as possible (forcing memory barriers of both buffers and shared memory). Implementation isn't quite there yet -- it doesn't look at interactions of adjacent barriers like it's supposed to -- but the core is there. Fixes dEQP-GLES31.functional.compute.basic.ssbo_local_barrier_single_invocation Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Fix swizzles harderAlyssa Rosenzweig2020-02-161-54/+46
| | | | | | | Just for disassembly for now~ Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Fix missing prefixesAlyssa Rosenzweig2020-02-161-1/+1
| | | | | | | | I was wondering where those were going... :) Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: c1952779d68 ("pan/decode: Dump to a file") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* pan/midgard: Track pressure when scheduling ld/stAlyssa Rosenzweig2020-02-161-0/+35
| | | | | | | | | Fixes RA failure in dEQP-GLES31.functional.shaders.builtin_functions.common.modf.* (which uses multiple indirect SSBO writes) Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Allocate RAM backing of shared memoryAlyssa Rosenzweig2020-02-165-2/+43
| | | | | | | | | | | | Unlike other GPUs, Mali does not have dedicated shared memory for compute workloads. Instead, we allocate shared memory (backed to RAM), and the general memory access functions have modes to access shared memory (essentially, think of these modes as adding this allocates base + workgroupid * stride in harder). So let's allocate enough memory based on the shared_size parameter and supply it. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Rename unknown2_8 to paddingAlyssa Rosenzweig2020-02-162-4/+5
| | | | | | | It's zero everywhere. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Rename bifrost_framebuffer->mali_framebufferAlyssa Rosenzweig2020-02-164-36/+36
| | | | | | | | | | | | (And bifrost_fb_extra to mali_framebuffer_extra, bifrost_render_target to mali_render_target) These structures are the norm on midgard t760+, drop the bifrost names, it's silly... unrelated to the rest of the series but while I'm messing with pandecode and cleaning up bifrost abstractions, might as well. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Unify bifrost_scratchpad with mali_shared_memoryAlyssa Rosenzweig2020-02-164-52/+18
| | | | | | | | | | It looks like these are the same structure, so this allows us to reuse mali_shared_memory across architectures, and dispels with the Bifrost-specific mystery of the scratchpads... nothing so mysterious after all, just stack. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Identify mali_shared_memory structureAlyssa Rosenzweig2020-02-165-96/+96
| | | | | | | | | This small structure is used to configure shared memory and stack for compute shaders, and is also present at the beginning of framebuffer descriptors. Let's factor it out. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Ensure compute shader_meta is zeroedAlyssa Rosenzweig2020-02-161-1/+2
| | | | | | | In theory the hardware doesn't care but it'll make for easier traces. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Update comment about magic number relating to barriersAlyssa Rosenzweig2020-02-161-2/+2
| | | | | | | | | | | It's a complicated story. But from what I can tell, in GL compute without barriers, the blob is able to redistribute the workgroups in various ways (that are not yet understood), whereas with barriers it cannot redistribute anything, which accounts for erratic workgroup packing without barriers. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* ci: bump debian image and change llvm deps to 8Dave Airlie2020-02-152-12/+4
| | | | | | | | | v3: remove version in a few places (Michel) Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805>
* gallivm/s390: fix pass init order on s390 with llvm 8 (v2)Dave Airlie2020-02-151-2/+3
| | | | | | | | | | | llvm 8 has some missing pass dependencies, fix the s390 case as well. v2: add ARM also (Michel) Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805>
* iris: Trim "../../src/gallium/drivers/iris/" out of debug dump filenamesKenneth Graunke2020-02-151-0/+4
| | | | | | | | | | | Easier to read. v2: Also trim "/iris/" (Jordan Justen) Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3830> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3830>