summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_print.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAMMarek Olšák2015-06-051-1/+1
| | | | | | | | 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]>
* program: Shrink and rename SaturateMode field to Saturate.Matt Turner2015-06-031-3/+3
| | | | | | | | | | | It was 2 bits to accommodate SATURATE_PLUS_MINUS_ONE (removed by commit 09b566e1). A similar change was made to TGSI recently in commit e1c4e8aa. Reducing the size from 2 bits to 1 reduces the size of the bit fields from 17 bits to 16, which is a much nicer number. Reviewed-by: Brian Paul <[email protected]>
* mesa/program: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-8/+8
| | | | Acked-by: Ilia Mirkin <[email protected]>
* mesa: Fix some signed-unsigned comparison warningsJan Vesely2015-01-211-2/+2
| | | | | | | | v2: s/unsigned int/unsigned/ in prog_optimize.c Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa/cs: Add a MESA_SHADER_COMPUTE stage and update switch statements.Paul Berry2014-02-051-0/+3
| | | | | | | | | This patch adds MESA_SHADER_COMPUTE to the gl_shader_stage enum. Also, where it is trivial to do so, it adds a compute shader case to switch statements that switch based on the type of shader. This avoids "unhandled switch case" compiler warnings. Reviewed-by: Matt Turner <[email protected]>
* mesa: Add varying slot for viewport indexIan Romanick2014-01-201-4/+6
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use gl_shader::Stage instead of gl_shader::Type where possible.Paul Berry2014-01-081-5/+10
| | | | | | | | | | | | | | | | | | | | | This reduces confusion since gl_shader::Type is sometimes GL_SHADER_PROGRAM_MESA but is more frequently GL_SHADER_{VERTEX,GEOMETRY,FRAGMENT}. It also has the advantage that when switching on gl_shader::Stage, the compiler will alert if one of the possible enum types is unhandled. Finally, many functions in src/glsl (especially those dealing with linking) already use gl_shader_stage to represent pipeline stages; using gl_shader::Stage in those functions avoids the need for a conversion. Note: in the process I changed _mesa_write_shader_to_file() so that if it encounters an unexpected shader stage, it will use a file suffix of "????" rather than "geom". Reviewed-by: Brian Paul <[email protected]> v2: Split from patch "mesa: Store gl_shader_stage enum in gl_shader objects." Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove PROGRAM_ENV_PARAM enum.Eric Anholt2013-11-151-5/+0
| | | | | | | | This has been replaced with referring to env parameters using PROGRAM_STATE_VAR and _mesa_load_state_parameters. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove PROGRAM_LOCAL_PARAM enum.Eric Anholt2013-11-151-5/+0
| | | | | | | | This has been replaced with referring to local parameters using PROGRAM_STATE_VAR and _mesa_load_state_parameters. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add new builtins required by GL_ARB_sample_shadingAnuj Phogat2013-11-011-0/+1
| | | | | | | | | | | | | | | | New builtins added by GL_ARB_sample_shading: in vec2 gl_SamplePosition in int gl_SampleID in int gl_NumSamples out int gl_SampleMask[] V2: - Use SWIZZLE_XXXX for STATE_NUM_SAMPLES. - Use "result.samplemask" in arb_output_attrib_string. - Add comment to explain the size of gl_SampleMask[] array. - Make gl_SampleID and gl_SamplePosition system values. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove unused opcodes AND, DP2A, NOT, NRM3, NRM4, OR, PRINT, XORMarek Olšák2013-04-241-14/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Replace gl_frag_attrib enum with gl_varying_slot.Paul Berry2013-03-151-8/+8
| | | | | | | | | | | | 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]>
* mtypes.h: Modify gl_frag_attrib to refer to new gl_varying_slot enum.Paul Berry2013-03-151-4/+11
| | | | | | | | This paves the way for eliminating the gl_frag_attrib enum entirely. 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-11/+11
| | | | | | | | | | | 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]>
* mtypes.h: Modify gl_vert_result to refer to new gl_varying_slot enum.Paul Berry2013-03-151-0/+4
| | | | | | | | This paves the way for eliminating the gl_vert_result enum entirely. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: Remove PROG_EMIT_VERTEX and PROG_END_PRIMITIVE opcodes.Kenneth Graunke2012-11-071-6/+0
| | | | | | | | These were only used for geometry shader support back in the days before the new GLSL compiler. Future geometry shader support will not use these. Reviewed-by: Ian Romanick <[email protected]>
* mesa: bump MAX_VARYING to 32Marek Olšák2012-10-291-2/+34
| | | | | | | | | | | | | | | | | We're starting to get apps utilizing more than 16 varyings and most current hardware supports 32 anyway. Tested with r600g. swrast, softpipe and llvmpipe still advertise 16 varyings. This fixes a WebGL crash after launching this demo: https://developer.mozilla.org/en-US/demos/detail/falling-cubes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54402 NOTE: This is a candidate for the stable branches. Acked-by: Kenneth Graunke <[email protected]>
* mesa: Remove PROGRAM_WRITE_ONLY register type.Kenneth Graunke2012-10-161-2/+0
| | | | | | | More dead code. I'm not sure what it was for. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove remnants of PROGRAM_VARYING.Kenneth Graunke2012-10-161-5/+0
| | | | | | | | The previous patch removed the producer of things in this file. Since there aren't any, we can remove it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove GLSL-related PROG_PARAM_BIT flags.Kenneth Graunke2012-10-161-8/+0
| | | | | | | | GLSL doesn't use the program code anymore. Accordingly, there were no consumers of these flags, so there's no need to define them. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove support for named parameters.Kenneth Graunke2012-10-161-2/+0
| | | | | | | | | | | These were only part of NV_fragment_program, so we can kill them. The fact that PROGRAM_NAMED_PARAM appears in r200_vertprog.c is rather comedic, but also demonstrates that people just spam the various types of parameters everywhere because they're confusing. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove prog_print support for NV programs.Kenneth Graunke2012-10-161-55/+5
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove Mesa IR opcodes that existed only for NV_vertex_program.Eric Anholt2012-10-151-7/+0
| | | | | | v2: Remove dead positive() function, caught by Matt. Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: use the PRIx64 macro for printing 64-bit hexadecimal valuesBrian Paul2012-07-051-5/+6
| | | | | | We'll revert the #define fprintf __mingw_fprintf change next. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove _mesa_ffs(), implement ffs() for non-GNU platformsBrian Paul2012-01-121-2/+2
| | | | | | | | | | | Call ffs() and ffsll() everywhere. Define our own ffs(), ffsll() functions when the platform doesn't have them. v2: remove #ifdef _WIN32, __IBMC__, __IBMCPP_ tests inside ffs() implementation. The #else clause was recursive. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Alexander von Gluck <[email protected]>
* program: fix previous commitnobled2011-12-181-1/+1
| | | | Accidentally an old patch.
* program: fix out of bounds array accesses and other bad thingsnobled2011-12-181-15/+59
| | | | | | | | | | | | | | | | | | | | Noticed a "warning: array subscript is above array bounds" given at one of the existing sanity-check asserts. Turns out all the arrays of strings haven't matched the corresponding enum values in a while, if ever. I didn't know the proper names for any of these and couldn't find them in the base specs aside from "result.pointsize" in ARB_vertex_program, so I just filled in the enum's value as was done with other slots. Also add four STATIC_ASSERT()s to be sure and catch future additions or bumps to MAX_VARYING/etc again, and some more non-static asserts where there weren't any before. (Note, the fragment enum that corresponded to result.color(half) was removed in 8d475822e6e19fa79719c856a2db5b6a205db1b9.) Reviewed-by: Brian Paul <[email protected]>
* mesa: fix an out-of-bounds access in prog_print.cMarek Olšák2011-12-131-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: use Elements() macro in program printing codeBrian Paul2011-11-301-4/+4
|
* mesa: fix printf format warning in _mesa_fprint_program_parameters()Brian Paul2011-11-301-2/+2
|
* mesa: Simplify uniform debug logging logicIan Romanick2011-10-181-2/+2
| | | | | | | | | This simplificiation was enabled by the earlier refactors that eliminated the references to the assembly shaders stored in the gl_shader_program structure. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: support boolean and integer-based parameters in prog_parameterBryan Cain2011-08-011-1/+1
| | | | | | The functionality is not used by anything yet, and the glUniform functions will need to be reworked before this can reach its full usefulness. It is nonetheless a step towards integer support in the state tracker and classic drivers.
* prog_print: Add support for printing the TXD opcode.Kenneth Graunke2011-04-281-0/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: program printing for PROGRAM_SYSTEM_VALUEBrian Paul2010-12-081-0/+5
|
* mesa: rename, make _mesa_register_file_name() non-staticBrian Paul2010-11-231-11/+9
| | | | Plus remove unused parameter.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-2/+2
|
* Merge branch 'master' into glsl2Ian Romanick2010-08-131-0/+2
|\
| * mesa: added gl_program::IndirectRegisterFiles fieldBrian Paul2010-07-301-0/+2
| | | | | | | | | | | | | | | | Now drivers, etc. can know which register files are accessed with indirect addressing. Before we just checked gl_program::NumAddressRegs but didn't know if that was the constant buffer, temp regs, or what. The only user of this new field so far will be the gallium state tracker.
* | mesa: check for null shader->InfoLog before printingBrian Paul2010-08-121-1/+3
| |
* | i965: Settle on printing our program debug to stdout.Eric Anholt2010-08-041-16/+16
| | | | | | | | | | | | Mixing stderr (_mesa_print_program, _mesa_print_instruction, _mesa_print_alu) with stdout means that when writing both to a file, there isn't a consistent ordering between the two.
* | mesa: Don't null deref looking for Mesa IR code at compile time.Eric Anholt2010-08-041-5/+3
|/ | | | | | | The new compiler doesn't generate Mesa IR at compile time, and that compile time code previously wouldn't have reflected the link time code that actually got used. But do dump the info log of the compile regardless.
* mesa: add comments and change Index2D to just Index2Zack Rusin2010-07-131-5/+5
|
* mesa: add basic support for 2D register arrays to mesaZack Rusin2010-07-091-3/+11
| | | | | just like in Gallium it's a basic functionality needed by a lot of modern graphcis extensions
* mesa: Silence warning.José Fonseca2010-07-021-1/+2
|
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-1/+11
| | | | | | laying down the foundation for everything and implementing most of the stuff. linking, gl_VerticesIn and multidimensional inputs are left.
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-0/+1065