diff options
author | marha <marha@users.sourceforge.net> | 2014-01-10 23:39:19 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-10 23:39:19 +0100 |
commit | aaeb8bf497c82efabc4f9b27c319042c0e72d816 (patch) | |
tree | 0df2c4a5b027a07dd1e3bf8707c72f25fe71b4f1 /mesalib/src/glsl/link_atomics.cpp | |
parent | be6e384aa4b97dc81b88ab5b04328c161828e760 (diff) | |
download | vcxsrv-aaeb8bf497c82efabc4f9b27c319042c0e72d816.tar.gz vcxsrv-aaeb8bf497c82efabc4f9b27c319042c0e72d816.tar.bz2 vcxsrv-aaeb8bf497c82efabc4f9b27c319042c0e72d816.zip |
randrproto libfontenc mesa xserver git update 10 Jan 2014
xserver commit a92c6406e7f6c0b74fb1cb9361ad904facc0f722
libfontenc commit 0037a42107b952c9d903719615747e760e4e7247
randrproto commit 1755cbe0f501a86afe515f92bb24e417a1866092
mesa commit 532b1fecd93fd30d3b1b101b55fd2c6e074088ad
Diffstat (limited to 'mesalib/src/glsl/link_atomics.cpp')
-rw-r--r-- | mesalib/src/glsl/link_atomics.cpp | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/mesalib/src/glsl/link_atomics.cpp b/mesalib/src/glsl/link_atomics.cpp index 603329c50..db9c53965 100644 --- a/mesalib/src/glsl/link_atomics.cpp +++ b/mesalib/src/glsl/link_atomics.cpp @@ -64,7 +64,7 @@ namespace { active_atomic_counter *counters; unsigned num_counters; - unsigned stage_references[MESA_SHADER_TYPES]; + unsigned stage_references[MESA_SHADER_STAGES]; unsigned size; }; @@ -96,7 +96,7 @@ namespace { *num_buffers = 0; - for (unsigned i = 0; i < MESA_SHADER_TYPES; ++i) { + for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) { struct gl_shader *sh = prog->_LinkedShaders[i]; if (sh == NULL) continue; @@ -199,7 +199,7 @@ link_assign_atomic_counter_resources(struct gl_context *ctx, } /* Assign stage-specific fields. */ - for (unsigned j = 0; j < MESA_SHADER_TYPES; ++j) + for (unsigned j = 0; j < MESA_SHADER_STAGES; ++j) mab.StageReferences[j] = (ab.stage_references[j] ? GL_TRUE : GL_FALSE); @@ -214,23 +214,11 @@ void link_check_atomic_counter_resources(struct gl_context *ctx, struct gl_shader_program *prog) { - const unsigned max_atomic_counters[] = { - ctx->Const.VertexProgram.MaxAtomicCounters, - ctx->Const.GeometryProgram.MaxAtomicCounters, - ctx->Const.FragmentProgram.MaxAtomicCounters - }; - STATIC_ASSERT(Elements(max_atomic_counters) == MESA_SHADER_TYPES); - const unsigned max_atomic_buffers[] = { - ctx->Const.VertexProgram.MaxAtomicBuffers, - ctx->Const.GeometryProgram.MaxAtomicBuffers, - ctx->Const.FragmentProgram.MaxAtomicBuffers - }; - STATIC_ASSERT(Elements(max_atomic_buffers) == MESA_SHADER_TYPES); unsigned num_buffers; active_atomic_buffer *const abs = find_active_atomic_counters(ctx, prog, &num_buffers); - unsigned atomic_counters[MESA_SHADER_TYPES] = {}; - unsigned atomic_buffers[MESA_SHADER_TYPES] = {}; + unsigned atomic_counters[MESA_SHADER_STAGES] = {}; + unsigned atomic_buffers[MESA_SHADER_STAGES] = {}; unsigned total_atomic_counters = 0; unsigned total_atomic_buffers = 0; @@ -243,7 +231,7 @@ link_check_atomic_counter_resources(struct gl_context *ctx, if (abs[i].size == 0) continue; - for (unsigned j = 0; j < MESA_SHADER_TYPES; ++j) { + for (unsigned j = 0; j < MESA_SHADER_STAGES; ++j) { const unsigned n = abs[i].stage_references[j]; if (n) { @@ -256,14 +244,14 @@ link_check_atomic_counter_resources(struct gl_context *ctx, } /* Check that they are within the supported limits. */ - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - if (atomic_counters[i] > max_atomic_counters[i]) + for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { + if (atomic_counters[i] > ctx->Const.Program[i].MaxAtomicCounters) linker_error(prog, "Too many %s shader atomic counters", - _mesa_shader_type_to_string(i)); + _mesa_shader_stage_to_string(i)); - if (atomic_buffers[i] > max_atomic_buffers[i]) + if (atomic_buffers[i] > ctx->Const.Program[i].MaxAtomicBuffers) linker_error(prog, "Too many %s shader atomic counter buffers", - _mesa_shader_type_to_string(i)); + _mesa_shader_stage_to_string(i)); } if (total_atomic_counters > ctx->Const.MaxCombinedAtomicCounters) |