summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-04-07 14:30:26 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-04-08 17:36:11 +0200
commit492040bd9ce40f86f9845699d68104d31d272155 (patch)
treed49167082e927cc97e7d6880decd3d26680c7fb9 /src/video_core/renderer_opengl
parentFix bad rebase (diff)
downloadyuzu-492040bd9ce40f86f9845699d68104d31d272155.tar
yuzu-492040bd9ce40f86f9845699d68104d31d272155.tar.gz
yuzu-492040bd9ce40f86f9845699d68104d31d272155.tar.bz2
yuzu-492040bd9ce40f86f9845699d68104d31d272155.tar.lz
yuzu-492040bd9ce40f86f9845699d68104d31d272155.tar.xz
yuzu-492040bd9ce40f86f9845699d68104d31d272155.tar.zst
yuzu-492040bd9ce40f86f9845699d68104d31d272155.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp10
-rw-r--r--src/video_core/renderer_opengl/gl_shader_disk_cache.cpp7
2 files changed, 8 insertions, 9 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index ed1e97a73..6f3bcccec 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -19,7 +19,6 @@
#include "core/core.h"
#include "core/hle/kernel/process.h"
#include "core/settings.h"
-#include "video_core/const_buffer_accessor.h"
#include "video_core/engines/maxwell_3d.h"
#include "video_core/renderer_opengl/gl_rasterizer.h"
#include "video_core/renderer_opengl/gl_shader_cache.h"
@@ -985,14 +984,13 @@ void RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, const Shader& s
for (u32 bindpoint = 0; bindpoint < entries.size(); ++bindpoint) {
const auto& entry = entries[bindpoint];
Tegra::Texture::FullTextureInfo texture;
- if (!entry.IsBindless()) {
- texture = maxwell3d.GetStageTexture(stage, entry.GetOffset());
- } else {
+ if (entry.IsBindless()) {
const auto cbuf = entry.GetBindlessCBuf();
Tegra::Texture::TextureHandle tex_handle;
- tex_handle.raw =
- Tegra::ConstBufferAccessor::access<u32>(stage, cbuf.first, cbuf.second);
+ tex_handle.raw = maxwell3d.AccessConstBuffer32(stage, cbuf.first, cbuf.second);
texture = maxwell3d.GetTextureInfo(tex_handle, entry.GetOffset());
+ } else {
+ texture = maxwell3d.GetStageTexture(stage, entry.GetOffset());
}
const u32 current_bindpoint = base_bindings.sampler + bindpoint;
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
index e27740383..08603b7a5 100644
--- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
@@ -328,9 +328,10 @@ std::optional<ShaderDiskCacheDecompiled> ShaderDiskCacheOpenGL::LoadDecompiledEn
file.ReadBytes(&is_bindless, sizeof(u8)) != sizeof(u8)) {
return {};
}
- entry.entries.samplers.emplace_back(
- static_cast<std::size_t>(offset), static_cast<std::size_t>(index),
- static_cast<Tegra::Shader::TextureType>(type), is_array != 0, is_shadow != 0, is_bindless != 0);
+ entry.entries.samplers.emplace_back(static_cast<std::size_t>(offset),
+ static_cast<std::size_t>(index),
+ static_cast<Tegra::Shader::TextureType>(type),
+ is_array != 0, is_shadow != 0, is_bindless != 0);
}
u32 global_memory_count{};