1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[dxvk] Unbind incompatible resources

This commit is contained in:
Philip Rebohle 2018-02-05 08:58:15 +01:00
parent 6f1ed72b78
commit f69d2481a0
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -89,6 +89,9 @@ namespace dxvk {
uint32_t slot,
const DxvkBufferSlice& buffer) {
if (!m_rc[slot].bufferSlice.matches(buffer)) {
m_rc[slot].sampler = nullptr;
m_rc[slot].imageView = nullptr;
m_rc[slot].bufferView = nullptr;
m_rc[slot].bufferSlice = buffer;
m_flags.set(
@ -102,7 +105,10 @@ namespace dxvk {
uint32_t slot,
const Rc<DxvkBufferView>& bufferView) {
if (m_rc[slot].bufferView != bufferView) {
m_rc[slot].bufferView = bufferView;
m_rc[slot].sampler = nullptr;
m_rc[slot].imageView = nullptr;
m_rc[slot].bufferView = bufferView;
m_rc[slot].bufferSlice = DxvkBufferSlice();
m_flags.set(
DxvkContextFlag::CpDirtyResources,
@ -115,7 +121,10 @@ namespace dxvk {
uint32_t slot,
const Rc<DxvkImageView>& image) {
if (m_rc[slot].imageView != image) {
m_rc[slot].imageView = image;
m_rc[slot].sampler = nullptr;
m_rc[slot].imageView = image;
m_rc[slot].bufferView = nullptr;
m_rc[slot].bufferSlice = DxvkBufferSlice();
m_flags.set(
DxvkContextFlag::CpDirtyResources,
@ -128,7 +137,10 @@ namespace dxvk {
uint32_t slot,
const Rc<DxvkSampler>& sampler) {
if (m_rc[slot].sampler != sampler) {
m_rc[slot].sampler = sampler;
m_rc[slot].sampler = sampler;
m_rc[slot].imageView = nullptr;
m_rc[slot].bufferView = nullptr;
m_rc[slot].bufferSlice = DxvkBufferSlice();
m_flags.set(
DxvkContextFlag::CpDirtyResources,