@@ -140,6 +140,8 @@ void CHW::CreateDevice(HWND hWnd, bool move_window)
140140 updateWindowProps (m_hWnd);
141141 fill_vid_mode_list (this );
142142#endif
143+
144+ InitResources (resources);
143145}
144146
145147void CHW::DestroyDevice ()
@@ -319,6 +321,104 @@ void fill_vid_mode_list(CHW* /*_hw*/)
319321 }
320322}
321323
324+
325+ void CHW::InitResources (TBuiltInResource& Resources)
326+ {
327+ Resources.maxLights = 32 ;
328+ Resources.maxClipPlanes = 6 ;
329+ Resources.maxTextureUnits = 32 ;
330+ Resources.maxTextureCoords = 32 ;
331+ Resources.maxVertexAttribs = 64 ;
332+ Resources.maxVertexUniformComponents = 4096 ;
333+ Resources.maxVaryingFloats = 64 ;
334+ Resources.maxVertexTextureImageUnits = 32 ;
335+ Resources.maxCombinedTextureImageUnits = 80 ;
336+ Resources.maxTextureImageUnits = 32 ;
337+ Resources.maxFragmentUniformComponents = 4096 ;
338+ Resources.maxDrawBuffers = 32 ;
339+ Resources.maxVertexUniformVectors = 128 ;
340+ Resources.maxVaryingVectors = 8 ;
341+ Resources.maxFragmentUniformVectors = 16 ;
342+ Resources.maxVertexOutputVectors = 16 ;
343+ Resources.maxFragmentInputVectors = 15 ;
344+ Resources.minProgramTexelOffset = -8 ;
345+ Resources.maxProgramTexelOffset = 7 ;
346+ Resources.maxClipDistances = 8 ;
347+ Resources.maxComputeWorkGroupCountX = 65535 ;
348+ Resources.maxComputeWorkGroupCountY = 65535 ;
349+ Resources.maxComputeWorkGroupCountZ = 65535 ;
350+ Resources.maxComputeWorkGroupSizeX = 1024 ;
351+ Resources.maxComputeWorkGroupSizeY = 1024 ;
352+ Resources.maxComputeWorkGroupSizeZ = 64 ;
353+ Resources.maxComputeUniformComponents = 1024 ;
354+ Resources.maxComputeTextureImageUnits = 16 ;
355+ Resources.maxComputeImageUniforms = 8 ;
356+ Resources.maxComputeAtomicCounters = 8 ;
357+ Resources.maxComputeAtomicCounterBuffers = 1 ;
358+ Resources.maxVaryingComponents = 60 ;
359+ Resources.maxVertexOutputComponents = 64 ;
360+ Resources.maxGeometryInputComponents = 64 ;
361+ Resources.maxGeometryOutputComponents = 128 ;
362+ Resources.maxFragmentInputComponents = 128 ;
363+ Resources.maxImageUnits = 8 ;
364+ Resources.maxCombinedImageUnitsAndFragmentOutputs = 8 ;
365+ Resources.maxCombinedShaderOutputResources = 8 ;
366+ Resources.maxImageSamples = 0 ;
367+ Resources.maxVertexImageUniforms = 0 ;
368+ Resources.maxTessControlImageUniforms = 0 ;
369+ Resources.maxTessEvaluationImageUniforms = 0 ;
370+ Resources.maxGeometryImageUniforms = 0 ;
371+ Resources.maxFragmentImageUniforms = 8 ;
372+ Resources.maxCombinedImageUniforms = 8 ;
373+ Resources.maxGeometryTextureImageUnits = 16 ;
374+ Resources.maxGeometryOutputVertices = 256 ;
375+ Resources.maxGeometryTotalOutputComponents = 1024 ;
376+ Resources.maxGeometryUniformComponents = 1024 ;
377+ Resources.maxGeometryVaryingComponents = 64 ;
378+ Resources.maxTessControlInputComponents = 128 ;
379+ Resources.maxTessControlOutputComponents = 128 ;
380+ Resources.maxTessControlTextureImageUnits = 16 ;
381+ Resources.maxTessControlUniformComponents = 1024 ;
382+ Resources.maxTessControlTotalOutputComponents = 4096 ;
383+ Resources.maxTessEvaluationInputComponents = 128 ;
384+ Resources.maxTessEvaluationOutputComponents = 128 ;
385+ Resources.maxTessEvaluationTextureImageUnits = 16 ;
386+ Resources.maxTessEvaluationUniformComponents = 1024 ;
387+ Resources.maxTessPatchComponents = 120 ;
388+ Resources.maxPatchVertices = 32 ;
389+ Resources.maxTessGenLevel = 64 ;
390+ Resources.maxViewports = 16 ;
391+ Resources.maxVertexAtomicCounters = 0 ;
392+ Resources.maxTessControlAtomicCounters = 0 ;
393+ Resources.maxTessEvaluationAtomicCounters = 0 ;
394+ Resources.maxGeometryAtomicCounters = 0 ;
395+ Resources.maxFragmentAtomicCounters = 8 ;
396+ Resources.maxCombinedAtomicCounters = 8 ;
397+ Resources.maxAtomicCounterBindings = 1 ;
398+ Resources.maxVertexAtomicCounterBuffers = 0 ;
399+ Resources.maxTessControlAtomicCounterBuffers = 0 ;
400+ Resources.maxTessEvaluationAtomicCounterBuffers = 0 ;
401+ Resources.maxGeometryAtomicCounterBuffers = 0 ;
402+ Resources.maxFragmentAtomicCounterBuffers = 1 ;
403+ Resources.maxCombinedAtomicCounterBuffers = 1 ;
404+ Resources.maxAtomicCounterBufferSize = 16384 ;
405+ Resources.maxTransformFeedbackBuffers = 4 ;
406+ Resources.maxTransformFeedbackInterleavedComponents = 64 ;
407+ Resources.maxCullDistances = 8 ;
408+ Resources.maxCombinedClipAndCullDistances = 8 ;
409+ Resources.maxSamples = 4 ;
410+ Resources.limits .nonInductiveForLoops = 1 ;
411+ Resources.limits .whileLoops = 1 ;
412+ Resources.limits .doWhileLoops = 1 ;
413+ Resources.limits .generalUniformIndexing = 1 ;
414+ Resources.limits .generalAttributeMatrixVectorIndexing = 1 ;
415+ Resources.limits .generalVaryingIndexing = 1 ;
416+ Resources.limits .generalSamplerIndexing = 1 ;
417+ Resources.limits .generalVariableIndexing = 1 ;
418+ Resources.limits .generalConstantMatrixVectorIndexing = 1 ;
419+ }
420+
421+
322422void CHW::UpdateViews ()
323423{
324424 // Create the program pipeline used for rendering with shaders
0 commit comments