summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Use enum pipe_shader_type in set_shader_images()Kai Wasserbäch2016-08-292-2/+4
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in set_sampler_views()Kai Wasserbäch2016-08-292-2/+2
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)Kai Wasserbäch2016-08-292-5/+7
| | | | | | | | | | | v1 → v2: - Fixed indentation (noted by Brian Paul) - Removed second assert from nouveau's switch statements (suggested by Brian Paul) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/cso: avoid unnecessary null dereferenceEric Engestrom2016-08-241-1/+1
| | | | | | | | | | | The label `out:` calls `destroy()` which dereferences `ctx`. This is unnecessary as there is nothing to destroy. Immediately return instead. CovID: 1258255 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/cso: allow saving the first fragment shader image slotNicolai Hähnle2016-06-012-0/+48
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* cso: remove / add some commentsBrian Paul2016-05-171-6/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* cso: null-out previously bound sampler statesBrian Paul2016-05-031-1/+3
| | | | | | | | | | | | | If, for example, we previously had 2 sampler states bound and now we are binding one, we'd leave the second sampler state unchanged. This change nulls-out the second sampler state in this situation. We're already doing the same thing for sampler views. This silences an occasional warning issued by the VMware driver when the number of sampler views and sampler states disagreed. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: pause queries for all meta opsMarek Olšák2016-04-122-0/+5
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/cso: fix indentationThomas Hindoe Paaboel Andersen2016-03-021-4/+4
| | | | | | | | Only one of these were recently introduced. However, since we keep copy/pasting the same wrong indentation we should probably just fix it. Reviewed-by: Brian Paul <[email protected]>
* gallium/cso: only enable compute shaders when TGSI is supportedSamuel Pitoiset2016-02-181-1/+6
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94186 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* cso: add CSO_BITS_ALL_SHADERSBrian Paul2016-02-161-0/+6
| | | | | | For saving/restoring all shader stages. Reviewed-by: Marek Olšák <[email protected]>
* cso: make most of the cso_save/restore_x() functions staticBrian Paul2016-02-162-85/+70
| | | | | | | Users of the CSO save/restore facility all use the new cso_save/restore_state() functions instead. Reviewed-by: Jose Fonseca <[email protected]>
* cso: add new cso_save/restore_state() functionsBrian Paul2016-02-162-0/+133
| | | | | | | cso_save_state() takes a bitmask of state items to save. Calling cso_restore_state() restores those states. Reviewed-by: Jose Fonseca <[email protected]>
* cso: remove commentBrian Paul2016-02-161-1/+0
| | | | There's a similar comment just a few lines before.
* cso: add new cso_set_viewport_dims() helperBrian Paul2016-02-162-0/+20
| | | | | | To simplify some viewport setting code in the state tracker. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/cso: add support for compute shadersSamuel Pitoiset2016-02-132-0/+34
| | | | | | | | | | | Changes from v2: - removed cso_{save,restore}_compute_shader() functions and the compute_shader_saved variable because disabling compute shaders for meta ops is not currently needed Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/auxiliary: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-062-3/+3
| | | | | | | | | | 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 <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* cso: eliminate some sampler function wrappersMarek Olšák2015-07-232-33/+12
|
* cso: remove clip state handlingMarek Olšák2015-07-232-57/+0
| | | | | | There is no need for this. v2: handle redundant clip state changes in st/mesa
* cso: only allow saving and restoring fragment sampler statesMarek Olšák2015-07-222-14/+18
|
* cso: drop inefficient checking for redundant sampler state changesMarek Olšák2015-07-221-26/+2
| | | | | Drivers can do this better, because they can skip redundant state changes at per-slot granularity.
* cso: only allow saving and restoring fragment sampler viewsMarek Olšák2015-07-222-54/+53
| | | | Not needed for other shader stages.
* gallium: replace INLINE with inlineIlia Mirkin2015-07-212-8/+8
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* cso: add context cleanup code from st/mesaMarek Olšák2015-05-201-0/+7
| | | | | | | | | | This fixes a crash in nouveau which can't handle set_constant_buffer(PIPE_SHADER_TESS_*). Cc: 10.6 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/cso: set NULL shaders at context destructionMarek Olšák2015-05-161-0/+7
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/cso: add support for tessellation shadersMarek Olšák2015-05-162-0/+105
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* cso: minor comment fixBrian Paul2015-04-221-1/+1
|
* cso: put cso_release_all into cso_destroy_contextMarek Olšák2014-12-102-19/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/aux: Avoid redefining MAXAlexander von Gluck IV2014-12-101-0/+2
| | | | * Can be redefined on some platforms through u_debug.h
* u_vbuf: Simplify the format fallback translation.Eric Anholt2014-08-241-11/+1
| | | | | | | | | | Individual caps made supporting new fallbacks more complicated than it needed to be. Instead, just make a table of fallbacks at context init time. v2: Fix inverted "do we need to install vbuf?" flagging caught by Marek. Reviewed-by: Marek Olšák <[email protected]> (v2)
* cso: fix stream-out clean up in cso_release_all()Brian Paul2014-06-121-1/+1
| | | | | | | | | Use the has_streamout flag as we do elsewhere to check if we need to call pipe->set_stream_output_targets(). The driver might implement the set_stream_output_targets() function, but not for all hardware configurations. Reviewed-by: Jose Fonseca <[email protected]>
* mesa/st: add support for ARB_sample_shadingIlia Mirkin2014-04-262-0/+23
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* cso: check for no sampler view changes in cso_set_sampler_views()Brian Paul2014-04-031-3/+8
| | | | | | | | | As we do for sampler states in single_sampler_done() and many other CSO functions. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* cso: fix sampler view count in cso_set_sampler_views()Brian Paul2014-04-021-3/+4
| | | | | | | | | | | | | | We want to call pipe->set_sampler_views() with count being the maximum of the old number of sampler views and the new number. This makes sure we null-out any old sampler views. We already do the same thing for sampler states in single_sampler_done(). Fixes some assertions seen in the VMware driver with XA tracker. Cc: "10.0" "10.1" <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Tested-by: Thomas Hellstrom <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: allow setting of the internal stream output offsetZack Rusin2014-03-072-6/+9
| | | | | | | | | | | | | | | | D3D10 allows setting of the internal offset of a buffer, which is in general only incremented via actual stream output writes. By allowing setting of the internal offset draw_auto is capable of rendering from buffers which have not been actually streamed out to. Our interface didn't allow. This change functionally shouldn't make any difference to OpenGL where instead of an append_bitmask you just get a real array where -1 means append (like in D3D) and 0 means do not append. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-176-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* cso_context: Fix cso_context::sample_mask initial value.José Fonseca2014-01-071-1/+1
| | | | | | | | | | | | The initial value of cso_context::sample_mask_saved is irrelevant as it will be overwritten with cso_context::sample_mask in cso_save_sample_mask. Therefore it is cso_context::sample_mask that needs to be properly initialized. This fixes regressions in blits and mipmap generation after adding support for sample_mask to llvmpipe. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: implement layered framebuffer clear for the clear_with_quad fallbackMarek Olšák2013-12-032-0/+25
| | | | Same approach as in u_blitter.
* gallium/cso: fix sampler / sampler_view countsRoland Scheidegger2013-11-281-11/+16
| | | | | | | | | Now that it is possible to query drivers for the max sampler view it should be safe to increase this without crashing. Not entirely convinced this really works correctly though if state trackers using non-linked sampler / sampler_views use this. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-231-29/+6
| | | | | | | | | | | | The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* cso: fix incorrect sampler view count in cso_restore_sampler_views()Brian Paul2013-10-161-3/+6
| | | | | | | | | | | | | | | | | | During the recent bind_sampler_states() interface change in gallium we changed the CSO single_sampler_done() function so that if we were decreasing the number of sampler states bound in the driver, we'd null-out the "extra/old" sampler states to unbind them. See commit 1e2fbf265. However, we didn't make the corresponding fix for sampler views. This caused an assertion to fail in the svga driver which checked that the number of sampler views matched the number of sampler states. This patch fixes cso_restore_sampler_views() so that it nulls-out the extra/old sampler views if the number of new views is less than the number of current/old views. Reviewed-by: Jose Fonseca <[email protected]>
* cso: make sure all sampler states are set/clearedBrian Paul2013-10-031-2/+9
|
* cso: remove use of old bind_*_sampler_states() functionsBrian Paul2013-10-031-31/+3
|
* cso: use pipe_context::bind_sampler_states() if non-nullBrian Paul2013-10-031-21/+44
|
* gallium: add condition parameter to render_conditionRoland Scheidegger2013-06-182-4/+12
| | | | | | | | | | | | | For conditional rendering this makes it possible to skip rendering if either the predicate is true or false, as supported by d3d10 (in fact previously it was sort of implied skip rendering if predicate is false for occlusion predicate, and true for so_overflow predicate). There's no cap bit for this as presumably all drivers could do it trivially (but this patch does not implement it for the drivers using true hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL functionality). Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-2/+2
| | | | | | | | | | | | Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca<[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* 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 <[email protected]>
* gallium: manage render condition in cso_context and fix postprocessing w/ itMarek Olšák2012-12-122-0/+31
| | | | Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]>