Skip to content

Commit 1b16871

Browse files
committed
Implement several features
1 parent 1da8585 commit 1b16871

File tree

4 files changed

+184
-116
lines changed

4 files changed

+184
-116
lines changed

include/nbl/video/SPhysicalDeviceFeatures.h

Lines changed: 110 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,103 @@ struct SPhysicalDeviceFeatures
552552
bool rayTracingMotionBlur = false;
553553
bool rayTracingMotionBlurPipelineTraceRaysIndirect = false;
554554

555+
/* CoverageReductionModeFeaturesNV *//* VK_NV_coverage_reduction_mode */
556+
bool coverageReductionMode;
557+
558+
/* DeviceGeneratedCommandsFeaturesNV *//* VK_NV_device_generated_commands */
559+
bool deviceGeneratedCommands = false;
560+
561+
/* MeshShaderFeaturesNV *//* VK_NV_mesh_shader */
562+
bool taskShader = false;
563+
bool meshShader = false;
564+
565+
/* RepresentativeFragmentTestFeaturesNV *//* VK_NV_representative_fragment_test */
566+
bool representativeFragmentTest = false;
567+
568+
/* VK_AMD_mixed_attachment_samples *//* OR *//* VK_NV_framebuffer_mixed_samples */
569+
bool mixedAttachmentSamples = false;
570+
571+
/* VK_EXT_hdr_metadata */
572+
bool hdrMetadata = false;
573+
574+
/* VK_GOOGLE_display_timing */
575+
bool displayTiming = false;
576+
577+
/* VK_AMD_rasterization_order */
578+
bool rasterizationOrder = false;
579+
580+
/* VK_AMD_shader_explicit_vertex_parameter */
581+
bool shaderExplicitVertexParameter = false;
582+
583+
/* VK_AMD_shader_info */
584+
bool shaderInfoAMD = false;
585+
586+
// [TODO] Promoted to VK1.1 core, haven't updated API to match
587+
/* VK_KHR_descriptor_update_template */
588+
589+
// [TODO] Always enable, expose as limit
590+
/* VK_NV_sample_mask_override_coverage */
591+
592+
// [TODO] Always enable, have it contribute to shaderSubgroup reporting & report as limit
593+
/* VK_NV_shader_subgroup_partitioned */
594+
595+
// [TODO] Always enable, expose as limit
596+
/* VK_AMD_gcn_shader */
597+
598+
// [TODO] Always enable, expose as limit (Note: Promoted to VK_KHR_shader_float16_int8)
599+
/* VK_AMD_gpu_shader_half_float */
600+
601+
// [TODO] Always enable, expose as limit (Note: Promoted to VK_AMD_gpu_shader_int16)
602+
/* VK_AMD_gpu_shader_int16 */
603+
604+
// [TODO] Always enable, have it contribute to shaderSubgroup reporting
605+
/* VK_AMD_shader_ballot */
606+
607+
// [TODO] Always enable, expose as limit
608+
/* VK_AMD_shader_image_load_store_lod */
609+
610+
// [TODO] Enable when available, report as limit
611+
/* VK_AMD_shader_trinary_minmax */
612+
613+
// [TODO] needs to figure out how extending our LOAD_OP enum would affect the GL backend
614+
/* VK_EXT_load_store_op_none */
615+
616+
// [TODO] Always enable, expose as limit
617+
/* VK_EXT_post_depth_coverage */
618+
619+
// [TODO] Always enable, expose as limit
620+
/* VK_EXT_shader_stencil_export */
621+
622+
// [TODO] Always enable, expose as limit
623+
/* VK_GOOGLE_decorate_string */
624+
625+
// [TODO] Always enable, expose as limit
626+
/* VK_KHR_external_fence_fd */
627+
628+
// [TODO] Always enable, expose as limit
629+
/* VK_KHR_external_fence_win32 */
630+
631+
// [TODO] Always enable, expose as limit
632+
/* VK_KHR_external_memory_fd */
633+
634+
// [TODO] Always enable, expose as limit
635+
/* VK_KHR_external_memory_win32 */
636+
637+
// [TODO] Always enable, expose as limit
638+
/* VK_KHR_external_semaphore_fd */
639+
640+
// [TODO] Always enable, expose as limit
641+
/* VK_KHR_external_semaphore_win32 */
642+
643+
// [TODO] Shader extension, always enable, expose as limit
644+
/* VK_KHR_shader_non_semantic_info */
645+
646+
// [TODO] Always enable, expose as limit
647+
/* VK_NV_geometry_shader_passthrough */
648+
649+
// [TODO] Always enable, expose as limit
650+
/* VK_NV_viewport_swizzle */
651+
555652
// Enabled by Default, Moved to Limits
556653
//bool shaderOutputViewportIndex; // ALIAS: VK_EXT_shader_viewport_index_layer
557654
//bool shaderOutputLayer; // ALIAS: VK_EXT_shader_viewport_index_layer
@@ -568,14 +665,22 @@ struct SPhysicalDeviceFeatures
568665
/* ShaderImageFootprintFeaturesNV *//* VK_NV_shader_image_footprint */
569666
//bool imageFootprint;
570667

