MCPcopy Create free account
hub / github.com/cogentcore/core / SetGPUOpts

Method SetGPUOpts

vgpu/opts.go:410–529  ·  view source on GitHub ↗

SetGPUOpts sets the Enabled optional features in given features struct

(feats *vk.PhysicalDeviceFeatures, opts GPUOpts)

Source from the content-addressed store, hash-verified

408
409// SetGPUOpts sets the Enabled optional features in given features struct
410func (gp *GPU) SetGPUOpts(feats *vk.PhysicalDeviceFeatures, opts GPUOpts) {
411 for op, st := range opts {
412 if st != Enabled {
413 continue
414 }
415 switch op {
416 case OptRobustBufferAccess:
417 feats.RobustBufferAccess = vk.True
418 case OptFullDrawIndexUint32:
419 feats.FullDrawIndexUint32 = vk.True
420 case OptImageCubeArray:
421 feats.ImageCubeArray = vk.True
422 case OptIndependentBlend:
423 feats.IndependentBlend = vk.True
424 case OptGeometryShader:
425 feats.GeometryShader = vk.True
426 case OptTessellationShader:
427 feats.TessellationShader = vk.True
428 case OptSampleRateShading:
429 feats.SampleRateShading = vk.True
430 case OptDualSrcBlend:
431 feats.DualSrcBlend = vk.True
432 case OptLogicOp:
433 feats.LogicOp = vk.True
434 case OptMultiDrawIndirect:
435 feats.MultiDrawIndirect = vk.True
436 case OptDrawIndirectFirstInstance:
437 feats.DrawIndirectFirstInstance = vk.True
438 case OptDepthClamp:
439 feats.DepthClamp = vk.True
440 case OptDepthBiasClamp:
441 feats.DepthBiasClamp = vk.True
442 case OptFillModeNonSolid:
443 feats.FillModeNonSolid = vk.True
444 case OptDepthBounds:
445 feats.DepthBounds = vk.True
446 case OptWideLines:
447 feats.WideLines = vk.True
448 case OptLargePoints:
449 feats.LargePoints = vk.True
450 case OptAlphaToOne:
451 feats.AlphaToOne = vk.True
452 case OptMultiViewport:
453 feats.MultiViewport = vk.True
454 case OptSamplerAnisotropy:
455 feats.SamplerAnisotropy = vk.True
456 case OptTextureCompressionETC2:
457 feats.TextureCompressionETC2 = vk.True
458 case OptTextureCompressionASTC_LDR:
459 feats.TextureCompressionASTC_LDR = vk.True
460 case OptTextureCompressionBC:
461 feats.TextureCompressionBC = vk.True
462 case OptOcclusionQueryPrecise:
463 feats.OcclusionQueryPrecise = vk.True
464 case OptPipelineStatisticsQuery:
465 feats.PipelineStatisticsQuery = vk.True
466 case OptVertexPipelineStoresAndAtomics:
467 feats.VertexPipelineStoresAndAtomics = vk.True

Callers 1

MakeDeviceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected