aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_depth.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: Only enable depth writes if the function isn't EQUAL.Kenneth Graunke2018-07-111-1/+2
| | | | | | | | | | If the depth function is EQUAL, then we'll only write the depth value when it already matches what's in the buffer, which is pointless. Skipping these writes can save bandwidth. The state tracker can easily take care of this, so all drivers benefit. Reviewed-by: Marek Olšák <[email protected]>
* mesa: include mtypes.h lessMarek Olšák2018-04-121-1/+0
| | | | | | | | | | - remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <[email protected]>
* mesa: replace _mesa_update_stencil() with helper functionsMarek Olšák2017-06-221-1/+1
| | | | | | | | | | | | | The idea is to remove the dependency on _mesa_update_state_locked, so that st/mesa can skip it for stencil state updates, and then stop setting _NEW_STENCIL in mesa/main if the driver is st/mesa. The main motivation is to stop invoking _mesa_update_state_locked for certain state groups. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove struct st_tracked_stateMarek Olšák2017-05-081-7/+2
| | | | | | | | | It contains only one member: the update function. Let's use the update function directly. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: disable alpha-test, alpha-to-coverage, alpha-to-one for integer FBsMarek Olšák2016-10-191-1/+2
| | | | | | v2: rebased Reviewed-by: Brian Paul <[email protected]>
* st/mesa: completely rewrite state atomsMarek Olšák2016-07-301-4/+0
| | | | | | | | | | | | | | | | | | | | The goal is to do this in st_validate_state: while (dirty) atoms[u_bit_scan(&dirty)]->update(st); That implies that atoms can't specify which flags they consume. There is exactly one ST_NEW_* flag for each atom. (58 flags in total) There are macros that combine multiple flags into one for easier use. All _NEW_* flags are translated into ST_NEW_* flags in st_invalidate_state. st/mesa doesn't keep the _NEW_* flags after that. torcs is 2% faster between the previous patch and the end of this series. v2: - add st_atom_list.h to Makefile.sources Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove st_tracked_state::nameMarek Olšák2016-07-301-1/+0
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: add EXT_depth_bounds_testMarek Olšák2015-08-141-4/+11
| | | | Reviewed-by: Brian Paul <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* st: Use accessor for stencil reference valuesChris Forbes2013-05-151-2/+5
| | | | | | | | | NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: depth-stencil-alpha state also depends on _NEW_BUFFERSMarek Olšák2013-04-241-1/+1
| | | | | | | | | because the code looks at the visual if there is a depth or stencil buffer before enabling depth or stencil, respectively. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: undo a couple static assertsBrian Paul2012-07-271-2/+2
| | | | Hmm, gcc didn't catch these mistakes, but MSVC did.
* st/mesa: use STATIC_ASSERT in a few placesBrian Paul2012-07-271-10/+10
|
* gallium: implement clamping controls (ARB_color_buffer_float)Luca Barbieri2011-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BTW this changes the gallium interface. Some rather cosmetic changes by Marek. Squashed commit of the following: commit 513b37d484f0318311e84bb86ed4c93cdff71f13 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:17:54 2010 +0200 mesa/st: respect fragment clamping in st_DrawPixels commit 546a31e42cad459d7a7a10ebf77fc5ffcf89e9b8 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:17:28 2010 +0200 mesa/st: support fragment and vertex color clamping commit c406514a1fbee6891da4cf9ac3eebe4e4407ec13 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:56:37 2010 +0200 mesa/st: expose ARB_color_buffer_float if unclamping is supported commit d0c5ea11b6f75f3da2f4ca989115f150ebc7cf8d Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 17:53:41 2010 +0200 mesa/st: use unclamped colors This assumes that Gallium is to be interpreted as given drivers the responsibility to clamp these colors if necessary. commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. (see the removed XXX comment. -Marek) TODO: did I get the set of operations mandating it right? commit 76bdfcfe3ff4145a1818e6cb6e227b730a5f12d8 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:18:25 2010 +0200 gallium: add color clamping to the interface
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* mesa: Remove inclusion of compiler.h from mtypes.h.Vinson Lee2010-07-311-0/+2
| | | | | | | mtypes.h does not use any symbols from compiler.h. Also add the required headers for files that depended on symbols from compiler.h but were indirectly including compiler.h through mtypes.h.
* st/mesa: more fixes for stencil ref change.Roland Scheidegger2010-02-101-1/+0
| | | | | compiles. Might need to do something to make it possible to save/restore stencil ref.
* gallium: don't put stencil ref value in pipe_depth_stencil_alpha_stateRoland Scheidegger2010-02-091-1/+9
| | | | | | | | This will make driver's life a bit harder, however it makes sense that stencil reference value is not part of the pipe_depth_stencil_alpha_state, because it often (there are some algorithms which require this) changes more frequently than the rest of the dsa state. This is also encouraged by some graphic APIs. Treat it similar to pipe_blend_color.
* gallium: remove depth.occlusion_count flagKeith Whitwell2009-10-011-4/+0
| | | | | | | This was redundant as drivers can just keep track of whether they are inside a begin/end query pair. We want to add more query types later and also support nested queries, none of which map well onto a flag like this. No driver appeared to be using the flag.
* gallium: only enable depth test if a depth bufffer is availableBrian Paul2009-03-021-3/+5
|
* gallium: fix state tracker's stencil buffer testBrian Paul2009-02-271-1/+1
| | | | | | | | Need to check ctx->DrawBuffer->Visual.stencilBits not ctx->Visual.stencilBits because the later only applies to the window system buffers, not user-created FBOs. This, plus the previous commit, fixes progs/tests/fbotexture.c
* mesa: support GL_EXT_stencil_two_side in gallium/mesa state trackerBrian Paul2009-02-191-25/+27
| | | | | | | | Since Ian's patch of a few weeks ago, we can enable all three variations of two-sided stencil. Update the state tracker to handle the extra back- face state and turn on the EXT. Note: there's a new Glean test for two-sided stencil now...
* gallium: it's a reference value, not a reference numberZack Rusin2009-01-271-1/+1
|
* gallium: standardize naming of masksZack Rusin2009-01-271-4/+4
|
* Some changed for non-C99 compilersAlan Hourihane2008-05-021-5/+5
|
* gallium: fix two-side stencil handlingRoland Scheidegger2008-04-041-1/+2
| | | | | | | | | | | Previously all drivers were in twosided mode since they checked for stencil.enable[1] flag which was a copy of stencil.enable[0]. Note that drivers should not reference stencil[1] state (other than the enable) if twosided stenciling is disabled (for now the stencil state is still copied but for instance clear_with_quads won't provide useful values in there). Also, use _TestTwoSide instead of TestTwoSide since results would be bogus otherwise if using APIs with implicit two side stencil enable (i.e. core ogl 2.0).
* gallium: don't enable stencil test if no stencil buffer.Brian Paul2008-03-241-1/+4
| | | | Also, if not doing two-sided stencil, set back-face state = front-face state.
* gallium: rework CSO-related code in state trackerBrian2008-03-111-33/+27
| | | | | | | | | | Use the code in cso_context.c rather than st_cache.c. Basically, binding of state objects now goes through the CSO module. But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're not cached by the CSO module at this time. Also, update softpipe driver to handle NULL state objects in various places. This happens during context destruction. May need to update other drivers...
* gallium: incorporate alpha state into depth_stencil state object.Keith Whitwell2007-12-171-24/+31
|
* gallium: remove clear values from depth, stencil stateKeith Whitwell2007-12-111-2/+0
|
* Replace gl_stencil_func_to_sp() and gl_depth_func_to_sp() with ↵Brian2007-11-081-35/+14
| | | | st_compare_func_to_pipe()
* Convert depth_stencil state to the new semantics.Zack Rusin2007-09-201-5/+5
|
* Combing depth and stencil objects and making them immutable.Zack Rusin2007-09-181-16/+92
| | | | | Converting depth and stencil objects into a single state object (d3d10 like) and making it immutable.
* add names to tracked state atoms to improve debugkeithw2007-08-251-0/+1
|
* Added basic occlusion countingBrian2007-07-131-0/+4
|
* Define just one set of PIPE_FUNC_LESS, GREATER, EQUAL, etc tokens.Brian2007-06-181-8/+8
| | | | Used for depth test, alpha test, stencil test, shadow test, etc.
* Rename directories again?!Keith Whitwell2007-06-141-13/+13
| | | | Some git wierdness going on.
* Renamed softpipe directories and files to something less confusing.Keith Whitwell2007-06-141-0/+88
softpipe/state_tracker --> state_tracker/ softpipe/ --> pipe/ softpipe/generic --> pipe/softpipe/ I don't think pipe is a great name, but I disliked all the others too. Luckily it's fairly easy to rename with git, so this can be revisited later.