mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Merge remote-tracking branch 'remotes/origin/vulkan2'
This commit is contained in:
commit
90cc0cf35b
6 changed files with 13 additions and 11 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -173,7 +173,7 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
|
|||
PalEntry color1 = side->GetSpecialColor(tierndx, side_t::walltop, frontsector);
|
||||
PalEntry color2 = side->GetSpecialColor(tierndx, side_t::wallbottom, frontsector);
|
||||
state.SetObjectColor(color1);
|
||||
state.SetObjectColor2((color1 != color2) ? color2 : 0);
|
||||
state.SetObjectColor2((color1 != color2) ? color2 : PalEntry(0));
|
||||
state.SetAddColor(side->GetAdditiveColor(tierndx, frontsector));
|
||||
if (color1 != color2)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -191,7 +191,7 @@ void VulkanFrameBuffer::DeleteFrameObjects()
|
|||
FrameDeleteList.CommandBuffers.clear();
|
||||
}
|
||||
|
||||
void VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish)
|
||||
void VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish, bool lastsubmit)
|
||||
{
|
||||
int currentIndex = mNextSubmit % maxConcurrentSubmitCount;
|
||||
|
||||
|
@ -215,12 +215,14 @@ void VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer **commands, size_t cou
|
|||
submit.addSignal(mRenderFinishedSemaphore.get());
|
||||
}
|
||||
|
||||
submit.addSignal(mSubmitSemaphore[currentIndex].get());
|
||||
if (!lastsubmit)
|
||||
submit.addSignal(mSubmitSemaphore[currentIndex].get());
|
||||
|
||||
submit.execute(device, device->graphicsQueue, mSubmitFence[currentIndex].get());
|
||||
mNextSubmit++;
|
||||
}
|
||||
|
||||
void VulkanFrameBuffer::FlushCommands(bool finish)
|
||||
void VulkanFrameBuffer::FlushCommands(bool finish, bool lastsubmit)
|
||||
{
|
||||
if (mDrawCommands || mTransferCommands)
|
||||
{
|
||||
|
@ -241,7 +243,7 @@ void VulkanFrameBuffer::FlushCommands(bool finish)
|
|||
FrameDeleteList.CommandBuffers.push_back(std::move(mDrawCommands));
|
||||
}
|
||||
|
||||
FlushCommands(commands, count, finish);
|
||||
FlushCommands(commands, count, finish, lastsubmit);
|
||||
|
||||
current_rendered_commandbuffers += (int)count;
|
||||
}
|
||||
|
@ -259,7 +261,7 @@ void VulkanFrameBuffer::WaitForCommands(bool finish)
|
|||
mPostprocess->DrawPresentTexture(mOutputLetterbox, true, true);
|
||||
}
|
||||
|
||||
FlushCommands(finish);
|
||||
FlushCommands(finish, true);
|
||||
|
||||
if (finish)
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
VkPostprocess *GetPostprocess() { return mPostprocess.get(); }
|
||||
VkRenderBuffers *GetBuffers() { return mActiveRenderBuffers; }
|
||||
|
||||
void FlushCommands(bool finish);
|
||||
void FlushCommands(bool finish, bool lastsubmit = false);
|
||||
|
||||
unsigned int GetLightBufferBlockSize() const;
|
||||
|
||||
|
@ -111,7 +111,7 @@ private:
|
|||
void CopyScreenToBuffer(int w, int h, void *data);
|
||||
void UpdateShadowMap();
|
||||
void DeleteFrameObjects();
|
||||
void FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish);
|
||||
void FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish, bool lastsubmit);
|
||||
|
||||
std::unique_ptr<VkShaderManager> mShaderManager;
|
||||
std::unique_ptr<VkSamplerManager> mSamplerManager;
|
||||
|
|
Loading…
Reference in a new issue