memcpy((void*)pNewNode->pCreateInfoList, pSetLayoutInfoList, sizeof(XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO));
pNewNode->layout = *pSetLayout;
pNewNode->stageFlags = stageFlags;
+ uint32_t i = XGL_SHADER_STAGE_COMPUTE;
+ for (uint32_t stage = XGL_SHADER_STAGE_FLAGS_COMPUTE_BIT; stage > 0; stage >>= 1) {
+ assert(i < XGL_NUM_SHADER_STAGE);
+ if (stage & stageFlags)
+ pNewNode->shaderStageBindPoints[i] = pSetBindPoints[i];
+ i--;
+ }
pNewNode->startIndex = 0;
LAYOUT_NODE* pPriorNode = getLayoutNode(priorSetLayout);
// Point to prior node or NULL if no prior node
typedef struct _LAYOUT_NODE {
XGL_DESCRIPTOR_SET_LAYOUT layout;
XGL_FLAGS stageFlags;
- const uint32_t shaderStageBindPoints[XGL_NUM_SHADER_STAGE];
+ uint32_t shaderStageBindPoints[XGL_NUM_SHADER_STAGE];
const XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO* pCreateInfoList;
uint32_t startIndex; // 1st index of this layout
uint32_t endIndex; // last index of this layout