aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_rasterizer.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: Move _NEW_FRAG_CLAMP to NewFragClamp driver flag.Mathias Fröhlich2020-04-301-1/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4314>
* mesa/gallium: automatically lower two-sided lightingErik Faye-Lund2019-10-171-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: move point_size_per_vertex-logic to helperErik Faye-Lund2019-10-171-30/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: handling lower flatshading for NIR drivers.Dave Airlie2019-10-171-1/+2
| | | | | | | This uses the NIR pass to lower flatshading when the driver requests it. Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Add depth clamping to rasterizer codeGert Wollny2019-08-011-2/+4
| | | | | | | | | | implemented by Erik Faye-Lund <[email protected]> v2: Use current depth range values for clamping (Erik) v3: fix scons-win64 build Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: indicate intel extension support for inner_coverage based on capMike Blumenkrantz2019-04-231-0/+2
| | | | | | | | if the driver (iris) indicates support for the inner_coverage pipe cap, this will set the necessary states in the driver flags and rasterizer structs Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: move utility functions, macros into new st_util.h fileBrian Paul2019-03-111-0/+1
| | | | | | | | | | | | | | To de-clutter st_context.h. Clean up remaining function prototypes in st_context.h. The st_vp_uses_current_values() helper is only used in st_context.c so move it there. The st_get_active_states() function is only used in st_context.c so remove its prototype in st_context.h Reviewed-by: Neha Bhende <[email protected]>
* gallium: split depth_clip into depth_clip_near & depth_clip_farMarek Olšák2018-09-061-2/+2
| | | | for AMD_depth_clamp_separate.
* mesa: Add support for AMD_depth_clamp_separateSagar Ghuge2018-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable _mesa_PushAttrib() and _mesa_PopAttrib() to handle GL_DEPTH_CLAMP_NEAR_AMD and GL_DEPTH_CLAMP_FAR_AMD tokens. Remove DepthClamp, because DepthClampNear + DepthClampFar replaces it, as suggested by Marek Olsak. Driver that enables AMD_depth_clamp_separate will only ever look at DepthClampNear and DepthClampFar, as suggested by Ian Romanick. v2: 1) Remove unnecessary parentheses (Marek Olsak) 2) if AMD_depth_clamp_separate is unsupported, TEST_AND_UPDATE GL_DEPTH_CLAMP only (Marek Olsak) 3) Clamp against near and far plane separately (Marek Olsak) 4) Clip point separately for near and far Z clipping plane (Marek Olsak) v3: Clamp raster position zw to the range [min(n,f), 0] for near plane and [0, max(n,f)] for far plane (Marek Olsak) v4: Use MIN2 and MAX2 instead of CLAMP (Marek Olsak) Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add support for nvidia conservative rasterization extensionsRhys Perry2018-04-301-0/+15
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: trivial whitespace/formatting fixes in st_atom_rasterizer.cBrian Paul2017-12-121-20/+22
|
* mesa: Implement a new GL_MESA_tile_raster_order extension.Eric Anholt2017-10-101-0/+5
| | | | | | | | | | | | | | The intent is to use this extension on vc4 to allow X11 to do overlapping CopyArea() within a pixmap without first blitting the pixmap to a temporary. With associated glamor patches, improves x11perf -copywinwin100 performance on a Raspberry Pi 3 from ~4700/sec to ~5130/sec, and is an even larger boost to uncomposited window movement performance (most copywinwin100 copies don't overlap). v2: Fix glIsEnabled() on the new enums. v3: Drop the local spec since I'm upstreaming the spec. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: fix pipe_rasterizer_state::scissor with multiple viewportsMarek Olšák2017-06-221-1/+1
| | | | | Cc: 17.1 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: use precomputed st_fb_orientationMarek Olšák2017-06-221-3/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: replace ctx->VertexProgram._TwoSideEnabled with a helper functionMarek Olšák2017-06-221-1/+2
| | | | | | 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-5/+1
| | | | | | | | | 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: Add support for NV_fill_rectangleLyude2017-03-311-0/+2
| | | | | | | | | Signed-off-by: Lyude <[email protected]> Changes since v1: - Fix commit name Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: remove a redundant call to _mesa_is_multisample_enabledNicolai Hähnle2016-11-181-1/+1
| | | | | | | We called it immediately prior, so re-use the previously returned value. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* r200/glsl/st/mesa: use common outputs written fieldTimothy Arceri2016-10-261-2/+4
| | | | | | | | | And set outputs written directly in shader_info. st/mesa changes where: Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* r200/i915/st/mesa/compiler: use common inputs read fieldTimothy Arceri2016-10-261-1/+1
| | | | | | | | | | | | And set set inputs_read directly in shader_info. To avoid regressions between changes this change is a squashed version of the following patches. st/mesa changes where: Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa/r200/i915/i965: eliminate gl_fragment_programTimothy Arceri2016-10-261-2/+2
| | | | | | | | | | Here we move OriginUpperLeft and PixelCenterInteger into gl_program all other fields have been replace by shader_info. V2: Don't use anonymous union/structs to hold vertex/fragment fields suggested by Ian. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/i965/i915/r200: eliminate gl_vertex_programTimothy Arceri2016-10-261-4/+4
| | | | | | | Here we move the only field in gl_vertex_program to the ARB program fields in gl_program. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/mesa/st: eliminate gl_geometry_programTimothy Arceri2016-10-261-1/+1
| | | | | | We now get all the gs metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/mesa/st: eliminate gl_tess_eval_programTimothy Arceri2016-10-261-1/+1
| | | | | | We now get all the tes metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: completely rewrite state atomsMarek Olšák2016-07-301-16/+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]>
* mesa: Rename CoordReplaceBits back to CoordReplace.Mathias Fröhlich2016-06-161-1/+1
| | | | | | | | It used to be called like that and fits better with 80 columns. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* gallium: Convert the state_tracker to use CoordsReplaceBits.Mathias Fröhlich2016-06-161-6/+2
| | | | | | | | Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* st/mesa: fix setting of point_size_per_vertex in ES contextsIlia Mirkin2016-05-291-2/+18
| | | | | | | | | | | | | GL ES 2.0+ does not have a GL_PROGRAM_POINT_SIZE enable, unlike desktop GL. So we have to go and check the last pre-rasterizer stage to see whether it outputs a point size or not. This fixes a number of dEQP tests that use a geometry or tessellation shader to emit points primitives. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "11.1 11.2" <[email protected]>
* mesa/st: Use _mesa_geometric_ functions appropriatelyEdward O'Callaghan2016-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: replace gl_context->Multisample._Enabled with ↵Bas Nieuwenhuizen2016-03-241-2/+3
| | | | | | | | | | | | _mesa_is_multisample_enabled. This removes any dependency on driver validation of the number of framebuffer samples. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: minor indentation fixesBrian Paul2016-01-051-4/+4
|
* st/mesa: negate the can_force_persample_interp flagMarek Olšák2015-10-201-1/+1
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: set force_persample_interp if ARB_sample_shading is usedMarek Olšák2015-10-031-0/+8
| | | | | | | This is only a half of the work. The next patch will handle gl_SampleID/SamplePos, which is the other half of ARB_sample_shading. Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: add EXT_polygon_offset_clamp supportIlia Mirkin2015-02-021-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Glenn Kennard <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mesa/gallium: Signal _NEW_TRANSFORM from glClipControl.Mathias Fröhlich2014-10-301-7/+4
| | | | | | | | | This removes the need for the gallium rasterizer state to listen to viewport changes. Thanks to Marek Olšák <[email protected]>. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* gallium: Enable ARB_clip_control for gallium drivers.Mathias Fröhlich2014-10-241-1/+13
| | | | | | | | | | | | | | | | Gallium should be prepared fine for ARB_clip_control. So enable this and mention it in the release notes. v2: Only enable for drivers announcing the freshly introduced PIPE_CAP_CLIP_HALFZ capability. v3: Use extension enable infrastructure to connect PIPE_CAP_CLIP_HALFZ with ARB_clip_control. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* st/mesa: add ST_DEBUG=wf option which enables wireframe renderingMarek Olšák2014-10-211-2/+9
| | | | Useful for tessellation.
* st/mesa: redefine mapping from VARYING_SLOT_TEXi/PNTC/VARi to TGSI GENERIC[i]Marek Olšák2014-09-241-1/+2
| | | | | | | | | | | Generic varyings in TGSI were based on the value of VARYING_SLOT_TEX0, so VAR0 was always GENERIC[22] (with tessellation patches). Some drivers might not be able to cope with that. This commit defines a proper mapping, so that PNTC is GENERIC[8] and VAR0 is GENERIC[9]. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: don't set coord_enable for gl_PointCoord if using TGSI_SEMANTIC_PCOORDMarek Olšák2014-09-241-1/+2
| | | | | | This was missed when Christoph Bumiller added PIPE_CAP_TGSI_TEXCOORD. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: minor simplification of some state atom assignmentsBrian Paul2014-07-091-1/+1
|
* st/mesa: implement zero-stride edge flag by culling primitivesMarek Olšák2014-03-151-0/+8
| | | | This was unimplemented.
* mesa: Update gl_scissor_attrib to support ARB_viewport_arrayCourtney Goeltzenleuchter2014-01-201-1/+1
| | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[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]>
* mesa: convert _NEW_RASTERIZER_DISCARD to a driver flagMarek Olšák2013-04-241-3/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: Replace gl_rasterization_rules with lower_left_origin and ↵José Fonseca2013-04-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | half_pixel_center. Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <[email protected]> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <[email protected]>
* mesa: don't set _ClampFragmentColor to TRUE if it has no effectMarek Olšák2013-04-061-2/+1
| | | | | | | | This should reduce shader recompilations with drivers that emulate fragment color clamping, because we want the clamping to be enabled only if there is a signed normalized or floating-point colorbuffer. Reviewed-by: Brian Paul <[email protected]>
* Replace gl_frag_attrib enum with gl_varying_slot.Paul Berry2013-03-151-2/+2
| | | | | | | | | | | | This patch makes the following search-and-replace changes: gl_frag_attrib -> gl_varying_slot FRAG_ATTRIB_* -> VARYING_SLOT_* FRAG_BIT_* -> VARYING_BIT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* Replace gl_vert_result enum with gl_varying_slot.Paul Berry2013-03-151-1/+1
| | | | | | | | | | | This patch makes the following search-and-replace changes: gl_vert_result -> gl_varying_slot VERT_RESULT_* -> VARYING_SLOT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: remove some conditionals in update_raster_state()Brian Paul2013-02-261-15/+8
| | | | | | Just use simple assignments. Reviewed-by: Marek Olšák <[email protected]>