1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 13:24:10 +01:00

[spirv] Expose opMatrixTimesMatrix, opMatrixTimesVector and opVectorTimesMatrix

This commit is contained in:
Joshua Ashton 2019-06-26 23:06:28 +01:00 committed by Philip Rebohle
parent afe2b487a6
commit 1b8c54eb84
2 changed files with 60 additions and 0 deletions

View File

@ -1807,6 +1807,51 @@ namespace dxvk {
} }
uint32_t SpirvModule::opMatrixTimesMatrix(
uint32_t resultType,
uint32_t a,
uint32_t b) {
uint32_t resultId = this->allocateId();
m_code.putIns(spv::OpMatrixTimesMatrix, 5);
m_code.putWord(resultType);
m_code.putWord(resultId);
m_code.putWord(a);
m_code.putWord(b);
return resultId;
}
uint32_t SpirvModule::opMatrixTimesVector(
uint32_t resultType,
uint32_t matrix,
uint32_t vector) {
uint32_t resultId = this->allocateId();
m_code.putIns(spv::OpMatrixTimesVector, 5);
m_code.putWord(resultType);
m_code.putWord(resultId);
m_code.putWord(matrix);
m_code.putWord(vector);
return resultId;
}
uint32_t SpirvModule::opVectorTimesMatrix(
uint32_t resultType,
uint32_t vector,
uint32_t matrix) {
uint32_t resultId = this->allocateId();
m_code.putIns(spv::OpVectorTimesMatrix, 5);
m_code.putWord(resultType);
m_code.putWord(resultId);
m_code.putWord(vector);
m_code.putWord(matrix);
return resultId;
}
uint32_t SpirvModule::opFFma( uint32_t SpirvModule::opFFma(
uint32_t resultType, uint32_t resultType,
uint32_t a, uint32_t a,

View File

@ -659,6 +659,21 @@ namespace dxvk {
uint32_t vector, uint32_t vector,
uint32_t scalar); uint32_t scalar);
uint32_t opMatrixTimesMatrix(
uint32_t resultType,
uint32_t a,
uint32_t b);
uint32_t opMatrixTimesVector(
uint32_t resultType,
uint32_t matrix,
uint32_t vector);
uint32_t opVectorTimesMatrix(
uint32_t resultType,
uint32_t vector,
uint32_t matrix);
uint32_t opFFma( uint32_t opFFma(
uint32_t resultType, uint32_t resultType,
uint32_t a, uint32_t a,