mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-26 21:13:51 +00:00
fix(rendering): check sampler validity in VkTexture::isValid(), fix Windows build
- VkTexture::isValid() now checks both image AND sampler handles. Previously it only checked the image, so a texture with a valid image but NULL sampler would pass validation and get bound to a descriptor set. On MoltenVK (macOS) this renders as pink/magenta boxes; the fallback white texture is now correctly used instead. - Fix fs::path to std::string implicit conversion in asset extractor that broke the Windows (MSYS2/clang) CI build.
This commit is contained in:
parent
50fdfd2e22
commit
bcf1015149
2 changed files with 3 additions and 3 deletions
|
|
@ -60,7 +60,7 @@ public:
|
||||||
uint32_t getHeight() const { return image_.extent.height; }
|
uint32_t getHeight() const { return image_.extent.height; }
|
||||||
VkFormat getFormat() const { return image_.format; }
|
VkFormat getFormat() const { return image_.format; }
|
||||||
uint32_t getMipLevels() const { return mipLevels_; }
|
uint32_t getMipLevels() const { return mipLevels_; }
|
||||||
bool isValid() const { return image_.image != VK_NULL_HANDLE; }
|
bool isValid() const { return image_.image != VK_NULL_HANDLE && sampler_ != VK_NULL_HANDLE; }
|
||||||
|
|
||||||
// Write descriptor info for binding
|
// Write descriptor info for binding
|
||||||
VkDescriptorImageInfo descriptorInfo(VkImageLayout layout =
|
VkDescriptorImageInfo descriptorInfo(VkImageLayout layout =
|
||||||
|
|
|
||||||
|
|
@ -866,7 +866,7 @@ bool Extractor::run(const Options& opts) {
|
||||||
// Merge with existing manifest so partial extractions don't nuke prior entries
|
// Merge with existing manifest so partial extractions don't nuke prior entries
|
||||||
fs::path manifestPath = fs::path(effectiveOutputDir) / "manifest.json";
|
fs::path manifestPath = fs::path(effectiveOutputDir) / "manifest.json";
|
||||||
if (fs::exists(manifestPath)) {
|
if (fs::exists(manifestPath)) {
|
||||||
auto existing = loadManifestEntries(manifestPath);
|
auto existing = loadManifestEntries(manifestPath.string());
|
||||||
if (!existing.empty()) {
|
if (!existing.empty()) {
|
||||||
// New entries override existing ones with same key
|
// New entries override existing ones with same key
|
||||||
for (auto& entry : manifestEntries) {
|
for (auto& entry : manifestEntries) {
|
||||||
|
|
@ -889,7 +889,7 @@ bool Extractor::run(const Options& opts) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// basePath is "." since manifest sits inside the output directory
|
// basePath is "." since manifest sits inside the output directory
|
||||||
if (!ManifestWriter::write(manifestPath, ".", manifestEntries)) {
|
if (!ManifestWriter::write(manifestPath.string(), ".", manifestEntries)) {
|
||||||
std::cerr << "Failed to write manifest: " << manifestPath << "\n";
|
std::cerr << "Failed to write manifest: " << manifestPath << "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue