aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_program.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: implement GL_ATI_fragment_shaderMiklós Máté2016-03-271-0/+31
| | | | | | | | | | | | | 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/+30
| | | | | | | | | 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: remove st_is_program_nativeMarek Olšák2016-02-091-13/+0
| | | | | | The default scenario sets GL_TRUE too. Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: unify variants and delete functions for TCS, TES, GSMarek Olšák2016-02-091-6/+12
| | | | | | no difference between those Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: create shaders which have only one variant immediatelly (v2)Marek Olšák2015-10-201-2/+3
| | | | | | v2: fix the condition when lacking sample shading Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: fix incorrect pointer type arguments in st_new_program()Brian Paul2015-10-161-5/+5
| | | | | | | | | | Silences 5 warnings of the type: state_tracker/st_cb_program.c: In function 'st_new_program': state_tracker/st_cb_program.c:108:7: warning: passing argument 1 of '_mesa_init_gl_program' from incompatible pointer type [enabled by default] return _mesa_init_gl_program(&prog->Base, target, id); ^ Reviewed-by: Emil Velikov <[email protected]>
* program: convert _mesa_init_gl_program() to take struct gl_program *Emil Velikov2015-10-151-18/+20
| | | | | | | | Rather than accepting a void pointer, only to down and up cast around it, convert the function to take the base (struct gl_program) pointer. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* program: remove _mesa_init_*_program wrappersMarek Olšák2015-10-091-25/+18
| | | | | | | They didn't do anything useful. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: translate tessellation shaders into TGSI when we get themMarek Olšák2015-10-091-0/+4
| | | | | | 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/+2
| | | | | | 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-0/+2
| | | | | | 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-1/+3
| | | | | | | | | | 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: add tessellation shader statesIlia Mirkin2015-07-231-0/+58
| | | | additional fixes by Marek
* mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAMMarek Olšák2015-06-051-4/+4
| | | | | | | | There's no reason to use our own definition. Tessellation will use the NV definitions too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add a debug option to compile shaders at link timeMarek Olšák2015-04-161-0/+4
| | | | | | | v2: fix crashes Tested-by: Tom Stellard <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: cleanup st_geometry_program structureMarek Olšák2015-02-241-10/+0
| | | | | | | It's full of unused variables and variables only used in st_translate_geometry_program. Reviewed-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: Remove st_new_shaderIan Romanick2014-10-241-1/+0
| | | | | | | | | | | It was identical to the default implementation in _mesa_new_shader. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Dave Airlie <[email protected]>
* glsl_to_tgsi: Remove st_new_shader_programIan Romanick2014-10-241-1/+0
| | | | | | | | | | | | It was identical to the default implementation in _mesa_new_shader_program. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Dave Airlie <[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: Remove yet more remnants of NV_fragment_program.Kenneth Graunke2012-10-161-2/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: move fragment shader tgsi tokens into st_fp_variantMarek Olšák2012-01-251-10/+0
| | | | The TGSI code may vary depending on the clamp_color bit.
* st/mesa: Add a GLSL IR to TGSI translator.Bryan Cain2011-08-011-0/+14
| | | | | | | | | | It is still a work in progress at this point, but it produces working and reasonably well-optimized code. Originally based on ir_to_mesa and st_mesa_to_tgsi, but does not directly use Mesa IR instructions in TGSI generation, instead generating TGSI from the intermediate class glsl_to_tgsi_instruction. It also has new optimization passes to replace _mesa_optimize_program.
* st/mesa: s/varient/variantBrian Paul2010-12-161-7/+7
|
* st/mesa: rename the varient release functionsBrian Paul2010-12-141-6/+6
|
* st/mesa: make st_delete_program() staticBrian Paul2010-12-131-1/+1
|
* st/mesa: add comments, fix formatting in st_cb_program.cBrian Paul2010-12-131-29/+31
|
* Squashed commit of the following (st-mesa-per-context-shaders branch):Brian Paul2010-12-131-38/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4f106f44a32eaddb6cf3fea6ba5ee9787bff609a Author: Brian Paul <[email protected]> Date: Mon Dec 13 14:06:08 2010 -0700 st/mesa: reorganize vertex program translation code Now it looks like the fragment and geometry program code. Also remove the serial number fields from programs. It was used to determine when new translations were needed. Now the variant key is used for that. And the st_program_string_notify() callback removes all variants when the program's code is changed. commit e12d6791c5e4bff60bb2e6c04414b1b4d1325f3e Author: Brian Paul <[email protected]> Date: Mon Dec 13 13:38:12 2010 -0700 st/mesa: implement geometry shader varients Only needed in order to support per-context gallium shaders. commit c5751c673644808ab069259a852f24c4c0e92b9d Author: Brian Paul <[email protected]> Date: Sun Dec 12 15:28:57 2010 -0700 st/mesa: restore glDraw/CopyPixels using new fragment program variants Clean up the logic for fragment programs for glDraw/CopyPixels. We now generate fragment program variants for glDraw/CopyPixels as needed which do texture sampling, pixel scale/bias, pixelmap lookups, etc. commit 7b0bb99bab6547f503a0176b5c0aef1482b02c97 Author: Brian Paul <[email protected]> Date: Fri Dec 10 17:03:23 2010 -0700 st/mesa: checkpoint: implement fragment program variants The fragment programs variants are per-context, as the vertex programs. NOTE: glDrawPixels is totally broken at this point. commit 2cc926183f957f8abac18d71276dd5bbd1f27be2 Author: Brian Paul <[email protected]> Date: Fri Dec 10 14:59:32 2010 -0700 st/mesa: make vertex shader variants per-context Gallium shaders are per-context but OpenGL shaders aren't. So we need to make a different variant for each context. During context tear-down we need to walk over all shaders/programs and free all variants for the context being destroyed.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-6/+6
|
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-0/+48
| | | | | | laying down the foundation for everything and implementing most of the stuff. linking, gl_VerticesIn and multidimensional inputs are left.
* st/mesa: Remove unnecessary headers.Vinson Lee2010-06-261-2/+0
|
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-3/+3
|
* mesa: refactor shader api / object codeBrian Paul2010-06-101-5/+3
| | | | | Remove the unneeded ctx->Driver hooks for shader-related functions. Move state and API-related things into main/.
* st/mesa: rename state -> tgsi, updated commentsBrian Paul2010-02-121-6/+6
|
* mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul2010-02-041-3/+6
| | | | | | | | | | | | | GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
* st/mesa: Remove unnecessary headers.Vinson Lee2010-01-311-1/+0
|
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-221-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
| * st/mesa: Remove unnecessary header from st_cb_program.c.Vinson Lee2010-01-151-1/+0
| |
* | mesa/st: refactor vertex and fragment shader translationKeith Whitwell2009-11-151-41/+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.
* mesa: Ensure TGSI tokens are freed with gallium's free.José Fonseca2009-09-211-4/+5
| | | | To avoid breaking the gallium's builtin malloc debugging.
* mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul2009-02-121-2/+2
|
* mesa: consistantly use mesa memory-functions in gallium state trackerBrian Paul2009-02-121-4/+4
| | | | | Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
* gallium: check for FEATURE_feedback and FEATURE_drawpix when creating/using ↵Brian Paul2008-07-101-0/+4
| | | | the aux draw module
* Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul2008-05-201-0/+7
|\
| * gallium: fix vertex shader mem leak (glRasterPos)Brian Paul2008-05-201-0/+7
| |
* | Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul2008-05-201-2/+7
|\|
| * gallium: fix default case in st_new_program()Brian Paul2008-05-201-2/+7
| |
| * fix program delete/refcount bugBrian Paul2008-05-191-1/+3
| | | | | | | | cherry-picked from gallium-tex-surfaces
* | fix program delete/refcount bugBrian Paul2008-05-181-1/+4
|/
* gallium: use cso_destroy_vertex/fragment_shader() functionsBrian Paul2008-04-241-7/+5
| | | | | Also, rearrange the st_destroy_context() code a bit to prevent some invalid/NULL ptr derefs during tear-down.
* gallium: fix some bitmap frag shader issuesBrian Paul2008-04-221-0/+4
| | | | | If texturing happens to be enabled when glBitmap() is called, need to be careful about choosing a sampler unit, etc.