668+
// [TODO LATER] Won't expose for now, API changes necessary
669+
/* VK_AMD_texture_gather_bias_lod */
670+
671+
// [TODO LATER] requires extra API work to use
672+
// GL Hint: in GL/GLES this is NV_scissor_exclusive
673+
/* ExclusiveScissorFeaturesNV *//* VK_NV_scissor_exclusive */
674+
//bool exclusiveScissor;
675+
676+
// [TODO LATER] when we do multi-gpu
677+
/* ExternalMemoryRDMAFeaturesNV *//* VK_NV_external_memory_rdma */
678+
//bool externalMemoryRDMA;
679+
571680
// [DO NOT EXPOSE] for a very long time
572681
/* CornerSampledImageFeaturesNV *//* VK_NV_corner_sampled_image */
573682
//bool cornerSampledImage;
574683

575-
// [TODO]
576-
/* CoverageReductionModeFeaturesNV *//* VK_NV_coverage_reduction_mode */
577-
//VkCoverageReductionModeNV coverageReductionMode;
578-
579684
// [DO NOT EXPOSE] insane oxymoron, dedicated means dedicated, not aliased, won't expose
580685
/* DedicatedAllocationImageAliasingFeaturesNV *//* VK_NV_dedicated_allocation_image_aliasing */
581686
//bool dedicatedAllocationImageAliasing;
@@ -584,14 +689,6 @@ struct SPhysicalDeviceFeatures
584689
/* DiagnosticsConfigFeaturesNV *//* VK_NV_device_diagnostics_config */
585690
//bool diagnosticsConfig;
586691

587-
// [TODO]
588-
/* DeviceGeneratedCommandsFeaturesNV *//* VK_NV_device_generated_commands */
589-
//bool deviceGeneratedCommands;
590-
591-
// [TODO] when we do multi-gpu
592-
/* ExternalMemoryRDMAFeaturesNV *//* VK_NV_external_memory_rdma */
593-
//bool externalMemoryRDMA;
594-
595692
// [DEPRECATED]
596693
/* FragmentShaderBarycentricFeaturesNV *//* VK_NV_fragment_shader_barycentric */
597694
//bool fragmentShaderBarycentric;
@@ -610,20 +707,6 @@ struct SPhysicalDeviceFeatures
610707
/* LinearColorAttachmentFeaturesNV *//* VK_NV_linear_color_attachment */
611708
//bool linearColorAttachment;
612709

613-
// [TODO]
614-
/* MeshShaderFeaturesNV *//* VK_NV_mesh_shader */
615-
//bool taskShader;
616-
//bool meshShader;
617-
618-
// [TODO] Expose Soon, Useful
619-
/* RepresentativeFragmentTestFeaturesNV *//* VK_NV_representative_fragment_test */
620-
//bool representativeFragmentTest;
621-
622-
// [TODO] requires extra API work to use
623-
// GL Hint: in GL/GLES this is NV_scissor_exclusive
624-
/* ExclusiveScissorFeaturesNV *//* VK_NV_scissor_exclusive */
625-
//bool exclusiveScissor;
626-
627710
// [ENABLE BY DEFAULT]
628711
/* ShaderSMBuiltinsFeaturesNV *//* VK_NV_shader_sm_builtins */
629712
//bool shaderSMBuiltins;
@@ -662,31 +745,18 @@ struct SPhysicalDeviceFeatures
662745
// [DO NOT EXPOSE] Promoted to KHR version already exposed
663746
/* VK_AMD_draw_indirect_count */
664747

665-
// [TODO] Always enable, expose as limit
666-
/* VK_AMD_gcn_shader */
667-
668748
// [DO NOT EXPOSE] 0 documentation
669749
/* VK_AMD_gpa_interface */
670750

671-
// [TODO] Always enable, expose as limit (Note: Promoted to VK_KHR_shader_float16_int8)
672-
/* VK_AMD_gpu_shader_half_float */
673-
674751
// [TODO LATER] (When it has documentation): Always enable, expose as limit
675752
/* VK_AMD_gpu_shader_half_float_fetch */
676-
677-
// [TODO] Always enable, expose as limit (Note: Promoted to VK_AMD_gpu_shader_int16)
678-
/* VK_AMD_gpu_shader_int16 */
679753

