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.
diff --git a/icd/intel/cmd_priv.h b/icd/intel/cmd_priv.h
index e396d12..ff930a9 100644
--- a/icd/intel/cmd_priv.h
+++ b/icd/intel/cmd_priv.h
@@ -485,10 +485,12 @@
}
static inline void cmd_begin_render_pass(struct intel_cmd *cmd,
- const struct intel_render_pass *rp)
+ const struct intel_render_pass *rp,
+ const struct intel_fb *fb)
{
cmd->bind.render_pass = rp;
cmd->bind.render_pass_changed = true;
+ cmd->bind.fb = fb;
}
static inline void cmd_end_render_pass(struct intel_cmd *cmd,
@@ -496,6 +498,7 @@
{
//note what to do if rp != bound rp
cmd->bind.render_pass = 0;
+ cmd->bind.fb = 0;
}
void cmd_batch_flush(struct intel_cmd *cmd, uint32_t pipe_control_dw0);