Skip to content

Commit

Permalink
removing type emit wrapper now that element count isnt used
Browse files Browse the repository at this point in the history
  • Loading branch information
natevm committed Dec 8, 2024
1 parent 5330f8c commit ce56f20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 2 additions & 9 deletions source/slang/slang-emit-metal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,9 +919,7 @@ bool MetalSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inO

void MetalSourceEmitter::emitVectorTypeNameImpl(IRType* elementType, IRIntegerValue elementCount)
{
// NM: Passing count here, as Metal 64-bit vector type names do not match their scalar
// equivalents.
emitSimpleTypeKnowingCount(elementType, elementCount);
emitSimpleType(elementType);

switch (elementType->getOp())
{
Expand Down Expand Up @@ -1041,7 +1039,7 @@ void MetalSourceEmitter::emitParamTypeImpl(IRType* type, String const& name)
emitType(type, name);
}

void MetalSourceEmitter::emitSimpleTypeKnowingCount(IRType* type, IRIntegerValue elementCount)
void MetalSourceEmitter::emitSimpleTypeImpl(IRType* type)
{
switch (type->getOp())
{
Expand Down Expand Up @@ -1288,11 +1286,6 @@ void MetalSourceEmitter::emitSimpleTypeKnowingCount(IRType* type, IRIntegerValue
}
}

void MetalSourceEmitter::emitSimpleTypeImpl(IRType* type)
{
emitSimpleTypeKnowingCount(type, 1);
}

void MetalSourceEmitter::_emitType(IRType* type, DeclaratorInfo* declarator)
{
switch (type->getOp())
Expand Down
2 changes: 0 additions & 2 deletions source/slang/slang-emit-metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class MetalSourceEmitter : public CLikeSourceEmitter
IRType* valueType,
IRPackOffsetDecoration* decoration) SLANG_OVERRIDE;

void emitSimpleTypeKnowingCount(IRType* type, IRIntegerValue elementCount);

virtual void emitMeshShaderModifiersImpl(IRInst* varInst) SLANG_OVERRIDE;
virtual void emitSimpleTypeImpl(IRType* type) SLANG_OVERRIDE;
virtual void emitParamTypeImpl(IRType* type, String const& name) SLANG_OVERRIDE;
Expand Down

0 comments on commit ce56f20

Please sign in to comment.