diff options
| author | Chia-I Wu <olv@lunarg.com> | 2014-11-08 10:48:20 +0800 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2014-11-21 16:49:39 -0700 |
| commit | cdcd868fd637fd3f548e06d87071290062dcc795 (patch) | |
| tree | cf0ee34940c4ca4436488b48d68a26f87a65beaa /layers | |
| parent | bb57f646f4ac300adbc0ffc2b6c5ab4a79fbcaa5 (diff) | |
| download | usermoji-cdcd868fd637fd3f548e06d87071290062dcc795.tar.xz | |
update to the latest vertex fetch proposal
The main difference is that XGL_SLOT_VERTEX_INPUT is replaced by
xglCmdBindVertexData. This actually simplifies the driver, which can be seen
with:
$ git show icd/intel/
The new proposal also adds some new formats, but they are ignored for now
because they are marked TBD.
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/api_dump.c | 10 | ||||
| -rw-r--r-- | layers/basic_plugin.c | 3 | ||||
| -rw-r--r-- | layers/draw_state.c | 11 | ||||
| -rw-r--r-- | layers/object_track.c | 9 | ||||
| -rw-r--r-- | layers/xgl_string_helper.h | 3 |
5 files changed, 29 insertions, 7 deletions
diff --git a/layers/api_dump.c b/layers/api_dump.c index ef6ea306..7896544d 100644 --- a/layers/api_dump.c +++ b/layers/api_dump.c @@ -194,6 +194,8 @@ static void initLayerTable() nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet; CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView"); nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView; + CmdBindVertexDataType fpCmdBindVertexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindVertexData"); + nextTable.CmdBindVertexData = fpCmdBindVertexData; CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData"); nextTable.CmdBindIndexData = fpCmdBindIndexData; CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments"); @@ -998,6 +1000,12 @@ XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdB } } +XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindVertexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT binding) +{ + nextTable.CmdBindVertexData(cmdBuffer, mem, offset, binding); + printf("xglCmdBindVertexData(cmdBuffer = %p, mem = %p, offset = %i, binding = %d)\n", (void*)cmdBuffer, (void*)mem, offset, binding); +} + XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType) { nextTable.CmdBindIndexData(cmdBuffer, mem, offset, indexType); @@ -1507,6 +1515,8 @@ XGL_LAYER_EXPORT XGL_VOID* XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL return xglCmdBindDescriptorSet; else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) funcName, sizeof("xglCmdBindDynamicMemoryView"))) return xglCmdBindDynamicMemoryView; + else if (!strncmp("xglCmdBindVertexData", (const char *) funcName, sizeof("xglCmdBindVertexData"))) + return xglCmdBindVertexData; else if (!strncmp("xglCmdBindIndexData", (const char *) funcName, sizeof("xglCmdBindIndexData"))) return xglCmdBindIndexData; else if (!strncmp("xglCmdBindAttachments", (const char *) funcName, sizeof("xglCmdBindAttachments"))) diff --git a/layers/basic_plugin.c b/layers/basic_plugin.c index 4126e3eb..ac8362da 100644 --- a/layers/basic_plugin.c +++ b/layers/basic_plugin.c @@ -92,6 +92,7 @@ static void initLayerTable() myTable.CmdBindStateObject = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdBindStateObject"); myTable.CmdBindDescriptorSet = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdBindDescriptorSet"); myTable.CmdBindDynamicMemoryView = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdBindDynamicMemoryView"); + myTable.CmdBindVertexData = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdBindVertexData"); myTable.CmdBindIndexData = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdBindIndexData"); myTable.CmdBindAttachments = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdBindAttachments"); myTable.CmdPrepareMemoryRegions = fpGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (const XGL_CHAR *) "xglCmdPrepareMemoryRegions"); @@ -337,6 +338,8 @@ XGL_LAYER_EXPORT XGL_VOID * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XG return myTable.CmdBindDescriptorSet; else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) pName, sizeof ("xglCmdBindDynamicMemoryView"))) return myTable.CmdBindDynamicMemoryView; + else if (!strncmp("xglCmdBindVertexData", (const char *) pName, sizeof ("xglCmdBindVertexData"))) + return myTable.CmdBindVertexData; else if (!strncmp("xglCmdBindIndexData", (const char *) pName, sizeof ("xglCmdBindIndexData"))) return myTable.CmdBindIndexData; else if (!strncmp("xglCmdBindAttachments", (const char *) pName, sizeof ("xglCmdBindAttachments"))) diff --git a/layers/draw_state.c b/layers/draw_state.c index 89f0f041..8a2e4c78 100644 --- a/layers/draw_state.c +++ b/layers/draw_state.c @@ -354,10 +354,6 @@ static XGL_BOOL verifyShaderSlotMapping(const XGL_UINT slot, const XGL_UINT slot if (MAPPING_SAMPLER != slotBinding) error = XGL_TRUE; break; - case XGL_SLOT_VERTEX_INPUT: - if (MAPPING_MEMORY != slotBinding) - error = XGL_TRUE; - break; case XGL_SLOT_SHADER_UAV: if (MAPPING_MEMORY != slotBinding) error = XGL_TRUE; @@ -602,6 +598,8 @@ static void initLayerTable() nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet; CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView"); nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView; + CmdBindVertexDataType fpCmdBindVertexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindVertexData"); + nextTable.CmdBindVertexData = fpCmdBindVertexData; CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData"); nextTable.CmdBindIndexData = fpCmdBindIndexData; CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments"); @@ -1248,6 +1246,11 @@ XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdB nextTable.CmdBindDynamicMemoryView(cmdBuffer, pipelineBindPoint, pMemView); } +XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindVertexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT binding) +{ + nextTable.CmdBindVertexData(cmdBuffer, mem, offset, binding); +} + XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType) { nextTable.CmdBindIndexData(cmdBuffer, mem, offset, indexType); diff --git a/layers/object_track.c b/layers/object_track.c index 07b617d5..e0be1853 100644 --- a/layers/object_track.c +++ b/layers/object_track.c @@ -252,6 +252,8 @@ static void initLayerTable() nextTable.CmdBindDescriptorSet = fpCmdBindDescriptorSet; CmdBindDynamicMemoryViewType fpCmdBindDynamicMemoryView = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindDynamicMemoryView"); nextTable.CmdBindDynamicMemoryView = fpCmdBindDynamicMemoryView; + CmdBindVertexDataType fpCmdBindVertexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindVertexData"); + nextTable.CmdBindVertexData = fpCmdBindVertexData; CmdBindIndexDataType fpCmdBindIndexData = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindIndexData"); nextTable.CmdBindIndexData = fpCmdBindIndexData; CmdBindAttachmentsType fpCmdBindAttachments = fpNextGPA((XGL_PHYSICAL_GPU) pCurObj->nextObject, (XGL_CHAR *) "xglCmdBindAttachments"); @@ -988,6 +990,13 @@ XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(XGL_CMD_BUFFER cmdB nextTable.CmdBindDynamicMemoryView(cmdBuffer, pipelineBindPoint, pMemView); } +XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindVertexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT binding) +{ + ll_increment_use_count((XGL_VOID*)cmdBuffer); + printf("OBJ[%llu] : USING cmdBuffer object %p (%lu total uses)\n", object_track_index++, (void*)cmdBuffer, ll_get_obj_uses((XGL_VOID*)cmdBuffer)); + nextTable.CmdBindVertexData(cmdBuffer, mem, offset, binding); +} + XGL_LAYER_EXPORT XGL_VOID XGLAPI xglCmdBindIndexData(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType) { ll_increment_use_count((XGL_VOID*)cmdBuffer); diff --git a/layers/xgl_string_helper.h b/layers/xgl_string_helper.h index c61a21cf..f1edc905 100644 --- a/layers/xgl_string_helper.h +++ b/layers/xgl_string_helper.h @@ -166,9 +166,6 @@ static const char* string_XGL_DESCRIPTOR_SET_SLOT_TYPE(XGL_DESCRIPTOR_SET_SLOT_T case XGL_SLOT_UNUSED: return "XGL_SLOT_UNUSED"; - case XGL_SLOT_VERTEX_INPUT: - return "XGL_SLOT_VERTEX_INPUT"; - default: return "Unhandled XGL_DESCRIPTOR_SET_SLOT_TYPE"; } |
