test-framework: make color and depth binding info accessible

This commit is contained in:
Courtney Goeltzenleuchter 2014-10-22 14:12:38 -06:00
parent 9a34e263a3
commit ca89c91eb2
2 changed files with 12 additions and 4 deletions

View File

@ -39,6 +39,9 @@ XglRenderFramework::XglRenderFramework() :
{
m_render_target_fmt.channelFormat = XGL_CH_FMT_R8G8B8A8;
m_render_target_fmt.numericFormat = XGL_NUM_FMT_UNORM;
m_colorBinding.view = XGL_NULL_HANDLE;
m_depthStencilBinding.view = XGL_NULL_HANDLE;
}
XglRenderFramework::~XglRenderFramework()
@ -440,10 +443,13 @@ void XglRenderFramework::CreateDefaultPipeline(XGL_PIPELINE* pipeline, XGL_SHADE
void XglRenderFramework::GenerateBindRenderTargetCmd()
{
// bind render target
XGL_COLOR_ATTACHMENT_BIND_INFO colorBind = {};
colorBind.view = m_renderTarget->targetView();
colorBind.colorAttachmentState = XGL_IMAGE_STATE_TARGET_RENDER_ACCESS_OPTIMAL;
xglCmdBindAttachments(m_cmdBuffer, 1, &colorBind, NULL );
m_colorBinding.view = m_renderTarget->targetView();
m_colorBinding.colorAttachmentState = XGL_IMAGE_STATE_TARGET_RENDER_ACCESS_OPTIMAL;
if (m_depthStencilBinding.view) {
xglCmdBindAttachments(m_cmdBuffer, 1, &m_colorBinding, &m_depthStencilBinding );
} else {
xglCmdBindAttachments(m_cmdBuffer, 1, &m_colorBinding, XGL_NULL_HANDLE );
}
}
void XglRenderFramework::GenerateBindStateAndPipelineCmds(XGL_PIPELINE* pipeline)

View File

@ -81,6 +81,8 @@ protected:
XglImage *m_renderTarget;
XGL_FLOAT m_width, m_height;
XGL_FORMAT m_render_target_fmt;
XGL_COLOR_ATTACHMENT_BIND_INFO m_colorBinding;
XGL_DEPTH_STENCIL_BIND_INFO m_depthStencilBinding;
/*
* SetUp and TearDown are called by the Google Test framework