summaryrefslogtreecommitdiff
path: root/src/gallium
AgeCommit message (Collapse)AuthorFilesLines
2017-10-12st/dri: implement __DRIimageExtension::validateUsage properlyHEADmasterMarek Olšák1-8/+22
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-10-12gallium: add pipe_screen::check_resource_capabilityMarek Olšák5-0/+74
This is optional (and no CAP). Implemented by radeonsi, ddebug, rbug, trace. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-10-12etnaviv: Do GC3000 resolve-in-place when possibleWladimir J. van der Laan4-4/+25
If an RS blit is done with source exactly the same as destination, and the hardware supports this, do an in-place resolve. This only fills in tiles that have not been rendered to using information from the TS. This is the same as the blob does and potentially saves significant bandwidth when doing i.MX6qp scanout using PRE, and when rendering to textures (though here using sampler TS would be even better). Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
2017-10-12radeonsi: add support for PIPE_FORMAT_{X1,A1}R5G5B5_UNORMNicolai Hähnle1-0/+8
Fixes dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8 Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-12gallium: add tests for PIPE_FORMAT_{X1,A1}B5G5R5_UNORM formatsNicolai Hähnle1-0/+13
This is a left-over from my version of adding the new format after rebasing on Eric's version. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-11swr: simd16 shaders work in progressTim Rowley3-2/+21
Start building vertex shaders as simd16. Disabled by default, set USE_SIMD16_SHADERS in knobs.h to experiment. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-10-11gallium: allow 512-bit vectorsTim Rowley2-9/+9
Increase the max allowed vector size from 256 to 512. No piglit llvmpipe regressions running on avx2. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-10-11nv50,nvc0: fix push hint logic in presence of a start offsetIlia Mirkin2-7/+5
Previously buffer offsets were passed in explicitly as an offset, which had to be added to the resource address. Now they are passed in via an increased 'start' parameter. As a result, we were double-adding the start offset in this kind of situation. This condition was triggered by piglit's draw-elements test which has a requisite glMultiDrawElements in combination with a small enough number of vertices to go through the immediate push path. Fixes: 330d0607ed6 ("gallium: remove pipe_index_buffer and set_index_buffer") Reported-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: mesa-stable@lists.freedesktop.org
2017-10-10Android: fix build break from r600/radeon splitRob Herring3-2/+6
Commit 06bfb2d28f7a ("r600: fork and import gallium/radeon") broke the Android build: external/mesa3d/src/gallium/drivers/radeon/r600_pipe_common.c:43:10: fatal error: 'llvm-c/TargetMachine.h' file not found ^~~~~~~~~~~~~~~~~~~~~~~~ Update the Android makefiles so that drivers/radeon is only built when radeonsi (and therefore LLVM) is enabled. Fixes: 06bfb2d28f7a (r600: fork and import gallium/radeon) Acked-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Rob Herring <robh@kernel.org>
2017-10-11r600: cleanup llvm ir target selection.Dave Airlie1-18/+2
Only r600 target used now for compute IR. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-10-11r600: drop tc_L2_dirty bit, this was SI only.Dave Airlie3-15/+0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-10-11radeonsi: lower ffma in nir to mad.Dave Airlie1-0/+1
This lowers ffma to a * b + c. This seems like it should keep Marek happiest, so we'd never get to the fma instruction emission code. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-10-10broadcom/vc5: Fix handling of 5551 textures using the new gallium format.Eric Anholt1-2/+2
Like vc4, we have the alpha in the low bit. Fixes a bunch of piglit texwrap failures.
2017-10-10broadcom/vc5: Set the RCL's MSAA mode to match the BCL's MSAA state.Eric Anholt1-0/+2
2017-10-10braodcom/vc5: Set up clear color for higher-bpp formats.Eric Anholt1-4/+25
Fixes arb_color_buffer_float-clear
2017-10-10broadcom/vc5: Set up per-MRT clear colors.Eric Anholt3-41/+22
Fixes fbo-mrt-alphatest.
2017-10-10broadcom/vc5: Fix blendfactor zero handling.Eric Anholt1-0/+1
I cut the line out to move it up to the top, when putting "0" in the switch made the compiler complain that that wasn't a valid enum.
2017-10-10broadcom/vc5: Add support for f32 render targets.Eric Anholt1-0/+4
The TLB write code is getting ugly and needs a refactoring (that will hopefully handle TLBU uniform coalescing as well).
2017-10-10broadcom/vc5: Fix color masks for non-independent blending.Eric Anholt1-8/+16
This gets fbo-mrt-alphatest working except for the second RT's clear color.
2017-10-10broadcom/vc5: Make the BCL's number of render targets setup match the RCL.Eric Anholt1-1/+2
2017-10-10braodcom/vc5: Fix tile size setup for MRTs.Eric Anholt1-2/+2
We need to divide the TLB in two for the 2nd color buffer, and again if the 3rd or 4th are present.
2017-10-10broadcom/vc5: Start hooking up multiple render targets support.Eric Anholt1-3/+9
We now emit as many TLB color writes as there are color buffers.
2017-10-10broadcom/vc5: Add support for GL_EXT_provoking_vertex.Eric Anholt2-1/+4
The bit was missing from the spec, but it's there in the simulator. Fixes the piglit clipflat test.
2017-10-10braodcom/vc5: Find the actual first TF output for our TF spec.Eric Anholt1-1/+6
This doesn't yet support PSIZ, but gets us at least some of TF working.
2017-10-10broadcom/vc5: Fix translation of transform feedback's output_register field.Eric Anholt1-2/+16
It's a NIR driver_location, not a slot offset.
2017-10-10broadcom/vc5: Mark our primitives as needing TF processing.Eric Anholt1-4/+11
The TF enable state appears to stick around until the next TF enable packet is sent, so we only want to request TF when the shader is using it.
2017-10-10broadcom/vc5: Fix setup of TF dword output count.Eric Anholt1-1/+1
I missed the "- 1" when reading the spec.
2017-10-10broadcom/vc5: Fix up a comment from vc4 about the predraw texture setup.Eric Anholt1-1/+3
2017-10-10broadcom/vc5: Flush the job when mapping a transform feedback buffer.Eric Anholt3-0/+32
We will want something fancier for reusing a TF output within the same frame, but we at least need this in order for piglit tests to work.
2017-10-10broadcom/vc5: Fix handling of interp qualifiers on builtin color inputs.Eric Anholt2-3/+3
The interpolation qualifier, if specified, is supposed to take precedence over glShadeModel().
2017-10-10broadcom/vc5: Fix CLIF dumping of lists that aren't capped by a HALT.Eric Anholt1-2/+2
The HW will halt when you hit a HALT packet, or when you hit the end address. Tell CLIF if there's an end address is so that it can stop correctly. (There was usually a 0 byte after the CL, so it would stop anyway).
2017-10-10broadcom/vc5: Fix depth and stencil clear values.Eric Anholt3-14/+10
I had misread the packet description: We always have a 32f depth, and a separate u8 stencil.
2017-10-10broadcom/vc5: Add missing Z16 format.Eric Anholt1-0/+1
We can render to and sample from it just fine.
2017-10-10braodcom/vc5: Fix incorrect early Z writes in discard shaders.Eric Anholt1-1/+6
Fixes glsl-fs-discard-02.
2017-10-10broadcom/vc5: Add proper support for base_vertex and base_instance.Eric Anholt3-20/+24
I had base_vertex hacked into the shader state setup like in vc4, but it's not correct for big offsets. Using the proper packet is easier and hopefully means we can re-emit shader state setup less frequently.
2017-10-10broadcom/vc5: Use supertiles and generic tile lists.Eric Anholt3-73/+130
This massively reduces the size of our RCL setup. It also gets us closer to supporting multicore platforms.
2017-10-10broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.Eric Anholt42-2/+9129
V3D 3.3 is a continuation of the 3D implementation in VC4 (v2.1 and v2.6). V3D 3.3 introduces an MMU (no more CMA allocations) and support for GLES3.1. This driver is not currently conformant, though that will be a target as soon as possible. V3D 3.x parts use a new texture tiling layout common across many Broadcom graphics parts including and the HVS scanout engine. It also massively changes the QPU instructions, introducing a common physical register file (no more A/B split) and half-float instructions, while removing the 4x8 unorm instructions in favor of half-float for talking to fixed function interfaces. Because so much has changed, vc5 is implemented in a separate gallium driver, using only the XML code-generation support from vc4. v2: Fix tile layout for 64bpp textures. Fix texture swizzling for 32-bit returns. Fix up a bit of MRT setup. Sync the simulator to kernel behavior a bit more. Improve uniform debugging code. Rebase on QIR->VIR rename. Move texture state mostly to the CSOs. Improve cache flushing on the simulator. Fix program deletion use-after-frees. Acked-by: Dave Airlie <airlied@gmail.com> (uabi plan) Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (uabi plan)
2017-10-10nir: Move vc4's alpha test lowering to core NIR.Eric Anholt3-55/+11
I've been doing this inside of vc4, but vc5 wants it as well and it may be useful for other drivers (Intel has a related path for pre-gen6 with MRT, and freedreno had a TGSI path for it at one point). This required defining a common enum for the standard comparison functions, but other lowering passes are likely to also want that enum. v2: Add to meson.build as well. Acked-by: Rob Clark <robdclark@gmail.com>
2017-10-10broadcom/vc4: Expose PIPE_CAP_TILE_RASTER_ORDEREric Anholt7-20/+71
Because vc4 can control the order that tiles are rasterized in, we can use it to implement overlapping blits using normal drawing and GL_ARB_texture_barrier, as long as we can tell the kernel what order to render the tiles in. v2: Fix on the simulator. v3: Add the cap (disabled) to other drivers, add rst docs for the cap. v4: Rebase on PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS v5: Split from the core gallium commit, drop some unnecessary code related to glBlitFramebuffer(), fix a crash with clears before state has been bound.
2017-10-10gallium: Create a new PIPE_CAP_TILE_RASTER_ORDER for vc4.Eric Anholt18-0/+29
Because vc4 can control the order that tiles are rasterized in, we can use it to implement overlapping blits using normal drawing and GL_ARB_texture_barrier, as long as we can tell the kernel what order to render the tiles in. This commit introduces the core gallium support, vc4 changes will follow. v2: Fix on the simulator. v3: Add the cap (disabled) to other drivers, add rst docs for the cap. v4: Rebase on PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS v5: Drop vc4 changes from this commit, for clarity. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v3)
2017-10-10broadcom/vc4: Implement GL_ARB_texture_barrier.Eric Anholt2-1/+12
Improves x11perf -copywinwin100 from ~2000/sec to ~4700/sec. More importantly, this is a prerequisite for the new GL_MESA_tile_raster_order extension.
2017-10-10vc4: Add support for 5551 textures.Eric Anholt2-3/+3
This keeps us from promoting them up to 8888, at the cost of not being color-renderable.
2017-10-10gallium: Add support for 5551 with the 1-bit field in the low bit.Eric Anholt3-0/+6
This is how VC4 stores 5551 textures, which we need to support for GL_OES_required_internalformat. v2: Extend commit message, fix svga driver build, add BE ordering from Roland. v3: Rebase on PIPE_FORMAT_R10G10B10X2_UNORM addition. Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2) Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v2)
2017-10-10st_api: remove unused get_resource_for_egl_imageNicolai Hähnle1-37/+0
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-10st/dri: implement createImageFromRenderbuffer(2)Nicolai Hähnle3-7/+71
Tested with dEQP-EGL.functional.image.*renderbuffer* tests. Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-10u_threaded_context: fix a memory leakNicolai Hähnle1-7/+8
The uploaders can own transfers which need to be unmapped. Destroy them before the final sync (they're not used from the driver thread anyway) so that the transfer_unmap call is processed by the driver. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-10etnaviv: update HW headers and fix provoking vertexLucas Stach6-47/+67
Now that the real meaning of the 2 bits in PA_SYSTEM_MODE is known, we can set them according to the rasterizer state, which fixes uses that are setting provoking vertex first. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-10-10etnaviv: remove flat shading workaroundLucas Stach1-5/+1
It turned out not to be a hardware bug, but the shader compiler emitting wrong varying component use information. With that fixed we can turn flat shading back on. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-10-10etnaviv: fix varying interpolationLucas Stach1-12/+10
It seems that newer cores don't use the PA_ATTRIBUTES to decide if the varying should bypass the flat shading, but derive this from the component use. This fixes flat shading on GC880+. VARYING_COMPONENT_USE_POINTCOORD is a bit of a misnomer now, as it isn't only used for pointcoords, but missing a better name I left it as-is. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-10-10etnaviv: fix bogus flush requests in transfer handlingLucas Stach1-5/+10
The logic to decide if we need to flush the GPU command stream was broken and hard to reason about. Fix and clarify this. Fixes the data sync subtests from piglit arb_vertex_buffer_object. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>