Skip to content

Commit 47d3a41

Browse files
committed
removed mSpirv from kp::Algorithm
1 parent ea0889a commit 47d3a41

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/Algorithm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ Algorithm::createParameters()
213213
}
214214

215215
void
216-
Algorithm::createShaderModule()
216+
Algorithm::createShaderModule(const std::vector<uint32_t>& spirv)
217217
{
218218
KP_LOG_DEBUG("Kompute Algorithm createShaderModule started");
219-
this->mShader = std::make_shared<Shader>(this->mDevice, this->mSpirv);
219+
this->mShader = std::make_shared<Shader>(this->mDevice, spirv);
220220
KP_LOG_DEBUG("Kompute Algorithm create shader module success");
221221
}
222222

src/include/kompute/Algorithm.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ class Algorithm
9696
KP_LOG_DEBUG("Kompute Algorithm rebuild started");
9797

9898
this->mMemObjects = memObjects;
99-
this->mSpirv = spirv;
10099

101100
if (specializationConstants.size()) {
102101
if (this->mSpecializationConstantsData) {
@@ -138,7 +137,7 @@ class Algorithm
138137
}
139138

140139
this->createParameters();
141-
this->createShaderModule();
140+
this->createShaderModule(spirv);
142141
this->createPipeline();
143142
}
144143

@@ -312,7 +311,6 @@ class Algorithm
312311
bool mFreePipeline = false;
313312

314313
// -------------- ALWAYS OWNED RESOURCES
315-
std::vector<uint32_t> mSpirv;
316314
void* mSpecializationConstantsData = nullptr;
317315
uint32_t mSpecializationConstantsDataTypeMemorySize = 0;
318316
uint32_t mSpecializationConstantsSize = 0;
@@ -323,7 +321,7 @@ class Algorithm
323321
std::shared_ptr<Shader> mShader = nullptr;
324322

325323
// Create util functions
326-
void createShaderModule();
324+
void createShaderModule(const std::vector<uint32_t>& spirv);
327325
void createPipeline();
328326

329327
// Parameters

0 commit comments

Comments
 (0)