680754
// [DO NOT EXPOSE] 0 documentation
681755
/* VK_AMD_image_layout_resolve */
682756

683757
// [DO NOT EXPOSE]
684758
/* VK_AMD_memory_overallocation_behavior */
685759

686-
// [TODO] Expose NV & AMD mixed attachment samples under single bool
687-
/* VK_AMD_mixed_attachment_samples */
688-
/* VK_NV_framebuffer_mixed_samples */
689-
690760
// [DO NOT EXPOSE] Promoted to VK_KHR_maintenance1, core VK 1.1
691761
/* VK_AMD_negative_viewport_height */
692762

@@ -695,27 +765,6 @@ struct SPhysicalDeviceFeatures
695765

696766
// [DO NOT EXPOSE] Promoted to VK_EXT_sample_locations
697767
/* VK_AMD_programmable_sample_locations */
698-
699-
// [TODO] Will add at some point
700-
/* VK_AMD_rasterization_order */
701-
702-
// [TODO] Always enable, have it contribute to shaderSubgroup reporting
703-
/* VK_AMD_shader_ballot */
704-
705-
// [TODO] Want to expose
706-
/* VK_AMD_shader_explicit_vertex_parameter */
707-
708-
// [TODO] Always enable, expose as limit
709-
/* VK_AMD_shader_image_load_store_lod */
710-
711-
// [TODO] Expose, leave note to user about needing to use `getNativeHandle` for reporting
712-
/* VK_AMD_shader_info */
713-
714-
// [TODO] Enable when available, report as limit
715-
/* VK_AMD_shader_trinary_minmax */
716-
717-
// [TODO] Won't expose for now, API changes necessary
718-
/* VK_AMD_texture_gather_bias_lod */
719768

720769
// [DO NOT EXPOSE] 0 documentation
721770
/* VK_AMD_wave_limits */
@@ -732,7 +781,7 @@ struct SPhysicalDeviceFeatures
732781
// [DO NOT EXPOSE] Promoted to VK_EXT_debug_utils (instance ext)
733782
/* VK_EXT_debug_marker */
734783

735-
// [TODO] Will expose some day
784+
// [TODO LATER] Will expose some day
736785
/* VK_EXT_depth_range_unrestricted */
737786

738787
// [TODO LATER] Requires handling display swapchain stuff
@@ -750,15 +799,9 @@ struct SPhysicalDeviceFeatures
750799
// [DO NOT EXPOSE] absorbed into KHR_global_priority
751800
/* VK_EXT_global_priority_query */
752801

753-
// [TODO] Expose
754-
/* VK_EXT_hdr_metadata */
755-
756802
// [DO NOT EXPOSE] Too "intrinsically linux"
757803
/* VK_EXT_image_drm_format_modifier */
758804

759-
// [TODO] needs to figure out how extending our LOAD_OP enum would affect the GL backend
760-
/* VK_EXT_load_store_op_none */
761-
762805
// [TODO LATER] Expose when we support MoltenVK
763806
/* VK_EXT_metal_objects */
764807

@@ -771,9 +814,6 @@ struct SPhysicalDeviceFeatures
771814
// [TODO LATER] would like to expose, but too much API to change
772815
/* VK_EXT_pipeline_creation_feedback */
773816

774-
// [TODO] Always enable, expose as limit
775-
/* VK_EXT_post_depth_coverage */
776-
777817
/* VK_EXT_queue_family_foreign */
778818

779819
// [DO NOT EXPOSE] wont expose yet (or ever), requires VK_KHR_sampler_ycbcr_conversion
@@ -784,9 +824,6 @@ struct SPhysicalDeviceFeatures
784824
// [DO NOT EXPOSE] stupid to expose, it would be extremely dumb to want to provide some identifiers instead of VkShaderModule outside of some emulator which has no control over pipeline combo explosion
785825
/* VK_EXT_shader_module_identifier */
786826

787-
// [TODO] Always enable, expose as limit
788-
/* VK_EXT_shader_stencil_export */
789-
790827
// [DO NOT EXPOSE] we dont need to care or know about it
791828
/* VK_EXT_tooling_info */
792829

@@ -805,12 +842,6 @@ struct SPhysicalDeviceFeatures
805842
// [DO NOT EXPOSE] Provisional
806843
/* VK_EXTX_portability_subset */
807844

808-
// [TODO] Always enable, expose as limit
809-
/* VK_GOOGLE_decorate_string */
810-
811-
// [TODO] Immediate TODO shortlist
812-
/* VK_GOOGLE_display_timing */
813-
814845
// [DO NOT EXPOSE]
815846
/* VK_GOOGLE_hlsl_functionality1 */
816847

