mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- fix wrong clamp mode used in OpenGL
- fix sampler array size on Vulkan
This commit is contained in:
parent
a3587009e7
commit
09883431bf
3 changed files with 3 additions and 3 deletions
|
@ -868,7 +868,7 @@ void GLPPRenderState::Draw()
|
||||||
|
|
||||||
const PPTextureInput &input = Textures[index];
|
const PPTextureInput &input = Textures[index];
|
||||||
int filter = (input.Filter == PPFilterMode::Nearest) ? GL_NEAREST : GL_LINEAR;
|
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)
|
switch (input.Type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -287,7 +287,7 @@ void VkPostprocess::RenderBuffersReset()
|
||||||
|
|
||||||
VulkanSampler *VkPostprocess::GetSampler(PPFilterMode filter, PPWrapMode wrap)
|
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];
|
auto &sampler = mSamplers[index];
|
||||||
if (sampler)
|
if (sampler)
|
||||||
return sampler.get();
|
return sampler.get();
|
||||||
|
|
|
@ -75,7 +75,7 @@ private:
|
||||||
|
|
||||||
VulkanSampler *GetSampler(PPFilterMode filter, PPWrapMode wrap);
|
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::map<VkPPRenderPassKey, std::unique_ptr<VkPPRenderPassSetup>> mRenderPassSetup;
|
||||||
std::unique_ptr<VulkanDescriptorPool> mDescriptorPool;
|
std::unique_ptr<VulkanDescriptorPool> mDescriptorPool;
|
||||||
int mCurrentPipelineImage = 0;
|
int mCurrentPipelineImage = 0;
|
||||||
|
|
Loading…
Reference in a new issue