summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.cpp
Commit message (Collapse)AuthorAgeFilesLines
* mesa: hook up core bits of GL_ARB_shader_group_voteIlia Mirkin2016-06-061-0/+9
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* Revert "glsl: fix xfb_offset unsized array validation"Timothy Arceri2016-06-011-23/+0
| | | | | | | | | | | This reverts commit aac90ba2920cf5ceb4df6dba776dd3952780e456. The commit caused a regression in: piglit.spec.glsl-1_50.compiler.gs-input-nonarray-named-block.geom Also the CTS test it was meant to fix seems like it may be bogus. Cc: "12.0" <[email protected]>
* glsl: fix xfb_offset unsized array validationTimothy Arceri2016-05-301-0/+23
| | | | | | | | | | | | | | | | This partially fixes CTS test: GL44-CTS.enhanced_layouts.xfb_get_program_resource_api The test now fails at a tes evaluation shader with unsized output arrays. The ARB_enhanced_layouts spec says: "It is a compile-time error to apply xfb_offset to the declaration of an unsized array." So this seems like a bug in the CTS. Reviewed-by: Dave Airlie <[email protected]>
* glsl: make max array trackers ints and use -1 as base. (v2)Dave Airlie2016-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug that breaks cull distances. The problem is the max array accessors can't tell the difference between an never accessed unsized array and an accessed at location 0 unsized array. This leads to converting an undeclared unused gl_ClipDistance inside or outside gl_PerVertex to a size 1 array. However we need to the number of active clip distances to work out the starting point for the cull distances, and this offset by one when it's not being used isn't possible to distinguish from the case were only the first element is accessed. I tried to use ->used for this, but that doesn't work when gl_ClipDistance is part of an interface block. So this changes things so that max_array_access is an int and initialised to -1. This also allows unsized arrays to proceed further than that could before, but we really shouldn't mind as they will get eliminated if nothing uses them later. For initialised uniforms we no longer change their array size at runtime, if these are unused they will get eliminated eventually. v2: use ralloc_array (Ilia) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: fixed uninitialized pointerJakob Sinclair2016-05-121-0/+5
| | | | | | | | | | | | | Class "ir_constant" had a bunch of constructors where the pointer member "array_elements" had not been initialized. This could have lead to unsafe code if something had tried to write anything to it. This patch fixes this issue by initializing the pointer to NULL in all the constructors. This issue was discovered by Coverity. CID: 401603, 401604, 401605, 401610 Signed-off-by: Jakob Sinclair <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]>
* compiler/glsl: do not downcast list sentinelNicolai Hähnle2016-05-071-1/+4
| | | | | | This crashes gcc's undefined behaviour sanitizer. Reviewed-by: Marek Olšák <[email protected]>
* glsl: remove unused helperTimothy Arceri2016-02-171-15/+0
| | | | | | Seems to have become unused when i965 moved to NIR. Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl/types: Rename sampler_type to sampled_typeJason Ekstrand2016-02-131-1/+1
| | | | | | | | It's a bit more descriptive since it is the base type that you get when you sample from it. Also, the next commit adds a bare "sampler" type and we need glsl_type::sampler_type available for a public static member. Reviewed-by: Jordan Justen <[email protected]>
* glsl: Remove 2x16 half-precision pack/unpack opcodes.Matt Turner2016-02-011-9/+0
| | | | | | i965/fs was the only consumer, and we're now doing the lowering in NIR. Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+2039
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>