mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-13 16:08:50 +01:00
[dxvk] Add feedback loop aspect flags to bindRenderTargets
This commit is contained in:
parent
dff514c924
commit
31d17efb48
@ -3161,7 +3161,7 @@ namespace dxvk {
|
||||
EmitCs([
|
||||
cAttachments = std::move(attachments)
|
||||
] (DxvkContext* ctx) mutable {
|
||||
ctx->bindRenderTargets(Forwarder::move(cAttachments));
|
||||
ctx->bindRenderTargets(Forwarder::move(cAttachments), 0u);
|
||||
});
|
||||
|
||||
// If necessary, update push constant for the sample count
|
||||
@ -3813,7 +3813,7 @@ namespace dxvk {
|
||||
cUsedBindings = GetMaxUsedBindings()
|
||||
] (DxvkContext* ctx) {
|
||||
// Reset render targets
|
||||
ctx->bindRenderTargets(DxvkRenderTargets());
|
||||
ctx->bindRenderTargets(DxvkRenderTargets(), 0u);
|
||||
|
||||
// Reset vertex input state
|
||||
ctx->setInputLayout(0, nullptr, 0, nullptr);
|
||||
|
@ -1198,7 +1198,7 @@ namespace dxvk {
|
||||
rt.color[0].view = cView;
|
||||
rt.color[0].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
|
||||
ctx->bindRenderTargets(std::move(rt));
|
||||
ctx->bindRenderTargets(std::move(rt), 0u);
|
||||
ctx->bindShader(VK_SHADER_STAGE_VERTEX_BIT, Rc<DxvkShader>(m_vs));
|
||||
ctx->bindShader(VK_SHADER_STAGE_FRAGMENT_BIT, Rc<DxvkShader>(m_fs));
|
||||
ctx->bindResourceBuffer(VK_SHADER_STAGE_FRAGMENT_BIT, 0, DxvkBufferSlice(m_ubo));
|
||||
@ -1312,7 +1312,7 @@ namespace dxvk {
|
||||
|
||||
void D3D11VideoContext::UnbindResources() {
|
||||
m_ctx->EmitCs([this] (DxvkContext* ctx) {
|
||||
ctx->bindRenderTargets(DxvkRenderTargets());
|
||||
ctx->bindRenderTargets(DxvkRenderTargets(), 0u);
|
||||
|
||||
ctx->bindShader(VK_SHADER_STAGE_VERTEX_BIT, nullptr);
|
||||
ctx->bindShader(VK_SHADER_STAGE_FRAGMENT_BIT, nullptr);
|
||||
|
@ -5465,7 +5465,7 @@ namespace dxvk {
|
||||
EmitCs([
|
||||
cAttachments = std::move(attachments)
|
||||
] (DxvkContext* ctx) mutable {
|
||||
ctx->bindRenderTargets(std::move(cAttachments));
|
||||
ctx->bindRenderTargets(std::move(cAttachments), 0u);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,16 @@ namespace dxvk {
|
||||
* \param [in] targets Render targets to bind
|
||||
*/
|
||||
void bindRenderTargets(
|
||||
DxvkRenderTargets&& targets) {
|
||||
DxvkRenderTargets&& targets,
|
||||
VkImageAspectFlags feedbackLoop) {
|
||||
// Set up default render pass ops
|
||||
m_state.om.renderTargets = std::move(targets);
|
||||
|
||||
if (unlikely(m_state.gp.state.om.feedbackLoop() != feedbackLoop)) {
|
||||
m_state.gp.state.om.setFeedbackLoop(feedbackLoop);
|
||||
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
||||
}
|
||||
|
||||
this->resetRenderPassOps(
|
||||
m_state.om.renderTargets,
|
||||
m_state.om.renderPassOps);
|
||||
|
@ -180,7 +180,7 @@ namespace dxvk {
|
||||
renderTargets.color[0].view = dstView;
|
||||
renderTargets.color[0].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
|
||||
ctx->bindRenderTargets(std::move(renderTargets));
|
||||
ctx->bindRenderTargets(std::move(renderTargets), 0u);
|
||||
|
||||
VkExtent2D dstExtent = {
|
||||
dstView->imageInfo().extent.width,
|
||||
|
Loading…
Reference in New Issue
Block a user