aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.h
Commit message (Collapse)AuthorAgeFilesLines
* st/glsl_to_tgsi: store num_tgsi_tokens in st_*_programTimothy Arceri2018-01-171-0/+12
| | | | | | | We will need this for ARB_get_program_binary binary support. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: make use of driver_cache_blob with the disk cacheTimothy Arceri2017-11-281-3/+0
| | | | | | | | | | | | driver_cache_blob was introduced with the i965 disk cache, it allows us to simplify the cache a little and possibly offers some minor speed improvements since we load the GLSL metadata and TGSI from disk in one pass. Using driver_cache_blob should also make it straight forward to implement binary support for ARB_get_program_binary in gallium. Reviewed-by: Marek Olšák <[email protected]>
* st/program: add support for gs/tes/tcs nir shaders.Dave Airlie2017-10-261-0/+3
| | | | | | | | This probably needs more work but this just add the initial code to convert gs/tcs/tes nir based shaders in the state tracker. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/program: rework basic variant interfaceDave Airlie2017-10-261-2/+1
| | | | | | | This just passes st_common_program and uses it. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi,st/mesa: move varying slot to semantic mapping into a helper for VSNicolai Hähnle2017-07-051-18/+3
| | | | | | | We will use this helper in radeonsi's NIR path. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: remove an obsolete commentNicolai Hähnle2017-07-031-1/+0
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: unify TCS, TES, GS st_*_program structuresMarek Olšák2017-05-081-77/+11
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: decrease the size of st_vertex_programMarek Olšák2017-05-081-4/+4
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/st: compute support for glsl_to_nirRob Clark2017-05-041-0/+3
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: add sha1 field to st program structsTimothy Arceri2017-02-231-0/+18
| | | | | | | This will be used to share the sha1 computed by the tgsi load function with the tgsi write function. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: move set_prog_affected_state_flags() to st_program.cTimothy Arceri2017-02-231-0/+2
| | | | | | | We want to use this in the new tgsi shader cache so we move it here and make it available externally. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa/r200/i915/i965: eliminate gl_fragment_programTimothy Arceri2016-10-261-4/+4
| | | | | | | | | | 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]>
* i965/mesa/st: eliminate gl_compute_programTimothy Arceri2016-10-261-3/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/i965/i915/r200: eliminate gl_vertex_programTimothy Arceri2016-10-261-2/+2
| | | | | | | 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-3/+3
| | | | | | 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-3/+3
| | | | | | We now get all the tes metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/mesa/st: eliminate gl_tess_ctrl_programTimothy Arceri2016-10-261-3/+3
| | | | | | We now get all the tcs metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/st: support lowering multi-planar YUVRob Clark2016-09-261-0/+37
| | | | | | | | | | | | | | | Support multi-planar YUV for external EGLImage's (currently just in the dma-buf import path) by lowering to multiple texture fetch's for each plane and CSC in shader. There was some discussion of alternative approaches for tracking the additional UV or U/V planes: https://lists.freedesktop.org/archives/mesa-dev/2016-September/127832.html They all seemed worse than pipe_resource::next Signed-off-by: Rob Clark <[email protected]>
* st/mesa: determine states used or affected by shaders at compile timeMarek Olšák2016-08-121-0/+6
| | | | | | | | | | | | At compile time, each shader determines which ST_NEW flags should be set at shader bind time. This just sets the new field for all shaders. The next commit will use it. v2: small code unification Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* mesa/st: add support for NIR as possible driver IRRob Clark2016-05-171-0/+6
| | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Eric Anholt <[email protected]>
* st/mesa: implement GL_ATI_fragment_shaderMiklós Máté2016-03-271-0/+8
| | | | | | | | | | | | | v2: fix arithmetic for special opcodes, fix fog state, cleanup v3: simplify handling of special opcodes, fix rebinding with different textargets or fog equation, lots of formatting fixes v4: adapt to the compile early, fix later architecture, formatting fixes Signed-off-by: Miklós Máté <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/mesa: add compute shader statesSamuel Pitoiset2016-02-131-0/+41
| | | | | | | | | 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: use correct pipe functions to create tess shadersMarek Olšák2016-02-111-0/+1
| | | | | | | | | Broken by one of my cleanups. Spotted by luck. Radeonsi doesn't care, because all shader create callbacks go to the same function. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: unify get_variant functions for TCS, TES, GSMarek Olšák2016-02-091-14/+3
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: unify variants and delete functions for TCS, TES, GSMarek Olšák2016-02-091-71/+17
| | | | | | no difference between those Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: fix parameter names for tesseval/tessctrl prototypesSamuel Pitoiset2016-01-031-4/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: fix GLSL uniform updates for glBitmap & glDrawPixels (v2)Marek Olšák2016-01-021-1/+0
| | | | | | | | | | Spotted by luck. The GLSL uniform storage is only associated once in LinkShader and can't be reallocated afterwards, because that would break the association. v2: don't remove st_upload_constants calls, clarify why they're needed Cc: 11.0 11.1 <[email protected]>
* st/mesa: translate tessellation shaders into TGSI when we get themMarek Olšák2015-10-091-0/+10
| | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: translate geometry shaders into TGSI when we get themMarek Olšák2015-10-091-0/+5
| | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: translate fragment shaders into TGSI when we get themMarek Olšák2015-10-091-2/+5
| | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: translate vertex shaders into TGSI when we get themMarek Olšák2015-10-091-0/+4
| | | | | | | | | | The translate functions is split into two: - translation to TGSI - creating the variant (TGSI transformations only) Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: fix glDrawPixels with a textureMarek Olšák2015-10-091-0/+4
| | | | | | | | | | | The samplers for DrawPixels data and the pixel map are assigned to slots which don't overlap with the existing sampler slots. The texture coordinates for the user texture are uploaded as a constant. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: make Z/S drawpix shaders independent of variants, don't use Mesa IR v2Marek Olšák2015-10-091-2/+0
| | | | | | | | | | | | | - there is no connection to user fragment shaders, so having these as shader variants makes no sense - don't use Mesa IR, use TGSI - don't create gl_fragment_program, just create the shader CSO v2: generate exactly the same shader as before to fix llvmpipe Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: decrease the size of st_vertex_programMarek Olšák2015-10-091-5/+0
| | | | | | | | The other variables can't be moved. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: inline st_prepare_vertex_programMarek Olšák2015-10-091-10/+0
| | | | | | | | | | | No other shader stage has a "prepare" function. This will allow removing some variables from st_vertex_program. Also, prepare_fragment_program was a dead prototype. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: add tessellation shader statesIlia Mirkin2015-07-231-1/+121
| | | | additional fixes by Marek
* glsl_to_tgsi: use TGSI array declarations for VS,GS arrays of outputs (v2)Marek Olšák2015-06-051-0/+1
| | | | v2: don't use PIPE_MAX_SHADER_ARRAYS
* st/mesa: add double input support including lowering (v3.1)Dave Airlie2015-05-081-0/+1
| | | | | | | | | | | | | | | | | This takes a different approach to previously, we cannot index into the inputMapping with anything but the mesa attribute index, so we can't use the just add one to index trick, we need more info to add one to it after we've mapped the input. (Fixed copy propgation and cleaned up a little) v2: drop float64 format check, just attr->Doubles. merge enable patch. v3: cleanup code a bit. v3.1: minor review fixups (comment, newline) (Ilia) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add a debug option to compile shaders at link timeMarek Olšák2015-04-161-0/+3
| | | | | | | v2: fix crashes Tested-by: Tom Stellard <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: replace INLINE with inlineBrian Paul2015-02-261-7/+7
| | | | Reviewed-by: Alex Deucher <[email protected]>
* st/mesa: remove unused/broken function st_print_shadersMarek Olšák2015-02-241-4/+0
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: cleanup st_geometry_program structureMarek Olšák2015-02-241-18/+0
| | | | | | | It's full of unused variables and variables only used in st_translate_geometry_program. Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: add extern "C" to st_program.hBrian Paul2014-12-161-0/+9
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: redefine mapping from VARYING_SLOT_TEXi/PNTC/VARi to TGSI GENERIC[i]Marek Olšák2014-09-241-0/+25
| | | | | | | | | | | 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]>
* mesa/st: add per sample shading state to fp key and set interpolationIlia Mirkin2014-07-091-0/+3
| | | | | | | | | | | This enables a gallium driver not to care about the semantics of ARB_sample_shading vs ARB_gpu_shader5 sample attributes. When ARB_sample_shading-style sample shading is enabled, all of the fp inputs are marked for interpolation at the sample location. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[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]>
* Replace gl_geom_attrib enum with gl_varying_slot.Paul Berry2013-03-151-4/+4
| | | | | | | | | | | | This patch makes the following search-and-replace changes: gl_geom_attrib -> gl_varying_slot GEOM_ATTRIB_* -> VARYING_SLOT_* GEOM_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-4/+4
| | | | | | | | | | | 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: added st_print_current_vertex_program(), for debuggingBrian Paul2012-05-191-0/+4
|
* st/mesa: move fragment shader tgsi tokens into st_fp_variantMarek Olšák2012-01-251-2/+2
| | | | The TGSI code may vary depending on the clamp_color bit.