From a28bdde711fae9c44b80f99d1701fc55dd0e0b56 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 28 Mar 2015 15:23:55 +0800 Subject: binding: update for xglCmdBindDescriptorSets() This update makes it possible to bind multiple descriptor sets to the command buffer. We introduced intel_cmd_dset_data to hold the descriptor set offsets in the global descriptor region as well as their dynamic offsets. We also changed the descriptor reading routines from intel_desc_set_read_surface() intel_desc_set_read_sampler() to intel_desc_region_read_surface() intel_desc_region_read_sampler() v2: fix a potential crash when allocation of dynamic_desc_indices fails --- include/xgl.h | 9 ++++++--- include/xglLayer.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/xgl.h b/include/xgl.h index f90b8a7e..bae9c3fb 100644 --- a/include/xgl.h +++ b/include/xgl.h @@ -2336,7 +2336,7 @@ typedef XGL_RESULT (XGLAPI *xglEndCommandBufferType)(XGL_CMD_BUFFER cmdBuffer); typedef XGL_RESULT (XGLAPI *xglResetCommandBufferType)(XGL_CMD_BUFFER cmdBuffer); typedef void (XGLAPI *xglCmdBindPipelineType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_PIPELINE pipeline); typedef void (XGLAPI *xglCmdBindDynamicStateObjectType)(XGL_CMD_BUFFER cmdBuffer, XGL_STATE_BIND_POINT stateBindPoint, XGL_DYNAMIC_STATE_OBJECT state); -typedef void (XGLAPI *xglCmdBindDescriptorSetType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_DESCRIPTOR_SET descriptorSet, const uint32_t* pUserData); +typedef void (XGLAPI *xglCmdBindDescriptorSetsType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, XGL_DESCRIPTOR_SET_LAYOUT_CHAIN layoutChain, uint32_t layoutChainSlot, uint32_t count, const XGL_DESCRIPTOR_SET* pDescriptorSets, const uint32_t* pUserData); typedef void (XGLAPI *xglCmdBindIndexBufferType)(XGL_CMD_BUFFER cmdBuffer, XGL_BUFFER buffer, XGL_GPU_SIZE offset, XGL_INDEX_TYPE indexType); typedef void (XGLAPI *xglCmdBindVertexBufferType)(XGL_CMD_BUFFER cmdBuffer, XGL_BUFFER buffer, XGL_GPU_SIZE offset, uint32_t binding); typedef void (XGLAPI *xglCmdDrawType)(XGL_CMD_BUFFER cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount); @@ -2807,10 +2807,13 @@ void XGLAPI xglCmdBindDynamicStateObject( XGL_STATE_BIND_POINT stateBindPoint, XGL_DYNAMIC_STATE_OBJECT dynamicState); -void XGLAPI xglCmdBindDescriptorSet( +void XGLAPI xglCmdBindDescriptorSets( XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, - XGL_DESCRIPTOR_SET descriptorSet, + XGL_DESCRIPTOR_SET_LAYOUT_CHAIN layoutChain, + uint32_t layoutChainSlot, + uint32_t count, + const XGL_DESCRIPTOR_SET* pDescriptorSets, const uint32_t* pUserData); void XGLAPI xglCmdBindIndexBuffer( diff --git a/include/xglLayer.h b/include/xglLayer.h index 98e52537..6111bcb9 100644 --- a/include/xglLayer.h +++ b/include/xglLayer.h @@ -104,7 +104,7 @@ typedef struct _XGL_LAYER_DISPATCH_TABLE xglResetCommandBufferType ResetCommandBuffer; xglCmdBindPipelineType CmdBindPipeline; xglCmdBindDynamicStateObjectType CmdBindDynamicStateObject; - xglCmdBindDescriptorSetType CmdBindDescriptorSet; + xglCmdBindDescriptorSetsType CmdBindDescriptorSets; xglCmdBindVertexBufferType CmdBindVertexBuffer; xglCmdBindIndexBufferType CmdBindIndexBuffer; xglCmdDrawType CmdDraw; -- cgit v1.2.3