Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Mar 22, 2016
1 parent 4bab3fb commit c69c963
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/shader_spirv.cpp
Expand Up @@ -921,7 +921,7 @@ namespace bgfx
break;

default:
size += bx::read(_reader, _operand.data[0], _err);
size += bx::read(_reader, _operand.data, _err);
break;
}

Expand Down Expand Up @@ -1047,31 +1047,31 @@ namespace bgfx
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%sAddressingModel(%d)"
, 0 == ii ? " " : ", "
, operand.data[0]
, operand.data
);
break;

case SpvOperand::Decoration:
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%s%s"
, 0 == ii ? " " : ", "
, getName(SpvDecoration::Enum(operand.data[0]) )
, getName(SpvDecoration::Enum(operand.data) )
);
break;

case SpvOperand::FunctionControl:
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%s0x%08x"
, 0 == ii ? " " : ", "
, operand.data[0]
, operand.data
);
break;

case SpvOperand::LiteralNumber:
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%s%d"
, 0 == ii ? " " : ", "
, operand.data[0]
, operand.data
);
break;

Expand All @@ -1087,31 +1087,31 @@ namespace bgfx
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%sMemoryModel(%d)"
, 0 == ii ? " " : ", "
, operand.data[0]
, operand.data
);
break;

case SpvOperand::StorageClass:
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%s%s"
, 0 == ii ? " " : ", "
, getName(SpvStorageClass::Enum(operand.data[0]) )
, getName(SpvStorageClass::Enum(operand.data) )
);
break;

case SpvOperand::Count:
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%s__%d__"
, 0 == ii ? " " : ", "
, operand.data[0]
, operand.data
);
break;

default:
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
, "%sr%d"
, 0 == ii ? " " : ", "
, operand.data[0]
, operand.data
);
break;

Expand Down
3 changes: 1 addition & 2 deletions src/shader_spirv.h
Expand Up @@ -581,9 +581,8 @@ namespace bgfx
};

Enum type;
uint32_t data[4];
uint32_t data;

uint32_t target;
stl::string literalString;
};

Expand Down

0 comments on commit c69c963

Please sign in to comment.