Address some feedback, thanks unknown

This commit is contained in:
Henrik Rydgård 2020-03-01 18:41:09 +01:00
parent cc739ebbee
commit 63f06cdd91
3 changed files with 7 additions and 6 deletions

View file

@ -1341,7 +1341,7 @@ void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePt
}
bool expand32 = !gstate_c.Supports(GPU_SUPPORTS_16BIT_FORMATS);
DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false, expand32);
DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false, expand32);
gpuStats.numTexturesDecoded++;
// We check before scaling since scaling shouldn't invent alpha from a full alpha texture.

View file

@ -436,16 +436,19 @@ void DrawBuffer::MeasureTextCount(FontID font, const char *text, int count, floa
void DrawBuffer::MeasureTextRect(FontID font_id, const char *text, int count, const Bounds &bounds, float *w, float *h, int align) {
if (!text || font_id.isInvalid()) {
*w = 0;
*h = 0;
*w = 0.0f;
*h = 0.0f;
return;
}
std::string toMeasure = std::string(text, count);
if (align & FLAG_WRAP_TEXT) {
const AtlasFont *font = atlas->getFont(font_id);
if (!font)
if (!font) {
*w = 0.0f;
*h = 0.0f;
return;
}
AtlasWordWrapper wrapper(*font, fontscalex, toMeasure.c_str(), bounds.w);
toMeasure = wrapper.Wrapped();
}

View file

@ -1350,10 +1350,8 @@ std::vector<std::string> VKContext::GetExtensionList() const {
uint32_t VKContext::GetDataFormatSupport(DataFormat fmt) const {
VkFormat vulkan_format = DataFormatToVulkan(fmt);
// TODO: Actually do proper check
VkFormatProperties properties;
vkGetPhysicalDeviceFormatProperties(vulkan_->GetCurrentPhysicalDevice(), vulkan_format, &properties);
uint32_t flags = 0;
if (properties.optimalTilingFeatures & VkFormatFeatureFlagBits::VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
flags |= FMT_RENDERTARGET;