diff options
| author | Tony Barbour <tony@LunarG.com> | 2015-07-13 13:37:24 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-17 10:05:22 -0600 |
| commit | 1e6c516d95f0fe3863fa77a93a3f2e61310fb914 (patch) | |
| tree | 91536e17a9d90a79bb06586a999761b468cd7bda | |
| parent | 75594d24f740d36eb30648d7544da155ab85cc35 (diff) | |
| download | usermoji-1e6c516d95f0fe3863fa77a93a3f2e61310fb914.tar.xz | |
Windows: More windows compilier fixes
| -rw-r--r-- | icd/nulldrv/nulldrv.c | 6 | ||||
| -rw-r--r-- | layers/draw_state.cpp | 8 | ||||
| -rw-r--r-- | loader/cJSON.c | 6 | ||||
| -rwxr-xr-x | vk-layer-generate.py | 4 |
4 files changed, 10 insertions, 14 deletions
diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c index 1a90be05..1d786008 100644 --- a/icd/nulldrv/nulldrv.c +++ b/icd/nulldrv/nulldrv.c @@ -138,9 +138,9 @@ static VkResult dev_create_queues(struct nulldrv_dev *dev, const VkDeviceQueueCreateInfo *q = &queues[i]; VkResult ret = VK_SUCCESS; - if (q->queueCount == 1 && !dev->queues[q->queueNodeIndex]) { - ret = nulldrv_queue_create(dev, q->queueNodeIndex, - &dev->queues[q->queueNodeIndex]); + if (q->queueCount == 1 && !dev->queues[q->queueFamilyIndex]) { + ret = nulldrv_queue_create(dev, q->queueFamilyIndex, + &dev->queues[q->queueFamilyIndex]); } else { ret = VK_ERROR_INVALID_POINTER; diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 01a49b3f..83ceb385 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -812,7 +812,6 @@ static VkBool32 validateUpdateType(const VkDevice device, const LAYOUT_NODE* pLa // First get actual type of update VkDescriptorType actualType; uint32_t i = 0; - char str[1024]; switch (pUpdateStruct->sType) { case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: @@ -845,7 +844,6 @@ static GENERIC_HEADER* shadowUpdateNode(const VkDevice device, GENERIC_HEADER* p size_t base_array_size = 0; size_t total_array_size = 0; size_t baseBuffAddr = 0; - char str[1024]; switch (pUpdate->sType) { case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: @@ -906,7 +904,7 @@ static VkBool32 dsUpdate(VkDevice device, VkStructureType type, uint32_t updateC } else { // Next verify that update falls within size of given binding if (getBindingEndIndex(pLayout, getUpdateBinding(device, pUpdate)) < getUpdateEndIndex(device, pLayout, pUpdate)) { - char str[48*1024]; // TODO : Keep count of layout CI structs and size this string dynamically based on that count + // TODO : Keep count of layout CI structs and size this string dynamically based on that count pLayoutCI = &pLayout->createInfo; string DSstr = vk_print_vkdescriptorsetlayoutcreateinfo(pLayoutCI, "{DS} "); log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_DESCRIPTOR_SET, ds.handle, 0, DRAWSTATE_DESCRIPTOR_UPDATE_OUT_OF_BOUNDS, "DS", @@ -1170,7 +1168,6 @@ static bool validateBoundPipeline(const VkCmdBuffer cb) if (pCB && pCB->lastBoundPipeline) { // First verify that we have a Node for bound pipeline PIPELINE_NODE *pPipeTrav = getPipeline(pCB->lastBoundPipeline); - char str[1024]; if (!pPipeTrav) { log_msg(mdd(cb), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, 0, 0, DRAWSTATE_NO_PIPELINE_BOUND, "DS", "Can't find last bound Pipeline %#" PRIxLEAST64 "!", pCB->lastBoundPipeline.handle); @@ -1203,7 +1200,6 @@ static bool validateBoundPipeline(const VkCmdBuffer cb) // Print details of DS config to stdout static void printDSConfig(const VkCmdBuffer cb) { - char tmp_str[1024]; char ds_config_str[1024*256] = {0}; // TODO : Currently making this buffer HUGE w/o overrun protection. Need to be smarter, start smaller, and grow as needed. GLOBAL_CB_NODE* pCB = getCBNode(cb); if (pCB && pCB->lastBoundDescriptorSet) { @@ -1350,7 +1346,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkDestroyInstance(VkInstance instance) static void createDeviceRegisterExtensions(const VkDeviceCreateInfo* pCreateInfo, VkDevice device) { - uint32_t i, ext_idx; + uint32_t i; VkLayerDispatchTable *pDisp = get_dispatch_table(draw_state_device_table_map, device); deviceExtMap[pDisp].debug_marker_enabled = false; diff --git a/loader/cJSON.c b/loader/cJSON.c index a330f694..2d55207b 100644 --- a/loader/cJSON.c +++ b/loader/cJSON.c @@ -135,7 +135,7 @@ static char* ensure(printbuffer *p,int needed) return newbuffer+p->offset; } -static int update(printbuffer *p) +static size_t update(printbuffer *p) { char *str; if (!p || !p->buffer) return 0; @@ -251,7 +251,7 @@ static const char *parse_string(cJSON *item,const char *str) /* Render the cstring provided to an escaped version that can be printed. */ static char *print_string_ptr(const char *str,printbuffer *p) { - const char *ptr;char *ptr2,*out;int len=0,flag=0;unsigned char token; + const char *ptr;char *ptr2,*out;size_t len=0,flag=0;unsigned char token; for (ptr=str;*ptr;ptr++) flag|=((*ptr>0 && *ptr<32)||(*ptr=='\"')||(*ptr=='\\'))?1:0; if (!flag) @@ -434,7 +434,7 @@ static const char *parse_array(cJSON *item,const char *value) static char *print_array(cJSON *item,int depth,int fmt,printbuffer *p) { char **entries; - char *out=0,*ptr,*ret;int len=5; + char *out=0,*ptr,*ret;size_t len=5; cJSON *child=item->child; int numentries=0,i=0,fail=0; size_t tmplen=0; diff --git a/vk-layer-generate.py b/vk-layer-generate.py index c44b0f85..58b48840 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -561,7 +561,7 @@ class GenericLayerSubcommand(Subcommand): gen_header.append('') gen_header.append('static void createDeviceRegisterExtensions(const VkDeviceCreateInfo* pCreateInfo, VkDevice device)') gen_header.append('{') - gen_header.append(' uint32_t i, ext_idx;') + gen_header.append(' uint32_t i;') gen_header.append(' VkLayerDispatchTable *pDisp = device_dispatch_table(device);') gen_header.append(' deviceExtMap[pDisp].wsi_enabled = false;') gen_header.append(' for (i = 0; i < pCreateInfo->extensionCount; i++) {') @@ -738,7 +738,7 @@ class APIDumpSubcommand(Subcommand): header_txt.append('') header_txt.append('static void createDeviceRegisterExtensions(const VkDeviceCreateInfo* pCreateInfo, VkDevice device)') header_txt.append('{') - header_txt.append(' uint32_t i, ext_idx;') + header_txt.append(' uint32_t i;') header_txt.append(' VkLayerDispatchTable *pDisp = device_dispatch_table(device);') header_txt.append(' deviceExtMap[pDisp].wsi_enabled = false;') header_txt.append(' for (i = 0; i < pCreateInfo->extensionCount; i++) {') |
