Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
|
|
Now we can actually return information on uniforms in uniform blocks
in the new queries.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
Probably a several places missing, but enough to cover all headers
(in)directly included by uniform_query.cpp, and fix the MSVC build.
|
|
|
|
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>
|