|
1 | 1 | /*
|
2 | 2 | ***********************************************************************************************************************
|
3 | 3 | *
|
4 |
| - * Copyright (c) 2014-2019 Advanced Micro Devices, Inc. All Rights Reserved. |
| 4 | + * Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved. |
5 | 5 | *
|
6 | 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 | 7 | * of this software and associated documentation files (the "Software"), to deal
|
@@ -371,72 +371,72 @@ enum class ChNumFormat : uint32
|
371 | 371 | /// bit, 10-bit mantissa, and 5-bit biased (15) exponent). There is no sign
|
372 | 372 | /// bit, and there is a shared 5-bit biased (15) exponent and a 9-bit mantissa
|
373 | 373 | /// for each channelShared exponent format.
|
374 |
| - Bc1_Unorm = 0x57, ///< [BC1](http://tinyurl.com/kejao56) compressed texture format. |
375 |
| - Bc1_Srgb = 0x58, ///< [BC1](http://tinyurl.com/kejao56) compressed texture format. |
376 |
| - Bc2_Unorm = 0x59, ///< [BC2](http://tinyurl.com/kxtubtj) compressed texture format. |
377 |
| - Bc2_Srgb = 0x5A, ///< [BC2](http://tinyurl.com/kxtubtj) compressed texture format. |
378 |
| - Bc3_Unorm = 0x5B, ///< [BC3](http://tinyurl.com/kwa65u3) compressed texture format. |
379 |
| - Bc3_Srgb = 0x5C, ///< [BC3](http://tinyurl.com/kwa65u3) compressed texture format. |
380 |
| - Bc4_Unorm = 0x5D, ///< [BC4](http://tinyurl.com/lvouv7q) compressed texture format. |
381 |
| - Bc4_Snorm = 0x5E, ///< [BC4](http://tinyurl.com/lvouv7q) compressed texture format. |
382 |
| - Bc5_Unorm = 0x5F, ///< [BC5](http://tinyurl.com/l59bu2s) compressed texture format. |
383 |
| - Bc5_Snorm = 0x60, ///< [BC5](http://tinyurl.com/l59bu2s) compressed texture format. |
384 |
| - Bc6_Ufloat = 0x61, ///< [BC6](http://tinyurl.com/nxxjhlq) unsigned compressed texture format. |
385 |
| - Bc6_Sfloat = 0x62, ///< [BC6](http://tinyurl.com/nxxjhlq) signed compressed texture format. |
386 |
| - Bc7_Unorm = 0x63, ///< [BC7](http://tinyurl.com/l6qhpgr) compressed texture format. |
387 |
| - Bc7_Srgb = 0x64, ///< [BC7](http://tinyurl.com/l6qhpgr) compressed texture format. |
388 |
| - Etc2X8Y8Z8_Unorm = 0x65, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
389 |
| - Etc2X8Y8Z8_Srgb = 0x66, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
390 |
| - Etc2X8Y8Z8W1_Unorm = 0x67, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
391 |
| - Etc2X8Y8Z8W1_Srgb = 0x68, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
392 |
| - Etc2X8Y8Z8W8_Unorm = 0x69, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
393 |
| - Etc2X8Y8Z8W8_Srgb = 0x6A, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
394 |
| - Etc2X11_Unorm = 0x6B, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
395 |
| - Etc2X11_Snorm = 0x6C, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
396 |
| - Etc2X11Y11_Unorm = 0x6D, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
397 |
| - Etc2X11Y11_Snorm = 0x6E, ///< _Untested._ [ETC Formats](http://tinyurl.com/qznv7od) |
398 |
| - AstcLdr4x4_Unorm = 0x6F, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
399 |
| - AstcLdr4x4_Srgb = 0x70, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
400 |
| - AstcLdr5x4_Unorm = 0x71, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
401 |
| - AstcLdr5x4_Srgb = 0x72, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
402 |
| - AstcLdr5x5_Unorm = 0x73, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
403 |
| - AstcLdr5x5_Srgb = 0x74, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
404 |
| - AstcLdr6x5_Unorm = 0x75, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
405 |
| - AstcLdr6x5_Srgb = 0x76, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
406 |
| - AstcLdr6x6_Unorm = 0x77, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
407 |
| - AstcLdr6x6_Srgb = 0x78, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
408 |
| - AstcLdr8x5_Unorm = 0x79, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
409 |
| - AstcLdr8x5_Srgb = 0x7A, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
410 |
| - AstcLdr8x6_Unorm = 0x7B, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
411 |
| - AstcLdr8x6_Srgb = 0x7C, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
412 |
| - AstcLdr8x8_Unorm = 0x7D, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
413 |
| - AstcLdr8x8_Srgb = 0x7E, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
414 |
| - AstcLdr10x5_Unorm = 0x7F, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
415 |
| - AstcLdr10x5_Srgb = 0x80, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
416 |
| - AstcLdr10x6_Unorm = 0x81, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
417 |
| - AstcLdr10x6_Srgb = 0x82, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
418 |
| - AstcLdr10x8_Unorm = 0x83, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
419 |
| - AstcLdr10x8_Srgb = 0x84, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
420 |
| - AstcLdr10x10_Unorm = 0x85, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
421 |
| - AstcLdr10x10_Srgb = 0x86, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
422 |
| - AstcLdr12x10_Unorm = 0x87, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
423 |
| - AstcLdr12x10_Srgb = 0x88, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
424 |
| - AstcLdr12x12_Unorm = 0x89, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
425 |
| - AstcLdr12x12_Srgb = 0x8A, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
426 |
| - AstcHdr4x4_Float = 0x8B, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
427 |
| - AstcHdr5x4_Float = 0x8C, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
428 |
| - AstcHdr5x5_Float = 0x8D, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
429 |
| - AstcHdr6x5_Float = 0x8E, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
430 |
| - AstcHdr6x6_Float = 0x8F, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
431 |
| - AstcHdr8x5_Float = 0x90, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
432 |
| - AstcHdr8x6_Float = 0x91, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
433 |
| - AstcHdr8x8_Float = 0x92, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
434 |
| - AstcHdr10x5_Float = 0x93, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
435 |
| - AstcHdr10x6_Float = 0x94, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
436 |
| - AstcHdr10x8_Float = 0x95, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
437 |
| - AstcHdr10x10_Float = 0x96, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
438 |
| - AstcHdr12x10_Float = 0x97, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
439 |
| - AstcHdr12x12_Float = 0x98, ///< _Untested._ [ASTC Formats](http://tinyurl.com/oysygeq) |
| 374 | + Bc1_Unorm = 0x57, |
| 375 | + Bc1_Srgb = 0x58, |
| 376 | + Bc2_Unorm = 0x59, |
| 377 | + Bc2_Srgb = 0x5A, |
| 378 | + Bc3_Unorm = 0x5B, |
| 379 | + Bc3_Srgb = 0x5C, |
| 380 | + Bc4_Unorm = 0x5D, |
| 381 | + Bc4_Snorm = 0x5E, |
| 382 | + Bc5_Unorm = 0x5F, |
| 383 | + Bc5_Snorm = 0x60, |
| 384 | + Bc6_Ufloat = 0x61, |
| 385 | + Bc6_Sfloat = 0x62, |
| 386 | + Bc7_Unorm = 0x63, |
| 387 | + Bc7_Srgb = 0x64, |
| 388 | + Etc2X8Y8Z8_Unorm = 0x65, |
| 389 | + Etc2X8Y8Z8_Srgb = 0x66, |
| 390 | + Etc2X8Y8Z8W1_Unorm = 0x67, |
| 391 | + Etc2X8Y8Z8W1_Srgb = 0x68, |
| 392 | + Etc2X8Y8Z8W8_Unorm = 0x69, |
| 393 | + Etc2X8Y8Z8W8_Srgb = 0x6A, |
| 394 | + Etc2X11_Unorm = 0x6B, |
| 395 | + Etc2X11_Snorm = 0x6C, |
| 396 | + Etc2X11Y11_Unorm = 0x6D, |
| 397 | + Etc2X11Y11_Snorm = 0x6E, |
| 398 | + AstcLdr4x4_Unorm = 0x6F, |
| 399 | + AstcLdr4x4_Srgb = 0x70, |
| 400 | + AstcLdr5x4_Unorm = 0x71, |
| 401 | + AstcLdr5x4_Srgb = 0x72, |
| 402 | + AstcLdr5x5_Unorm = 0x73, |
| 403 | + AstcLdr5x5_Srgb = 0x74, |
| 404 | + AstcLdr6x5_Unorm = 0x75, |
| 405 | + AstcLdr6x5_Srgb = 0x76, |
| 406 | + AstcLdr6x6_Unorm = 0x77, |
| 407 | + AstcLdr6x6_Srgb = 0x78, |
| 408 | + AstcLdr8x5_Unorm = 0x79, |
| 409 | + AstcLdr8x5_Srgb = 0x7A, |
| 410 | + AstcLdr8x6_Unorm = 0x7B, |
| 411 | + AstcLdr8x6_Srgb = 0x7C, |
| 412 | + AstcLdr8x8_Unorm = 0x7D, |
| 413 | + AstcLdr8x8_Srgb = 0x7E, |
| 414 | + AstcLdr10x5_Unorm = 0x7F, |
| 415 | + AstcLdr10x5_Srgb = 0x80, |
| 416 | + AstcLdr10x6_Unorm = 0x81, |
| 417 | + AstcLdr10x6_Srgb = 0x82, |
| 418 | + AstcLdr10x8_Unorm = 0x83, |
| 419 | + AstcLdr10x8_Srgb = 0x84, |
| 420 | + AstcLdr10x10_Unorm = 0x85, |
| 421 | + AstcLdr10x10_Srgb = 0x86, |
| 422 | + AstcLdr12x10_Unorm = 0x87, |
| 423 | + AstcLdr12x10_Srgb = 0x88, |
| 424 | + AstcLdr12x12_Unorm = 0x89, |
| 425 | + AstcLdr12x12_Srgb = 0x8A, |
| 426 | + AstcHdr4x4_Float = 0x8B, |
| 427 | + AstcHdr5x4_Float = 0x8C, |
| 428 | + AstcHdr5x5_Float = 0x8D, |
| 429 | + AstcHdr6x5_Float = 0x8E, |
| 430 | + AstcHdr6x6_Float = 0x8F, |
| 431 | + AstcHdr8x5_Float = 0x90, |
| 432 | + AstcHdr8x6_Float = 0x91, |
| 433 | + AstcHdr8x8_Float = 0x92, |
| 434 | + AstcHdr10x5_Float = 0x93, |
| 435 | + AstcHdr10x6_Float = 0x94, |
| 436 | + AstcHdr10x8_Float = 0x95, |
| 437 | + AstcHdr10x10_Float = 0x96, |
| 438 | + AstcHdr12x10_Float = 0x97, |
| 439 | + AstcHdr12x12_Float = 0x98, |
440 | 440 | X8Y8_Z8Y8_Unorm = 0x99, ///< _Untested._
|
441 | 441 | X8Y8_Z8Y8_Uscaled = 0x9A, ///< _Untested._
|
442 | 442 | Y8X8_Y8Z8_Unorm = 0x9B, ///< _Untested._
|
@@ -629,6 +629,43 @@ struct Box
|
629 | 629 | Extent3d extent; ///< Box width, height and depth.
|
630 | 630 | };
|
631 | 631 |
|
| 632 | +/// ShaderHash represents a 128-bit shader hash. |
| 633 | +struct ShaderHash |
| 634 | +{ |
| 635 | + uint64 lower; ///< Lower 64-bits of hash |
| 636 | + uint64 upper; ///< Upper 64-bits of hash |
| 637 | +}; |
| 638 | + |
| 639 | +/// PipelineHash represents a concatenated pair of 64-bit hashes. |
| 640 | +struct PipelineHash |
| 641 | +{ |
| 642 | + uint64 stable; ///< Lower 64-bits of hash. "Stable" portion, suitable for e.g. shader replacement use cases. |
| 643 | + uint64 unique; ///< Upper 64-bits of hash. "Unique" portion, suitable for e.g. pipeline cache use cases. |
| 644 | +}; |
| 645 | + |
| 646 | +///@{ |
| 647 | +/// Determines whether two ShaderHashes or PipelineHashes are equal. |
| 648 | +/// |
| 649 | +/// @param [in] hash1 The first 128-bit shader hash or pipeline hash |
| 650 | +/// @param [in] hash2 The second 128-bit shader hash or pipeline hash |
| 651 | +/// |
| 652 | +/// @returns True if the hashes are equal. |
| 653 | +PAL_INLINE bool ShaderHashesEqual(const ShaderHash hash1, const ShaderHash hash2) |
| 654 | + { return ((hash1.lower == hash2.lower) && (hash1.upper == hash2.upper)); } |
| 655 | +PAL_INLINE bool PipelineHashesEqual(const PipelineHash hash1, const PipelineHash hash2) |
| 656 | + { return ((hash1.stable == hash2.stable) && (hash1.unique == hash2.unique)); } |
| 657 | +///@} |
| 658 | + |
| 659 | +///@{ |
| 660 | +/// Determines whether the given ShaderHash or PipelineHash is non-zero. |
| 661 | +/// |
| 662 | +/// @param [in] hash A 128-bit shader hash or pipeline hash |
| 663 | +/// |
| 664 | +/// @returns True if the hash is non-zero. |
| 665 | +PAL_INLINE bool ShaderHashIsNonzero(const ShaderHash hash) { return ((hash.upper | hash.lower) != 0); } |
| 666 | +PAL_INLINE bool PipelineHashIsNonzero(const PipelineHash hash) { return ((hash.stable | hash.unique) != 0); } |
| 667 | +///@} |
| 668 | + |
632 | 669 | /// Specifies the Display Output Post-Processing (DOPP) desktop texture information, which are provided by OpenGL via
|
633 | 670 | /// interop. The DOPP is an OpenGL extension to allow its client to access the desktop texture directly without the
|
634 | 671 | /// need of copying to system memory. This is only supported on Windows.
|
|
0 commit comments