|
1 | 1 | #ifndef SLANG_PRELUDE_CPP_TYPES_H
|
2 | 2 | #define SLANG_PRELUDE_CPP_TYPES_H
|
3 |
| - |
4 |
| -#include "../slang.h" |
5 |
| - |
| 3 | +#include <stdint.h> |
6 | 4 | #ifndef SLANG_PRELUDE_ASSERT
|
7 | 5 | # ifdef _DEBUG
|
8 | 6 | # define SLANG_PRELUDE_ASSERT(VALUE) assert(VALUE)
|
|
11 | 9 | # endif
|
12 | 10 | #endif
|
13 | 11 |
|
| 12 | +#ifndef SLANG_FORCE_INLINE |
| 13 | +# define SLANG_FORCE_INLINE inline |
| 14 | +#endif |
| 15 | + |
14 | 16 | #ifdef SLANG_PRELUDE_NAMESPACE
|
15 | 17 | namespace SLANG_PRELUDE_NAMESPACE {
|
16 | 18 | #endif
|
@@ -294,6 +296,42 @@ struct SamplerComparisonState
|
294 | 296 | ISamplerComparisonState* state;
|
295 | 297 | };
|
296 | 298 |
|
| 299 | +#ifndef SLANG_RESOURCE_SHAPE |
| 300 | +# define SLANG_RESOURCE_SHAPE |
| 301 | +typedef unsigned int SlangResourceShape; |
| 302 | +enum |
| 303 | +{ |
| 304 | + SLANG_RESOURCE_BASE_SHAPE_MASK = 0x0F, |
| 305 | + |
| 306 | + SLANG_RESOURCE_NONE = 0x00, |
| 307 | + |
| 308 | + SLANG_TEXTURE_1D = 0x01, |
| 309 | + SLANG_TEXTURE_2D = 0x02, |
| 310 | + SLANG_TEXTURE_3D = 0x03, |
| 311 | + SLANG_TEXTURE_CUBE = 0x04, |
| 312 | + SLANG_TEXTURE_BUFFER = 0x05, |
| 313 | + |
| 314 | + SLANG_STRUCTURED_BUFFER = 0x06, |
| 315 | + SLANG_BYTE_ADDRESS_BUFFER = 0x07, |
| 316 | + SLANG_RESOURCE_UNKNOWN = 0x08, |
| 317 | + SLANG_ACCELERATION_STRUCTURE = 0x09, |
| 318 | + |
| 319 | + SLANG_RESOURCE_EXT_SHAPE_MASK = 0xF0, |
| 320 | + |
| 321 | + SLANG_TEXTURE_FEEDBACK_FLAG = 0x10, |
| 322 | + SLANG_TEXTURE_ARRAY_FLAG = 0x40, |
| 323 | + SLANG_TEXTURE_MULTISAMPLE_FLAG = 0x80, |
| 324 | + |
| 325 | + SLANG_TEXTURE_1D_ARRAY = SLANG_TEXTURE_1D | SLANG_TEXTURE_ARRAY_FLAG, |
| 326 | + SLANG_TEXTURE_2D_ARRAY = SLANG_TEXTURE_2D | SLANG_TEXTURE_ARRAY_FLAG, |
| 327 | + SLANG_TEXTURE_CUBE_ARRAY = SLANG_TEXTURE_CUBE | SLANG_TEXTURE_ARRAY_FLAG, |
| 328 | + |
| 329 | + SLANG_TEXTURE_2D_MULTISAMPLE = SLANG_TEXTURE_2D | SLANG_TEXTURE_MULTISAMPLE_FLAG, |
| 330 | + SLANG_TEXTURE_2D_MULTISAMPLE_ARRAY = |
| 331 | + SLANG_TEXTURE_2D | SLANG_TEXTURE_MULTISAMPLE_FLAG | SLANG_TEXTURE_ARRAY_FLAG, |
| 332 | +}; |
| 333 | +#endif |
| 334 | + |
297 | 335 | //
|
298 | 336 | struct TextureDimensions
|
299 | 337 | {
|
@@ -393,7 +431,7 @@ struct TextureDimensions
|
393 | 431 | }
|
394 | 432 | }
|
395 | 433 |
|
396 |
| - SlangResourceShape shape; |
| 434 | + uint32_t shape; |
397 | 435 | uint32_t width, height, depth;
|
398 | 436 | uint32_t numberOfLevels;
|
399 | 437 | uint32_t arrayElementCount; ///< For array types, 0 otherwise
|
|
0 commit comments