@@ -844,9 +875,6 @@ struct SPhysicalDeviceFeatures
844875
// [DO NOT EXPOSE] required for acceleration_structure and only that extension, do not expose until another comes that actually makes use of it
845876
/* VK_KHR_deferred_host_operations */
846877

847-
// [TODO] Promoted to VK1.1 core, haven't updated API to match
848-
/* VK_KHR_descriptor_update_template */
849-
850878
// [DO NOT EXPOSE] Promoted to core VK 1.1
851879
/* VK_KHR_device_group */
852880

@@ -855,30 +883,12 @@ struct SPhysicalDeviceFeatures
855883
// [DO NOT EXPOSE] Promoted to core VK 1.1
856884
/* VK_KHR_external_fence */
857885

858-
// [TODO] Always enable, expose as limit
859-
/* VK_KHR_external_fence_fd */
860-
861-
// [TODO] Always enable, expose as limit
862-
/* VK_KHR_external_fence_win32 */
863-
864886
// [DO NOT EXPOSE] Promoted to core VK 1.1
865887
/* VK_KHR_external_memory */
866888

867-
// [TODO] Always enable, expose as limit
868-
/* VK_KHR_external_memory_fd */
869-
870-
// [TODO] Always enable, expose as limit
871-
/* VK_KHR_external_memory_win32 */
872-
873889
// [DO NOT EXPOSE] Promoted to core VK 1.1
874890
/* VK_KHR_external_semaphore */
875891

876-
// [TODO] Always enable, expose as limit
877-
/* VK_KHR_external_semaphore_fd */
878-
879-
// [TODO] Always enable, expose as limit
880-
/* VK_KHR_external_semaphore_win32 */
881-
882892
/* VK_KHR_format_feature_flags2 */
883893

884894
// [DO NOT EXPOSE] Promoted to core VK 1.1
@@ -896,9 +906,6 @@ struct SPhysicalDeviceFeatures
896906
// [DO NOT EXPOSE] Promoted to core VK 1.1
897907
/* VK_KHR_relaxed_block_layout */
898908

899-
// [TODO] Shader extension, always enable, expose as limit
900-
/* VK_KHR_shader_non_semantic_info */
901-
902909
// [DO NOT EXPOSE] Leave for later consideration
903910
/* VK_KHR_shared_presentable_image */
904911

@@ -947,9 +954,6 @@ struct SPhysicalDeviceFeatures
947954
// [TODO LATER] Requires API changes
948955
/* VK_NV_fragment_coverage_to_color */
949956

950-
// [TODO] Always enable, expose as limit
951-
/* VK_NV_geometry_shader_passthrough */
952-
953957
// [DO NOT EXPOSE]
954958
/* VK_NV_glsl_shader */
955959

@@ -961,12 +965,6 @@ struct SPhysicalDeviceFeatures
961965
// [DO NOT EXPOSE] 0 documentation
962966
/* VK_NV_rdma_memory */
963967

964-
// [TODO] Always enable, expose as limit
965-
/* VK_NV_sample_mask_override_coverage */
966-
967-
// [TODO] Always enable, have it contribute to shaderSubgroup reporting & report as limit
968-
/* VK_NV_shader_subgroup_partitioned */
969-
970968
// [DO NOT EXPOSE] 0 documentation
971969
/* VK_NV_texture_dirty_tile_map */
972970

@@ -975,9 +973,6 @@ struct SPhysicalDeviceFeatures
975973

976974
/* VK_NV_viewport_array2 */
977975

978-
// [TODO] Always enable, expose as limit
979-
/* VK_NV_viewport_swizzle */
980-
981976
// [DO NOT EXPOSE] Promoted to VK_KHR_win32_keyed_mutex
982977
/* VK_NV_win32_keyed_mutex */
983978

src/nbl/video/COpenGLFeatureMap.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,8 @@ class COpenGLFeatureMap
467467
"GL_NV_conservative_raster_pre_snap_triangles",
468468
"GL_NV_conservative_raster_underestimation",
469469
"GL_NV_shader_texture_footprint",
470+
"GL_NV_framebuffer_mixed_samples",
471+
"GL_NV_representative_fragment_test",
470472
"GL_OML_interlace",
471473
"GL_OML_resample",
472474
"GL_OML_subsample",
@@ -1024,6 +1026,8 @@ class COpenGLFeatureMap
10241026
NBL_NV_conservative_raster_pre_snap_triangles,
10251027
NBL_NV_conservative_raster_underestimation,
10261028
NBL_NV_shader_texture_footprint,
1029+
NBL_NV_framebuffer_mixed_samples,
1030+
NBL_NV_representative_fragment_test,
10271031
NBL_OML_interlace,
10281032
NBL_OML_resample,
10291033
NBL_OML_subsample,

0 commit comments

Comments
 (0)