summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3dx_draw.c
Commit message (Collapse)AuthorAgeFilesLines
* v3d: Use the early_fragment_tests flag for the shader's disable-EZ field.Eric Anholt2019-02-191-2/+7
| | | | | | | | | | | | Apparently we need disable-EZ flagged, not just "does Z writes". Fixes dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_depth_fbo on 7278, even though it passed in simulation. Signed-off-by: Eric Anholt <[email protected]> Fixes: 051a41d3d56e ("v3d: Add support for the early_fragment_tests flag.") (cherry picked from commit cd5e0b272919a654079620adecd2abe24ff51233)
* v3d: Avoid duplicating limits defines between gallium and v3d core.Eric Anholt2019-01-271-1/+1
| | | | | We don't want to pull the compiler into every include in the gallium driver, so just make a new little header to store the limits.
* v3d: Rename gallium-local limits defines from VC5 to V3D.Eric Anholt2019-01-271-3/+3
| | | | | The compiler has its limits under V3D_* (like most V3D stuff), so sync up with that.
* v3d: Add support for shader_image_load_store.Eric Anholt2019-01-141-0/+13
| | | | | | This is only exposed on V3D 4.1+, because we didn't have the TMU write operations for images on 3.3 (To do GLES 3.1 there, you have to lower it to SSBO load/stores, which is a problem to solve later).
* v3d: Add SSBO/atomic counters support.Eric Anholt2019-01-141-0/+11
| | | | | So far I assume that all the buffers get written. If they weren't, you'd probably be using UBOs instead.
* v3d: Drop in a bunch of notes about performance improvement opportunities.Eric Anholt2018-12-141-0/+9
| | | | | | These have all been floating in my head, and while I've thought about encoding them in issues on gitlab once they're enabled, they also make sense to just have in the area of the code you'll need to work in.
* v3d: Add support for draw indirect for GLES3.1.Eric Anholt2018-12-141-2/+30
| | | | | | In trying to enable compute shaders, I found that a bunch of deqp-gles31's compute stuff wanted to interact with indirect dispatch. This was easy to do on its own.
* v3d: Add support for texturing from linear.Eric Anholt2018-12-141-2/+6
| | | | | | | Just like vc4, we have to support linear shared BOs for X11 on arbitrary displays. When we're faced with a request to texture from one of those, make a shadow image that we copy using the TFU at the start of the draw call.
* v3d: Don't forget to flush writes to UBOs.Eric Anholt2018-12-071-5/+13
| | | | | If someone did TF into a UBO, we might have left the TF job un-flushed at the point of reading.
* v3d: Make an array for frag/vert texture state in the context.Eric Anholt2018-12-071-9/+6
| | | | | This simplifies a bunch of our texture handling, while introducing the slots necessary for adding new shader stages.
* v3d: Put default vertex attribute values into the state uploader as well.Eric Anholt2018-12-071-1/+2
| | | | | The default attributes are long-lived (the state struct is cached), and only 256 bytes each.
* v3d: Create a state uploader for packing our shaders together.Eric Anholt2018-12-071-3/+6
| | | | | | 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.
* v3d: Use combined input/output segments.Eric Anholt2018-12-071-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.
* v3d: Emit the VCM_CACHE_SIZE packet.Eric Anholt2018-08-061-0/+7
| | | | | | | This is needed to ensure that we don't get blocked waiting for VPM space with bin/render overlapping. Cc: "18.2" <[email protected]>
* v3d: Rename "configuration" and "config" in the XML to "cfg"Eric Anholt2018-07-301-11/+15
| | | | | | This matches what CLIF parsing expects, and makes TILE_BINNING_MODE_CONFIGURATION_COMMON_CONFIGURATION into a much more legible TILE_BINNING_MODE_CFG_COMMON.
* v3d: Rename primitives to prims in the XML to match CLIF names.Eric Anholt2018-07-301-4/+4
| | | | This makes us match up with the V3D HW team's names a bit more.
* v3d: Block bin on render when doing vertex texturing.Eric Anholt2018-07-291-0/+14
| | | | | | | | | | | | The kernel by default serializes the BCL on previous BCLs submitted on this FD, but not RCLs. For now this fix is conservative and blocks on last RCL if any vertex texturing is done, which fails to get bin/render overlap if there was an intermediate job that doesn't draw to the BCL's buffer. I've dropped a perf_debug() in here to note that as a potential future improvement. Fixes intermittent failures in KHR-GLES3.copy_tex_image_conversions.required.*
* v3d: Stop using spaces in the names of our buffers.Eric Anholt2018-07-271-1/+1
| | | | | For CLIF dumping, we need names to not have spaces. Rather than rewriting them after the fact, just change the two cases where I had put a space in.
* v3d: Avoid the GFXH-1461 workaround if we have only Z or only S.Eric Anholt2018-07-261-4/+6
| | | | | | This seems like a sensible precaution to avoid extra draws. It doesn't deal with the case of a Z24S8 buffer created by the window system for an application that happens to never use S.
* v3d: Rework the ordering of how we clear things.Eric Anholt2018-07-261-31/+54
| | | | | | | | | First, figure out if we can just sneak the clear into the TLB clear, even if drawing has already happened (since we have job->load and job->clear to tell us), taking into account GFXH-1461. For any pieces we can't TLB clear, fall back to drawing a quad without flushing the scene. Fixes extra scene flushes in glmark2 due to GFXH-1461.
* v3d: Only store buffers that have been written to.Eric Anholt2018-07-261-3/+9
| | | | | I've seen cases where a color buffer is bound, but only Z is written, and we end up storing color.
* v3d: Track the buffers being loaded separately.Eric Anholt2018-07-261-0/+3
| | | | | | We were computing this at RCL generation time, but that means you can't unflag the store for an invalidate_resource, or not flag the store if writmasking is disabled.
* v3d: Rename cleared/resolve to clear/store.Eric Anholt2018-07-261-6/+6
| | | | | | These describe what the fields mean in RCL generation. "resolve" is left over from VC4, and sounds like MSAA resolves (which may or may not be involved in the store we generate).
* v3d: Work around GFXH-1461 bug losing our Z/S clears.Eric Anholt2018-07-131-0/+30
| | | | | | | If you load S and clear Z or vice versa, the clear may get lost. Just fall back to drawing a quad. Fixes KHR-GLES3.packed_depth_stencil.verify_read_pixels.depth24_stencil8
* v3d: Emit a TF flush after each draw using TF.Eric Anholt2018-07-021-0/+7
| | | | | This fixes GPU hangs on 7278 in transform feedback tests such as GTF-GLES3.gtf.GL3Tests.transform_feedback2.transform_feedback2_basic
* v3d: Convert a bunch of our "minus one" fields over to the new XML attr.Eric Anholt2018-06-271-4/+7
| | | | | This fixes up their formatting for CLIF files and makes the code more legible.
* v3d: Add missing reference to the separate stencil buffer.Eric Anholt2018-06-201-11/+13
| | | | Noticed while debugging a missing flush of rendering in the z32f_s8 case.
* v3d: Set the SO offsets correctly if we have to re-emit.Eric Anholt2018-06-181-0/+6
| | | | | | This should fix TF across a glFlush() or TF pause/restart. Fixes dEQP-GLES3.functional.transform_feedback.array.interleaved.lines.highp_float and many, many others.
* v3d: Fix shaders using pixel center W but no varyings.Eric Anholt2018-06-151-1/+1
| | | | | | | | The docs called this field "uses both center W and centroid W", but actually it's "do you need center W even if varyings don't obviously call for it?" Fixes dEQP-GLES3.functional.shaders.builtin_variable.fragcoord_w
* v3d: Don't set the first_ez_state to DISABLED if after only UNDECIDED draws.Eric Anholt2018-06-141-1/+2
| | | | | | | | | We need to have the RCL start with EZ enabled, since those undecided draws had EZ enabled. But we do need to update from UNDECIDED to LT or GT as necessary still. Fixes many simulator assertion fails in deqp fragment_ops/interaction/basic_shader/*
* v3d: Add static asserts for other packed packet sizes.Eric Anholt2018-06-141-0/+1
|
* v3d: Enable NaN propagation in the VS and CS as well.Eric Anholt2018-05-171-1/+3
| | | | Fixes piglit vs-isnan-*.shader_test at the expense of gl-1.0-spot-light.
* v3d: Rename driver functions from vc5 to v3d.Eric Anholt2018-05-161-132/+132
| | | | This is the final step of the driver rename.
* v3d: Rename the driver files from "vc5" to "v3d".Eric Anholt2018-05-161-0/+714