diff options
author | Timothy Arceri <[email protected]> | 2016-03-10 15:00:00 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-03-31 12:51:52 +1100 |
commit | cf039a309a36ba537b45f3bfe7e5a154c87d51ad (patch) | |
tree | 4e4887d474effeefd0b275074e18018a09f46d0e /src/compiler | |
parent | 258299d87ad932246ae8b1aa979b4a1a398db155 (diff) |
mesa: split transform feedback buffer into its own struct
This will be used in a following patch to implement interface
query support for TRANSFORM_FEEDBACK_BUFFER.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index cb0c8baf8aa..5645f783f3f 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -722,7 +722,7 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog, /* Handle gl_SkipComponents. */ if (this->skip_components) { - info->BufferStride[buffer] += this->skip_components; + info->Buffers[buffer].Stride += this->skip_components; return true; } @@ -734,7 +734,7 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog, * and the buffer mode is INTERLEAVED_ATTRIBS_EXT. */ if (prog->TransformFeedback.BufferMode == GL_INTERLEAVED_ATTRIBS && - info->BufferStride[buffer] + this->num_components() > + info->Buffers[buffer].Stride + this->num_components() > ctx->Const.MaxTransformFeedbackInterleavedComponents) { linker_error(prog, "The MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS " "limit has been exceeded."); @@ -752,10 +752,11 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog, info->Outputs[info->NumOutputs].NumComponents = output_size; info->Outputs[info->NumOutputs].StreamId = stream_id; info->Outputs[info->NumOutputs].OutputBuffer = buffer; - info->Outputs[info->NumOutputs].DstOffset = info->BufferStride[buffer]; + info->Outputs[info->NumOutputs].DstOffset = + info->Buffers[buffer].Stride; ++info->NumOutputs; - info->BufferStride[buffer] += output_size; - info->BufferStream[buffer] = this->stream_id; + info->Buffers[buffer].Stride += output_size; + info->Buffers[buffer].Stream = this->stream_id; num_components -= output_size; location++; location_frac = 0; |