Guest User

Untitled

a guest
May 26th, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. From 401892af1188073dc3107832b8e2e908c5c0e79e Mon Sep 17 00:00:00 2001
  2. From: Neil Roberts <neil@linux.intel.com>
  3. Date: Thu, 27 May 2010 14:51:44 +0100
  4. Subject: [PATCH] cogl: Record new enabled arrays in _cogl_disable_other_texcoord_arrays
  5.  
  6. When _cogl_disable_other_texcoord_arrays is called it disables the
  7. neccessary texcoord arrays and then removes the bits for the disabled
  8. arrays in ctx->texcoord_arrays_enabled. However none of the places
  9. that call the function then set any bits in ctx->texcoord_arrays_enabled
  10. so the arrays would never get marked and they would never get disabled
  11. again.
  12.  
  13. This patch just changes it so that _cogl_disable_other_texcoord_arrays
  14. also sets the corresponding bits in ctx->texcoord_arrays_enabled.
  15. ---
  16. clutter/cogl/cogl/cogl-internal.h | 3 ++-
  17. clutter/cogl/cogl/cogl.c | 1 +
  18. 2 files changed, 3 insertions(+), 1 deletions(-)
  19.  
  20. diff --git a/clutter/cogl/cogl/cogl-internal.h b/clutter/cogl/cogl/cogl-internal.h
  21. index c650960..c4169be 100644
  22. --- a/clutter/cogl/cogl/cogl-internal.h
  23. +++ b/clutter/cogl/cogl/cogl-internal.h
  24. @@ -134,7 +134,8 @@ void
  25. _cogl_flush_face_winding (void);
  26.  
  27. /* Disables the texcoord arrays that don't have a corresponding bit
  28. - set in the mask */
  29. + set in the mask and sets ctx->texcoord_arrays_enabled to mask. Note
  30. + that it doesn't enable any extra texcoord arrays */
  31. void
  32. _cogl_disable_other_texcoord_arrays (const CoglBitmask *mask);
  33.  
  34. diff --git a/clutter/cogl/cogl/cogl.c b/clutter/cogl/cogl/cogl.c
  35. index eab2d12..41dfa53 100644
  36. --- a/clutter/cogl/cogl/cogl.c
  37. +++ b/clutter/cogl/cogl/cogl.c
  38. @@ -790,6 +790,7 @@ _cogl_disable_other_texcoord_arrays (const CoglBitmask *mask)
  39. /* Update the mask of arrays that are enabled */
  40. _cogl_bitmask_clear_bits (&ctx->texcoord_arrays_enabled,
  41. &ctx->texcoord_arrays_to_disable);
  42. + _cogl_bitmask_set_bits (&ctx->texcoord_arrays_enabled, mask);
  43. }
  44.  
  45. void
  46. --
  47. 1.7.1.87.g94e70
Add Comment
Please, Sign In to add comment