Remove redundant function

This commit is contained in:
Polona Caserman 2017-01-16 12:40:50 +01:00
parent f647e32659
commit 3e0f52d44c
3 changed files with 1 additions and 12 deletions

View File

@ -998,12 +998,6 @@ uint64_t Compiler::get_decoration_mask(uint32_t id) const
return dec.decoration_flags;
}
bool Compiler::is_decoration_set(uint32_t id, spv::Decoration decoration) const
{
auto &dec = meta.at(id).decoration;
return (dec.decoration_flags & (1ull << DecorationLocation));
}
uint32_t Compiler::get_decoration(uint32_t id, Decoration decoration) const
{
auto &dec = meta.at(id).decoration;

View File

@ -137,8 +137,6 @@ public:
// I.e. (1ull << spv::DecorationFoo) | (1ull << spv::DecorationBar)
uint64_t get_decoration_mask(uint32_t id) const;
bool is_decoration_set(uint32_t id, spv::Decoration decoration) const;
// Gets the value for decorations which take arguments.
// If the decoration is a boolean (i.e. spv::DecorationNonWritable),
// 1 will be returned.

View File

@ -19,8 +19,6 @@
#include <algorithm>
#include <numeric>
#include <iostream>
using namespace spv;
using namespace spirv_cross;
using namespace std;
@ -407,8 +405,7 @@ uint32_t CompilerMSL::add_interface_block(StorageClass storage)
// Copy the variable location from the original variable to the member
auto &dec = meta[p_var->self].decoration;
uint32_t locn = dec.location;
if (is_decoration_set(p_var->self, DecorationLocation))
{
if (get_decoration_mask(p_var->self) == DecorationLocation) {
set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn);
}
mark_location_as_used_by_shader(locn, storage);