From a993df1ee294b861eef4f35fccabeecd05754f2a Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 28 Oct 2019 02:31:05 -0300 Subject: shader/node: Unpack bindless texture encoding Bindless textures were using u64 to pack the buffer and offset from where they come from. Drop this in favor of separated entries in the struct. Remove the usage of std::set in favor of std::list (it's not std::vector to avoid reference invalidations) for samplers and images. --- src/video_core/shader/shader_ir.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/video_core/shader/shader_ir.h') diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 1fd44bde1..5243644e8 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include #include #include @@ -95,11 +96,11 @@ public: return used_cbufs; } - const std::set& GetSamplers() const { + const std::list& GetSamplers() const { return used_samplers; } - const std::map& GetImages() const { + const std::list& GetImages() const { return used_images; } @@ -316,9 +317,6 @@ private: /// Access a bindless image sampler. Image& GetBindlessImage(Tegra::Shader::Register reg, Tegra::Shader::ImageType type); - /// Tries to access an existing image, updating it's state as needed - Image* TryUseExistingImage(u64 offset, Tegra::Shader::ImageType type); - /// Extracts a sequence of bits from a node Node BitfieldExtract(Node value, u32 offset, u32 bits); @@ -402,8 +400,8 @@ private: std::set used_input_attributes; std::set used_output_attributes; std::map used_cbufs; - std::set used_samplers; - std::map used_images; + std::list used_samplers; + std::list used_images; std::array used_clip_distances{}; std::map used_global_memory; bool uses_layer{}; -- cgit v1.2.3