[GPU] Explicitly cast bit field values in std::min/max

According to the integral promotion rules https://eel.is/c++draft/conv.prom#5.sentence-1 bit fields can be promoted to `int` if it's wide enough to store their value, and then otherwise, to `unsigned int`. Hopefully fixes Clang building (the `width_div_8` case).
This commit is contained in:
Triang3l
2022-06-26 16:54:11 +03:00
parent e0b890fe5c
commit 086a070fa9
5 changed files with 33 additions and 27 deletions

View File

@@ -73,7 +73,8 @@ bool TextureInfo::Prepare(const xe_gpu_texture_fetch_t& fetch,
info.pitch = fetch.pitch << 5;
info.mip_min_level = fetch.mip_min_level;
info.mip_max_level = std::max(fetch.mip_min_level, fetch.mip_max_level);
info.mip_max_level =
std::max(uint32_t(fetch.mip_min_level), uint32_t(fetch.mip_max_level));
info.is_tiled = fetch.tiled;
info.has_packed_mips = fetch.packed_mips;