GL: Subpass transition fix with GPU_ATTACHEMENT_IGNORE
GPU_ATTACHEMENT_IGNORE should work on slots that contain no attachments.
This commit is contained in:
@@ -193,6 +193,8 @@ void GPU_framebuffer_bind_loadstore(GPUFrameBuffer *framebuffer,
|
||||
* GPU_ATTACHEMENT_WRITE} // Color attachment 2
|
||||
* })
|
||||
* \endcode
|
||||
*
|
||||
* \note Excess attachments will have no effect as long as they are GPU_ATTACHEMENT_IGNORE.
|
||||
*/
|
||||
void GPU_framebuffer_subpass_transition_array(GPUFrameBuffer *framebuffer,
|
||||
const GPUAttachmentState *attachment_states,
|
||||
|
||||
@@ -287,12 +287,9 @@ void GLFrameBuffer::subpass_transition(const GPUAttachmentState depth_attachment
|
||||
tmp_detached_[type] = GPU_ATTACHMENT_NONE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else if (color_attachment_states[i] == GPU_ATTACHEMENT_READ) {
|
||||
tmp_detached_[type] = this->attachments_[type];
|
||||
unwrap(tmp_detached_[type].tex)->detach_from(this);
|
||||
}
|
||||
|
||||
if (color_attachment_states[i] == GPU_ATTACHEMENT_READ) {
|
||||
GPU_texture_bind_ex(tmp_detached_[type].tex, GPUSamplerState::default_sampler(), i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user