mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Metal: Fix operator precedence bug
This commit is contained in:
parent
03e4c4b26d
commit
31c986998b
1 changed files with 3 additions and 3 deletions
|
|
@ -220,9 +220,9 @@ void MTLStorageBuf::clear(uint32_t clear_value)
|
|||
if (ctx) {
|
||||
/* If all 4 bytes within clear value are equal, use the builtin fast-path for clearing. */
|
||||
uint clear_byte = clear_value & 0xFF;
|
||||
bool clear_value_bytes_equal = (clear_byte == (clear_value >> 8) & 0xFF) &&
|
||||
(clear_byte == (clear_value >> 16) & 0xFF) &&
|
||||
(clear_byte == (clear_value >> 24) & 0xFF);
|
||||
bool clear_value_bytes_equal = (clear_byte == ((clear_value >> 8) & 0xFF)) &&
|
||||
(clear_byte == ((clear_value >> 16) & 0xFF)) &&
|
||||
(clear_byte == ((clear_value >> 24) & 0xFF));
|
||||
if (clear_value_bytes_equal) {
|
||||
id<MTLBlitCommandEncoder> blit_encoder =
|
||||
ctx->main_command_buffer.ensure_begin_blit_encoder();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue