summaryrefslogtreecommitdiff
path: root/src/glsl/ir_uniform.h
AgeCommit message (Collapse)AuthorFilesLines
2013-10-29mesa: Add support for ARB_shader_atomic_counters.Francisco Jerez1-0/+7
This patch implements the common support code required for the ARB_shader_atomic_counters extension. It defines the necessary data structures for tracking atomic counter buffer objects (from now on "ABOs") associated with some specific context or shader program, it implements support for binding buffers to an ABO binding point and querying the existing atomic counters and buffers declared by GLSL shaders. v2: Fix extension checks. Drop unused MAX_ATOMIC_BUFFERS constant. Acked-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-05-28mesa: fix GLSL program objects with more than 16 samplers combinedMarek Olšák1-9/+18
The problem is the sampler units are allocated from the same pool for all shader stages, so if a vertex shader uses 12 samplers (0..11), the fragment shader samplers start at index 12, leaving only 4 sampler units for the fragment shader. The main cause is probably the fact that samplers (texture unit -> sampler unit mapping, etc.) are tracked globally for an entire program object. This commit adapts the GLSL linker and core Mesa such that the sampler units are assigned to sampler uniforms for each shader stage separately (if a sampler uniform is used in all shader stages, it may occupy a different sampler unit in each, and vice versa, an i-th sampler unit may refer to a different sampler uniform in each shader stage), and the sampler-specific variables are moved from gl_shader_program to gl_shader. This doesn't require any driver changes, and it fixes piglit/max-samplers for gallium and classic swrast. It also works with any number of shader stages. v2: - converted tabs to spaces - added an assertion to _mesa_get_sampler_uniform_value Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-12-28glsl: Add a note about a surprising feature of gl_uniform_storage->type.Eric Anholt1-0/+4
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-20glsl: Propagate uniform block information into gl_uniform_storage.Eric Anholt1-0/+34
Now we can actually return information on uniforms in uniform blocks in the new queries. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-09mesa,glsl,mapi: Put extern "C" { ... } where appropriate.José Fonseca1-3/+6
Probably a several places missing, but enough to cover all headers (in)directly included by uniform_query.cpp, and fix the MSVC build.
2011-11-08glsl: remove trailing comma to silence warningBrian Paul1-1/+1
2011-11-07glsl: Add new structures for tracking uniforms in linked shadersIan Romanick1-0/+125
v2: Update some comments based on feedback from Eric Anholt. v3: Remove gl_uniform_storage::dirty field. Make gl_uniform_storage::initialized be bool, and make gl_uniform_storage::sampler be uint8_t. v4: Include stdbool.h after Tom Stellard noticed a build failure that was introduced by the changes in v2. Oops. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>