aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* 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]>
* turnip: allow writes to draw_cs outside of render passJonathan Marek2019-12-041-4/+3
| | | | | | | | | This is for state commands like CmdSetViewport that can be used outside of a renderpass. Accumulating those into draw_cs outside of the renderpass should have the desired effect. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/ir3: fix neverball assert in case of unused VS inputsRob Clark2019-12-042-4/+19
| | | | | | | | | | | | | | | The logic to ensure VS and BS inputs are aligned wasn't accounting for unused inputs in VS. This *usually* doesn't happen, but it seems it can in the case of ARB programs? Fixes assert: ``` fd6_program_create: Assertion `bs->inputs[i].regid == vs->inputs[i].regid' failed. ``` Fixes: 882d53d8e36 ("freedreno/ir3+a6xx: same VBO state for draw/binning") Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/ir3: remove store_output lowered to store_shared_ir3Rob Clark2019-12-041-1/+1
| | | | | | | | | | | | | | | Fixes crashes that were unnoticed in CI because debug_assert() was not enabled (but become real crashes after the next patch): dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_highp_geometry dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_lowp_geometry dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_mediump_geometry dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_highp_geometry dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_lowp_geometry dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_mediump_geometry Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: MSAA resolve directly from GMEMJonathan Marek2019-12-043-50/+32
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: don't set unused BLIT_DST_INFO bits for GMEM clearJonathan Marek2019-12-041-7/+1
| | | | | | | | | These bits are ignored when clearing so don't bother setting them. Note: MSAA samples when clearing comes from other registers (tu6_emit_msaa) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: implement CmdClearAttachmentsJonathan Marek2019-12-041-1/+65
| | | | | | | Passes these deqp tests: dEQP-VK.api.image_clearing.core.*attach*single* Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: don't skip unused attachments when setting up tiling configJonathan Marek2019-12-041-18/+10
| | | | | | | This makes it easier to find the gmem_offset associated with an attachment. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: fix display wsi fence timing outJonathan Marek2019-12-021-0/+11
| | | | | | | Fixes: df9f2adf ("turnip: add display wsi") Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Disable timestamp queries for now.Eric Anholt2019-11-271-2/+2
| | | | | | | They're not implemented, and not critical to bring up immediately. Avoids failures in the CTS when nothing gets written to the query. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* freedreno/perfcntrs/fdperf: add missing a2xx case in select_counterJonathan Marek2019-11-271-0/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/perfcntrs/fdperf: add missing a20x compatibleJonathan Marek2019-11-271-0/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/perfcntrs/fdperf: fix u64 print on 32-bit buildsJonathan Marek2019-11-271-1/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/perfcntrs: add a2xx MH countersJonathan Marek2019-11-271-4/+186
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/registers: add missing MH perfcounter enum for a2xxJonathan Marek2019-11-271-0/+185
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* turnip: fix integer render targetsJonathan Marek2019-11-261-1/+3
| | | | | | | | | | | | | Add missing required bits. Fixes at least: dEQP-VK.pipeline.render_to_image.dedicated_allocation.1d.small.r16g16_sint_d24_unorm_s8_uint dEQP-VK.pipeline.render_to_image.dedicated_allocation.2d.mipmap.r16g16_sint_d24_unorm_s8_uint dEQP-VK.renderpass.dedicated_allocation.attachment.4.401 dEQP-VK.renderpass2.suballocation.formats.r16_uint.load.draw dEQP-VK.synchronization.op.single_queue.barrier.write_draw_read_copy_image_to_buffer.image_128x128_r16_uint Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno: Introduce a resource layout header.Eric Anholt2019-11-261-0/+164
| | | | | | | | This will be used for sharing resource layout code between freedreno and tu. Mostly copied from a commit by Rob, with a new location and the slice struct renamed for consistency. Acked-by: Rob Clark <[email protected]>
* turnip: implement UBWCJonathan Marek2019-11-219-125/+325
| | | | | | | | | | | This enables UBWC for everything except 3D textures. It breaks many image_to_image copies but those aren't important and it can be worked around later (image_to_image copy needs to be done in two steps, decode from the source format and then encode to the destination format). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/regs: update UBWC related bitsJonathan Marek2019-11-211-5/+9
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/perfctrs/fdperf: periodically restore countersRob Clark2019-11-211-1/+31
| | | | | | | | | When GPU is idle and suspends, the currently selected countables will all reset to the first one. So periodically restore the selected countables. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs: add fdperfRob Clark2019-11-212-0/+1082
| | | | | | | | | Port from the envytools tree, but converted to use the .c tables for describing the perfcounter groups/countables, rather than using rnndec to get this at runtime from the register xml. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs/a6xx: remove RBBM countersRob Clark2019-11-211-1/+1
| | | | | | | | | | Currently this are getting blocked by the kernel.. these counters don't seem to be the most useful ones, and to use them we'd have to somehow probe the kernel by submitting cmdstream to write the selector regs and see if that triggers a GPU fault. So let's just skip them. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfctrs/a2xx: move CP to be first groupRob Clark2019-11-211-1/+1
| | | | | | | fdperf expects this, to find the ALWAYS_COUNT counter Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs: add accessor to get per-gen tablesRob Clark2019-11-214-0/+61
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/perfcntrs: move to shared locationRob Clark2019-11-219-0/+2522
| | | | | | | | | | This should eventually be useful for VK_KHR_performance_query as well. And in the more near term, for fdperf. Attempt to not break android build is best-effort and untested. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/ir3: enable half precision for pre-fs texture fetchHyunjun Ko2019-11-201-1/+1
| | | | Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: fixup when changing to mad.f16Hyunjun Ko2019-11-201-1/+5
| | | | Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: fix printing output registers of FS.Hyunjun Ko2019-11-201-2/+3
| | | | | | Fixes: cea39af2fbf1 ("freedreno/ir3: Generalize ir3_shader_disasm()") Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: Enabling lowering 16-bit flrpNeil Roberts2019-11-201-0/+2
| | | | Reviewed-by: Rob Clark <[email protected]>
* freedreno: support 16b for the sampler opcodeHyunjun Ko2019-11-202-18/+38
| | | | Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: Implement f2b16 and i2b16Neil Roberts2019-11-201-0/+12
| | | | Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: Add implementation of nir_op_b16cselNeil Roberts2019-11-201-5/+15
| | | | Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: Support 16-bit comparison instructionsNeil Roberts2019-11-201-0/+20
| | | | | | | | | | v2. [Hyunjun Ko ([email protected])] Avoid using too much open code like "instr->regs[n]->flags |= FOO" v3. [Hyunjun Ko ([email protected])] Remove redundant code for both 16b and 32b operations. Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: cleanup by removing repeated codeHyunjun Ko2019-11-201-12/+5
| | | | | | Prep-work for the corresponding patch. Reviewed-by: Rob Clark <[email protected]>
* turnip: Drop the copy of the formats table.Eric Anholt2019-11-196-738/+83
| | | | | | | | | | | | | | | | | Now that we can (mostly) generate a pipe format for a VkFormat, use that to answer queries about formats. This will let us refactor the freedreno format table surface layout code to be shared between gallium and vulkan. This causes us to expose fewer formats for now (on a 1/100 CTS run I'm doing, skips go from 3671 to 3835 out of 5145 tests). Fails stay about the same (478 -> 434, but the run is pretty flaky and we're doing fewer tests now). v2: Rebase on master, throw a finishme on missing vk-to-pipe formats that tu used to support. Reviewed-by: Kristian H. Kristensen <[email protected]> (v1) Reviewed-by: Jonathan Marek <[email protected]>
* turnip: fix sRGB GMEM clearJonathan Marek2019-11-191-6/+17
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: implement CmdClearColorImage/CmdClearDepthStencilImageJonathan Marek2019-11-1910-35/+195
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: add x11 wsiJonathan Marek2019-11-182-0/+114
| | | | | | | Copied from radv Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: add display wsiJonathan Marek2019-11-184-0/+366
| | | | | | | Copied from radv (minus the fence change) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>