osl.diff 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake external_osl/src/cmake/flexbison.cmake
  2. --- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
  3. +++ external_osl/src/cmake/flexbison.cmake 2018-08-23 15:42:27 -0600
  4. @@ -77,7 +77,7 @@
  5. DEPENDS ${${compiler_headers}}
  6. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
  7. ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
  8. - COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
  9. + COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
  10. MAIN_DEPENDENCY ${flexsrc}
  11. DEPENDS ${${compiler_headers}}
  12. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
  13. diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej external_osl/src/cmake/flexbison.cmake.rej
  14. --- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej 1969-12-31 17:00:00 -0700
  15. +++ external_osl/src/cmake/flexbison.cmake.rej 2018-08-24 17:42:11 -0600
  16. @@ -0,0 +1,11 @@
  17. +--- src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
  18. ++++ src/cmake/flexbison.cmake 2018-08-24 10:24:03 -0600
  19. +@@ -77,7 +77,7 @@
  20. + DEPENDS ${${compiler_headers}}
  21. + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
  22. + ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
  23. +- COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
  24. ++ COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
  25. + MAIN_DEPENDENCY ${flexsrc}
  26. + DEPENDS ${${compiler_headers}}
  27. + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
  28. diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h
  29. --- OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h 2018-05-01 16:39:02 -0600
  30. +++ external_osl/src/include/OSL/llvm_util.h 2018-08-25 14:05:00 -0600
  31. @@ -33,6 +33,8 @@
  32. #include <vector>
  33. +#define OSL_HAS_BLENDER_CLEANUP_FIX
  34. +
  35. #ifdef LLVM_NAMESPACE
  36. namespace llvm = LLVM_NAMESPACE;
  37. #endif
  38. @@ -487,6 +489,7 @@
  39. std::string func_name (llvm::Function *f);
  40. static size_t total_jit_memory_held ();
  41. + static void Cleanup ();
  42. private:
  43. class MemoryManager;
  44. diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h external_osl/src/include/OSL/oslnoise.h
  45. --- OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h 2018-05-01 16:39:02 -0600
  46. +++ external_osl/src/include/OSL/oslnoise.h 2018-08-24 17:42:11 -0600
  47. @@ -762,7 +762,7 @@
  48. // packed into a float4. We assume T is float and VECTYPE is float4,
  49. // but it also works if T is Dual2<float> and VECTYPE is Dual2<float4>.
  50. template<typename T, typename VECTYPE>
  51. -OIIO_FORCEINLINE T bilerp (VECTYPE abcd, T u, T v) {
  52. +OIIO_FORCEINLINE T bilerp (VECTYPE& abcd, T u, T v) {
  53. VECTYPE xx = OIIO::lerp (abcd, OIIO::simd::shuffle<1,1,3,3>(abcd), u);
  54. return OIIO::simd::extract<0>(OIIO::lerp (xx,OIIO::simd::shuffle<2>(xx), v));
  55. }
  56. diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp
  57. --- OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp 2018-05-01 16:39:02 -0600
  58. +++ external_osl/src/liboslexec/llvm_util.cpp 2018-08-25 14:04:27 -0600
  59. @@ -140,7 +140,10 @@
  60. };
  61. -
  62. +void LLVM_Util::Cleanup ()
  63. +{
  64. + jitmm_hold.clear();
  65. +}
  66. size_t
  67. LLVM_Util::total_jit_memory_held ()