mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- VkHardwareTexture needs to BFF with FTexture
This commit is contained in:
parent
83ee884ffc
commit
a585a90d81
2 changed files with 5 additions and 4 deletions
|
@ -295,6 +295,7 @@ class FTexture
|
||||||
friend class OpenGLRenderer::FGLRenderState; // For now this needs access to some fields in ApplyMaterial. This should be rerouted through the Material class
|
friend class OpenGLRenderer::FGLRenderState; // For now this needs access to some fields in ApplyMaterial. This should be rerouted through the Material class
|
||||||
friend struct FTexCoordInfo;
|
friend struct FTexCoordInfo;
|
||||||
friend class OpenGLRenderer::FHardwareTexture;
|
friend class OpenGLRenderer::FHardwareTexture;
|
||||||
|
friend class VkHardwareTexture;
|
||||||
friend class FMultiPatchTexture;
|
friend class FMultiPatchTexture;
|
||||||
friend class FSkyBox;
|
friend class FSkyBox;
|
||||||
friend class FBrightmapTexture;
|
friend class FBrightmapTexture;
|
||||||
|
|
|
@ -68,9 +68,9 @@ VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &s
|
||||||
int clampmode = state.mClampMode;
|
int clampmode = state.mClampMode;
|
||||||
int translation = state.mTranslation;
|
int translation = state.mTranslation;
|
||||||
|
|
||||||
//if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
|
if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
|
||||||
//if (tex->isHardwareCanvas()) clampmode = CLAMP_CAMTEX;
|
if (tex->isHardwareCanvas()) clampmode = CLAMP_CAMTEX;
|
||||||
//else if ((tex->isWarped() || tex->shaderindex >= FIRST_USER_SHADER) && clampmode <= CLAMP_XY) clampmode = CLAMP_NONE;
|
else if ((tex->isWarped() || tex->shaderindex >= FIRST_USER_SHADER) && clampmode <= CLAMP_XY) clampmode = CLAMP_NONE;
|
||||||
|
|
||||||
// Textures that are already scaled in the texture lump will not get replaced by hires textures.
|
// Textures that are already scaled in the texture lump will not get replaced by hires textures.
|
||||||
int flags = state.mMaterial->isExpanded() ? CTF_Expand : (gl_texture_usehires && !tex->isScaled() && clampmode <= CLAMP_XY) ? CTF_CheckHires : 0;
|
int flags = state.mMaterial->isExpanded() ? CTF_Expand : (gl_texture_usehires && !tex->isScaled() && clampmode <= CLAMP_XY) ? CTF_CheckHires : 0;
|
||||||
|
@ -96,7 +96,7 @@ VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &s
|
||||||
{
|
{
|
||||||
FTexture *layer;
|
FTexture *layer;
|
||||||
auto systex = static_cast<VkHardwareTexture*>(mat->GetLayer(i, 0, &layer));
|
auto systex = static_cast<VkHardwareTexture*>(mat->GetLayer(i, 0, &layer));
|
||||||
update.addCombinedImageSampler(descriptorSet.get(), i, systex->GetImageView(layer, clampmode, 0, mat->isExpanded() ? CTF_Expand : 0), sampler, mImageLayout);
|
update.addCombinedImageSampler(descriptorSet.get(), i, systex->GetImageView(layer, clampmode, 0, mat->isExpanded() ? CTF_Expand : 0), sampler, systex->mImageLayout);
|
||||||
}
|
}
|
||||||
update.updateSets(fb->device);
|
update.updateSets(fb->device);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue