aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: check for softpin availability on Halti5 devicesLucas Stach2019-10-181-0/+5
| | | | | | | | | | | | Halti5 uses texture descriptors to control the samplers, and thus needs to know the GPU virtual address for the texture buffers to fill into the descriptor buffer. Without softpin userspace has no control over the GPU VM and also no way to fix up the texture descriptor buffer, so there is no point in creating a screen on a Halti5 device without softpin being available. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: Rework lockingMarek Vasut2019-10-189-16/+28
| | | | | | | | Replace the per-screen locking of flushing with per-context one and add per-context lock around command stream buffer accesses, to prevent cross-context flushing from corrupting these command stream buffers. Signed-off-by: Marek Vasut <[email protected]>
* etnaviv: Rework resource status trackingMarek Vasut2019-10-184-32/+93
| | | | | | | | | | Have each context track which resources it marked as pending read and pending write. Have each resource track in which context it is pending. This way, it is possible to identify when a resource is both pending read and pending write at the same time. Moreover, the status field can be correctly calculated and updated when necessary. Signed-off-by: Marek Vasut <[email protected]>
* etnaviv: rework the stream flush to always go through the context flushLucas Stach2019-10-181-36/+43
| | | | | | | | | This way we can ensure that the pipe driver tracking of pending resources stays in sync with the actual command buffer state, even if a space reservation triggers a forced flush. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: keep references to pending resourcesLucas Stach2019-10-182-11/+10
| | | | | | | | | | As long as a resource is pending in any context we must not destroy it, otherwise we'll hit a classical use-after-free with fireworks. To avoid this take a reference when the resource is first added to the pending set and put the reference when no longer pending. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: Make contexts track resourcesMarek Vasut2019-10-185-15/+40
| | | | | | | | | | | | | Currently, the screen tracks all resources for all contexts, but this is not correct. Each context should track the resources it uses. This also allows a context to detect whether a resource is used by another context and to notify another context using a resource that the current context is done using the resource. Signed-off-by: Marek Vasut <[email protected]> Cc: Christian Gmeiner <[email protected]> Cc: Guido Günther <[email protected]> Cc: Lucas Stach <[email protected]>
* v3d: Explicitly expose OpenGL ES Shading Language 3.1Jose Maria Casanova Crespo2019-10-181-0/+3
| | | | | | | | This will expose GL_EXT_primitive_bounding_box and GL_OES_primitive_bounding_box after previous commits expose OpenGL ES 3.1 once Compute Shaders are available. Reviewed-by: Eric Anholt <[email protected]>
* v3d: request the kernel to flush caches when TMU is dirtyIago Toral Quiroga2019-10-185-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adapts the v3d driver to the new CL submit ioctl interface that allows the driver to request a flush of the caches after the render job has completed. This seems to eliminate the kernel write violation errors reported during CTS and Piglit excutions, fixing some CTS tests and GPU resets along the way. v2: - Adapt to changes in the kernel side. - Disable shader storage and shader images if the kernel doesn't implement cache flushing. Fixes CTS tests: KHR-GLES31.core.shader_image_size.basic-nonMS-fs-float KHR-GLES31.core.shader_image_size.basic-nonMS-fs-int KHR-GLES31.core.shader_image_size.basic-nonMS-fs-uint KHR-GLES31.core.shader_image_size.advanced-nonMS-fs-float KHR-GLES31.core.shader_image_size.advanced-nonMS-fs-int KHR-GLES31.core.shader_image_size.advanced-nonMS-fs-uint KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-draw-calls2 KHR-GLES31.core.shader_atomic_counters.advanced-usage-draw-update-draw KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-int KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std140-matR KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std140-struct KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std430-matC-pad KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std430-vec Reviewed-by: Eric Anholt <[email protected]>
* v3d: Add Compute Shader supportEric Anholt2019-10-188-8/+278
| | | | | | Now that the UAPI has landed, add the pipe_context function for dispatching compute shaders. This is the last major feature for GLES 3.1, though it's not enabled quite yet.
* v3d: add new flag dirty TMU cache at v3d_compilerIago Toral Quiroga2019-10-181-0/+5
| | | | | | | | | | | | | | That we set for any TMU write on spills and general tmu. It is then used as part of v3d_emit_gl_shader_state later. v2: add a new flag instead at v3d_compiler instead of dirty the flag at v3dx if there is any spill (change suggested by Eric, added by Alejandro) v3: set this for anything that is not a load and do it also in v3d40_vir_emit_image_load_store (Eric) Reviewed-by: Eric Anholt <[email protected]>
* v3d: trivial update to obsolete commentIago Toral Quiroga2019-10-181-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* panfrost: Respect offset for imported resourcesDaniel Stone2019-10-181-0/+3
| | | | | | | | | | | | | | | | When we import a resource through Gallium, we need to take account of the offset parameter passed. Fixes a failure seen with the VIVID V4L2 driver, which would create NV12 resources within the same BO, with an offset. Sample pipeline to reproduce (replace videoN with your actual VIVID device node): gst-launch-1.0 v4l2src device=/dev/videoN ! video/x-raw,format=NV12 ! glimagesink Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reported-by: Nicolas Dufresne <[email protected]> Tested-by: Nicolas Dufresne <[email protected]>
* iris/resource: Use isl surface alignment during bo allocationJordan Justen2019-10-171-1/+3
| | | | | | | | | Reworks: * Change subject from "iris: Align main surface allocation to 64k on gen12+" * Make use of isl surf alignment. (Nanley) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Let isl decide the supported tiling in more situationsJordan Justen2019-10-171-15/+0
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Suggested-by: Nanley Chery <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* freedreno/a6xx: Turn on geometry shadersKristian H. Kristensen2019-10-172-3/+15
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Implement PIPE_QUERY_PRIMITIVES_GENERATED for GSKristian H. Kristensen2019-10-171-0/+34
| | | | | | | When we don't have streamout enabled, we have to read this register to get the number of primitives emitted. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/blitter: Save GS stateKristian H. Kristensen2019-10-171-0/+1
| | | | | | We have GS state now. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Support layered render targetsKristian H. Kristensen2019-10-174-4/+32
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Emit program state for GSKristian H. Kristensen2019-10-173-26/+148
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/ir3: Implement primitive layout intrinsicsKristian H. Kristensen2019-10-175-4/+82
| | | | | | | | This implements the load_vs_primitive_stride_ir3, load_vs_vertex_stride_ir3 and load_primitive_location_ir3 intrinsics, used for getting the primitive layout strides and locations. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/ir3: Add has_gs flag to shader keyKristian H. Kristensen2019-10-171-5/+7
| | | | | | | Since the presence of GS changes how the VS operates we need to track that in the shader key. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Add missing adjacency primitives to tableKristian H. Kristensen2019-10-171-8/+12
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Trim a few regs from fd6_emit_restore()Kristian H. Kristensen2019-10-171-20/+0
| | | | | | | We know what these do an either write them in the program stateobj or don't need to write them. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/registers: Update with GS, HS and DS registersKristian H. Kristensen2019-10-172-3/+3
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* radeonsi: recreate aux_context after a GPU resetMarek Olšák2019-10-171-3/+25
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: call the reset callback if get_device_reset_status returns a failureMarek Olšák2019-10-173-20/+7
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* panfrost: Keep track of active BOsTomeu Vizoso2019-10-173-21/+87
| | | | | | | | | | | | | | | If two jobs use the same GEM object at the same time, the job that finishes first will (previous to this commit) close the GEM object, even if there's a job still referencing it. To prevent this, have all jobs use the same panfrost_bo for a given GEM object, so it's only closed once the last job is done with it. Signed-off-by: Tomeu Vizoso <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Rohan Garg <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* nv50/ir: remove DUMMY edge typeKarol Herbst2019-10-174-13/+1
| | | | | | | it was never used Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* v3d: do not report alpha-test as supportedErik Faye-Lund2019-10-171-0/+3
| | | | | | | This triggers lowering in the state-tracker, which makes things a bit simpler. Reviewed-by: Marek Olšák <[email protected]>
* vc4: do not report alpha-test as supportedErik Faye-Lund2019-10-172-14/+4
| | | | | | | This triggers lowering in the state-tracker, which makes things a bit simpler. Reviewed-by: Marek Olšák <[email protected]>
* panfrost: do not report alpha-test as supportedErik Faye-Lund2019-10-172-9/+3
| | | | | | | This triggers lowering in the state-tracker, which makes things a bit simpler. Reviewed-by: Marek Olšák <[email protected]>
* nir: support feeding state to nir_lower_clip_[vg]sErik Faye-Lund2019-10-172-4/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* nir: support lowering clipdist to arraysErik Faye-Lund2019-10-172-5/+8
| | | | | | | | This allows us to make sure clipdist is emitted as a scalar array rather than two vec4s. This matches SPIR-V semantics, and will be useful for Zink. Reviewed-by: Marek Olšák <[email protected]>
* nir: allow passing alpha-ref state to lowering-codeErik Faye-Lund2019-10-172-2/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* lima: Fix crash when there are no vertex shader attributesAndreas Baierl2019-10-161-3/+3
| | | | | Signed-off-by: Andreas Baierl <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* lima: Fix compiler warning in standalone compilerAndreas Baierl2019-10-161-1/+1
| | | | | | | 'struct lima_context' has to be declared before usage in lima_program.h Signed-off-by: Andreas Baierl <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* pan/midgard: Allow COMPUTE jobs in panfrost_bo_access_for_stageAlyssa Rosenzweig2019-10-161-1/+7
| | | | | Fixes: ada752afe40 ("panfrost: Extend the panfrost_batch_add_bo() API to pass access flags") Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Disable frame throttlingAlyssa Rosenzweig2019-10-161-0/+3
| | | | | | | | | | | | | | The new frame throttling implemention interacts unfortunately with pipelining, leading to fence fds leaking like crazy and ultimately apps crashing quickly. With this patch, apps still crash but not as quickly. We need to either figure out the real cause or revert the core changes. Nevertheless, we don't want frame throttling in the first place, so. Fixes: a65e29ccb26 ("gallium: simplify throttle implementation") Signed-off-by: Alyssa Rosenzweig <[email protected]>
* radeonsi/nir: simplify si_lower_nir signatureMarek Olšák2019-10-154-17/+17
| | | | just a cleanup
* iris: finish aux import on get_paramJames Xiong2019-10-151-1/+5
| | | | | | | | | | | | A buffer and its aux are imported separately, if the aux import is not completed yet when resource_get_param is called, merge the separate aux a.k.a the 2nd image into the main image. Fixes: 246eebba4a8 ("iris: Export and import surfaces with modifiers that have aux data") Signed-off-by: James Xiong <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* etnaviv: remove variable from global namespaceLionel Landwerlin2019-10-151-1/+1
| | | | | | | | | Found out by accident this was clashing with another driver. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Cc: <[email protected]>
* v3d: drop unused shader_rec_count member from contextIago Toral2019-10-152-3/+0
| | | | | | | Looks like this was copied from the vc4 driver where it is actually included in the submit CL ioctl. Reviewed-by: Eric Anholt <[email protected]>
* freedreno/ir3: remove input ncomp fieldJonathan Marek2019-10-142-2/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* etnaviv: fix vertex buffer state emission for single stream GPUsLucas Stach2019-10-141-1/+1
| | | | | | | | | GPUs with a single supported vertex stream must use the single state address to program the stream. Fixes: 3d09bb390a39 (etnaviv: GC7000: State changes for HALTI3..5) Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* gallivm/draw/swr: make the gs_iface not depend on tgsi.Dave Airlie2019-10-151-42/+42
| | | | | | | | | | | | | This gs_iface doesn't seem to require a dependence on the tgsi context, except for the swr end prim code. This refactors the API to include all the info that the swr code needs in the interface rather than having to dig it out of the struct inheritance. This is a precursor to adding NIR support to llvmpipe. Reviewed-by: Jan Zielinski <[email protected]>
* iris: Implement the Gen < 9 tessellation quads workaroundKenneth Graunke2019-10-141-0/+3
| | | | | | | | Fixes several CTS tests: - KHR-GL46.tessellation_shader.vertex.vertex_spacing - KHR-GL46.tessellation_shader.tessellation_shader_point_mode.points_verification Fixes: 823609b1a39 ("iris/WIP: add broadwell support")
* gallium: rename PIPE_CAP_MAX_FRAMES_IN_FLIGHT to PIPE_CAP_THROTTLEJames Xiong2019-10-143-3/+3
| | | | | | | | | v2: [ Michel Dänzer ] * Update src/gallium/docs/source/screen.rst accordingly Signed-off-by: James Xiong <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> # v1 Reviewed-by: Marek Olšák <[email protected]> # v1
* panfrost: Fix support for packed 24-bit formatsBoris Brezillon2019-10-131-1/+1
| | | | | | | | | pan_pack_color() color was missing the 24-bit packed format case. Looks like putting the clear color in a 32-bit slot does the trick. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* etnaviv: rework etna_resource_create tiling choiceJonathan Marek2019-10-111-40/+26
| | | | | | | | | | Now that the base resource is allowed to be incompatible with PE, we can make a smarter choice of tiling mode to avoid allocating a PE compatible base that is never used for regular textures. This affects GPUs like GC2000 where there is no tiling compatible with both PE and TE. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: rework compatible render baseJonathan Marek2019-10-117-58/+64
| | | | | | | | For PE-incompatible layouts, use a mechanism similar to what texture does to create a compatible base resource. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>