rp_info.sType = XGL_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
rp_info.renderArea.extent.width = demo->width;
rp_info.renderArea.extent.height = demo->height;
+ rp_info.colorAttachmentCount = 1;
rp_info.pColorLoadOps = &load_op;
rp_info.pColorStoreOps = &store_op;
rp_info.depthLoadOp = XGL_ATTACHMENT_LOAD_OP_DONT_CARE;
rp_info.sType = XGL_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
rp_info.renderArea.extent.width = demo->width;
rp_info.renderArea.extent.height = demo->height;
+ rp_info.colorAttachmentCount = 1;
rp_info.pColorLoadOps = &load_op;
rp_info.pColorStoreOps = &store_op;
rp_info.depthLoadOp = XGL_ATTACHMENT_LOAD_OP_DONT_CARE;
func_body.append(' customSize = colorCount * sizeof(XGL_COLOR_ATTACHMENT_BIND_INFO) + dsSize;')
func_body.append(' CREATE_TRACE_PACKET(xglCreateFramebuffer, sizeof(XGL_FRAMEBUFFER_CREATE_INFO) + sizeof(XGL_FRAMEBUFFER) + customSize);')
elif 'CreateRenderPass' == proto.name:
-# HACK ALERT, TODO this API currently has insufficient parameters to determine the count of the colorLoadOps, colorStoreOps, in the CREATE_INFO struct
-# assume number of colorAttachments == 1 for now rather than tracing code keeping a list of framebuffer objects with colorAttachmentCounts
- func_body.append(' uint32_t colorCount = (pCreateInfo != NULL && pCreateInfo->pColorLoadOps != NULL && pCreateInfo->pColorStoreOps != NULL && pCreateInfo->pColorLoadClearValues != NULL) ? 1 : 0; //TODO fixme')
+ func_body.append(' uint32_t colorCount = (pCreateInfo != NULL && pCreateInfo->pColorLoadOps != NULL && pCreateInfo->pColorStoreOps != NULL && pCreateInfo->pColorLoadClearValues != NULL) ? pCreateInfo->colorAttachmentCount : 0;')
func_body.append(' customSize = colorCount * (sizeof(XGL_ATTACHMENT_LOAD_OP) + sizeof(XGL_ATTACHMENT_STORE_OP) + sizeof(XGL_CLEAR_COLOR));')
func_body.append(' CREATE_TRACE_PACKET(xglCreateRenderPass, sizeof(XGL_RENDER_PASS_CREATE_INFO) + sizeof(XGL_RENDER_PASS) + customSize);')
elif 'BeginCommandBuffer' == proto.name:
#include "xglPlatform.h"
// XGL API version supported by this file
-#define XGL_API_VERSION XGL_MAKE_VERSION(0, 48, 2)
+#define XGL_API_VERSION XGL_MAKE_VERSION(0, 50, 1)
#ifdef __cplusplus
extern "C"
XGL_RECT renderArea;
XGL_FRAMEBUFFER framebuffer;
+ uint32_t colorAttachmentCount;
const XGL_ATTACHMENT_LOAD_OP* pColorLoadOps; // Array of size equivalent to the number of attachments in the framebuffer
const XGL_ATTACHMENT_STORE_OP* pColorStoreOps; // Array of size equivalent to the number of attachments in the framebuffer
const XGL_CLEAR_COLOR* pColorLoadClearValues; // Array of size equivalent to the number of attachments in the framebuffer