Tobin Ehlis | e79df94 | 2014-11-18 16:38:08 -0700 | [diff] [blame] | 1 | /* |
| 2 | * XGL |
| 3 | * |
| 4 | * Copyright (C) 2014 LunarG, Inc. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included |
| 14 | * in all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 22 | * DEALINGS IN THE SOFTWARE. |
| 23 | */ |
| 24 | #include "xglLayer.h" |
| 25 | // Draw State ERROR codes |
| 26 | typedef enum _DRAW_STATE_ERROR |
| 27 | { |
| 28 | DRAWSTATE_NONE = 0, // Used for INFO & other non-error messages |
| 29 | DRAWSTATE_DESCRIPTOR_MAX_EXCEEDED = 1, // Descriptor Count of DS Mapping exceeds MAX_SLOTS |
| 30 | DRAWSTATE_SLOT_REMAPPING = 2, // DS Slot being mapped to a different type than previously |
| 31 | DRAWSTATE_NO_PIPELINE_BOUND = 3, // Unable to identify a bound pipeline |
| 32 | DRAWSTATE_NO_DS_BOUND = 4, // Unable to identify a bound DS |
| 33 | DRAWSTATE_DS_SLOT_NUM_MISMATCH = 5, // Number of slots in DS mapping exceeds actual DS slots |
| 34 | DRAWSTATE_UNKNOWN_DS_MAPPING = 6, // Shader slot mapping is not recognized |
| 35 | DRAWSTATE_DS_MAPPING_MISMATCH = 7, // DS Mapping mismatch |
| 36 | DRAWSTATE_INVALID_DS = 8, // Invalid DS referenced |
| 37 | DRAWSTATE_DS_END_WITHOUT_BEGIN = 9, // EndDSUpdate called w/o corresponding BeginDSUpdate |
| 38 | DRAWSTATE_DS_ATTACH_WITHOUT_BEGIN = 10, // Attempt to attach descriptors to DS w/ calling BeginDSUpdate |
| 39 | DRAWSTATE_DS_SAMPLE_ATTACH_FAILED = 11, // Error while attempting to Attach Sampler mapping to DS Slot |
| 40 | DRAWSTATE_DS_IMAGE_ATTACH_FAILED = 12, // Error while attempting to Attach Image mapping to DS Slot |
| 41 | DRAWSTATE_DS_MEMORY_ATTACH_FAILED = 13, // Error while attempting to Attach Mem mapping to DS Slot |
| 42 | DRAWSTATE_DS_NESTED_DS_ATTACH_FAILED = 14, // Error while attempting to Attach Nested DS mapping to DS Slot |
| 43 | DRAWSTATE_CLEAR_DS_FAILED = 15, // Error while attempting ClearDS |
| 44 | DRAWSTATE_INVALID_PIPELINE = 16, // Invalid DS referenced |
| 45 | } DRAW_STATE_ERROR; |
Tobin Ehlis | 2609202 | 2014-11-20 09:49:17 -0700 | [diff] [blame^] | 46 | |
| 47 | typedef enum _DRAW_TYPE |
| 48 | { |
| 49 | DRAW = 0, |
| 50 | DRAW_INDEXED = 1, |
| 51 | DRAW_INDIRECT = 2, |
| 52 | DRAW_INDEXED_INDIRECT = 3, |
| 53 | DRAW_BEGIN_RANGE = DRAW, |
| 54 | DRAW_END_RANGE = DRAW_INDEXED_INDIRECT, |
| 55 | NUM_DRAW_TYPES = (DRAW_END_RANGE - DRAW_BEGIN_RANGE + 1), |
| 56 | } DRAW_TYPE; |