summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.c
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Fix fallback to quad clears of depth in GLX.Eric Anholt2016-10-061-0/+4
| | | | | The fix in the vc4-jobs series ended up triggering the fallback path on GLX apps that use depth but not stencil.
* vc4: use the new parent/child pools for transfersNicolai Hähnle2016-10-051-3/+2
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* vc4: Implement job shufflingEric Anholt2016-09-141-86/+15
| | | | | | | | | | | | | | | Track rendering to each FBO independently and flush rendering only when necessary. This lets us avoid the overhead of storing and loading the frame when an application momentarily switches to rendering to some other texture in order to continue rendering the main scene. Improves glmark -b desktop:effect=shadow:windows=4 by 27% Improves glmark -b desktop:blur-radius=5:effect=blur:passes=1:separable=true:windows=4 by 17% While I haven't tested other apps, this should help X rendering a lot, and I've heard GLBenchmark needed it too.
* vc4: Handle resolve skipping at job submit time.Eric Anholt2016-09-141-7/+2
| | | | | | This is done in vc4_flush currently, but I'm going to make the job always track the surfaces it might be rendering to instead of putting in the destinations at flush time.
* vc4: Move the render job state into a separate structure.Eric Anholt2016-09-141-17/+26
| | | | | This is a preparation step for having multiple jobs being queued up at the same time.
* vc4: Always unref the current job surfaces at job reset time.Eric Anholt2016-09-141-27/+10
| | | | | Drops some tricky logic in vc4_flush() trying to update the pointers, and fixes a broken lack of unref for MSAA surfaces at context destroy time.
* vc4: Move job-submit skip cases to vc4_job_submit().Eric Anholt2016-09-141-12/+0
| | | | For calling job_submit() directly, I need the skipping here.
* vc4: Move bin CL trailer to job_submit() time.Eric Anholt2016-09-141-11/+0
| | | | | To implement job shuffling, I want to be able to call submit() on specific jobs, turning vc4_flush() into the context's flush-all-jobs hook.
* gallium: switch drivers to the slab allocator in src/utilMarek Olšák2016-09-061-3/+3
|
* vc4: Don't flush on read-only access of buffers read by the CL.Eric Anholt2016-04-181-5/+8
| | | | | | Fixes piglit mixed-immediate-and-vbo, and may significantly improve performance of applications that store a 4-byte IB in the same VBO as vertex data.
* u_upload_mgr: allow specifying PIPE_USAGE_* for the upload bufferMarek Olšák2016-01-021-1/+2
| | | | Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* u_upload_mgr: remove alignment parameter from u_upload_createMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* vc4: Only update vc4->msaa when the framebuffer changes.Eric Anholt2015-12-151-7/+0
| | | | | | Any update here should have been the same as in vc4_set_framebuffer_state(), except for the point where vc4_blit.c temporarily sets different state for its different buffers.
* vc4: Don't consider nr_samples==1 surfaces to be MSAA.Eric Anholt2015-12-151-6/+8
| | | | | | This is apparently a weirdness of gallium -- nr_samples==1 is occasionally used and means the same thing as nr_samples==0. Fixes a bunch of ARB_framebuffer_srgb blit cases in piglit.
* vc4: Add support for drawing in MSAA.Eric Anholt2015-12-081-2/+21
|
* gallium/drivers: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-1/+1
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* vc4: Add support for loading sample mask.Eric Anholt2015-12-041-0/+2
|
* 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 <brianp@vmware.com> Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* 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 <robclark@freedesktop.org> Acked-by: Eric Anholt <eric@anholt.net>
* 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 <jfonseca@vmware.com>
* 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.