summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_scissor.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-22st/mesa: don't set 16 scissors and 16 viewports if they're unusedMarek Olšák1-3/+7
Only do so if there is a shader writing gl_ViewportIndex. This removes a lot of CPU overhead for the most common case. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-22st/mesa: use precomputed st_fb_orientationMarek Olšák1-1/+1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-08st/mesa: remove struct st_tracked_stateMarek Olšák1-12/+4
It contains only one member: the update function. Let's use the update function directly. Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-07-30st/mesa: completely rewrite state atomsMarek Olšák1-8/+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 <nicolai.haehnle@amd.com>
2016-07-30st/mesa: remove st_tracked_state::nameMarek Olšák1-2/+0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-06-18st/mesa: add support for GL_EXT_window_rectanglesIlia Mirkin1-0/+49
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 <imirkin@alum.mit.edu> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-04-07mesa/st: Use _mesa_geometric_ functions appropriatelyEdward O'Callaghan1-2/+6
Change references to gl_framebuffer::Width, Height, MaxNumLayers and Visual::samples to use the _mesa_geometric_ convenience functions for those places where the geometry of the gl_framebuffer is needed. This is in contrast to the geometry of the intersection of the attachments of the gl_framebuffer. This patch paves the way to enable GL_ARB_framebuffer_no_attachements for all gallium drivers. V.2: Remove itermeditate variable state. Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-01-21mesa: Fix some signed-unsigned comparison warningsJan Vesely1-1/+1
v2: s/unsigned int/unsigned/ in prog_optimize.c Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: David Heidelberg <david@ixit.cz> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-03-05mesa/st: only compare the one scissorIlia Mirkin1-1/+1
sizeof(scissor) returns the size of the full array rather than a single element. Fix it to consider just the one element. Fixes: 0705fa35 ("st/mesa: add support for GL_ARB_viewport_array (v0.2)") Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com>
2014-02-11st/mesa: add support for GL_ARB_viewport_array (v0.2)Dave Airlie1-36/+41
this just ties the mesa code to the pre-existing gallium interface, I'm not sure what to do with the CSO stuff yet. 0.2: fix min/max bounds Acked-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-01-20mesa: Update gl_scissor_attrib to support ARB_viewport_arrayCourtney Goeltzenleuchter1-7/+7
Update Mesa and drivers to access updated gl_scissor_attrib. Now have an enable bitfield and array of gl_scissor_rects. Drivers have been updated to the new scissor enable state attribute (gl_context.scissor.EnableFlags) but still treat it as a single boolean which is okay as mesa will only use bit 0 when communicating with a driver that does not support ARB_viewport_array. v2 (idr): Rebase fixes. v3 (idr): Small code formatting fix suggsted by Ken. Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-01-17s/Tungsten Graphics/VMware/José Fonseca1-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/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # 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 <brianp@vmware.com>
2013-05-25gallium: Add support for multiple viewportsZack Rusin1-1/+1
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 <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2011-06-14st/mesa: replace st->ctx with ctxBrian Paul1-8/+9
2010-04-19st/mesa: invert scissor rect depending on FB orientationBrian Paul1-5/+8
Fixes fd.o bug 27715
2010-01-24st/mesa: fix int->uint conversion for negative scissor bound valuesBrian Paul1-4/+9
Based on a patch by Xavier Chantry <chantry.xavier@gmail.com>: If x+width or y+height is negative, then maxx or maxy will get a bogus value when converting that to unsigned. Fix this by setting 0 as minimal value. This was also triggered by teeworlds, but only with some combination of resolution and map section. For example upper part of dm2 at 1280x1024.
2010-01-24st/mesa: fix unsigned/signed breakage in scissorXavier Chantry1-4/+4
commit 53174afeeb introduced a portability change that converted GLint x,y to GLuint. That breaks when x and y are negative, which seems to be allowed, and which at least one game uses : teeworlds. Rather than simply reverting the change, it seems possible to convert the 16bit unsigned to GLint so that comparisons are made between signed integers instead. This hopefully does not break anything while keeping MSVC happy. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2008-05-31mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca1-4/+4
2008-05-02Some changed for non-C99 compilersAlan Hourihane1-10/+5
2007-08-25add names to tracked state atoms to improve debugkeithw1-0/+1
2007-08-10invert Y for scissorBrian1-0/+8
2007-07-02rename a few structs (use _state suffix consistantly), reorder/sort fields ↵Brian1-2/+2
in some structs
2007-06-14Rename directories again?!Keith Whitwell1-3/+3
Some git wierdness going on.
2007-06-14Renamed softpipe directories and files to something less confusing.Keith Whitwell1-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.