summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/link_varyings.h
Commit message (Collapse)AuthorAgeFilesLines
* glsl/mesa: split gl_shader in twoTimothy Arceri2016-06-301-7/+10
| | | | | | | | | | | | | | | | | There are two distinctly different uses of this struct. The first is to store GL shader objects. The second is to store information about a shader stage thats been linked. The two uses actually share few fields and there is clearly confusion about their use. For example the linked shaders map one to one with a program so can simply be destroyed along with the program. However previously we were calling reference counting on the linked shaders. We were also creating linked shaders with a name even though it is always 0 and called the driver version of the _mesa_new_shader() function unnecessarily for GL shader objects. Acked-by: Iago Toral Quiroga <[email protected]>
* glsl: fix max varyings count for ARB_enhanced_layoutsTimothy Arceri2016-06-121-3/+9
| | | | | | | | | | | Since this extension allows more than one varying to share a single location we can't just count the number of slots a varying takes and add it to the total. Instead we now reuse the reserved varyings bitfield to determine how many slots are reserved for explicit locations instead. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl/link_varyings: switch to 64bit check instead of double.Dave Airlie2016-06-091-2/+2
| | | | | | | This is prep work for int64 support. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: Add arb_cull_distance support (v3)Tobias Klausmann2016-05-141-0/+1
| | | | | | | | | v2: make too large array a compile error v3: squash mesa/prog patch to avoid static compiler errors in bisect Signed-off-by: Tobias Klausmann <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: add support to query GL_TRANSFORM_FEEDBACK_BUFFER_INDEXTimothy Arceri2016-03-311-2/+2
| | | | Reviewed-by: Dave Airlie <[email protected]>
* glsl: handle varyings that are not written to but have an xfb_offsetTimothy Arceri2016-03-311-0/+8
| | | | Reviewed-by: Dave Airlie <[email protected]>
* glsl: add xfb_stride link time validationTimothy Arceri2016-03-311-1/+2
| | | | | | | | | | | | | | | | From the ARB_enhanced_layous spec: "It is a compile-time or link-time error to have any *xfb_offset* that overflows *xfb_stride*, whether stated on declarations before or after the *xfb_stride*, or in different compilation units. ... When no *xfb_stride* is specified for a buffer, the stride of a buffer will be the smallest needed to hold the variable placed at the highest offset, including any required padding." Reviewed-by: Dave Airlie <[email protected]>
* glsl: basic linking support for xfb qualifiersTimothy Arceri2016-03-311-2/+3
| | | | | | | This adds the initial infrastructure for enabling transform feedback mode via in shader qualifiers and adds initial buffer support. Reviewed-by: Dave Airlie <[email protected]>
* glsl: add xfb helpers and fields to the tfeedback_decl classTimothy Arceri2016-03-311-0/+20
| | | | | | We also apply any array/struct offsets. Reviewed-by: Dave Airlie <[email protected]>
* glsl: add helper to process xfb qualifiers during linkingTimothy Arceri2016-03-311-0/+5
| | | | | | | | | | | | This function checks for any xfb_* qualifiers which will enable transform feedback mode and cause any API defined xfb varyings to be ignored. It also counts the number of varyings that have a xfb_offset qualifier and finally it calls the create_xfb_varying_names() helper to generate the names of varyings to be caputured. Reviewed-by: Dave Airlie <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+299
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>