Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
saipraveenb25 committed Nov 8, 2024
1 parent dcc3104 commit c579188
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
5 changes: 1 addition & 4 deletions source/slang-wasm/slang-wasm-bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ EMSCRIPTEN_BINDINGS(slang)
.function("getEntryPointCodeBlob", &slang::wgsl::ComponentType::getEntryPointCodeBlob)
.function("getTargetCodeBlob", &slang::wgsl::ComponentType::getTargetCodeBlob)
.function("getTargetCode", &slang::wgsl::ComponentType::getTargetCode)
.function(
"getLayout",
&slang::wgsl::ComponentType::getLayout,
allow_raw_pointers())
.function("getLayout", &slang::wgsl::ComponentType::getLayout, allow_raw_pointers())
.function(
"loadStrings",
&slang::wgsl::ComponentType::loadStrings,
Expand Down
8 changes: 4 additions & 4 deletions source/slang-wasm/slang-wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ HashedString* ComponentType::loadStrings()

ProgramLayout* ComponentType::getLayout(unsigned int targetIndex)
{
return (slang::wgsl::ProgramLayout*) interface()->getLayout(targetIndex);
return (slang::wgsl::ProgramLayout*)interface()->getLayout(targetIndex);
}

unsigned int ProgramLayout::getParameterCount()
Expand All @@ -398,12 +398,12 @@ unsigned int ProgramLayout::getParameterCount()

VariableLayoutReflection* ProgramLayout::getParameterByIndex(unsigned int index)
{
return (slang::wgsl::VariableLayoutReflection*) (interface()->getParameterByIndex(index));
return (slang::wgsl::VariableLayoutReflection*)(interface()->getParameterByIndex(index));
}

TypeLayoutReflection* ProgramLayout::getGlobalParamsTypeLayout()
{
return (slang::wgsl::TypeLayoutReflection*) (interface()->getGlobalParamsTypeLayout());
return (slang::wgsl::TypeLayoutReflection*)(interface()->getGlobalParamsTypeLayout());
}

BindingType TypeLayoutReflection::getDescriptorSetDescriptorRangeType(
Expand All @@ -420,7 +420,7 @@ std::string VariableLayoutReflection::getName()

TypeLayoutReflection* VariableLayoutReflection::getTypeLayout()
{
return (slang::wgsl::TypeLayoutReflection*) (interface()->getTypeLayout());
return (slang::wgsl::TypeLayoutReflection*)(interface()->getTypeLayout());
}

unsigned int VariableLayoutReflection::getBindingIndex()
Expand Down
7 changes: 4 additions & 3 deletions source/slang-wasm/slang-wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,20 @@ class TypeLayoutReflection
class VariableLayoutReflection
{
public:

std::string getName();
slang::wgsl::TypeLayoutReflection* getTypeLayout();
unsigned int getBindingIndex();

slang::VariableLayoutReflection* interface() const { return (slang::VariableLayoutReflection*)this; }
slang::VariableLayoutReflection* interface() const
{
return (slang::VariableLayoutReflection*)this;
}
};


class ProgramLayout
{
public:

unsigned int getParameterCount();
slang::wgsl::VariableLayoutReflection* getParameterByIndex(unsigned int index);

Expand Down

0 comments on commit c579188

Please sign in to comment.