aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program/program_parse.y
Commit message (Collapse)AuthorAgeFilesLines
* program: Remove NV_fragment_program scalar suffix parsing.Matt Turner2016-03-011-17/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program_option parsing support.Matt Turner2016-03-011-44/+5
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program Abs support.Matt Turner2016-03-011-33/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove condition-code and precision support.Matt Turner2016-03-011-88/+1
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_KIL_NV.Matt Turner2016-03-011-7/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Replace gl_inst_opcode with enum prog_opcode.Matt Turner2015-06-031-3/+3
| | | | | | Both were introduced at the same time. I'm not sure why we needed two. Reviewed-by: Brian Paul <[email protected]>
* program: Shrink and rename SaturateMode field to Saturate.Matt Turner2015-06-031-1/+1
| | | | | | | | | | | 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: include stdarg.h only where it's usedBrian Paul2015-02-261-0/+2
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-6/+6
| | | | Acked-by: Eric Anholt <[email protected]>
* mesa: Add missing null check in _mesa_parse_arb_program()Juha-Pekka Heikkila2014-04-021-0/+5
| | | | | | | | Add missing null check in program_parse.tab.c through program_parse.y Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: replace ctx->Const.{Vertex,Fragment,Geomtery}Program with an array.Paul Berry2014-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | These are replaced with ctx->Const.Program[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the command: find src -type f '(' -iname '*.c' -o -iname '*.cpp' -o -iname '*.py' \ -o -iname '*.y' ')' -print0 | xargs -0 sed -i \ -e 's/Const\.VertexProgram/Const.Program[MESA_SHADER_VERTEX]/g' \ -e 's/Const\.GeometryProgram/Const.Program[MESA_SHADER_GEOMETRY]/g' \ -e 's/Const\.FragmentProgram/Const.Program[MESA_SHADER_FRAGMENT]/g' Suggested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix setup of LocalParams array.Eric Anholt2013-11-201-7/+0
| | | | | | | | | | | | | | | | | | | i965 passed piglit, but swrast and gallium both segfaulted without this. i965 happened to work because it never ran _mesa_load_state_parameters() on the new program before the test called glProgramLocalParameter(), which was allocating a LocalParams array for the fallback path. v2: Since v1 threw away old localparams data, leaked old LocalParams memory, only fixed fragment programs, and I was dubious of my previous invariants already (nothing but program_parse.y will generate LocalParams, and only that one path of program_parse.y will), just late-allocate localparams at the other point of dereferencing them. This adds overhead to _mesa_load_state_parameter, which is uncomfortable, but I'm pretty sure that giant switch statement is super slow already. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71734 Tested-by: Michel Dänzer <[email protected]>
* mesa: Dynamically allocate the storage for program local parameters.Eric Anholt2013-11-151-0/+7
| | | | | | | | | | | | | | | | The array was 64kb per struct gl_program, plus we statically stored a copy of one on disk for _mesa_DummyProgram. Given that most struct gl_programs we generate are for GLSL shaders that don't have local parameters, this was a waste. Since you can store and fetch parameters beyond what the program actually uses, we do have to do a late allocation if necessary at GetProgramLocalParameter time. Reduces peak memory usage in the dota2 trace I made by 76MB (4.5%) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/program: remove useless YYIDLaurent Carlier2013-07-311-2/+2
| | | | | | This fixes the build with Bison 3.0. Also works with Bison 2.7.1. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/program: Switch from the deprecated YYLEX_PARAM to %lex-param.Kenneth Graunke2013-07-311-5/+4
| | | | | | | | | | | | | | | | | | | | | YYLEX_PARAM is no longer supported as of Bison 3.0. Instead, the Bison developers recommend using %lex-param. %lex-param takes a type and variable name, similar to %parse-param, so you can't pass an arbitrary expression like state->scanner. But Flex insists on passing the actual scanner object, not an arbitrary object like state. To solve this, the parser defines a wrapper lex() function which accepts "state," and calls Flex's lex() function with state->scanner. Fixes the build with Bison 3.0. Also works with Bison 2.7.1. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67354 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Tested-by: Laurent Carlier <[email protected]> Cc: "9.2" [email protected]
* mesa/program: Change the program parser's namespace.Kenneth Graunke2013-07-311-2/+9
| | | | | | | | | | | | Bison 3.0 removes the YYLEX_PARAM macro. In preparation for handling this using %lex-param, the parser needs a wrapper function for the actual Flex lex() function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67354 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Tested-by: Laurent Carlier <[email protected]> Cc: "9.2" [email protected]
* mesa: GL_EXT_fog_coord is not optionalIan Romanick2013-06-281-5/+0
| | | | | | | | | Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: GL_EXT_secondary_color is not optionalIan Romanick2013-06-281-5/+0
| | | | | | | | | Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: move max texture image unit constants to gl_program_constantsMarek Olšák2013-05-111-1/+1
| | | | | | | | | | Const.MaxTextureImageUnits -> Const.FragmentProgram.MaxTextureImageUnits Const.MaxVertexTextureImageUnits -> Const.VertexProgram.MaxTextureImageUnits etc. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Fix up program_parse.y to avoid uninitialized $$Paul Berry2013-04-191-0/+5
| | | | | | | | | | | Without this patch, $$.negate, $$.rgba_valid, and $$.xyzw_valid take on garbage values. At the moment this problem is benign (the garbage values happen to be zero), but in my experiments executing GL operations on a background thread, the garbage values change, leading to piglit failures. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Replace gl_frag_attrib enum with gl_varying_slot.Paul Berry2013-03-151-4/+4
| | | | | | | | | | | | 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-8/+8
| | | | | | | | | | | 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]>
* mesa: Remove dead program_parameter::Flags field.Kenneth Graunke2012-10-161-1/+1
| | | | | | | All flags are now gone, so we can stop storing and passing this around. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove prog_instruction.h field for never-supported NV_vertex_program3.Eric Anholt2012-10-151-5/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Set UsesDFdy appropriately for assembly programs.Paul Berry2012-07-191-0/+2
| | | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Use VERT_{ATTRIB,BIT}* for ARB input validation.Mathias Fröhlich2011-12-031-3/+3
| | | | | | | | | | | | | For validating ARB program inputs replace hard coded bitfield and attribute number with the appropriate VERT_{ATTRIB,BIT}* variant. This should fix: https://bugs.freedesktop.org/show_bug.cgi?id=43407 Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Make gl_program::InputsRead 64 bits.Mathias Fröhlich2011-11-291-3/+3
| | | | | | | | | Make gl_program::InputsRead a 64 bits bitfield. Adapt the intel and radeon driver to handle a 64 bits InputsRead value. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use gl_constant_value type in ARB program parserBrian Paul2011-08-041-28/+28
|
* mesa: emit more info in program parser error messageBrian Paul2011-04-271-1/+5
|
* mesa: Fix fragment.color (no index) writes with OPTION ARB_draw_buffers.Eric Anholt2011-04-231-3/+8
| | | | | | | | | Fixes a bug in Trine where fragment.color would write FRAG_RESULT_COLOR (which is interpreted by drivers as being the "write this to all color buffers" option) instead of FRAG_RESULT_DATA0 (just the first target). Fixes piglit ATI_draw_buffers/arbfp-no-index.
* mesa: Add support for the ARB_fragment_program part of ARB_draw_buffers.Eric Anholt2011-04-131-0/+29
| | | | | | | | Fixes fbo-drawbuffers-arbfp. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34321 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: added gl_program_constants::MaxAddressOffsetBrian Paul2011-03-021-2/+2
| | | | See https://bugs.freedesktop.org/show_bug.cgi?id=29418
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* mesa: Fix printf-like warning.Vinson Lee2010-09-021-1/+1
|
* mesa: increase the relative address offset limit to 4096 in ARB_vp/fpMarek Olšák2010-08-041-2/+2
| | | | | | | | | | | | | | | | | | | Even though the spec says that the limits should be -64/+63, proprietary drivers support much larger relative offsets and some applications do depend on this non-standard behavior. Also program_parse.tab.c has been regenerated. This fixes the parser error: ARB_vp: error: relative address offset too large See also: https://bugs.freedesktop.org/show_bug.cgi?id=28628 4096 * sizeof(vec4) is the maximum size of the constant buffer on NV50. It is not supposed to be a definite hardware limit, it is for the parser not to get in the way and let the underlying driver decide whether it can run the shader or not.
* mesa: added gl_program::IndirectRegisterFiles fieldBrian Paul2010-07-301-0/+1
| | | | | | | | 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: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-0/+2767