aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: Drop PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS.Eric Anholt2020-01-211-1/+0
| | | | | | | | Now that we don't expose TGSI, we can stop exposing the flag. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3493> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3493>
* r300: Remove a bunch of default handling of pipe caps.Eric Anholt2020-01-211-125/+0
| | | | | | | | | | | u_screen will return 0 for all of these, which means that this is one less driver to see in git grep when I'm checking who exposes a cap. The exception is the texel/gather offsets and stream output components, which will not be exposed since we don't expose the corresponding GLSL version. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3493>
* r600: Remove a bunch of default handling of pipe caps.Eric Anholt2020-01-211-53/+0
| | | | | | | | u_screen will return 0 for all of these, which means that this is one less driver to see in git grep when I'm checking who exposes a cap. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3493>
* radeonsi: Remove a bunch of default handling of pipe caps.Eric Anholt2020-01-211-22/+0
| | | | | | | | u_screen will return 0 for all of these, which means that this is one less driver to see in git grep when I'm checking who exposes a cap. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3493>
* freedreno: Stop scattered remapping of SSBOs/images to IBOs.Eric Anholt2020-01-216-32/+37
| | | | | | | | | | | | | | | | | | | | | | | Just make it be all SSBOs then all storage images. The remapping table was there to make it so that the big gap present from gallium's atomic lowering would get cleaned up, but that's no longer case. The table has made it very hard to support Vulkan storage images, so it's time for it to go. This does mean that an SSBO/IBO that is only loaded (or size-queried) will now occupy a slot in the table where it wouldn't before. This seems like a minor cost compared to being able to drop this much logic. With the remapping table gone, SSBO array handling for turnip just falls out. Fixes many array cases of dEQP-VK.binding_model.shader_access.primary_cmd_buf.storage_buffer.* Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> (turnip) Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
* nir: Drop the ssbo_offset to atomic lowering.Eric Anholt2020-01-212-2/+2
| | | | | | | | | | | | | The arguments passed in were: - prog->info.num_ssbos - prog->nir->info.num_ssbos - arbitrary values for standalone compilers The num_ssbos should match between the prog's info and prog->nir's info until this lowering happens. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
* nouveau/nvc0: add extern keyword to nvc0_miptree_vtbl.Timur Kristóf2020-01-211-1/+1
| | | | | Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* panfrost: Add ASTC texture formatsIcecream952020-01-214-1/+28
| | | | | | Acked-by: Daniel Stone <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3414>
* panfrost: Add ETC1/ETC2 texture formatsIcecream952020-01-213-4/+34
| | | | | | Acked-by: Daniel Stone <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3414>
* panfrost: Rework linear<--->tiled conversionsAlyssa Rosenzweig2020-01-212-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lot going on here (it's a ton of commits squashed together since otherwise this would be impossible to review...) 1. We have a fast path for linear->tiled for whole (aligned) tiles, but we have to use a slow path for unaligned accesses. We can get a pretty major win for partial updates by using this slow path simply on the borders of the update region, and then hit the fast path for the tile-aligned interior. This does require some shuffling. 2. Mark the LUTs constant, which allows the compiler to inline them, which pairs well with loop unrolling (eliminating the memory accesses and just becoming some immediates.. which are not as immediate on aarch64 as I'd like..) 3. Add fast path for bpp1/2/8/16. These use the same algorithm and we have native types for them, so may as well get the fast path. 4. Drop generic path for bpp != 1/2/8/16, since these formats are generally awful and there's no way to tile them efficienctly and honestly there's not a good reason too either. Lima doesn't support any of these formats; Panfrost can make the opinionated choice to make them linear. 5. Specialize the unaligned routines. They don't have to be fully generic, they just can't assume alignment. So now they should be nearly as fast as the aligned versions (which get some extra tricks to be even faster but the difference might be neglible on some workloads). 6. Specialize also for the size of the tile, to allow 4x4 tiling as well as 16x16 tiling. This allows compressed textures to be efficiently tiled with the same routines (so we add support for tiling ASTC/ETC textures while we're at it) Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Tested-by: Vasily Khoruzhick <[email protected]> #lima on Mali400 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3414>
* panfrost,lima: De-Galliumize tiling routinesAlyssa Rosenzweig2020-01-212-4/+7
| | | | | | | | | | | | There's an implicit dependence on Gallium here that will add more complexity than needed when testing/optimizing out of driver as well as potentially Vulkanizing. We don't need a full pipe_box, just the x/y/w/h properties directly. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Tested-by: Vasily Khoruzhick <[email protected]> #lima on Mali400 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3414>
* gallium/gallivm: enable linking lp_bld_printf function with C++ codeJan Zielinski2020-01-211-0/+7
| | | | | | | | | To enable linking functions declared in lp_bld_printf.h file with C++, we need to add appropriate macros to the header. Reviewed-by: Krzysztof Raszkowski <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3470> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3470>
* iris: Fix value of out-of-bounds accesses for vertex attributesDanylo Piliaiev2020-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having VERTEX_BUFFER_STATE.BufferSize greater than the size of a bound vertex buffer allows shader to read uninitialized vertex attributes from BO, instead of allowing hardware to return zeroes on out-of-bounds access. OpenGL spec "6.4 Effects of Accessing Outside Buffer Bounds" says: "Robust buffer access can be enabled by creating a context with robust access enabled through the window system binding APIs. When enabled, any command unable to generate a GL error as described above, such as buffer object accesses from the active program, will not read or modify memory outside of the data store of the buffer object and will not result in GL interruption or termination. Out-of-bounds reads may return values from within the buffer object or zero values." Fixes three webgl tests: conformance/rendering/out-of-bounds-array-buffers.html conformance2/rendering/out-of-bounds-index-buffers-after-copying.html conformance2/rendering/element-index-uint.html See #1996 Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3427> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3427>
* clover: Initialize Asm ParsersJan Vesely2020-01-211-0/+1
| | | | | | | | | Fixes piglits that use ADMGCN inline assembly: program@execute@calls program@execute@amdgcn-mubuf-negative-vaddr CC: <[email protected]> Signed-off-by: Jan Vesely <[email protected]>
* radeonsi/gfx10: enable GS fast launch for triangles and strips with NGG cullingMarek Olšák2020-01-206-54/+222
| | | | | | | Only non-indexed triangle lists and strips are supported. This increases performance if there is something to cull. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: rewrite late alloc computationMarek Olšák2020-01-202-39/+59
| | | | | | | | - Use conservative late alloc when the number of CUs <= 6. - Move the late alloc GS register to the GS shader state, so that it can be tuned for NGG culling. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* ac: add helper ac_build_triangle_strip_indices_to_triangleMarek Olšák2020-01-202-37/+8
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: implement NGG culling for 4x wave32 subgroupsMarek Olšák2020-01-2012-54/+951
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: move GE_PC_ALLOC setting to shader statesMarek Olšák2020-01-205-15/+40
| | | | | | | | The value is not changed. I just use a different way to compute it. The value will vary with NGG culling. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: don't initialize VGPRs not used by NGG passthroughMarek Olšák2020-01-201-3/+5
| | | | | | v2: TES doesn't use the GS PrimitiveID Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: merge main and pos/param export IF blocks into one if possibleMarek Olšák2020-01-201-4/+21
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: export primitives at the beginning of VS/TESMarek Olšák2020-01-203-26/+66
| | | | | | | This decreases VGPR usage and will allow us to merge some IF blocks in shaders. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: move s_sendmsg gs_alloc_req to the beginning of shadersMarek Olšák2020-01-203-3/+13
| | | | | | This will allow us to merge some IF blocks in shaders. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: correct VS PrimitiveID implementation for NGGMarek Olšák2020-01-201-12/+13
| | | | | | | | | We didn't use the correct LDS pointer, though it probably doesn't matter, because I think that nothing else is using LDS here. This commit makes it consistent with all other esgs_ring use. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: update comments and remove invalid TODOsMarek Olšák2020-01-201-12/+1
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: turn an assertion into return in si_nir_store_output_tcsMarek Olšák2020-01-201-3/+5
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: fix doubles and int64Marek Olšák2020-01-202-7/+7
| | | | | | Fixes: 57bd73e2296 - radeonsi: remove llvm_type_is_64bit Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: don't invoke decompression inside internal launch_gridMarek Olšák2020-01-203-4/+22
| | | | | | | | Decompress resources properly but don't do it inside launch_grid to prevent recursion. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Cc: 19.3 <[email protected]>
* radeonsi: clean up how internal compute dispatches are handledMarek Olšák2020-01-201-22/+13
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Cc: 19.3 <[email protected]>
* Revert "radeonsi: unbind image before compute clear"Marek Olšák2020-01-201-5/+0
| | | | | | | | This reverts commit 3a527eda7ceee37643f948bfcf05285c5aa3a4d6. It's incorrect. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* Revert "gallium: add st_context_iface::flush_resource to call FLUSH_VERTICES"Daniel Stone2020-01-201-7/+0
| | | | | | | This reverts commit bec9c90b5ecf9cc2dc580f9ff297f94ba5aa3506. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472>
* Revert "st/dri: do FLUSH_VERTICES before calling flush_resource"Daniel Stone2020-01-201-4/+6
| | | | | | This reverts commit 3ba16d36c988a1c7b31c7fe44c1b6a24d9d8227d. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472>
* panfrost: Dynamically allocate shader variantsIcecream952020-01-182-3/+23
| | | | | | | | | This fixes a crash in LZDoom where over 16 shader variants are needed for a few shaders in some maps, and should also save a few kilobytes of RAM as most of the time only one or two variants of the 8 previously allocated are actually needed. Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Expose some functionality with dEQP flagAlyssa Rosenzweig2020-01-181-3/+3
| | | | | | | | These features are stable enough that they don't need to be hidden. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3464> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3464>
* panfrost: Compact the bo_access readers arrayIcecream952020-01-181-4/+9
| | | | | | | | | | | | | | | | | | Previously, the array bo_access->readers was only cleared when there were no unsignaled fences, which in some situations never happened. That resulted in the array having thousands of NULL pointers, but only a handful of active readers. With this patch, all the unsignaled readers are moved to the front of the array, effectively building a new array only containing the active readers in-place. This results in the readers array usually only having a couple of elements. Reviewed-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3419> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3419>
* zink: support arrays of samplersErik Faye-Lund2020-01-182-22/+60
| | | | | Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: support sampling non-float texturesErik Faye-Lund2020-01-181-6/+7
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: store image-type per textureErik Faye-Lund2020-01-181-7/+6
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: avoid incorrect vector-constructionErik Faye-Lund2020-01-181-2/+2
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: support offset-variants of texturingErik Faye-Lund2020-01-183-5/+17
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: implement nir_texop_txsErik Faye-Lund2020-01-183-4/+50
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* freedreno/a6xx: add PROG_FB_RAST stateobjRob Clark2020-01-172-0/+6
| | | | | | | | | | For the handful of registers that depend on the union of program/ framebuffer/rasterizer state. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
* freedreno/a6xx: move dynamic program state to streaming stateobjRob Clark2020-01-174-44/+61
| | | | | | | | | Move the program state which we can't pre-bake to a streaming state object, rather than emitting directly in the draw cmdstream. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
* freedreno/a6xx: drop a few more per-draw registersRob Clark2020-01-172-8/+23
| | | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
* freedreno/a6xx: separate rast stateobj for prim restartRob Clark2020-01-177-37/+67
| | | | | | | | | | | | | | This lets us move PC_PRIMITIVE_CNTL into the rasterizr stateobj, rather than unconditionally emitting it directly in the cmdstream on every draw. This also starts adding some tracking about previous draw state, so that following patches can limit some of the register writes we currently emit on every draw. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
* freedreno/a6xx: cleanup rasterizer stateRob Clark2020-01-172-89/+54
| | | | | | | | | | | | All but one of the reg values is only used in the stateobj, so we can inline the register value setup and stateobj construction. While we are at it, switch over to the new register builders. Prep work for next patch. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
* freedreno/a6xx: limit scratch/debug markers to debug buildsRob Clark2020-01-171-2/+10
| | | | | | | | | | | | | | | | | The overhead does seem to matter when you have a high enough # of draw calls that effect few bins/pixels, because these writes would happen unconditionally (ie. not part of a state-group). Possibly we could keep these if we moved them into a state-group so the register writes would be no-ops on bins with no geometry. OTOH I usually end up adding in a WFI when using them scratch reg values to track down a crash. (So add a WFI to mitigate the annoyance of needing to use a debug build to get scratch regs to locate the position of a crash/hang in the cmdstream.) Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3435>
* iris: Fix some indentation in iris_init_render_contextJordan Justen2020-01-171-28/+28
| | | | Signed-off-by: Jordan Justen <[email protected]>
* st/dri: do FLUSH_VERTICES before calling flush_resourceMarek Olšák2020-01-171-6/+4
|
* gallium: add st_context_iface::flush_resource to call FLUSH_VERTICESMarek Olšák2020-01-171-0/+7
|