Fix error spam on wrong attachment

-For now, disable reading from depth this was always broken, needs to be fixed later
-Give better error showing binding and set when this happens.
This commit is contained in:
reduz 2020-12-19 10:18:08 -03:00
parent 229fb888a3
commit 666d5f3431
3 changed files with 20 additions and 13 deletions

View file

@ -32,6 +32,7 @@
#define RENDERING_DEVICE_VULKAN_H
#include "core/os/thread_safe.h"
#include "core/templates/local_vector.h"
#include "core/templates/oa_hash_map.h"
#include "core/templates/rid_owner.h"
#include "servers/rendering/rendering_device.h"
@ -45,11 +46,6 @@
#include <vulkan/vulkan.h>
//todo:
//compute
//push constants
//views of texture slices
class VulkanContext;
class RenderingDeviceVulkan : public RenderingDevice {
@ -638,7 +634,12 @@ class RenderingDeviceVulkan : public RenderingDevice {
DescriptorPoolKey pool_key;
VkDescriptorSet descriptor_set = VK_NULL_HANDLE;
//VkPipelineLayout pipeline_layout; //not owned, inherited from shader
Vector<RID> attachable_textures; //used for validation
struct AttachableTexture {
uint32_t bind;
RID texture;
};
LocalVector<AttachableTexture> attachable_textures; //used for validation
Vector<Texture *> mutable_sampled_textures; //used for layout change
Vector<Texture *> mutable_storage_textures; //used for layout change
};