aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_simple_shaders.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: refactor pipe_shader_state to support multiple IR'sRob Clark2016-05-111-6/+12
| | | | | | | | | | | | | | | | The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some cases we should be able to skip the TGSI intermediate step (such as glsl->nir vs glsl->tgsi->nir). I think pipe_compute_state should get similar treatment. Currently, afaict, it has one user and one consumer, which has allowed it to be sloppy wrt. supporting alternative IR's. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium,utils: Fix trivial sign compare warningsJan Vesely2016-05-031-2/+2
| | | | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Jakob Sinclair <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: s/Elements/ARRAY_SIZE/Brian Paul2016-04-281-6/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*Marek Olšák2016-04-221-10/+10
| | | | Acked-by: Jose Fonseca <[email protected]>
* gallium/util: declare sampler view in util_make_fs_blit_msaa_depthstencil()Brian Paul2016-03-211-1/+2
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* gallium/auxiliary: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-8/+8
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: add a utility to create geometry passthrough shaderCharmaine Lee2015-09-011-0/+51
| | | | Reviewed-by: Brian Paul <[email protected]>
* util/blitter (and friends): generate appropriate SVIEW declsRob Clark2015-06-211-18/+60
| | | | | | | | Some hardware needs to know the sampler type. Update the blit related shaders to include SVIEW decl. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/u_tests: test a NULL buffer sampler viewMarek Olšák2015-02-061-3/+9
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* st/mesa: add a fallback for clear_with_quad when no vs_layerIlia Mirkin2014-11-171-0/+70
| | | | | | | | | | | | | | | | | Not all drivers can set gl_Layer from VS. Add a fallback that passes the instance id from VS to GS, and then uses the GS to set the layer. Tested by adding quad_buffers |= clear_buffers; clear_buffers = 0; to the st_Clear logic, and forcing set_vertex_shader_layered in all cases. No piglit regressions (on piglits with 'clear' in the name). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "10.4 10.3" <[email protected]>
* tgsi/ureg: simplify code for declaring propertiesMarek Olšák2014-11-161-1/+1
| | | | Tested-by: Nick Sarnie <[email protected]>
* gallium/util: add a window_space option to the passthrough vertex shaderMarek Olšák2014-11-161-2/+8
| | | | Tested-by: Nick Sarnie <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* gallium/u_blitter: implement shader-based MSAA resolve with bilinear filteringMarek Olšák2013-12-141-0/+95
| | | | | | | | | For scaled resolve. The filter is only good for magnification. If somebody has an idea how to implement a good filter for minification, I'm all ears. I'd have to use derivatives probably. Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: implement shader-based MSAA resolveMarek Olšák2013-12-141-0/+59
| | | | | | | | | We need this for integer formats and upside-down blits, which Radeons don't support for MSAA resolving. It can be used by calling util_blitter_blit. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: implement layered framebuffer clear in u_blitterMarek Olšák2013-12-031-0/+26
| | | | | | | | | | | | | All bound layers (from first_layer to last_layer) should be cleared. This uses a vertex shader which outputs gl_Layer = gl_InstanceID, so each instance goes to a different layer. By rendering a quad and setting the instance count to the number of layers, it will trivially clear all layers. This requires AMD_vertex_shader_layer (or PIPE_CAP_TGSI_VS_LAYER), which only radeonsi supports at the moment. r600 could do this too. Standard DX11 hardware will have to use a geometry shader though, which has higher overhead.
* gallium/u_blitter: make clearing independent of the number of bound colorbuffersMarek Olšák2013-06-131-0/+12
| | | | | | We can use the fragment shader TGSI property WRITES_ALL_CBUFS. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: make WRITES_ALL_CBUFS optional in the passthrough fragment shaderMarek Olšák2013-06-131-3/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/util: attempt to fix blitting multisample texture arraysMarek Olšák2013-03-111-1/+1
| | | | We don't have a test for this yet, but obviously the swizzle was wrong.
* gallium/util: fix glClear with MRT by making the FS write to all cbufsMarek Olšák2013-01-151-4/+30
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: implement blitting multisample resourcesMarek Olšák2012-08-151-0/+133
| | | | It can blit only one sample at a time (it should be called in a loop).
* gallium/u_blitter: accelerate stencil-only copyingMarek Olšák2012-07-121-0/+46
| | | | | | This doesn't seem to be used by anything yet, but better safe than sorry. Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blitter: accelerate depth-stencil copying using shader stencil exportMarek Olšák2012-07-121-0/+54
| | | | | | This fixes stencil buffer write transfers on r600g. Reviewed-by: Alex Deucher <[email protected]>
* gallium: utility helper functions for stream outputMarek Olšák2011-12-151-1/+13
|
* u_blitter: interpolate clear color using a GENERIC varying instead of COLORMarek Olšák2010-11-281-4/+7
| | | | | | | | | | | There are also some u_simple_shaders changes. On r300, the TGSI_SEMANTIC_COLOR varying is a fixed-point number clamped to the range [0,1] and limited to 12 bits of precision. Therefore we can't use it for passing through a clear color in order to clear high precision texture formats. This also makes u_blitter use only one vertex shader instead of two.
* util: Include missing header in u_simple_shaders.c.Vinson Lee2010-08-261-0/+1
| | | | Include p_state.h for PIPE_MAX_COLOR_BUFS symbol.
* gallium: add interpolation parameter to simple shader functionsBrian Paul2010-06-031-4/+15
| | | | | This lets us specify linear interpolation instead of perspective interpolation for blit operations. Might be a bit faster.
* gallium: Make pipe_atomic a regular int32_t.José Fonseca2010-02-021-0/+1
|
* gallium/util: replace 8 with PIPE_MAX_COLOR_BUFSBrian Paul2010-01-051-2/+2
|
* gallium/util: comments and whitespace fixesBrian Paul2010-01-051-3/+15
|
* util: add new fragment shaders to simple_shadersMarek Olšák2009-12-151-7/+63
| | | | | | | | | | New shaders: * Fragment shader which writes depth sampled from a texture * Fragment shader which copies COLOR[0] to multiple render targets Additional improvements: * The fragment 'tex' shaders now take a sampler type (TGSI_TEXTURE_*) so that they can sample from any type of texture, not only from a 2D one.
* util: add lost code to util_make_fragment_tex_shader_writemask()Keith Whitwell2009-10-051-1/+9
| | | | | This got ported to ureg at some point, but lost the code that distinguishes it from regular util_make_fragment_tex_shader().
* tgsi/ureg: VS inputs don't have any semantic tags, just an indexKeith Whitwell2009-09-121-3/+1
| | | | Fix ureg_DECL_vs_input to reflect this and fix up all callers.
* util: remove unneeded #includesBrian Paul2009-09-101-6/+0
|
* Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-091-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile configs/default progs/glsl/Makefile src/gallium/auxiliary/util/u_simple_shaders.c src/gallium/state_trackers/glx/xlib/xm_api.c src/mesa/drivers/dri/i965/brw_draw_upload.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/intel/intel_context.h src/mesa/drivers/dri/intel/intel_pixel.c src/mesa/drivers/dri/intel/intel_pixel_read.c src/mesa/main/texenvprogram.c src/mesa/main/version.h
| * util: add version of u_blit_pixels which takes a writemaskKeith Whitwell2009-09-021-2/+43
| | | | | | | | Values outside the writemask are set in the destination to {0,0,0,1}
* | util: add version of u_blit_pixels which takes a writemaskKeith Whitwell2009-09-031-2/+12
| | | | | | | | Values outside the writemask are set in the destination to {0,0,0,1}
* | aux/tgsi: pull back ureg work from 0.1 branchKeith Whitwell2009-09-031-1/+1
| | | | | | | | | | Manual merge of ureg changes on the branch. Too much unrelated stuff for a proper merge.
* | tgsi: Fix build error due to commit acc7da90Cooper Yuan2009-08-241-6/+6
| |
* | util: convert u_simple_shaders to use tgsi_uregKeith Whitwell2009-08-131-258/+60
|/ | | | Much nicer now.
* gallium: no need to keep a copy of shader tokens in state trackerKeith Whitwell2009-03-131-47/+29
| | | | | | | | Any driver who needs a copy of the shader tokens must organize to do so itself. This has been the case for a long time, but there was still defensive code in the state tracker, which is now removed. Any bugs resulting from this need to be fixed in the offending driver...
* gallium: Remove some superfluous instances of #include "p_inlines.h".Michel Dänzer2009-03-041-1/+0
|
* mesa: Free the util shaders with the gallium's FREE.José Fonseca2009-02-191-0/+7
|
* util: Move p_debug.h into util module.José Fonseca2009-02-181-1/+1
| | | | | The debug functions depend on several util function for os abstractions, and these depend on debug functions, so a seperate module is not possible.
* gallium: make p_winsys internalZack Rusin2009-01-301-1/+1
| | | | | move it to pipe/internal/p_winsys_screen.h and start converting the state trackers to the screen usage
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+1
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* Merge tgsi/exec and tgsi/util directories.José Fonseca2008-07-281-3/+3
|
* util: Fix build after TGSI declaration interface changes.Michal Krol2008-05-311-17/+16
|
* gallium: return pipe_shader_state from the simple shader functionsBrian2008-03-271-12/+19
| | | | Allows us to fix a mem leak (tokens array).
* gallium: enable vp input semantic infoBrian2008-03-201-9/+6
|