aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2014-11-08 10:48:20 +0800
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2014-11-21 16:49:39 -0700
commitcdcd868fd637fd3f548e06d87071290062dcc795 (patch)
treecf0ee34940c4ca4436488b48d68a26f87a65beaa
parentbb57f646f4ac300adbc0ffc2b6c5ab4a79fbcaa5 (diff)
downloadusermoji-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.
-rw-r--r--demos/tri.c31
-rw-r--r--include/xgl.h56
-rw-r--r--include/xglLayer.h2
-rw-r--r--layers/api_dump.c10
-rw-r--r--layers/basic_plugin.c3
-rw-r--r--layers/draw_state.c11
-rw-r--r--layers/object_track.c9
-rw-r--r--layers/xgl_string_helper.h3
-rw-r--r--loader/loader.c3
-rw-r--r--xgl.py7
10 files changed, 72 insertions, 63 deletions
diff --git a/demos/tri.c b/demos/tri.c
index 3d9be2d9..8b1f8577 100644
--- a/demos/tri.c
+++ b/demos/tri.c
@@ -57,7 +57,6 @@ struct demo {
struct {
XGL_GPU_MEMORY mem;
- XGL_MEMORY_VIEW_ATTACH_INFO view;
XGL_PIPELINE_VERTEX_INPUT_CREATE_INFO vi;
XGL_VERTEX_INPUT_BINDING_DESCRIPTION vi_bindings[1];
@@ -118,6 +117,8 @@ static void demo_draw_build_cmd(struct demo *demo)
xglCmdBindAttachments(demo->cmd, 1, &color_attachment, &depth_stencil);
+ xglCmdBindVertexData(demo->cmd, demo->vertices.mem, 0, 0);
+
clear_range.aspect = XGL_IMAGE_ASPECT_COLOR;
clear_range.baseMipLevel = 0;
clear_range.mipLevels = 1;
@@ -446,16 +447,6 @@ static void demo_prepare_vertices(struct demo *demo)
err = xglUnmapMemory(demo->vertices.mem);
assert(!err);
- demo->vertices.view.sType = XGL_STRUCTURE_TYPE_MEMORY_VIEW_ATTACH_INFO;
- demo->vertices.view.pNext = NULL;
- demo->vertices.view.mem = demo->vertices.mem;
- demo->vertices.view.offset = 0;
- demo->vertices.view.range = sizeof(vb);
- demo->vertices.view.stride = sizeof(vb[0]);
- demo->vertices.view.format.channelFormat = XGL_CH_FMT_UNDEFINED;
- demo->vertices.view.format.numericFormat = XGL_NUM_FMT_UNDEFINED;
- demo->vertices.view.state = XGL_MEMORY_STATE_GRAPHICS_SHADER_READ_ONLY;
-
demo->vertices.vi.sType = XGL_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO;
demo->vertices.vi.pNext = NULL;
demo->vertices.vi.bindingCount = 1;
@@ -482,7 +473,7 @@ static void demo_prepare_descriptor_set(struct demo *demo)
const XGL_DESCRIPTOR_SET_CREATE_INFO descriptor_set = {
.sType = XGL_STRUCTURE_TYPE_DESCRIPTOR_SET_CREATE_INFO,
.pNext = NULL,
- .slots = DEMO_TEXTURE_COUNT * 2 + 1,
+ .slots = DEMO_TEXTURE_COUNT * 2,
};
XGL_RESULT err;
XGL_UINT i;
@@ -491,7 +482,7 @@ static void demo_prepare_descriptor_set(struct demo *demo)
assert(!err);
xglBeginDescriptorSetUpdate(demo->dset);
- xglClearDescriptorSetSlots(demo->dset, 0, DEMO_TEXTURE_COUNT * 2 + 1);
+ xglClearDescriptorSetSlots(demo->dset, 0, DEMO_TEXTURE_COUNT * 2);
for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {
const XGL_IMAGE_VIEW_ATTACH_INFO image_view = {
@@ -507,8 +498,6 @@ static void demo_prepare_descriptor_set(struct demo *demo)
&image_view);
}
- xglAttachMemoryViewDescriptors(demo->dset, 2 * i, 1, &demo->vertices.view);
-
xglEndDescriptorSetUpdate(demo->dset);
}
@@ -587,8 +576,7 @@ static void demo_prepare_pipeline(struct demo *demo)
XGL_PIPELINE_DB_STATE_CREATE_INFO db;
XGL_PIPELINE_SHADER_STAGE_CREATE_INFO vs;
XGL_PIPELINE_SHADER_STAGE_CREATE_INFO fs;
- XGL_DESCRIPTOR_SLOT_INFO vs_slots[DEMO_TEXTURE_COUNT * 2 + 1];
- XGL_DESCRIPTOR_SLOT_INFO fs_slots[DEMO_TEXTURE_COUNT * 2 + 1];
+ XGL_DESCRIPTOR_SLOT_INFO fs_slots[DEMO_TEXTURE_COUNT * 2];
XGL_RESULT err;
XGL_UINT i;
@@ -613,10 +601,6 @@ static void demo_prepare_pipeline(struct demo *demo)
db.sType = XGL_STRUCTURE_TYPE_PIPELINE_DB_STATE_CREATE_INFO;
db.format = demo->depth.format;
- memset(&vs_slots, 0, sizeof(vs_slots));
- vs_slots[2 * DEMO_TEXTURE_COUNT].slotObjectType = XGL_SLOT_VERTEX_INPUT;
- vs_slots[2 * DEMO_TEXTURE_COUNT].shaderEntityIndex = 0;
-
memset(&fs_slots, 0, sizeof(fs_slots));
for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {
fs_slots[2 * i].slotObjectType = XGL_SLOT_SHADER_SAMPLER;
@@ -629,16 +613,13 @@ static void demo_prepare_pipeline(struct demo *demo)
vs.sType = XGL_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
vs.shader.stage = XGL_SHADER_STAGE_VERTEX;
vs.shader.shader = demo_prepare_vs(demo);
- vs.shader.descriptorSetMapping[0].descriptorCount =
- DEMO_TEXTURE_COUNT * 2 + 1;
- vs.shader.descriptorSetMapping[0].pDescriptorInfo = vs_slots;
memset(&fs, 0, sizeof(fs));
fs.sType = XGL_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
fs.shader.stage = XGL_SHADER_STAGE_FRAGMENT;
fs.shader.shader = demo_prepare_fs(demo);
fs.shader.descriptorSetMapping[0].descriptorCount =
- DEMO_TEXTURE_COUNT * 2 + 1;
+ DEMO_TEXTURE_COUNT * 2;
fs.shader.descriptorSetMapping[0].pDescriptorInfo = fs_slots;
pipeline.pNext = (const XGL_VOID *) &vi;
diff --git a/include/xgl.h b/include/xgl.h
index 25812c91..2ceb5665 100644
--- a/include/xgl.h
+++ b/include/xgl.h
@@ -286,10 +286,7 @@ typedef enum _XGL_DESCRIPTOR_SET_SLOT_TYPE
XGL_SLOT_SHADER_RESOURCE = 0x00000001,
XGL_SLOT_SHADER_UAV = 0x00000002,
XGL_SLOT_SHADER_SAMPLER = 0x00000003,
-// IMG CHANGE BEGIN - support for vertex input description
- XGL_SLOT_VERTEX_INPUT = 0x00000004,
- XGL_SLOT_NEXT_DESCRIPTOR_SET = 0x00000005,
-// IMG CHANGE END
+ XGL_SLOT_NEXT_DESCRIPTOR_SET = 0x00000004,
XGL_DESCRIPTOR_SET_SLOT_TYPE_BEGIN_RANGE = XGL_SLOT_UNUSED,
XGL_DESCRIPTOR_SET_SLOT_TYPE_END_RANGE = XGL_SLOT_NEXT_DESCRIPTOR_SET,
@@ -774,7 +771,15 @@ typedef enum _XGL_CHANNEL_FORMAT
// IMG CHANGE BEGIN - support for vertex input description
XGL_CH_FMT_R8G8B8 = 31,
XGL_CH_FMT_R16G16B16 = 32,
- XGL_MAX_CH_FMT = XGL_CH_FMT_R16G16B16,
+
+ // optional? TBD'
+ XGL_CH_FMT_B10G10R10A2 = 33,
+ XGL_CH_FMT_R64 = 34,
+ XGL_CH_FMT_R64G64 = 35,
+ XGL_CH_FMT_R64G64B64 = 36,
+ XGL_CH_FMT_R64G64B64A64 = 37,
+
+ XGL_MAX_CH_FMT = XGL_CH_FMT_R64G64B64A64,
// IMG CHANGE END
XGL_MAX_ENUM(_XGL_CHANNEL_FORMAT)
} XGL_CHANNEL_FORMAT;
@@ -789,7 +794,11 @@ typedef enum _XGL_NUM_FORMAT
XGL_NUM_FMT_FLOAT = 5,
XGL_NUM_FMT_SRGB = 6,
XGL_NUM_FMT_DS = 7,
- XGL_MAX_NUM_FMT = XGL_NUM_FMT_DS,
+// IMG CHANGE BEGIN - support for vertex input description
+ XGL_NUM_FMT_USCALED = 8,
+ XGL_NUM_FMT_SSCALED = 9,
+ XGL_MAX_NUM_FMT = XGL_NUM_FMT_SSCALED,
+// IMG CHANGE END
XGL_MAX_ENUM(_XGL_NUM_FORMAT)
} XGL_NUM_FORMAT;
@@ -1437,34 +1446,11 @@ typedef struct _XGL_COMPUTE_PIPELINE_CREATE_INFO
// IMG CHANGE BEGIN - support for vertex input description
-// Example descriptor set mapping:
-//
-// {
-// .descriptorCount = 4;
-// .pDescriptorInfo[0] =
-// {
-// .slotObjectType = XGL_SLOT_VERTEX_INPUT;
-// .shaderEntityIndex = 2; // describes XGL_PIPELINE_VERTEX_INPUT_CREATE_INFO.pVertexBindingDescriptions[2]
-// }
-// .pDescriptorInfo[1] =
-// {
-// .slotObjectType = XGL_SLOT_UNUSED;
-// .shaderEntityIndex = 0;
-// }
-// .pDescriptorInfo[2] =
-// {
-// .slotObjectType = XGL_SLOT_VERTEX_INPUT;
-// .shaderEntityIndex = 0; // describes XGL_PIPELINE_VERTEX_INPUT_CREATE_INFO.pVertexBindingDescriptions[0]
-// }
-// .pDescriptorInfo[3] =
-// {
-// .slotObjectType = XGL_SLOT_VERTEX_INPUT;
-// .shaderEntityIndex = 1; // describes XGL_PIPELINE_VERTEX_INPUT_CREATE_INFO.pVertexBindingDescriptions[1]
-// }
-// }
//
// The shader inputs are mapped to pVertexAttributeDescriptions using a decoration in the BIL.
//
+// The binding parameter in xglCmdBindVertexBuffer describes the index into pVertexBindingDescriptions[]
+//
//
// Formats allowed for attributes (XGL_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION.format) will be detailed in
// a table in the specification.
@@ -2192,6 +2178,14 @@ XGL_VOID XGLAPI xglCmdBindDynamicMemoryView(
XGL_PIPELINE_BIND_POINT pipelineBindPoint,
const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView);
+// IMG CHANGE BEGIN - support for vertex input description
+XGL_VOID XGLAPI xglCmdBindVertexData(
+ XGL_CMD_BUFFER cmdBuffer,
+ XGL_GPU_MEMORY mem,
+ XGL_GPU_SIZE offset,
+ XGL_UINT binding);
+// IMG CHANGE END
+
XGL_VOID XGLAPI xglCmdBindIndexData(
XGL_CMD_BUFFER cmdBuffer,
XGL_GPU_MEMORY mem,
diff --git a/include/xglLayer.h b/include/xglLayer.h
index 72fcb156..2cfdb162 100644
--- a/include/xglLayer.h
+++ b/include/xglLayer.h
@@ -91,6 +91,7 @@ typedef XGL_VOID (XGLAPI *CmdBindPipelineDeltaType)(XGL_CMD_BUFFER cmdBuffer, XG
typedef XGL_VOID (XGLAPI *CmdBindStateObjectType)(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_STATE_OBJECT state);
typedef XGL_VOID (XGLAPI *CmdBindDescriptorSetType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_UINT index, XGL_DESCRIPTOR_SET descriptorSet, XGL_UINT slotOffset);
typedef XGL_VOID (XGLAPI *CmdBindDynamicMemoryViewType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, const XGL_MEMORY_VIEW_ATTACH_INFO* pMemView);
+typedef XGL_VOID (XGLAPI *CmdBindVertexDataType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_UINT binding);
typedef XGL_VOID (XGLAPI *CmdBindIndexDataType)(XGL_CMD_BUFFER cmdBuffer, XGL_GPU_MEMORY mem, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType);
typedef XGL_VOID (XGLAPI *CmdBindAttachmentsType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT colorAttachmentCount, const XGL_COLOR_ATTACHMENT_BIND_INFO* pColorAttachments, const XGL_DEPTH_STENCIL_BIND_INFO* pDepthStencilAttachment);
typedef XGL_VOID (XGLAPI *CmdPrepareMemoryRegionsType)(XGL_CMD_BUFFER cmdBuffer, XGL_UINT transitionCount, const XGL_MEMORY_STATE_TRANSITION* pStateTransitions);
@@ -221,6 +222,7 @@ typedef struct _XGL_LAYER_DISPATCH_TABLE
CmdBindStateObjectType CmdBindStateObject;
CmdBindDescriptorSetType CmdBindDescriptorSet;
CmdBindDynamicMemoryViewType CmdBindDynamicMemoryView;
+ CmdBindVertexDataType CmdBindVertexData;
CmdBindIndexDataType CmdBindIndexData;
CmdBindAttachmentsType CmdBindAttachments;
CmdPrepareMemoryRegionsType CmdPrepareMemoryRegions;
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";
}
diff --git a/loader/loader.c b/loader/loader.c
index 6bfba284..3f8efdb0 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -525,6 +525,7 @@ static void loader_init_dispatch_table(XGL_LAYER_DISPATCH_TABLE *tab, GetProcAdd
tab->CmdBindStateObject = fpGPA(gpu, (const XGL_CHAR *) "xglCmdBindStateObject");
tab->CmdBindDescriptorSet = fpGPA(gpu, (const XGL_CHAR *) "xglCmdBindDescriptorSet");
tab->CmdBindDynamicMemoryView = fpGPA(gpu, (const XGL_CHAR *) "xglCmdBindDynamicMemoryView");
+ tab->CmdBindVertexData = fpGPA(gpu, (const XGL_CHAR *) "xglCmdBindVertexData");
tab->CmdBindIndexData = fpGPA(gpu, (const XGL_CHAR *) "xglCmdBindIndexData");
tab->CmdBindAttachments = fpGPA(gpu, (const XGL_CHAR *) "xglCmdBindAttachments");
tab->CmdPrepareMemoryRegions = fpGPA(gpu, (const XGL_CHAR *) "xglCmdPrepareMemoryRegions");
@@ -980,6 +981,8 @@ LOADER_EXPORT XGL_VOID * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const XGL_C
return disp_table->CmdBindDescriptorSet;
else if (!strncmp("xglCmdBindDynamicMemoryView", (const char *) pName, sizeof ("xglCmdBindDynamicMemoryView")))
return disp_table->CmdBindDynamicMemoryView;
+ else if (!strncmp("xglCmdBindVertexData", (const char *) pName, sizeof ("xglCmdBindVertexData")))
+ return disp_table->CmdBindVertexData;
else if (!strncmp("xglCmdBindIndexData", (const char *) pName, sizeof ("xglCmdBindIndexData")))
return disp_table->CmdBindIndexData;
else if (!strncmp("xglCmdBindAttachments", (const char *) pName, sizeof ("xglCmdBindAttachments")))
diff --git a/xgl.py b/xgl.py
index 3f4f90fe..033d85f7 100644
--- a/xgl.py
+++ b/xgl.py
@@ -466,6 +466,12 @@ core = (
Param("XGL_PIPELINE_BIND_POINT", "pipelineBindPoint"),
Param("const XGL_MEMORY_VIEW_ATTACH_INFO*", "pMemView"))),
+ Proto("XGL_VOID", "CmdBindVertexData",
+ (Param("XGL_CMD_BUFFER", "cmdBuffer"),
+ Param("XGL_GPU_MEMORY", "mem"),
+ Param("XGL_GPU_SIZE", "offset"),
+ Param("XGL_UINT", "binding"))),
+
Proto("XGL_VOID", "CmdBindIndexData",
(Param("XGL_CMD_BUFFER", "cmdBuffer"),
Param("XGL_GPU_MEMORY", "mem"),
@@ -814,6 +820,7 @@ icd_dispatch_table = (
"CmdBindStateObject",
"CmdBindDescriptorSet",
"CmdBindDynamicMemoryView",
+ "CmdBindVertexData",
"CmdBindIndexData",
"CmdBindAttachments",
"CmdPrepareMemoryRegions",