Skip to content
Snippets Groups Projects
  1. May 07, 2020
  2. Apr 07, 2020
  3. Mar 26, 2020
  4. Mar 25, 2020
    • Nat Goodspeed's avatar
      DRTVWR-476: Fix glVertexAttrib{IPointer,PointerARB}() OpenGL calls. · 30fa2496
      Nat Goodspeed authored
      VS 2017 complains about the same thing that clang does: casting S32 to GLvoid*
      can't possibly produce a valid pointer value because S32 can't fit a whole
      64-bit pointer. To appease it, not only must we use reinterpret_cast, but we
      must first cast S32 to intptr_t and then reinterpret_cast THAT.
      30fa2496
    • Nat Goodspeed's avatar
      DRTVWR-494: Defend LLInstanceTracker against multi-thread usage. · 9d5b8976
      Nat Goodspeed authored
      The previous implementation went to some effort to crash if anyone attempted
      to create or destroy an LLInstanceTracker subclass instance during traversal.
      That restriction is manageable within a single thread, but becomes unworkable
      if it's possible that a given subclass might be used on more than one thread.
      
      Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
      also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
      and instance_snapshot(), the only means of iterating over LLInstanceTracker
      instances. (These are intended to resemble functions, but in fact the current
      implementation simply presents the classes.) Iterating over a captured
      snapshot defends against container modifications during traversal. The term
      'snapshot' reminds the coder that a new instance created during traversal will
      not be considered. To defend against instance deletion during traversal, a
      snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
      fly any that have expired.
      
      Dereferencing instance_snapshot::iterator gets you a reference rather than a
      pointer. Because some use cases want to delete all existing instances, add an
      instance_snapshot::deleteAll() method that extracts the pointer. Those cases
      used to require explicitly copying instance pointers into a separate
      container; instance_snapshot() now takes care of that. It remains the caller's
      responsibility to ensure that all instances of that LLInstanceTracker subclass
      were allocated on the heap.
      
      Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
      nullptr if that instance had been destroyed -- with new getWeak() method
      returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr.
      
      Adjust tests accordingly.
      
      Use of std::weak_ptr to detect expired instances requires engaging
      std::shared_ptr in the constructor. We now store shared_ptrs in the static
      containers (std::map for keyed, std::set for unkeyed).
      
      Make LLInstanceTrackerBase a template parameterized on the type of the static
      data it manages. For that reason, hoist static data class declarations out of
      the class definitions to an LLInstanceTrackerStuff namespace.
      
      Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
      decrementDepth() and getDepth(), since they were used only to forbid creation
      and destruction during traversal.
      
      Add a std::mutex to static data. Introduce an internal LockStatic class that
      locks the mutex while providing a pointer to static data, making that the only
      way to access the static data.
      
      The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
      expect ~LLInstanceTracker() to throw an exception in test programs.
      That affects LLTrace::StatBase as well as LLInstanceTracker itself.
      
      Adapt consumers to the new LLInstanceTracker API.
      9d5b8976
  5. Mar 24, 2020
  6. Nov 22, 2019
  7. Nov 15, 2019
  8. Nov 12, 2019
  9. Oct 16, 2019
  10. Aug 30, 2019
  11. Aug 13, 2019
  12. Aug 12, 2019
    • Graham Linden's avatar
      Fix line-endings on new inline file. · 6fbb35b7
      Graham Linden authored
      6fbb35b7
    • Nat Goodspeed's avatar
      DRTVWR-493: Streamline LLParamSingleton, LLLockedSingleton. · 98be6e14
      Nat Goodspeed authored
      Simplify LLSingleton::SingletonLifetimeManager to SingletonInitializer: that
      struct has not been responsible for deletion ever since LLSingletonBase
      acquired dependency-ordered deleteAll().
      
      Move SingletonData::mInitState changes from SingletonLifetimeManager to
      constructSingleton() method. Similarly, constructSingleton() now sets
      SingletonData::mInstance instead of making its caller store the pointer.
      
      Add variadic arguments to LLSingleton::constructSingleton() so we can reuse it
      for LLParamSingleton.
      
      Add finishInitializing() method to encapsulate logic reused for
      getInstance()'s INITIALIZING and DELETED cases.
      
      Make LLParamSingleton a subclass of LLSingleton, just as LLLockedSingleton is
      a subclass of LLParamSingleton. Make LLParamSingleton a friend of LLSingleton,
      so it can access private members of LLSingleton without also granting access
      to any DERIVED_CLASS subclass. This eliminates the need for protected
      getInitState().
      
      LLParamSingleton::initParamSingleton() reuses LLSingleton::constructSingleton()
      and finishInitializing(). Its getInstance() method completely replaces
      LLSingleton::getInstance(): in most EInitStates, LLParamSingleton::getInstance()
      is an error.
      
      Use a std::mutex to serialize calls to LLParamSingleton::initParamSingleton()
      and getInstance(). While LLSingleton::getInstance() relies on the "initialized
      exactly once" guarantee for block-scope static declarations, LLParamSingleton
      cannot rely on the same mechanism.
      
      LLLockedSingleton is now a very succinct subclass of LLParamSingleton -- they
      have very similar functionality.
      
      Giving the LLSINGLETON() macro variadic arguments eliminates the need for a
      separate LLPARAMSINGLETON() macro, while continuing to support existing usage.
      98be6e14
  13. Aug 11, 2019
  14. Aug 10, 2019
  15. Aug 05, 2019
  16. Jul 29, 2019
  17. Jul 25, 2019
  18. Jul 23, 2019
    • Graham Linden's avatar
      SL-11621 · b507d635
      Graham Linden authored
      Remove all references to unused shader var global_gamma.
      
      Remove many unused decls for gamma from shaders.
      
      Make post-deferred gamma correction use display_gamma.
      
      Make setting display_gamma use the correct RenderDeferredDisplayGamma setting.
      b507d635
  19. Jul 22, 2019
    • Graham Linden's avatar
      Remove binding and use of glIsShader for now (only useful for avoiding... · 230c9b68
      Graham Linden authored
      Remove binding and use of glIsShader for now (only useful for avoiding warnings about deleting shader objects re-used across programs).
      230c9b68
    • Graham Linden's avatar
      SL-10761 · b3466243
      Graham Linden authored
      Make vograss objects set their face vert/index counts to 0 when setting
      the number of blades to 0 to disable rendering so we don't allocate space
      and then skip setting it up with actual index data in getGeometry.
      b3466243
  20. Jul 16, 2019
  21. Jul 15, 2019
    • Graham Linden's avatar
      SL-10761 · ddf70361
      Graham Linden authored
      Add code to force a usage hint when VBOs are disabled and make useBVOs reflect that as well.
      ddf70361
  22. Jul 12, 2019
    • Graham Linden's avatar
      SL-11109 · 11331604
      Graham Linden authored
      Make shadowAlphaMask shader ignore vertex alpha before discards iff we're a fullbright object.
      
      Keep llappearance from stuffing dangling pointers into the alpha cache (crash iff you're using nSight debugging and disable readbacks).
      11331604
  23. Jun 28, 2019
    • Graham Linden's avatar
      SL-11514 · b659e559
      Graham Linden authored
      Convince Geenzo code to get a little DeMorgan in it.
      
      Trophy Unlocked: make all alpha textures partcipate in picking.
      b659e559
  24. Jun 03, 2019
    • Graham Linden's avatar
      SL-10966 · 16d32799
      Graham Linden authored
      Fix light atten and transmittance calcs breaking ambient color contrib to fog.
      
      Needs to be tested on DRTSIM-415 or better to get legacy viewer settings that match EEP.
      16d32799
  25. May 21, 2019
    • Graham Linden's avatar
      SL-11238 · e9dbee00
      Graham Linden authored
      Fix ambient light inputs to the renderer.
      
      Fix 3rd sky shader w/ mistaken density mod conversion.
      
      Make ambient clamp apply to all modes.
      
      Tune ALM ambient clamp to match non-ALM.
      e9dbee00
  26. May 09, 2019
    • Graham Linden's avatar
      SL-11056 · fe734ddf
      Graham Linden authored
      Make OpenGL 3.3 cards not false alarm on version 140 shader reqs.
      Makes deferred rendering work on low-end GPUs more often.
      fe734ddf
  27. May 07, 2019
  28. May 02, 2019
  29. Apr 10, 2019
  30. Apr 02, 2019
  31. Apr 01, 2019
Loading