diff options
| author | Tobin Ehlis <tobin@lunarg.com> | 2015-02-25 11:46:39 -0700 |
|---|---|---|
| committer | Tobin Ehlis <tobin@lunarg.com> | 2015-02-25 11:55:52 -0700 |
| commit | 71ea17d0918c57422bebeeb75cae6f9472c6944e (patch) | |
| tree | d05433f29c9e59e79daf7be4f99d20821f1752b0 | |
| parent | 45f8ffc37defb1e5f5b5caa838968838c7850273 (diff) | |
| download | usermoji-71ea17d0918c57422bebeeb75cae6f9472c6944e.tar.xz | |
layers: Fix uninitialized variable in DrawState.
| -rw-r--r-- | layers/draw_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layers/draw_state.c b/layers/draw_state.c index 7dfc4d29..3a415c50 100644 --- a/layers/draw_state.c +++ b/layers/draw_state.c @@ -888,7 +888,7 @@ static void dsUpdate(XGL_DESCRIPTOR_SET ds, GENERIC_HEADER* pUpdateChain) SET_NODE* pSet = getSetNode(ds); loader_platform_thread_lock_mutex(&globalLock); LAYOUT_NODE* pLayout = NULL; - XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO* pLayoutCI; + XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO* pLayoutCI = NULL; // TODO : If pCIList is NULL, flag error GENERIC_HEADER* pUpdates = pUpdateChain; // Perform all updates @@ -907,8 +907,8 @@ static void dsUpdate(XGL_DESCRIPTOR_SET ds, GENERIC_HEADER* pUpdateChain) // Next verify that update is correct size if (!validateUpdateSize(pUpdates, pLayout->endIndex)) { char str[48*1024]; // TODO : Keep count of layout CI structs and size this string dynamically based on that count - char* pDSstr = xgl_print_xgl_descriptor_set_layout_create_info(pLayoutCI, "{DS} "); pLayoutCI = (XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO*)pLayout->pCreateInfoList; + char* pDSstr = xgl_print_xgl_descriptor_set_layout_create_info(pLayoutCI, "{DS} "); sprintf(str, "Descriptor update type of %s is out of bounds for matching layout w/ CI:\n%s!", string_XGL_STRUCTURE_TYPE(pUpdates->sType), pDSstr); layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, ds, 0, DRAWSTATE_DESCRIPTOR_UPDATE_OUT_OF_BOUNDS, "DS", str); free(pDSstr); |
