File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,10 +213,10 @@ Algorithm::createParameters()
213213}
214214
215215void
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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments