summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache
Commit message (Collapse)AuthorAgeFilesLines
* cso: add constant buffer save/restore feature for postprocessingMarek Olšák2013-03-262-0/+72
| | | | | Postprocessing is an internal meta op and should restore the states it changes.
* gallium/cso: don't use the pipe_error return type where it's not neededMarek Olšák2012-12-122-41/+24
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: manage render condition in cso_context and fix postprocessing w/ itMarek Olšák2012-12-122-0/+31
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-312-43/+53
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #defineBrian Paul2012-08-161-2/+0
| | | | | | | | | | | | PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
* cso: rearrange some structure fields for consistencyBrian Paul2012-08-101-2/+3
|
* gallium: set sample mask to ~0 for clear, blit and gen_mipmapMarek Olšák2012-08-042-1/+14
| | | | | | | The sample mask affects single-sampled rendering too (it's orthogonal to the color mask). Reviewed-by: Brian Paul <brianp@vmware.com>
* cso: remove unreachable break statementsBrian Paul2012-08-031-5/+0
|
* cso: 80-column wrapping, remove trailing whitespace, etcBrian Paul2012-08-031-33/+54
|
* gallium: consolidate CSO sampler and sampler_view functionsBrian Paul2012-08-032-212/+108
| | | | | | | | | | | | | Merge the vertex/fragment versions of the cso_set/save/restore_samplers() functions. Now we pass the shader stage (PIPE_SHADER_x) to the function to indicate vertex/fragment/geometry samplers. For example: cso_single_sampler(cso, PIPE_SHADER_FRAGMENT, unit, sampler); This results in quite a bit of code reduction, fewer CSO functions and support for geometry shaders. Reviewed-by: Marek Olšák <maraeo@gmail.com>
* cso: cso_context should install u_vbuf by itself and not st/mesaMarek Olšák2012-04-302-7/+23
| | | | so that it's installed in the other state trackers too
* gallium: make user vertex buffers optionalMarek Olšák2012-04-242-4/+65
| | | | | | | | | | | This couldn't be split because it would break bisecting. Summary: * r300g,r600g: stop using u_vbuf * r300g,r600g: also report that the FIXED vertex type is unsupported * u_vbuf: refactor for use in the state tracker * cso: wire up u_vbuf with cso_context * st/mesa: conditionally install u_vbuf
* cso: add set_index_buffer and draw_vbo passthrough functionsMarek Olšák2012-04-242-0/+48
| | | | | | v2: use util_draw_init_info Reviewed-by: Brian Paul <brianp@vmware.com>
* cso: unreference saved vertex buffers when restoringMarek Olšák2012-04-121-0/+8
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/cso: Put the comment about shader in the code for future reference.José Fonseca2012-02-221-0/+7
|
* gallium/cso: kill off non-functional shader cachingMarek Olšák2012-02-214-171/+0
| | | | | | | | | Suggested by José. We don't provide shader caching in CSO. Most of the time the api provides object semantics for shaders anyway, and the cases where it doesn't (eg mesa's internall-generated texenv programs), it will be up to the state tracker to implement their own specialized caching.
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-101-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <brianp@vmware.com> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <airlied@redhat.com> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <maraeo@gmail.com> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <maraeo@gmail.com> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* gallium: fix a crash in drivers that don't support stream outputFredrik Höglund2011-12-151-1/+2
|
* st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2Marek Olšák2011-12-152-0/+109
|
* st/mesa: set geometry shader to NULL when doing internal drawingMarek Olšák2011-11-041-1/+18
| | | | | | | The code expects the geometry shader to be NULL. We don't have geometry shaders now, but it's good to be prepared. v2: check for support in the cso context
* gallium/cso_cache: remove one call to pipe_sampler_view_referenceMarek Olšák2011-11-041-2/+4
|
* cso: move cso hashes to a more table driven schemeDave Airlie2011-06-032-84/+21
| | | | | | this removes a bad branch pain in the hash table lookup fn. Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium: always save and restore vertex buffers using cso_cacheMarek Olšák2011-02-142-0/+52
|
* cso: don't tell drivers to bind null samplers, sampler viewsBrian Paul2011-02-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, the set_sampler_views() and restore_sampler_views() functions used MAX2(old,new) to tell the driver how many samplers or sampler views to set. This could result in cases such as: pipe->set_fragment_sampler_views(pipe, 4, views={foo, bar, NULL, NULL}) Many/most gallium drivers would take this as-is and set ctx->num_sampler_views=4 and ctx->sampler_views={foo, bar, NULL, NULL, ...}. Later, loops over ctx->num_sampler_views would have to check for null pointers. Worse, the number of sampler views and number of sampler CSOs could get out of sync: ctx->num_samplers = 2 ctx->samplers = {foo, bar, ...} ctx->num_sampler_views = 4 ctx->sampler_views={Foo, Bar, NULL, NULL, ...} So loops over the num_samplers could run into null sampler_views pointers or vice versa. This fixes a failed assertion in the SVGA driver when running the Mesa engine demo in AA line mode (and possibly other cases). It looks like all gallium drivers are careful to unreference views and null-out sampler CSO pointers for the units beyond what's set with the pipe::bind_x_sampler_states() and pipe::set_x_sampler_views() functions. I'll update the gallium docs to explain this as well.
* cso: refactor texture sampler and sampler view codeBrian Paul2011-02-021-326/+307
| | | | | | This consolidates the code duplicated between the fragment sampler and vertex sampler functions. Plus, it'll make adding support for geometry shader samplers trivial.
* cso: rename fragment sampler-related fieldsBrian Paul2011-02-021-21/+26
| | | | To better distinguish from vertex sampler fields.
* cso: fix loop bound in cso_set_vertex_samplers()Brian Paul2011-02-021-1/+1
| | | | | | | Before we were looping to nr_samplers, which is the number of fragment samplers, not vertex samplers. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* cso: handle depth clampMarek Olšák2010-07-211-0/+4
|
* gallium/cso: check for set_vertex_sampler_views != NULL before calling itBrian Paul2010-07-021-1/+2
| | | | | Not all drivers implement this method. Fixes regression reported by Chris Rankin and bug 28889.
* gallium/cso: unbind sampler views in cso_release_all()Brian Paul2010-07-011-0/+2
|
* Merge commit 'origin/master' into gallium-msaaRoland Scheidegger2010-05-041-41/+7
|\
| * cso: use framebuffer utility functionsBrian Paul2010-05-031-41/+7
| |
* | Merge commit 'origin/master' into gallium-msaaRoland Scheidegger2010-04-301-1/+4
|\ \ | |/
| * cso: remove commented-out code, update function docsBrian Paul2010-04-291-1/+4
| |
* | gallium: fix glaring bugs in last commitRoland Scheidegger2010-04-271-1/+1
| |
* | gallium: interface changes for multisamplingRoland Scheidegger2010-04-262-0/+13
|/ | | | | | | | | | | | | | | | | | | | | | add function to set sample mask, and state for alpha-to-coverage and alpha-to-one. Also make it possible to query for supported sample count with is_msaa_supported(). Use explicit resource_resolve() to resolve a resource. Note that it is illegal to bind a unresolved resource as a sampler view, must be resolved first (as per d3d10 and OGL APIs, binding unresolved resource would mean that special texture fetch functions need to be used which give explicit control over what samples to fetch, which isn't supported yet). Also change surface_fill() and surface_copy() to operate directly on resources. Blits should operate directly on resources, most often state trackers just used get_tex_surface() then did a blit. Note this also means the blit bind flags are gone, if a driver implements this functionality it is expected to handle it for all resources having depth_stencil/render_target/sampler_view bind flags (might even require it for all bind flags?). Might want to introduce quality levels for MSAA later. Might need to revisit this for hw which does instant resolve.
* cso_cache: Ensure irrelevant state of the blend state is zeroed.José Fonseca2010-04-241-0/+1
| | | | | | | Otherwise drivers that bake the full blend state in a key end up having uninitialized memory in their key. Courtesy of valgrind.
* cso: Remove unnecessary header.Vinson Lee2010-03-221-1/+0
|
* cso: remove cso_set/save/restore_sampler_texturesRoland Scheidegger2010-03-192-76/+0
| | | | no longer used after all statetrackers have been converted.
* cso: Do not hold references to bound textures.Keith Whitwell2010-03-151-22/+8
| | | | Sampler views already hold references to those.
* cso: Remove set/save/restore_vertex_sampler_textures().Michal Krol2010-03-122-98/+0
|
* cso: Add entry points for vertex/fragment sampler views.Michal Krol2010-03-122-15/+167
|
* Merge branch 'master' into gallium-sampler-viewMichal Krol2010-03-104-2/+190
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/Makefile src/gallium/auxiliary/SConscript src/gallium/auxiliary/tgsi/tgsi_exec.c src/gallium/auxiliary/util/u_blitter.c src/gallium/drivers/i915/i915_context.h src/gallium/drivers/i965/brw_context.h src/gallium/drivers/llvmpipe/lp_context.h src/gallium/drivers/nv50/nv50_context.h src/gallium/drivers/nv50/nv50_state_validate.c src/gallium/drivers/nv50/nv50_tex.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_context.h src/gallium/drivers/r300/r300_emit.c src/gallium/drivers/r300/r300_state.c src/gallium/drivers/softpipe/sp_context.h src/gallium/drivers/svga/svga_context.h src/gallium/drivers/svga/svga_pipe_sampler.c
| * cso: don't forget to release vertex elements stateRoland Scheidegger2010-03-091-0/+1
| |
| * cso: Fix typo in assert.Corbin Simpson2010-03-091-1/+1
| |
| * Merge branch 'gallium-vertexelementcso'Roland Scheidegger2010-03-094-3/+123
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/cso_cache/cso_context.c src/gallium/auxiliary/util/u_blit.c src/gallium/auxiliary/util/u_gen_mipmap.c src/gallium/drivers/i915/i915_context.h src/gallium/drivers/i965/brw_draw_upload.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_context.h src/gallium/drivers/r300/r300_render.c src/gallium/drivers/r300/r300_state_derived.c src/mesa/state_tracker/st_cb_bitmap.c src/mesa/state_tracker/st_cb_clear.c
| | * auxiliary: fix vertex elements csoRoland Scheidegger2010-03-092-7/+19
| | | | | | | | | | | | | | | potentially could have got a match even though the cso was different (in case of different count and first few elements the same).
| | * gallium: use cso state handling for pipe_vertex_element stateRoland Scheidegger2010-02-184-2/+111
| | |
| * | cso: Track clip state with cso context.Michal Krol2010-02-242-0/+67
| |/
* | gallium: WIP: Introduce sampler views.Michal Krol2010-02-191-10/+68
|/