GPU: Refactor texture samplers #105642

Merged
Omar Emara merged 9 commits from OmarEmaraDev/blender:texture-sampler-refactor into main 2023-04-04 15:16:20 +02:00
1 changed files with 7 additions and 1 deletions
Showing only changes of commit 532e781fff - Show all commits

View File

@ -138,7 +138,13 @@ struct MTLSamplerState {
operator uint() const
{
return uint(uint64_t(state));
uint integer_representation = 0;
integer_representation |= this->state.filtering;
integer_representation |= this->state.wrapping_x << 8;
integer_representation |= this->state.wrapping_y << 12;
integer_representation |= this->state.custom_type << 16;
integer_representation |= this->state.type << 24;
return integer_representation;
}
operator uint64_t() const