aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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.
Diffstat (limited to 'include')
-rw-r--r--include/xgl.h56
-rw-r--r--include/xglLayer.h2
2 files changed, 27 insertions, 31 deletions
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;