Commit 86a2aac
* Adds Metal Support to ociodisplay and enables running GPU tests with Metal backend (#1538)
* * Adds Metal Shading Language (MSL) Generation support
Signed-off-by: Morteza Mostajabodaveh <[email protected]>
Co-authored-by: Ingthor Hjalmarsson <[email protected]>
Signed-off-by: Morteza Mostajab <[email protected]>
* * Fixes warnings triggered due to unused variables.
Signed-off-by: Morteza Mostajabodaveh <[email protected]>
Signed-off-by: Morteza Mostajab <[email protected]>
* * Fixes compilation error on Mac and Windows:
- vector of const objects causing compiler errors on windows.
- Wrong string was used for Metal language python binding.
Signed-off-by: Morteza Mostajab <[email protected]>
* * Removes class wrapping interface from OpenColorIO interface and move it to implementation
* Adding more tests for metal code path
* Proper generated Metal code indentation
* Fixes a few coding style inconsistencies and unneeded include files
Signed-off-by: Morteza Mostajab <[email protected]>
* Remove the unneeded empty line to reset OpenColorIO.h to what it was before the metal change.
Signed-off-by: Morteza Mostajab <[email protected]>
* * switching from c-like getFunctionParameters function to c++-like one since it is not in the opencolorio interface anymore.
Signed-off-by: Morteza Mostajab <[email protected]>
* Missing include causing compiler errors on windows
Signed-off-by: Morteza Mostajab <[email protected]>
* * Fixes and improvements follow up to change that was trying to move metal related code in implementation, and hide them from OCIO interface.
Signed-off-by: Morteza Mostajab <[email protected]>
* - remove unused variables.
Signed-off-by: Morteza Mostajab <[email protected]>
* * Adds support for uniform parameters and proper handling of them in metal code.
* Adds two new tests for uniforms and helper functions.
Signed-off-by: Morteza Mostajab <[email protected]>
* * making declaration parsing more C++-like. Functions like sscanf are problematic when it comes to multiple platform support and may not be safe
Signed-off-by: Morteza Mostajab <[email protected]>
* * Switching from clf/lut1d_half_domain_raw_half_set.clf to clf/lut1d_long.clf. Due to decimal number outputting difference between different platforms, some tests were failing.
Signed-off-by: Morteza Mostajab <[email protected]>
* * Moving Metal only functionalities to MetalClassWrappingInterface
* remove unnecessary functions and data types
* code clean up and quality improvement
Signed-off-by: Morteza Mostajab <[email protected]>
* * Adds support for uniforms that are array
* Removing getTextureKeyword() and getTextureDeclaration() as they are not needed.
* code clean up and quality improvement
Signed-off-by: Morteza Mostajab <[email protected]>
* Remove unnecessary changes to GpuShaderUtils_tests.cpp
Signed-off-by: Morteza Mostajab <[email protected]>
* * Removed unnecessary included files
Signed-off-by: Morteza Mostajab <[email protected]>
* Removing unnecessary include
Signed-off-by: Morteza Mostajab <[email protected]>
* * Apply style improvement suggestions
Signed-off-by: Morteza Mostajab <[email protected]>
* * changed from msl_metal to msl_2 so it matches with `GpuLanguageFromString` function.
Signed-off-by: Morteza Mostajab <[email protected]>
* Move MetalShaderClassWrappingInterface to a separate file and generalise it
Signed-off-by: Morteza Mostajab <[email protected]>
* header files inlcudes clean up
Signed-off-by: Morteza Mostajab <[email protected]>
* Still the else path is needed in case we set language from MSL2 to something else.
Signed-off-by: Morteza Mostajab <[email protected]>
* [minor] Showing the GpuShaderClassWrapper.h also in the vc15 aftereffect project.
Signed-off-by: Morteza Mostajab <[email protected]>
* Run ClassWrapper function for all backends. It only produces code in metal shading language code generation case.
operator= for GpuShaderClassWrapper
Signed-off-by: Morteza Mostajab <[email protected]>
* use factory pattern instead of updateClassWrappingInterface
Signed-off-by: Morteza Mostajab <[email protected]>
* Replace assignment operator with clone function that is more explicit.
Signed-off-by: Morteza Mostajab <[email protected]>
* use Assignment operator instead of setting members in clone member function
Signed-off-by: Morteza Mostajab <[email protected]>
* add include guards.
Signed-off-by: Morteza Mostajab <[email protected]>
* make output of MetalShaderClassWrapper::operator= non-const
Signed-off-by: Morteza Mostajab <[email protected]>
* Update default branch name (#1532)
Signed-off-by: Michael Dolan <[email protected]>
Co-authored-by: Patrick Hodoul <[email protected]>
Signed-off-by: Morteza Mostajab <[email protected]>
* Adsk Contrib - Default to C++14 and remove OIIO from ocioperf (#1516)
* Adsk Contrib - Default to C++14 and remove OIIO from ocioperf
Signed-off-by: Patrick Hodoul <[email protected]>
* Fix cmake breaks
Signed-off-by: Patrick Hodoul <[email protected]>
* Fix bit-depths
Signed-off-by: Patrick Hodoul <[email protected]>
* Fix Linux build break
Signed-off-by: Patrick Hodoul <[email protected]>
* Improve the image generation
Signed-off-by: Patrick Hodoul <[email protected]>
* Improve the image generation
Signed-off-by: Patrick Hodoul <[email protected]>
Signed-off-by: Morteza Mostajab <[email protected]>
* Add metal rendering support to ociodisplay
Signed-off-by: Morteza Mostajab <[email protected]>
* Adds support for metal only input texture
Signed-off-by: Morteza Mostajab <[email protected]>
* Returning correct value for maximum texture width
Signed-off-by: Morteza Mostajab <[email protected]>
* Add GPU rendering tests for metal renderer
Fixes incorrect shader generation code for arrays in uniform buffer
Adds support for vector comparison in Metal
Signed-off-by: Morteza Mostajab <[email protected]>
* Fixes failing test_cpu_exec test
Fixes compilation error on Linux, older clang compiler
Makes the app working on x64 Macs
Signed-off-by: Morteza Mostajab <[email protected]>
* Add support for test that apply color correction multiple times with different setups
replaces asserts with exception
Disables fast math to get more accurate results
Signed-off-by: Morteza Mostajab <[email protected]>
* Matching the uniform buffer size elements for array of ints and float to fix two gpu tests
Signed-off-by: Morteza Mostajab <[email protected]>
* enables -gpuinfo to print shader
Signed-off-by: Morteza Mostajab <[email protected]>
* Revert "Matching the uniform buffer size elements for array of ints and float to fix two gpu tests"
This reverts commit c1695e2.
Signed-off-by: Morteza Mostajab <[email protected]>
* Enables uniform data binding for metal without touching OCIO interface
Signed-off-by: Morteza Mostajab <[email protected]>
* set dummy buffers for the vectors that are empty.
Signed-off-by: Morteza Mostajab <[email protected]>
* Update metal test to reflect latest changes in metal shader generator
Signed-off-by: Morteza Mostajab <[email protected]>
* Improving coding style
Adds metal gpu unit tests to the one executing
Signed-off-by: Morteza Mostajab <[email protected]>
* Updating the test so it reflects latest code changes.
Signed-off-by: Morteza Mostajab <[email protected]>
* sets the opengl state even when no valid ocio config is loaded.
Signed-off-by: Morteza Mostajab <[email protected]>
* Handles metal resources lifecycles correctly. Fixes the crash on transform change.
Signed-off-by: Morteza Mostajab <[email protected]>
* Applying improvements to code and minor fixes
Signed-off-by: Morteza Mostajab <[email protected]>
* Disable testing NaN and Infinity on Apple Silicon that causes test failures and precision errors
Signed-off-by: Morteza Mostajab <[email protected]>
* make the condition for disabling NaN and INFs more accurate.
Signed-off-by: Morteza Mostajab <[email protected]>
* Improving code quality
Fixing possible texture mem leaks
Signed-off-by: Morteza Mostajab <[email protected]>
Co-authored-by: Ingthor Hjalmarsson <[email protected]>
Co-authored-by: Patrick Hodoul <[email protected]>
Co-authored-by: Michael Dolan <[email protected]>
Signed-off-by: Patrick Hodoul <[email protected]>
* Fix Linux warning
Signed-off-by: Patrick Hodoul <[email protected]>
Co-authored-by: Morteza Mostajab <[email protected]>
Co-authored-by: Ingthor Hjalmarsson <[email protected]>
Co-authored-by: Michael Dolan <[email protected]>
1 parent ffba80b commit 86a2aac
File tree
21 files changed
+1695
-55
lines changed- src
- OpenColorIO
- ops/gradingprimary
- apps/ociodisplay
- libutils/oglapphelpers
- tests
- cpu
- gpu
21 files changed
+1695
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
44 | 54 | | |
45 | 55 | | |
46 | | - | |
47 | | - | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | | - | |
| 60 | + | |
51 | 61 | | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
55 | 78 | | |
56 | 79 | | |
57 | 80 | | |
| |||
79 | 102 | | |
80 | 103 | | |
81 | 104 | | |
82 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
83 | 110 | | |
84 | 111 | | |
85 | 112 | | |
| |||
92 | 119 | | |
93 | 120 | | |
94 | 121 | | |
95 | | - | |
| 122 | + | |
96 | 123 | | |
97 | 124 | | |
98 | 125 | | |
99 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
100 | 129 | | |
101 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
102 | 134 | | |
103 | 135 | | |
104 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
70 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
438 | 448 | | |
439 | 449 | | |
440 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
414 | 419 | | |
415 | 420 | | |
416 | 421 | | |
417 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
418 | 428 | | |
419 | 429 | | |
420 | 430 | | |
| |||
613 | 623 | | |
614 | 624 | | |
615 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
616 | 632 | | |
617 | 633 | | |
618 | 634 | | |
| |||
624 | 640 | | |
625 | 641 | | |
626 | 642 | | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
627 | 646 | | |
628 | 647 | | |
629 | 648 | | |
| |||
640 | 659 | | |
641 | 660 | | |
642 | 661 | | |
643 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
644 | 672 | | |
645 | 673 | | |
646 | 674 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
18 | 34 | | |
19 | 35 | | |
20 | 36 | | |
| |||
82 | 98 | | |
83 | 99 | | |
84 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
85 | 111 | | |
86 | 112 | | |
87 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| |||
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
463 | | - | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments