Skip to content

Commit

Permalink
fix overflow of u8 & address of expired value
Browse files Browse the repository at this point in the history
  • Loading branch information
hana-alice committed Sep 8, 2023
1 parent b114304 commit dc1275d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion native/cocos/renderer/gfx-wgpu/WGPUObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace cc {
namespace gfx {

constexpr uint8_t CC_WGPU_MAX_ATTACHMENTS = 16;
constexpr uint8_t CC_WGPU_MAX_STREAM = 256; // not sure
constexpr decltype(nullptr) wgpuDefaultHandle = nullptr;
constexpr ccstd::hash_t WGPU_HASH_SEED = 0x811C9DC5;
constexpr uint8_t CC_WGPU_MAX_FRAME_COUNT = 3;
Expand Down
3 changes: 2 additions & 1 deletion native/cocos/renderer/gfx-wgpu/WGPUSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ CCWGPUSampler *dftUnfilterableSampler = nullptr;
using namespace emscripten;

CCWGPUSampler::CCWGPUSampler(const SamplerInfo &info) : Sampler(info) {
ccstd::string tag = std::to_string(static_cast<uint32_t>(info.minFilter)) + " " + std::to_string(static_cast<uint32_t>(info.magFilter)) + " " + std::to_string(static_cast<uint32_t>(info.mipFilter));
WGPUSamplerDescriptor descriptor = {
.nextInChain = nullptr,
.label = (std::to_string(static_cast<uint32_t>(info.minFilter)) + " " + std::to_string(static_cast<uint32_t>(info.magFilter)) + " " + std::to_string(static_cast<uint32_t>(info.mipFilter))).c_str(),
.label = tag.c_str(),
.addressModeU = toWGPUAddressMode(info.addressU),
.addressModeV = toWGPUAddressMode(info.addressV),
.addressModeW = toWGPUAddressMode(info.addressW),
Expand Down

0 comments on commit dc1275d

Please sign in to comment.