diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-04-03 15:25:24 -0600 |
|---|---|---|
| committer | Chia-I Wu <olv@lunarg.com> | 2015-04-16 17:33:25 +0800 |
| commit | 53968d8ee5baaf90d2e8922c452f663c3df0c363 (patch) | |
| tree | a02c5aae88d85c9cf89f4d282f04463f64db2c7c /include | |
| parent | 4953b9a7291ac1c14c9926b751085552ac8a16b4 (diff) | |
| download | usermoji-53968d8ee5baaf90d2e8922c452f663c3df0c363.tar.xz | |
xgl: Proposal to remove XGL_FRAMEBUFFER
bug # 13323
alpha header: r29635
Don't actually remove XGL_FRAMEBUFFER but do change how
RenderPass and Framebuffer are connected. Some comments
from the bug:
- Created a new structure XGL_RENDER_PASS_BEGIN that contains
both the XGL_RENDER_PASS and XGL_FRAMEBUFFER.
- XGL_CMD_BUFFER_GRAPHICS_BEGIN_INFO and xglCmdBeginRenderPass
both use XGL_RENDER_PASS_BEGIN to ensure they stay consistent.
- Renamed the member in XGL_CMD_BUFFER_GRAPHICS_BEGIN_INFO to
renderPassContinue with a comment to clarify that this is
only needed when a render pass is split across two command buffer.
The last has the biggest impact on this patch. The tests now
directly call CmdBeginRenderPass and CmdEndRenderPass in the
command buffer rather than set the BEGIN_INFO to a render pass and
have the driver implicitly do BeginRenderPass and EndRenderPass.
It would probably still work, but didn't seem to match the intent
with this change in the header file.
Diffstat (limited to 'include')
| -rw-r--r-- | include/xgl.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/include/xgl.h b/include/xgl.h index bffc7dfa..1955f8ae 100644 --- a/include/xgl.h +++ b/include/xgl.h @@ -33,7 +33,7 @@ #include "xglPlatform.h" // XGL API version supported by this file -#define XGL_API_VERSION XGL_MAKE_VERSION(0, 56, 1) +#define XGL_API_VERSION XGL_MAKE_VERSION(0, 57, 1) #ifdef __cplusplus extern "C" @@ -1698,7 +1698,6 @@ typedef struct _XGL_PEER_IMAGE_OPEN_INFO { XGL_IMAGE originalImage; } XGL_PEER_IMAGE_OPEN_INFO; - typedef struct _XGL_SUBRESOURCE_LAYOUT { XGL_GPU_SIZE offset; // Specified in bytes @@ -2087,12 +2086,18 @@ typedef struct _XGL_CMD_BUFFER_BEGIN_INFO XGL_FLAGS flags; // XGL_CMD_BUFFER_BUILD_FLAGS } XGL_CMD_BUFFER_BEGIN_INFO; +typedef struct _XGL_RENDER_PASS_BEGIN +{ + XGL_RENDER_PASS renderPass; + XGL_FRAMEBUFFER framebuffer; +} XGL_RENDER_PASS_BEGIN; + typedef struct _XGL_CMD_BUFFER_GRAPHICS_BEGIN_INFO { XGL_STRUCTURE_TYPE sType; // Must be XGL_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO const void* pNext; // Pointer to next structure - XGL_RENDER_PASS renderPass; + XGL_RENDER_PASS_BEGIN renderPassContinue; // Only needed when a render pass is split across two command buffers } XGL_CMD_BUFFER_GRAPHICS_BEGIN_INFO; // Union allowing specification of floating point or raw color data. Actual value selected is based on image being cleared. @@ -2114,11 +2119,17 @@ typedef struct _XGL_RENDER_PASS_CREATE_INFO const void* pNext; // Pointer to next structure 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 + XGL_EXTENT2D extent; + uint32_t sampleCount; + uint32_t layers; + const XGL_FORMAT* pColorFormats; + const XGL_IMAGE_LAYOUT* pColorLayouts; + const XGL_ATTACHMENT_LOAD_OP* pColorLoadOps; + const XGL_ATTACHMENT_STORE_OP* pColorStoreOps; + const XGL_CLEAR_COLOR* pColorLoadClearValues; + XGL_FORMAT depthStencilFormat; + XGL_IMAGE_LAYOUT depthStencilLayout; XGL_ATTACHMENT_LOAD_OP depthLoadOp; float depthLoadClearValue; XGL_ATTACHMENT_STORE_OP depthStoreOp; @@ -2336,7 +2347,7 @@ typedef void (XGLAPI *xglCmdLoadAtomicCountersType)(XGL_CMD_BUFFER cmdBuff typedef void (XGLAPI *xglCmdSaveAtomicCountersType)(XGL_CMD_BUFFER cmdBuffer, XGL_PIPELINE_BIND_POINT pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, XGL_BUFFER destBuffer, XGL_GPU_SIZE destOffset); typedef XGL_RESULT (XGLAPI *xglCreateFramebufferType)(XGL_DEVICE device, const XGL_FRAMEBUFFER_CREATE_INFO* pCreateInfo, XGL_FRAMEBUFFER* pFramebuffer); typedef XGL_RESULT (XGLAPI *xglCreateRenderPassType)(XGL_DEVICE device, const XGL_RENDER_PASS_CREATE_INFO* pCreateInfo, XGL_RENDER_PASS* pRenderPass); -typedef void (XGLAPI *xglCmdBeginRenderPassType)(XGL_CMD_BUFFER cmdBuffer, XGL_RENDER_PASS renderPass); +typedef void (XGLAPI *xglCmdBeginRenderPassType)(XGL_CMD_BUFFER cmdBuffer, const XGL_RENDER_PASS_BEGIN* pRenderPassBegin); typedef void (XGLAPI *xglCmdEndRenderPassType)(XGL_CMD_BUFFER cmdBuffer, XGL_RENDER_PASS renderPass); #ifdef XGL_PROTOTYPES @@ -2980,7 +2991,7 @@ XGL_RESULT XGLAPI xglCreateRenderPass( void XGLAPI xglCmdBeginRenderPass( XGL_CMD_BUFFER cmdBuffer, - XGL_RENDER_PASS renderPass); + const XGL_RENDER_PASS_BEGIN* pRenderPassBegin); void XGLAPI xglCmdEndRenderPass( XGL_CMD_BUFFER cmdBuffer, |
