aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.c
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Fix a leak of the last color read/write surface on context destroy.Eric Anholt2015-10-061-0/+3
|
* gallium: add flags parameter to pipe_screen::context_createMarek Olšák2015-08-261-1/+1
| | | | | | | | This allows creating compute-only and debug contexts. Reviewed-by: Brian Paul <[email protected]> Acked-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
* vc4: Rework cl handling to be friendlier to the compiler.Eric Anholt2015-07-141-2/+4
| | | | | Drops 680 bytes of code, from avoiding a bunch of extra updates to the next pointer in the struct.
* vc4: Make a helper function for getting the current offset in the CL.Eric Anholt2015-07-141-2/+1
| | | | | | I needed to rewrite this a bit for safety checking in the next commit. Despite being a static inline of the same thing that was being done, we lose 36 bytes of code for some reason.
* vc4: unref old fenceRob Clark2015-07-101-0/+2
| | | | | | | | | Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe->flush(). So driver should use fence_ref() which will unref the old fence if not NULL. Signed-off-by: Rob Clark <[email protected]> Acked-by: Eric Anholt <[email protected]>
* vc4: Move tile state/alloc allocation into the kernel.Eric Anholt2015-06-171-2/+0
| | | | | | | This avoids a security issue where userspace could have written the tile state/tile alloc behind the GPU's back, and will apparently be necessary for fixing stability bugs (tile state buffers are missing some top bits for the tile alloc's address).
* vc4: Move RCL generation into the kernel.Eric Anholt2015-06-171-262/+27
| | | | | There weren't that many variations of RCL generation, and this lets us skip all the in-kernel validation for what we generated.
* vc4: Use VC4_SET/GET_FIELD for some RCL packets.Eric Anholt2015-06-161-28/+33
|
* vc4: Make symbolic values for packet sizes.Eric Anholt2015-06-161-16/+12
|
* vc4: Just stream out fallback IB contents.Eric Anholt2015-05-271-0/+7
| | | | | | | | | | | | | | | The idea I had when I wrote the original shadow code was that you'd see a set_index_buffer to the IB, then a bunch of draws out of it. What's actually happening in openarena is that set_index_buffer occurs at every draw, so we end up making a new shadow BO every time, and converting more of the BO than is actually used in the draw. While I could maybe come up with a better caching scheme, for now just do the simple thing that doesn't result in a new shadow IB allocation per draw. Improves performance of isosurf in drawelements mode by 58.7967% +/- 3.86152% (n=8).
* vc4: Separate out a bit of code for submitting jobs to the kernel.Eric Anholt2015-04-131-90/+3
| | | | | | I want to be able to have multiple jobs being set up at the same time (for example, a render job to do a little fixup blit in the course of doing a render to the main FBO).
* vc4: Skip sending down the clear colors if not clearing.Eric Anholt2015-04-131-5/+7
|
* vc4: Fix another space allocation mistake.Eric Anholt2015-04-131-0/+1
| | | | | | We're over-allocating our BCL in vc4_draw.c, so this never mattered. However, new RCL-only blit support might end up here without having set up any BCL contents.
* vc4: Add missed accounting for the size of the semaphore.Eric Anholt2015-04-131-0/+2
| | | | This wouldn't have mattered except in the worst case scenario RCL setup.
* vc4: Update to current kernel sources.Eric Anholt2015-02-241-5/+5
| | | | | | New BO create and mmap ioctls are added. The submit ABI gains a flags argument, and the pointers are fixed at 64-bit. Shaders are now fixed at the start of their BOs.
* vc4: Fix CL dumping trying to dump too far.Eric Anholt2015-01-151-2/+2
| | | | | Execution will end at the cl->next, because that's what ct0ea/ct1ea get programmed to.
* vc4: Fix early Z behavior on hardware.Eric Anholt2015-01-151-2/+1
| | | | | | It turns out the simulator was not treating this bit the same as the RPi, and I'd forgotten to remove it when turning on early Z. The result was that you'd get big chunks of your rendering missing.
* vc4: Skip storing the Z/S contents when it's invalidated.Eric Anholt2015-01-061-0/+11
| | | | | | | Improves framerate of 5 seconds of es2gears by 1.57473% +/- 0.669409% (n=67). Reviewed-by: Jose Fonseca <[email protected]>
* vc4: Fix memory leak as of 0404e7fe0ac2a6234a11290b4b1596e8bc127a4b.Eric Anholt2014-12-311-5/+5
| | | | Can't reset the CL before looking at how much we had pupt in it.
* vc4: Only render tiles where the scissor ever intersected them.Eric Anholt2014-12-301-8/+29
| | | | | This gives a 2.7x improvement in x11perf -rect100, since we only end up load/storing the x11perf window, not the whole screen.
* vc4: Move draw call reset handling to a helper function.Eric Anholt2014-12-301-23/+31
| | | | | | This will be more important in the next commit, when there's more state to reset to nonzero values, and I want an early exit from the submit function.
* vc4: Optimize CL emits by doing size checks up front.Eric Anholt2014-12-241-2/+18
| | | | | | | | The optimizer obviously doesn't have the ability to rewrite these to skip the size checks per call, so we have to do it manually. Improves a norast benchmark on simulation by 0.779706% +/- 0.405838% (n=6087).
* vc4: Avoid repeated hindex lookups in the loop over tiles.Eric Anholt2014-12-241-12/+15
| | | | | Improves norast performance of a microbenchmark by 11.1865% +/- 2.37673% (n=20).
* vc4: Fix leaks of the CL contents.Eric Anholt2014-12-141-0/+2
|
* vc4: Fix leak of vc4_bos stashed in the context.Eric Anholt2014-12-141-0/+5
|
* vc4: Fix leak of the compiled shader programs in the cache.Eric Anholt2014-12-141-0/+2
|
* vc4: Add a debug flag for waiting for sync on submit.Eric Anholt2014-12-051-0/+8
| | | | | This is nice when you're tracking down which command list is hanging the GPU.
* vc4: Update for new kernel ABI with async execution and waits.Eric Anholt2014-11-201-0/+10
| | | | | Our submits now return immediately and you have to manually wait for things to complete if you want to (like a normal driver).
* vc4: Emit semaphore instructions for new kernel ABI.Eric Anholt2014-11-181-3/+11
| | | | | | | Previously, the kernel would dispatch thread 0, wait, then dispatch thread 1. By insisting that the thread contents use semaphores in the right place, the kernel can sleep for longer by dispatching both threads at once.
* vc4: Refactor flushing before mapping a BO.Eric Anholt2014-10-241-9/+8
| | | | I'm going to want to make some other decisions here before flushing.
* vc4: Add support for rebasing texture levels so firstlevel == 0.Eric Anholt2014-10-191-0/+6
| | | | | | GLES2 doesn't have GL_TEXTURE_BASE_LEVEL, so the hardware doesn't. Fixes piglit levelclamp, tex-miplevel-selection, and texture-storage/2D mipmap rendering.
* vc4: Make some assertions about how many flushes/EOFs the simulator sees.Eric Anholt2014-10-171-2/+2
| | | | This caught the previous commit's bug in the kernel validator.
* vc4: Replace the FLUSH_ALL with FLUSH.Eric Anholt2014-10-171-1/+3
| | | | | | We don't need to emit all of our current state at the end of each bin list. We're going to be smashing it all at the start of the next tile's bin list, anyway.
* vc4: Add some comments about state management.Eric Anholt2014-10-171-0/+6
|
* vc4: Make sure there's exactly 1 tile store per tile coords packet.Eric Anholt2014-10-171-15/+64
| | | | | | It's not documented that I can see, but the other driver does it (check vg_hw_4.c), and one of the HW guys confirmed that you really do need to do it.
* vc4: Don't forget to store stencil along with depth when storing either.Eric Anholt2014-09-301-1/+1
| | | | | Otherwise, we'd replace the stencil in our packed depth/stencil with 0s. Fixes about 50 piglit tests.
* vc4: Don't try to do stores to buffers that aren't bound.Eric Anholt2014-09-291-5/+8
| | | | | | | | | | | | | | The code was kind of mixed up what buffers were getting stored in the case that a resolve bit was unset (which are set based on the GL state at draw time) and the buffer wasn't actually bound. In particular, depth-only rendering would store the color buffer contents, which happen to be pointing at the depth buffer. Thanks to clearing out the resolve bits for things we really can't resolve, now I can drop the safety checks for buffer presence around the actual stores. Fixes 42 piglit tests.
* vc4: Add the necessary stubs for occlusion queries.Eric Anholt2014-09-291-0/+1
| | | | | | We have to expose them for GL 2.0, but we just always return a value of 0. We should be advertising 0 query bits instead of 64, but gallium doesn't have plumbing for that yet. At least this stops the segfaults.
* vc4: Switch from errx() to fprintf() and abort().Eric Anholt2014-09-251-2/+4
| | | | | | | | These are pretty catastrophic, "should never happen" failure paths (though 4 tests in piglit hit them currently, due to a single bug). An abort() that you can gdb on easily is probably more useful than a clean exit, particularly since a bug in piglit framework right now is causing early exit(1)s to simply not be recorded in the results at all.
* vc4: Switch the context struct to use ralloc.Eric Anholt2014-09-231-2/+3
| | | | | I wanted to hang the ra_regs off it so I didn't have to free, but it turned out it wasn't ralloced yet.
* vc4: Actually implement VC4_DEBUG=cl.Eric Anholt2014-09-181-0/+7
|
* vc4: Fix segfaults when rendering with no color render target.Eric Anholt2014-09-091-3/+13
|
* vc4: Fill out the stencil clear field.Eric Anholt2014-09-091-1/+1
| | | | | | The rest of stencil handling isn't done yet, but it documents an extra cl_u8(0) and helps make it obvious why we don't need to format clear_depth the same way the depth/stencil buffer is formatted.
* vc4: Add support for loading/storing the depth buffer.Eric Anholt2014-09-091-7/+61
| | | | | | For now it still requires the color buffer to be present -- we're relying on the store of color buffer contents to end the frame, and we have to do something with color buffers in the rendering config packet.
* vc4: Don't forget to do initial tile clearing for depth/stencil.Eric Anholt2014-09-091-1/+6
|
* vc4: Add support for all the texture and FBO formats we can.Eric Anholt2014-08-221-1/+5
| | | | | | | Now that tiling is in place, we can expose the other formats. Depth is still broken (need to make changes in the shader), but if you don't expose it things crash all over. SNORM is dropped, but we could re-add it later with some shader fixes to handle converting between [0,1] and [-1,1].
* vc4: Add support for texture tiling.Eric Anholt2014-08-221-3/+3
| | | | | | This still treats everything as RGBA8888 for the most part, same as before. This is a prerequisite for handling other texture formats, since only RGBA8888 has a raster-layout mode.
* vc4: Include stdio/stdlib in headers so I don't have to include it per file.Eric Anholt2014-08-221-1/+0
| | | | | There are a few tools I want to have always available, and fprintf() and abort() are among them.
* vc4: Drop incorrect attempt to incorrectly invert the primconvert hw_mask.Eric Anholt2014-08-151-1/+1
| | | | | | | | The hw_mask is the set of primitives you actually support, so this attempt to provide the set of formats that's unsupported was wrong in two ways (it was intended to be '~' not '!'). However, we only call this code when prim isn't one of the actually supported hw_mask bits, so missing out on the memcpy didn't matter anyway.
* vc4: Move the deref of the color buffer for simulator into the simulator.Eric Anholt2014-08-151-4/+1
| | | | | | | At some point I'm going to want to move the information necessary for the host buffer upload/download into the BO so that it's independent of the current vc4->framebuffer, but for now this fixes pointless derefs on non-simulator in vc4_context.c since the dump_fbo() removal