aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.h
Commit message (Collapse)AuthorAgeFilesLines
* gallium: pass cso_velems_state into cso_context instead of pipe_vertex_elementMarek Olšák2020-02-281-2/+3
| | | | | | | This removes one memcpy from the CSO hashing code. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* st/mesa: make st_setup_current staticMarek Olšák2020-02-141-7/+0
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* gallium: bypass u_vbuf if it's not needed (no fallbacks and no user VBOs)Marek Olšák2020-01-081-1/+2
| | | | | | | This decreases CPU overhead, because u_vbuf is completely bypassed in those cases. Acked-by: Alyssa Rosenzweig <[email protected]>
* st/mesa: remove struct st_vp_variant in favor of st_common_variantMarek Olšák2019-12-091-4/+4
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: subclass st_vertex_program for VP-specific membersMarek Olšák2019-11-191-4/+4
| | | | | | | Inheritance: gl_program -> st_program -> st_vertex_program Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* st/mesa: rename st_common_program to st_programMarek Olšák2019-11-191-4/+4
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* st/mesa: trivially merge st_vertex_program into st_common_programMarek Olšák2019-11-191-4/+4
| | | | | | | a later commit will add back st_vertex_program as a subclass of st_common_program Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* st/mesa: consolidate and simplify code flagging program::affected_statesMarek Olšák2019-11-191-1/+1
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* mesa/st: Make st_pipe_vertex_format static.Mathias Fröhlich2018-11-261-3/+0
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa/st: Use binding information from the VAO in feedback rendering.Mathias Fröhlich2018-11-261-0/+7
| | | | | | | | | | | | Use VAO binding information in feedback rendering. In theory it should reduce the amount of buffer objects scheduled for rendering. Feedback rendering is implemented in a crude way anyhow, so I do not expect much gain here. But for the sake of code reuse we should use the same code for the same task. And finally if feeback rendering may get improved the array setup is already well done there. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa/st: Factor out array and buffer setup from st_atom_array.c.Mathias Fröhlich2018-11-261-0/+17
| | | | | | | | | Factor out vertex array setup routines from the array state atom. The factored functions will be used in feedback rendering in the next change. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa: Factor out struct gl_vertex_format.Mathias Fröhlich2018-11-211-1/+1
| | | | | | | | | | | | | | | | Factor out struct gl_vertex_format from array attributes. The data type is supposed to describe the type of a vertex element. At this current stage the data type is only used with the VAO, but actually is useful in various other places. Due to the bitfields being used, special care needs to be taken for the glGet code paths. v2: Change unsigned char -> GLubyte. Use struct assignment for struct gl_vertex_format. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* st/mesa: add support for ARB_sample_locationsRhys Perry2018-06-141-1/+1
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v2) Reviewed-by: Marek Olšák <[email protected]> (v2)
* gallium: Use struct gl_array_attributes* as st_pipe_vertex_format argument.Mathias Fröhlich2018-03-121-2/+1
| | | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* gallium: Mute arrays for several meta like callbacks.Mathias Fröhlich2018-02-091-0/+3
| | | | | | | | | | | | | Set the _DrawArray pointer to NULL when calling into the Drivers Bitmap/CopyPixels/DrawAtlasBitmaps/DrawPixels/DrawTex hooks. This fixes an assert that gets uncovered when the following patch gets applied. v2: Mute from within the state tracker instead of generic mesa. v3: Avoid evaluating _DrawArrays from within st_validate_state. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: use "ull" number suffix to keep the QtCreator parser happyMarek Olšák2017-07-101-2/+2
| | | | | | | It can't parse "llu". Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Eric Engestrom <[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]>
* mesa/st: only update samplers for stages that have changedTimothy Arceri2017-04-131-1/+5
| | | | | | Might help reduce cpu for some apps that use sso. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: don't update unrelated states in non-draw calls such as ClearMarek Olšák2017-02-251-0/+7
| | | | | | | | | | If a VAO isn't bound and u_vbuf isn't enabled because of the Core profile, we'll get user vertex buffers in drivers if we update vertex buffers in glClear. So don't do that. This fixes a regression since disabling u_vbuf for Core profiles. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: _NEW_TEXTURE & CONSTANTS shouldn't flag states that aren't usedMarek Olšák2016-08-121-0/+8
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: when changing shaders, only dirty states that are affected by themMarek Olšák2016-08-121-68/+4
| | | | | | | This reduces the amount of state processing that has no effect. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't update clip state on VS changes if it has no effectMarek Olšák2016-08-121-11/+12
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: define ST_NEW_ flags as uint64_t values, not enumsBrian Paul2016-08-091-4/+4
| | | | | | | | | | | | | | | | | | MSVC doesn't support 64-bit enum values, at least not with C code. The compiler was warning: c:\users\brian\projects\mesa\src\mesa\state_tracker\st_atom_list.h(43) : warning C4309: 'initializing' : truncation of constant value c:\users\brian\projects\mesa\src\mesa\state_tracker\st_atom_list.h(44) : warning C4309: 'initializing' : truncation of constant value ... And at runtime we crashed since the high 32-bits of the 'dirty' bitmask was always 0xffffffff and the 32+u_bit_scan() index went out of bounds of the atoms[] array. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: update sampler states when shaders are changedMarek Olšák2016-07-301-6/+12
| | | | | | | This bug seems to have always been there. Applications changing shaders but not textures between draw calls would have gotten undefined behavior. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: skip updates of states that have no effectMarek Olšák2016-07-301-8/+14
| | | | | | v2: - also don't check edge flags for GLES Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: completely rewrite state atomsMarek Olšák2016-07-301-66/+144
| | | | | | | | | | | | | | | | | | | | 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: add support for GL_EXT_window_rectanglesIlia Mirkin2016-06-181-0/+1
| | | | | | | | Make sure to pass the requisite information in draws, blits, and clears that work on the context's draw buffer. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: add an image atom for shader imagesIlia Mirkin2016-02-151-0/+6
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: add state validation for compute shadersSamuel Pitoiset2016-02-131-0/+5
| | | | | | | | This binds atomics, constants, samplers, ssbos, textures and ubos. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: add compute shader statesSamuel Pitoiset2016-02-131-0/+1
| | | | | | | | | Changes from v2: - use as much common code as possible (eg. st_basic_variant) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: add a second pipeline for computeSamuel Pitoiset2016-02-131-1/+4
| | | | | | | | | | | | | Compute needs a new and different validation path. Changes from v2: - make use of unreachable() instead of assert() when the pipeline is invalid - move the st_pipeline enumeration to st_context.h instead of st_api.h Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add support for SSBO binding and GLSL intrinsicsIlia Mirkin2016-01-291-0/+5
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> v1 -> v2: some 80 char reformatting
* st/mesa: add atomic counter supportIlia Mirkin2016-01-291-0/+5
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: remove st_finalize_textures atomMarek Olšák2015-07-291-1/+0
| | | | | | | | | It only checks fragment textures and ignores other shaders, which makes it incomplete, and textures are already finalized in update_single_texture. There are no piglit regressions. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: set default tessellation levelsMarek Olšák2015-07-231-0/+1
|
* st/mesa: add texture updates for tessellation programsIlia Mirkin2015-07-231-0/+2
|
* st/mesa: handle constbufs/ubos for tessellation shadersIlia Mirkin2015-07-231-0/+4
|
* st/mesa: add tessellation shader statesIlia Mirkin2015-07-231-0/+2
| | | | additional fixes by Marek
* mesa/st: add support for ARB_sample_shadingIlia Mirkin2014-04-261-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[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/mesa: add geometry shader ubo supportDave Airlie2013-10-171-0/+1
| | | | | | | This just adds the missing bits so the ubo tests don't crash. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/st: add ARB_uniform_buffer_object support (v2)Dave Airlie2012-12-081-0/+2
| | | | | | | | | | | | | | | | this adds UBO support to the state tracker, it works with softpipe as-is. It uses UARL + CONST[x][ADDR[0].x] type constructs. v2: don't disable UBOs if geom shaders don't exist (me) rename upload to bind (calim) fix 12 -> 13 comparison as comment (calim + brianp) fix signed->unsigned (Brian) remove assert (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add support for GS textures and samplersBrian Paul2012-08-161-1/+2
|
* st/mesa: atomize vertex array stateMarek Olšák2012-06-151-0/+5
| | | | This moves the state validation to where all the other states are validated.
* mesa/st: split updating vertex and fragment shader stages.Dave Airlie2011-05-181-0/+1
| | | | | | | this seems like a logical thing to do and sets the correct st flags for vertex textures. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: use GLuint to avoid problem w/ uint not defined on mingw32Brian Paul2010-10-151-1/+1
|
* st/mesa: Include glheader.h in st_atom.h.Vinson Lee2010-08-031-0/+2
| | | | Include glheader.h for GLenum symbol.
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-0/+2
| | | | | | laying down the foundation for everything and implementing most of the stuff. linking, gl_VerticesIn and multidimensional inputs are left.
* mesa/st: adapt to interface changesRoland Scheidegger2010-05-171-0/+1
| | | | | adapt to blit changes, and also handle a bit more msaa state in theory (incomplete, doesn't handle resolves in any way for now).
* mesa/st: refactor vertex and fragment shader translationKeith Whitwell2009-11-151-1/+2
| | | | | | | | | | | | | | | | | Translate vertex shaders independently of fragment shaders. Previously tried to make fragment shader semantic indexes always start at zero and exclude holes. This was unnecessary but meant that vertex shader translation had to be adjusted to take this into account. Now use a fixed scheme for labelling special FS input semantics (color, etc), and another fixed scheme for the generics. With this, vertex shaders can be translated independently of the bound fragment shader, assuming mesa has done its own job and ensured that the vertex shader provides at least the inputs the fragment shader is looking for. The state-tracker didn't attempt to do anything about this previously, so it shouldn't be needed now.