Tobin Ehlis | 6208641 | 2014-11-19 16:19:28 -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 | // Mem Tracker ERROR codes |
| 26 | typedef enum _MEM_TRACK_ERROR |
| 27 | { |
| 28 | MEMTRACK_NONE = 0, // Used for INFO & other non-error messages |
| 29 | MEMTRACK_INVALID_CB = 1, // Cmd Buffer invalid |
| 30 | MEMTRACK_CB_MISSING_MEM_REF = 2, // pMemRefs for CB is missing a mem ref |
| 31 | MEMTRACK_INVALID_MEM_OBJ = 3, // Invalid Memory Object |
| 32 | MEMTRACK_INTERNAL_ERROR = 4, // Bug in Mem Track Layer internal data structures |
| 33 | MEMTRACK_CB_MISSING_FENCE = 5, // Cmd Buffer does not have fence |
| 34 | MEMTRACK_FREED_MEM_REF = 6, // MEM Obj freed while it still has obj and/or CB refs |
| 35 | MEMTRACK_MEM_OBJ_CLEAR_EMPTY_BINDINGS = 7, // Clearing bindings on mem obj that doesn't have any bindings |
| 36 | MEMTRACK_MISSING_MEM_BINDINGS = 8, // Trying to retrieve mem bindings, but none found (may be internal error) |
| 37 | MEMTRACK_INVALID_OBJECT = 9, // Attempting to reference generic XGL Object that is invalid |
| 38 | MEMTRACK_FREE_MEM_ERROR = 10, // Error while calling xglFreeMemory |
| 39 | MEMTRACK_DESTROY_OBJECT_ERROR = 11, // Destroying an object that has a memory reference |
| 40 | MEMTRACK_MEMORY_BINDING_ERROR = 12, // Error during one of many calls that bind memory to object or CB |
| 41 | MEMTRACK_OUT_OF_MEMORY_ERROR = 13, // malloc failed |
Tobin Ehlis | 22d0323 | 2014-11-25 18:01:12 -0700 | [diff] [blame^] | 42 | MEMTRACK_MEMORY_LEAK = 14, // Failure to call xglFreeMemory on Mem Obj prior to DestroyDevice |
Tobin Ehlis | 6208641 | 2014-11-19 16:19:28 -0700 | [diff] [blame] | 43 | } MEM_TRACK_ERROR; |
| 44 | |