- fix wrong clamp mode used in OpenGL

- fix sampler array size on Vulkan
This commit is contained in:
Magnus Norddahl 2019-04-20 19:19:34 +02:00
parent a3587009e7
commit 09883431bf
3 changed files with 3 additions and 3 deletions

View File

@ -868,7 +868,7 @@ void GLPPRenderState::Draw()
const PPTextureInput &input = Textures[index];
int filter = (input.Filter == PPFilterMode::Nearest) ? GL_NEAREST : GL_LINEAR;
int wrap = (input.Wrap == PPWrapMode::Clamp) ? GL_CLAMP : GL_REPEAT;
int wrap = (input.Wrap == PPWrapMode::Clamp) ? GL_CLAMP_TO_EDGE : GL_REPEAT;
switch (input.Type)
{

View File

@ -287,7 +287,7 @@ void VkPostprocess::RenderBuffersReset()
VulkanSampler *VkPostprocess::GetSampler(PPFilterMode filter, PPWrapMode wrap)
{
int index = (((int)filter) << 2) | (int)wrap;
int index = (((int)filter) << 1) | (int)wrap;
auto &sampler = mSamplers[index];
if (sampler)
return sampler.get();

View File

@ -75,7 +75,7 @@ private:
VulkanSampler *GetSampler(PPFilterMode filter, PPWrapMode wrap);
std::array<std::unique_ptr<VulkanSampler>, 16> mSamplers;
std::array<std::unique_ptr<VulkanSampler>, 4> mSamplers;
std::map<VkPPRenderPassKey, std::unique_ptr<VkPPRenderPassSetup>> mRenderPassSetup;
std::unique_ptr<VulkanDescriptorPool> mDescriptorPool;
int mCurrentPipelineImage = 0;