소스 검색

mesa: Fix extra memset in store_tfeedback_info()

Commit 9d36c96d6e (mesa: Fix
glGetTransformFeedbackVarying()) accidentally added an extra memset()
call to the store_tfeedback_info() function, causing
prog->LinkedTransformFeedback.NumBuffers to be erased.

This patch removes the extra memset and rearranges the other
operations in store_tfeedback_info() to be in the correct order.

Fixes piglit tests "EXT_transform_feedback/api-errors *unbound*"

Reviewed-by: Eric Anholt <eric@anholt.net>
tags/mesa-8.0-rc1
Paul Berry 13 년 전
부모
커밋
1be0fd8c86
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3
    4
      src/glsl/linker.cpp

+ 3
- 4
src/glsl/linker.cpp 파일 보기

@@ -1884,16 +1884,15 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
unsigned total_tfeedback_components = 0;
bool separate_attribs_mode =
prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS;
memset(&prog->LinkedTransformFeedback, 0,
sizeof(prog->LinkedTransformFeedback));
prog->LinkedTransformFeedback.NumBuffers =
separate_attribs_mode ? num_tfeedback_decls : 1;

ralloc_free(prog->LinkedTransformFeedback.Varyings);

memset(&prog->LinkedTransformFeedback, 0,
sizeof(prog->LinkedTransformFeedback));

prog->LinkedTransformFeedback.NumBuffers =
separate_attribs_mode ? num_tfeedback_decls : 1;

prog->LinkedTransformFeedback.Varyings =
rzalloc_array(prog->LinkedTransformFeedback.Varyings,
struct gl_transform_feedback_varying_info,

Loading…
취소
저장