summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/v3d
AgeCommit message (Collapse)AuthorFilesLines
2018-12-07shader-packingEric Anholt1-1/+2
2018-12-07tfuEric Anholt1-1/+1
2018-12-07v3d: Fix a leak of the transfer helper on screen destroy.Eric Anholt1-0/+2
Fixes: 7a30517cce8f ("broadcom/vc5: Start adding support for rendering to Z32F_S8X24_UINT.")
2018-12-07v3d: Add VIR dumping of TMU config p0/p1.Eric Anholt1-14/+6
I had a bit of it for V3D 3.x, but didn't update it for 4.x.
2018-12-07v3d: Garbage collect unused uniforms code.Eric Anholt1-88/+0
2018-12-07v3d: Split most of TEXTURE_SHADER_STATE setup out of sampler views.Eric Anholt1-58/+69
For shader image load/store, we want most of this logic to be shared.
2018-12-07v3d: Avoid confusing auto-indenting in TEXTURE_SHADER_STATE packingEric Anholt1-4/+4
Having "v3dx_pack() {" under each #if branch would confuse emacs's indenter.
2018-12-07v3d: Fix handling of texture first_layer offsets for 3D textures.Eric Anholt1-5/+5
I think this bug predated adding v3d_layer_offset(). Noticed during an unrelated refactor.
2018-12-07v3d: Return the right gl_SampleMaskIn[] value.Eric Anholt1-8/+0
It's supposed to be the dispatched sample mask for this pixel, not the GL state's sample mask.
2018-12-07v3d: Don't forget to flush writes to UBOs.Eric Anholt2-5/+16
If someone did TF into a UBO, we might have left the TF job un-flushed at the point of reading.
2018-12-07v3d: Make an array for frag/vert texture state in the context.Eric Anholt7-42/+21
This simplifies a bunch of our texture handling, while introducing the slots necessary for adding new shader stages.
2018-12-07v3d: Put default vertex attribute values into the state uploader as well.Eric Anholt3-8/+12
The default attributes are long-lived (the state struct is cached), and only 256 bytes each.
2018-12-07v3d: Create a state uploader for packing our shaders together.Eric Anholt4-13/+35
Shaders are usually quite short, and are private to the context. We can save memory and reduce the work the kernel needs to do at exec time by packing them together in a stream uploader for long-lived state.
2018-12-07v3d: Update simulator cache flushing code to match the kernel better.Eric Anholt1-13/+19
We were missing the invalidate between bin and render (possibly relevant for SSBOs), and still trying to flush the nonexistent L2C on 3.3+.
2018-12-07v3d: Use the TFU to do generatemipmap.Eric Anholt7-1/+175
This is a separate, dedicated hardware unit for texture layout conversions and mipmap generation.
2018-12-07v3d: Add the V3D TFU submit interface to the simulator.Eric Anholt3-20/+90
The TFU lets us format raster and SAND images into formats that can be read by the texture engine, and do mipmap generation. The UAPI comes from drm-next e69aa5f9b97f ("Merge tag 'drm-misc-next-2018-12-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next")
2018-12-07v3d: Use combined input/output segments.Eric Anholt1-4/+7
The HW apparently has some issues (or at least a much more complicated VCM calculation) with non-combined segments, and the closed source driver also uses combined I/O. Until I get the last CTS failure resolved (which does look plausibly like some VPM stomping), let's use combined I/O too.
2018-12-07v3d: Add missing OES_half_float_linear support.Eric Anholt1-0/+1
We were exposing ARB_texture_float, but apparently not the OES subset flag. Fixes regression from GLES3 support to GLES2. Fixes: fcf9fcee3c8a ("mesa/main: do not require float-texture filtering for es3")
2018-12-07v3d: Add support for RGBA_SRGB along with BGRA_SRGB.Eric Anholt1-0/+2
This is the actual native format for the hardware, without swizzling. Noticed while debugging why GLES3 disappeared.
2018-11-27v3d: Add renderonly support.Eric Anholt4-4/+68
I've been using this with the kmsro series to test v3d on VKMS without my old KMS hack in the v3d kernel driver. KMSRO still needs some cleanup, but v3d RO support seems reasonable.
2018-11-15v3d: Fix double-swapping of R/B on V3D 4.1Eric Anholt1-2/+3
Fixes: 4018eb04e8a5 ("v3d: Use the TLB R/B swapping instead of recompiles when available.")
2018-11-02v3d: Remove the special path for simulaton of the submit ioctl.Eric Anholt5-19/+13
Now that it doesn't need to find the struct v3d_bos, it can just take the normal v3d_ioctl() path.
2018-11-02v3d: Maintain a mapping of the GEM buffer in the simulator.Eric Anholt1-23/+48
This way we don't need to reach back into the gallium driver code to get the mapping.
2018-11-01v3d: Use the TLB R/B swapping instead of recompiles when available.Eric Anholt4-3/+17
The recompile reduction is nice, but this also makes it so that a straight texture copy could get optimized some day to not unpack/repack the f16 values.
2018-11-01v3d: Take advantage of _mesa_hash_table_remove_key() in the simulator.Eric Anholt1-4/+2
2018-11-01v3d: Respect user-passed strides for BO imports.Eric Anholt5-96/+19
If the caller has passed in a stride for (linear) BO import, we should use that stride when rendering to the BO (or, if we some day support texturing from linear-imported BOs, when doing the linear-to-UIF shadow copy). This lets us remove the extra stride-changing relayout in the simulator.
2018-11-01v3d: Drop #if 0-ed out v3d_dump_to_file().Eric Anholt1-91/+0
This came from vc4, where we had a file format for GPU hangs. I don't have one of those for V3D, and I probably won't ever have the simulator side produce dumps even if I do.
2018-11-01v3d: Fix a typo in a comment in job handling.Eric Anholt1-1/+1
2018-11-01v3d: Fix a copy-and-paste comment in the simulator code.Eric Anholt1-1/+1
2018-10-30util: Move os_misc to utilDylan Baker1-1/+1
this is needed by u_debug Tested-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-10-30v3d: Use nir_remove_unused_io_vars to handle binner shader output DCEEric Anholt1-1/+1
We were doing this late after nir_lower_io, but we can just reuse the core code. By doing it at this stage, we won't even set up the VS attributes as inputs, reducing our VPM size.
2018-10-30v3d: Use nir_lower_io_to_scalar_early to DCE unused VS input components.Eric Anholt1-1/+4
This lets us trim unused trailing components in the vertex attributes, reducing the size of our VPM allocations.
2018-10-25util: use C99 declaration in the for-loop set_foreach() macroEric Engestrom1-2/+0
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-10-25util: use C99 declaration in the for-loop hash_table_foreach() macroEric Engestrom3-9/+0
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-10-15v3d: Add support for hardware pack/unpack of half floats.Eric Anholt1-0/+1
Cuts the formerly 7-minute simulation time of fs-packHalf2x16.shader_test in half.
2018-10-15gallium/ttn: Convert inputs and outputs to derefs of variables.Eric Anholt1-3/+4
This means that TTN shaders more closely resemble GTN shaders: they have inputs and outputs as variable derefs, with the variables having their .driver_location already set up for you. This will be useful for v3d to do input variable DCE in NIR, which we can't do when the TTN shaders never have a pre-nir_lower_io stage. Acked-by: Rob Clark <robdclark@gmail.com>
2018-10-14gallium/u_transfer_helper: Add support for separate Z24/S8 as well.Kenneth Graunke1-1/+2
u_transfer_helper already had code to handle treating packed Z32_S8 as separate Z32_FLOAT and S8_UINT resources, since some drivers can't handle that interleaved format natively. Other hardware needs depth and stencil as separate resources for all formats. For example, V3D3 needs this for 24-bit depth as well. This patch adds a new flag to lower all depth/stencils formats, and implements support for Z24_UNORM_S8_UINT. (S8_UINT_Z24_UNORM is left as an exercise to the reader, preferably someone who has access to a machine that uses that format.) Reviewed-by: Eric Anholt <eric@anholt.net>
2018-09-17v3d: Switch from FLUSH_ALL_STATE to FLUSH for ending our bin CLs.Eric Anholt1-6/+6
The HW for FLUSH_ALL_STATE isn't validated, since the closed driver only uses FLUSH. Now that we don't have any new state at the end of our bin CLs, follow their lead.
2018-09-17v3d: Stop clearing the OQ state at the end of the job.Eric Anholt3-18/+1
Ever since we added OQ support, we've been clearing OQ state at the start of the job anyway. We're intentionally breaking old-and-new-driver-mix systems, because we need to stop using the unvalidated FLUSH_ALL_STATE.
2018-09-17v3d: Always emit a TF disable at the start of drawing on V3D 4.x.Eric Anholt3-10/+8
The HW's FLUSH_ALL_STATE is not validated, so we probably shouldn't use it, meaning that we need to reset state at the start. By doing this, we also make ourselves more resilient to another client leaving the TF state enabled at the end of their batch (as we now do, ourselves). However, we still need to emit a single TF disable at the end of the frame, for SWVC5-718.
2018-09-07v3d: Fix setup of the VCM cache size.Eric Anholt1-1/+1
There were two bugs working together to make things mostly work: I wasn't dividing the VPM output size available by the size of a batch (vertex), but I also had the size of the VPM reduced by a factor of 8. Fixes dEQP-GLES3.functional.vertex_array_objects.all_attributes and it seems also my intermittent varying failures. Fixes: 1561e4984eb0 ("v3d: Emit the VCM_CACHE_SIZE packet.")
2018-09-07v3d: Fix SRC_ALPHA_SATURATE blending for RTs without alpha.Eric Anholt1-1/+3
Fixes dEQP-GLES3.functional.fragment_ops.blend.default_framebuffer.rgb_func_alpha_func.dst.src_alpha_saturate_src_alpha_saturate and friends with --deqp-egl-config-name=rgb565d0s0 Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-09-04v3d: Drop a bunch of duplicated gallium PIPE_CAP default code.Eric Anholt1-151/+0
Now that we have the util function for the default values, we can get rid of the boilerplate. v2: Rebase on new gallium caps
2018-09-04gallium: Add a helper for implementing PIPE_CAP_* default values.Eric Anholt1-2/+2
One of the pains of implementing a gallium driver is filling in a million pipe caps you don't know about yet when you're just starting out. One of the pains of working on gallium is copy-and-pasting your new PIPE_CAP into each driver. We can fix both of these by having each driver call into the default helper from their default case, so that both sides can ignore each other until they need to. v2: fix i915g build, revert swr change to avoid breaking scons build (https://travis-ci.org/anholt/mesa/jobs/419739857) v3: Rebase on 3 new gallium caps. Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1) Cc: Bruce Cherniak <bruce.cherniak@intel.com> Cc: George Kyriazis <george.kyriazis@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org>
2018-08-24gallium: Split out PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE.Kenneth Graunke1-0/+1
Some hardware can do PIPE_TEX_WRAP_MIRROR_REPEAT but not PIPE_TEX_WRAP_MIRROR_CLAMP and PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER. Drivers for such hardware would like to advertise support for ARB_texture_mirror_clamp_to_edge but not EXT_texture_mirror_clamp. This commit adds a new PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE bit, changes the extension enable to be based on that, and enables it in all upstream drivers which supported PIPE_CAP_TEXTURE_MIRROR_CLAMP (so they continue supporting this mode).
2018-08-23gallium: add PIPE_CAP_MAX_SHADER_BUFFER_SIZEMarek Olšák1-0/+2
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-08-23gallium: add PIPE_CAP_MAX_GS_INVOCATIONSMarek Olšák1-0/+1
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-08-06v3d: Emit the VCM_CACHE_SIZE packet.Eric Anholt2-0/+9
This is needed to ensure that we don't get blocked waiting for VPM space with bin/render overlapping. Cc: "18.2" <mesa-stable@lists.freedesktop.org>
2018-08-06v3d: Drop "VC5" from the renderer string.Eric Anholt1-1/+1
VC5 isn't a useful name any more, just stick to v3d.
2018-07-31gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák1-0/+4
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>