Lines Matching refs:resBinaryShader
140 ResBinaryShader resBinaryShader = ResDynamicCast<ResBinaryShader>(resShader); in ResBinaryShader_Setup() local
142 NW_ASSERT(resBinaryShader.GetShaderObjectsCount() != 0); in ResBinaryShader_Setup()
144 u32 shaderObjects = resBinaryShader.GetShaderObjects(0); in ResBinaryShader_Setup()
152 resBinaryShader.ref().m_CommandAllocator = allocator; in ResBinaryShader_Setup()
154 for (int i = 0; i < resBinaryShader.GetShaderKindsCount(); i++) in ResBinaryShader_Setup()
157 GLuint shader = glCreateShader(resBinaryShader.GetShaderKinds(i)); in ResBinaryShader_Setup()
161 resBinaryShader.SetShaderObjects(i, shader); in ResBinaryShader_Setup()
166 …resBinaryShader.ref().m_ShaderBinaryInfo = new(binaryAnalyzerBuffer) ShaderBinaryInfo( resBinarySh… in ResBinaryShader_Setup()
168 ShaderBinaryInfo* shaderInfo = resBinaryShader.GetShaderBinaryInfo(); in ResBinaryShader_Setup()
179 resBinaryShader.ref().m_CommandCache = buffer; in ResBinaryShader_Setup()
180 resBinaryShader.ref().m_CommandCacheSize = writtenSize; in ResBinaryShader_Setup()
184 resBinaryShader.GetShaderObjectsCount(), in ResBinaryShader_Setup()
185 reinterpret_cast<GLuint*>(resBinaryShader.GetShaderObjects()), in ResBinaryShader_Setup()
187 resBinaryShader.GetBinaryData(), in ResBinaryShader_Setup()
188 resBinaryShader.GetBinaryDataCount()); in ResBinaryShader_Setup()
191 for (int i = 0; i < resBinaryShader.GetDescriptionsCount(); i++) in ResBinaryShader_Setup()
193 ResShaderProgramDescription description = resBinaryShader.GetDescriptions(i); in ResBinaryShader_Setup()
195 s32 vertexIndex = resBinaryShader.GetDescriptions(i).GetVertexShaderIndex(); in ResBinaryShader_Setup()
196 NW_MINMAXLT_ASSERT(vertexIndex, 0, resBinaryShader.GetShaderObjectsCount()); in ResBinaryShader_Setup()
197 vertexShader = resBinaryShader.GetShaderObjects(vertexIndex); in ResBinaryShader_Setup()
200 s32 geometryIndex = resBinaryShader.GetDescriptions(i).GetGeometryShaderIndex(); in ResBinaryShader_Setup()
202 if (0 <= geometryIndex && geometryIndex < resBinaryShader.GetShaderObjectsCount()) in ResBinaryShader_Setup()
204 geometryShader = resBinaryShader.GetShaderObjects(geometryIndex); in ResBinaryShader_Setup()
207 resBinaryShader.GetDescriptions(i).SetVertexShaderObject( vertexShader ); in ResBinaryShader_Setup()
208 resBinaryShader.GetDescriptions(i).SetGeometryShaderObject( geometryShader ); in ResBinaryShader_Setup()
209 resBinaryShader.GetDescriptions(i).Setup(allocator); in ResBinaryShader_Setup()
238 ResBinaryShader resBinaryShader = ResDynamicCast<ResBinaryShader>(*this); in Cleanup() local
240 if (resBinaryShader.IsValid()) in Cleanup()
242 os::IAllocator* allocator = resBinaryShader.ref().m_CommandAllocator; in Cleanup()
244 if ( resBinaryShader.ref().m_CommandCache != NULL ) in Cleanup()
246 resBinaryShader.ref().m_CommandAllocator->Free( resBinaryShader.ref().m_CommandCache ); in Cleanup()
247 resBinaryShader.ref().m_CommandCache = NULL; in Cleanup()
248 resBinaryShader.ref().m_CommandCacheSize = 0; in Cleanup()
251 if ( resBinaryShader.ref().m_ShaderBinaryInfo != NULL ) in Cleanup()
253 ShaderBinaryInfo* shaderInfo = resBinaryShader.GetShaderBinaryInfo(); in Cleanup()
255 resBinaryShader.ref().m_CommandAllocator->Free( shaderInfo ); in Cleanup()
257 resBinaryShader.ref().m_ShaderBinaryInfo = NULL; in Cleanup()
260 ut::SafeCleanupAll(resBinaryShader.GetDescriptions()); in Cleanup()
262 for (int i = 0; i < resBinaryShader.GetShaderObjectsCount(); i++) in Cleanup()
264 u32 shaderObject = resBinaryShader.GetShaderObjects(i); in Cleanup()
270 resBinaryShader.SetShaderObjects(i, 0); in Cleanup()
275 resBinaryShader.ref().m_CommandAllocator = NULL; in Cleanup()