Skip to content

Commit

Permalink
sokol_gfx.h: fix bindslot validation bitmask test
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 6, 2024
1 parent ebcc628 commit 5da5946
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -16366,13 +16366,13 @@ _SOKOL_PRIVATE uint64_t _sg_validate_set_slot_bit(uint64_t bits, sg_shader_stage
switch (stage) {
case SG_SHADERSTAGE_NONE:
SOKOL_ASSERT(slot < 64);
return bits | (1 << slot);
return bits | (1ULL << slot);
case SG_SHADERSTAGE_VERTEX:
SOKOL_ASSERT(slot < 32);
return bits | (1 << slot);
return bits | (1ULL << slot);
case SG_SHADERSTAGE_FRAGMENT:
SOKOL_ASSERT(slot < 32);
return bits | (1 << (32 + slot));
return bits | (1ULL << (32 + slot));
}
SOKOL_UNREACHABLE;
return 0;
Expand All @@ -16383,15 +16383,15 @@ _SOKOL_PRIVATE bool _sg_validate_slot_bits(uint64_t bits, sg_shader_stage stage,
switch (stage) {
case SG_SHADERSTAGE_NONE:
SOKOL_ASSERT(slot < 64);
mask = 1 << slot;
mask = 1ULL << slot;
break;
case SG_SHADERSTAGE_VERTEX:
SOKOL_ASSERT(slot < 32);
mask = 1 << slot;
mask = 1ULL << slot;
break;
case SG_SHADERSTAGE_FRAGMENT:
SOKOL_ASSERT(slot < 32);
mask = 1 << (32 + slot);
mask = 1ULL << (32 + slot);
break;
default:
SOKOL_UNREACHABLE;
Expand Down

0 comments on commit 5da5946

Please sign in to comment.