diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11ec47ca..ad966b2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ variables: # # Pick a pipeline on https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/ # - MESA_PIPELINE_ID: 1646089 + MESA_PIPELINE_ID: 1736638 MESA_PROJECT_PATH: mesa/mesa S3_JWT_FILE: /s3_jwt @@ -59,7 +59,7 @@ include: # IMPORTANT: Use a recent Mesa Git revision # The commit ref must be in sync with the pipeline picked above # It can be found on the pipeline page below the commit message - ref: cc4492204894c0488e96a93f51b546345ae32f88 + ref: cf63745aa2dfdb88eafb4ac2b619f95c09cfd832 file: - '/.gitlab-ci/image-tags.yml' @@ -640,7 +640,6 @@ virgl-traces: PIGLIT_TRACES_FILE: "traces-virgl.yml" PIGLIT_REPLAY_DEVICE_NAME: "gl-virgl" PIGLIT_RESULTS: "virgl-replay" - KERNEL_TAG: "v6.16-mesa-9d85" .venus-lavapipe-test: extends: @@ -650,13 +649,11 @@ virgl-traces: CROSVM_GALLIUM_DRIVER: "llvmpipe" CROSVM_VK_DRIVER: "lvp" RUNNER_WRAPPER: "install/crosvm-runner.sh" - # INFO: Keep Linux version at 6.14 as 6.16 seems to have regressed - # in virtio gfx device initializaiton - KERNEL_TAG: "v6.14-mesa-4277" venus-lavapipe: extends: - .venus-lavapipe-test + parallel: 3 variables: DEQP_FRACTION: 35 DEQP_SUITE: venus diff --git a/.gitlab-ci/expectations/host/virgl-gl-fails.txt b/.gitlab-ci/expectations/host/virgl-gl-fails.txt index 90baf527..ecb2ab44 100644 --- a/.gitlab-ci/expectations/host/virgl-gl-fails.txt +++ b/.gitlab-ci/expectations/host/virgl-gl-fails.txt @@ -160,20 +160,15 @@ spec@arb_texture_rg@texwrap formats bordercolor-swizzled@GL_RG16- swizzled- bord spec@arb_texture_rg@texwrap formats bordercolor-swizzled@GL_RG8- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor,Fail spec@arb_texture_rg@texwrap formats-float bordercolor@GL_R16F- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor@GL_R32F- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor@GL_RG16F- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor@GL_RG32F- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_R16F- swizzled- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_R32F- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG16F- swizzled- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG32F- swizzled- border color only,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_0,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_2,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_any,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_single,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic,Fail -spec@egl 1.4@eglterminate then unbind context,Fail spec@egl_khr_gl_image@egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24,Fail spec@egl_khr_surfaceless_context@viewport,Fail spec@ext_framebuffer_multisample@alpha-blending-after-rendering 2,Fail @@ -326,7 +321,6 @@ spec@nv_copy_depth_to_color@nv_copy_depth_to_color 1 0x76356278,Fail spec@nv_copy_depth_to_color@nv_copy_depth_to_color,Fail spec@nv_copy_image@nv_copy_image-formats,Fail spec@nv_copy_image@nv_copy_image-formats@Source: GL_DEPTH_COMPONENT24/Destination: GL_DEPTH_COMPONENT24,Fail -spec@nv_read_depth@read_depth_gles3,Fail spec@!opengl 1.0@depth-clear-precision-check@depth32,Fail spec@!opengl 1.0@depth-clear-precision-check,Fail spec@!opengl 1.0@gl-1.0-edgeflag,Fail @@ -446,33 +440,41 @@ spec@arb_texture_float@texwrap formats bordercolor,Fail KHR-GL43.cull_distance.functional,Fail KHR-GL43.shader_image_load_store.incomplete_textures,Fail KHR-GL43.shader_image_load_store.basic-allTargets-store,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY32F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB32F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY16F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA16F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA32F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA32F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY32F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGB16F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA32F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA32F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE16F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA16F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE16F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB16F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGB32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA16F_ARB- border color only,Fail # uprev Mesa in virglrenderer +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.2,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.8,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.6,Crash KHR-GL43.cull_distance.functional_test_item_5_primitive_mode_lines_max_culldist_0,Fail KHR-GL43.cull_distance.functional_test_item_5_primitive_mode_points_max_culldist_0,Fail KHR-GL43.cull_distance.functional_test_item_5_primitive_mode_triangles_max_culldist_0,Fail @@ -517,6 +519,7 @@ spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=2,F spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=4,Fail spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=6,Fail spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=8,Fail +spec@!opengl 1.1@large-tex,Crash spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one_write-z,Fail spec@arb_shader_image_load_store@max-size@image2DMS max size test/8x16384x8x1,Fail spec@arb_shader_image_load_store@max-size@image2DMS max size test/8x8x16384x1,Fail @@ -532,6 +535,7 @@ spec@arb_texture_rectangle@copyteximage rect samples=4,Fail spec@arb_texture_rectangle@copyteximage rect samples=6,Fail spec@arb_texture_rectangle@copyteximage rect samples=8,Fail spec@arb_texture_rectangle@copyteximage rect,Fail +spec@arb_texture_view@tex-view,Fail spec@ext_framebuffer_multisample@interpolation 6 centroid-edges,Fail spec@ext_framebuffer_multisample@interpolation 8 centroid-edges,Fail spec@ext_framebuffer_multisample@no-color 6 depth single,Fail @@ -546,6 +550,7 @@ spec@ext_texture_array@copyteximage 2d_array samples=2,Fail spec@ext_texture_array@copyteximage 2d_array samples=4,Fail spec@ext_texture_array@copyteximage 2d_array samples=6,Fail spec@ext_texture_array@copyteximage 2d_array samples=8,Fail +spec@ext_transform_feedback2@draw-auto offset,Fail spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec3-index-wr-before-gs,Crash spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec4-index-wr-before-gs,Crash diff --git a/.gitlab-ci/expectations/host/virgl-gles-fails.txt b/.gitlab-ci/expectations/host/virgl-gles-fails.txt index 9d4b378c..5ed7f7ea 100644 --- a/.gitlab-ci/expectations/host/virgl-gles-fails.txt +++ b/.gitlab-ci/expectations/host/virgl-gles-fails.txt @@ -146,7 +146,6 @@ spec@arb_occlusion_query@occlusion_query_meta_fragments,Fail spec@arb_occlusion_query@occlusion_query_meta_no_fragments,Fail spec@arb_occlusion_query@occlusion_query_meta_save,Fail spec@arb_point_parameters@arb_point_parameters-point-attenuation@Aliased combinations,Fail -spec@arb_point_parameters@arb_point_parameters-point-attenuation@Antialiased combinations,Fail spec@arb_point_parameters@arb_point_parameters-point-attenuation,Fail spec@arb_point_sprite@arb_point_sprite-checkerboard,Fail spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex,ExpectedFail @@ -282,14 +281,10 @@ spec@arb_texture_rg@texwrap formats bordercolor-swizzled@GL_RG16- swizzled- bord spec@arb_texture_rg@texwrap formats bordercolor-swizzled@GL_RG8- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor,Fail spec@arb_texture_rg@texwrap formats-float bordercolor@GL_R16F- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor@GL_R32F- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor@GL_RG16F- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor@GL_RG32F- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_R16F- swizzled- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_R32F- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG16F- swizzled- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG32F- swizzled- border color only,Fail spec@arb_vertex_attrib_64bit@arb_vertex_attrib_64bit-overlapping-locations api,Fail spec@arb_vertex_attrib_64bit@arb_vertex_attrib_64bit-overlapping-locations shader,Fail spec@arb_vertex_attrib_64bit@execution@vs-fp64-input-trunc,Fail @@ -2208,7 +2203,6 @@ spec@nv_primitive_restart@primitive-restart-vbo_combined_vertex_and_index,Fail spec@nv_primitive_restart@primitive-restart-vbo_index_only,Fail spec@nv_primitive_restart@primitive-restart-vbo_separate_vertex_and_index,Fail spec@nv_primitive_restart@primitive-restart-vbo_vertex_only,Fail -spec@nv_read_depth@read_depth_gles3,Fail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3,ExpectedFail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3@oes_egl_image_external_essl3_imageLoad,ExpectedFail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3@oes_egl_image_external_essl3_imageStore,ExpectedFail @@ -3029,34 +3023,42 @@ shaders@point-vertex-id divisor,Fail shaders@point-vertex-id gl_vertexid divisor,Fail shaders@point-vertex-id gl_instanceid divisor,Fail spec@arb_texture_float@texwrap formats bordercolor,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY32F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB32F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY16F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA16F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA32F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA32F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY32F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGB16F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA32F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA32F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE16F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA16F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE16F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB16F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGB32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA16F_ARB- border color only,Fail # uprev Mesa in Virglrenderer +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.2,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.8,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.6,Crash spec@!opengl 1.1@depthstencil-default_fb-blit samples=2,Fail spec@!opengl 1.1@depthstencil-default_fb-blit samples=4,Fail spec@!opengl 1.1@depthstencil-default_fb-blit samples=6,Fail @@ -3093,6 +3095,7 @@ spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=2,F spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=4,Fail spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=6,Fail spec@!opengl 1.1@depthstencil-default_fb-readpixels-float-and-ushort samples=8,Fail +spec@!opengl 1.1@large-tex,Crash spec@arb_copy_image@arb_copy_image-formats --samples=2,Fail spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_ALPHA/Destination: GL_ALPHA,Fail spec@arb_copy_image@arb_copy_image-formats --samples=4,Fail @@ -3103,6 +3106,7 @@ spec@arb_framebuffer_no_attachments@arb_framebuffer_no_attachments-query@MS8,Fai spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one_write-z,Fail spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one,Fail spec@arb_framebuffer_object@execution@msaa-alpha-to-one,Fail +spec@arb_sample_shading@builtin-gl-sample-position 2,Fail spec@arb_sample_shading@samplemask 6 all,Fail spec@arb_sample_shading@samplemask 6 all@0.125000 mask_in_one,Fail spec@arb_sample_shading@samplemask 6 all@0.250000 mask_in_one,Fail @@ -3144,6 +3148,7 @@ spec@arb_texture_rectangle@copyteximage rect samples=2,Fail spec@arb_texture_rectangle@copyteximage rect samples=4,Fail spec@arb_texture_rectangle@copyteximage rect samples=6,Fail spec@arb_texture_rectangle@copyteximage rect samples=8,Fail +spec@arb_texture_view@tex-view,Fail spec@ext_framebuffer_multisample@alpha-to-one-dual-src-blend 6,Fail spec@ext_framebuffer_multisample@alpha-to-one-dual-src-blend 8,Fail spec@ext_framebuffer_multisample@draw-buffers-alpha-to-one 6,Fail @@ -3188,6 +3193,7 @@ spec@ext_texture_array@copyteximage 2d_array samples=2,Fail spec@ext_texture_array@copyteximage 2d_array samples=4,Fail spec@ext_texture_array@copyteximage 2d_array samples=6,Fail spec@ext_texture_array@copyteximage 2d_array samples=8,Fail +spec@ext_transform_feedback2@draw-auto offset,Fail spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec3-index-wr-before-gs,Crash spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec4-index-wr-before-gs,Crash spec@nv_copy_image@nv_copy_image-formats --samples=2,Fail diff --git a/.gitlab-ci/expectations/virt/deqp-venus.toml b/.gitlab-ci/expectations/virt/deqp-venus.toml index 132775d0..036c0e38 100644 --- a/.gitlab-ci/expectations/virt/deqp-venus.toml +++ b/.gitlab-ci/expectations/virt/deqp-venus.toml @@ -3,3 +3,4 @@ deqp = "/deqp-vk/external/vulkancts/modules/vulkan/deqp-vk" caselists = [ "/deqp-vk/mustpass/vk-main.txt" ] timeout = 30.0 # Starting lots of Crosvm instances simultaneously can take some time renderer_check = "Virtio-GPU Venus.*llvmpipe" +tests_per_group = 500 \ No newline at end of file diff --git a/.gitlab-ci/expectations/virt/traces-virgl.yml b/.gitlab-ci/expectations/virt/traces-virgl.yml index 7ce54d5a..883ecdbd 100644 --- a/.gitlab-ci/expectations/virt/traces-virgl.yml +++ b/.gitlab-ci/expectations/virt/traces-virgl.yml @@ -33,7 +33,7 @@ traces: checksum: bcaa3938ca6cdc3a6ac0f4da518ff9a9 gputest/plot3d-v2.trace: gl-virgl: - checksum: c4a35b0635bbe3fd6693c33814ff5059 + checksum: c523aed91b7520e6ea1283cb2cffd401 gputest/tessmark-v2.trace: gl-virgl: label: [skip, slow] @@ -109,7 +109,7 @@ traces: label: [crash] godot/Material Testers.x86_64_2020.04.08_13.38_frame799.rdc: gl-virgl: - checksum: 7ba4f0c52a719d94b805653d31ce22d7 + checksum: 465410a06d966b377bc8c41e52b21b0f ror/ror-default.trace: gl-virgl: label: [crash] diff --git a/.gitlab-ci/expectations/virt/venus-fails.txt b/.gitlab-ci/expectations/virt/venus-fails.txt index 04bf7297..d3dfc390 100644 --- a/.gitlab-ci/expectations/virt/venus-fails.txt +++ b/.gitlab-ci/expectations/virt/venus-fails.txt @@ -11,5 +11,9 @@ dEQP-VK.draw.dynamic_rendering.partial_secondary_cmd_buff.multiple_interpolation # uprev Mesa in Virglrenderer dEQP-VK.sparse_resources.image_block_shapes.2d.g8b8g8r8_422_unorm.samples_1,Fail +dEQP-VK.wsi.direct_drm.swapchain.create.image_format,Crash +dEQP-VK.wsi.direct_drm.swapchain.create.image_usage,Crash +dEQP-VK.wsi.direct_drm.swapchain.private_data.image_array_layers,Crash dEQP-VK.wsi.direct_drm.swapchain.private_data.image_usage,Crash +dEQP-VK.wsi.direct_drm.swapchain.render.basic,Crash diff --git a/.gitlab-ci/expectations/virt/venus-flakes.txt b/.gitlab-ci/expectations/virt/venus-flakes.txt index efe1ae51..ac16ac24 100644 --- a/.gitlab-ci/expectations/virt/venus-flakes.txt +++ b/.gitlab-ci/expectations/virt/venus-flakes.txt @@ -13,6 +13,12 @@ dEQP-VK.binding_model.mutable_descriptor.multiple_arrays_mixed.unbounded.noalias dEQP-VK.pipeline.monolithic.timestamp.calibrated.calibration_test # uprev Mesa in Virglrenderer +dEQP-VK.api.copy_and_blit.core.use_after_copy.a1r5g5b5_unorm_pack16.transfer_dst_optimal.1024x1024x2_tq_color_att_flag_img2img_msaa +dEQP-VK.api.copy_and_blit.core.use_after_copy.a8b8g8r8_srgb_pack32.transfer_dst_optimal.1024x1024x2_regions_color_att_flag_img2img_msaa +dEQP-VK.api.copy_and_blit.core.use_after_copy.r5g6b5_unorm_pack16.transfer_dst_optimal.1024x1024x2_tq_color_att_flag_img2img_msaa +dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.all_formats.color.2d.bc1_rgb_srgb_block.r8_srgb.general_general_linear +dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.all_formats.color.2d.r16g16_sfloat.r4g4_unorm_pack8.optimal_general_cubic +dEQP-VK.api.copy_and_blit.dedicated_allocation.image_to_image.all_formats.color.2d_to_2d.bc2_unorm_block.r32g32b32a32_uint.optimal_optimal dEQP-VK.api.info.image_format_properties2.2d.linear.g16b16g16r16_422_unorm dEQP-VK.binding_model.mutable_descriptor.multiple_arrays.constant_size.aliasing.update_write.no_source.no_source.pool_no_types.pre_update.index_push_constant.comp dEQP-VK.compute.shader_object_binary.workgroup_memory_explicit_layout.zero.uvec4_array_to_vec4_dvec4_array_3 @@ -35,9 +41,12 @@ dEQP-VK.ray_query.acceleration_structures.operations.traditional_structures.comp dEQP-VK.ray_tracing_pipeline.acceleration_structures.flags.sparse_binding_structures.gpu_built.aabbs.identical_instances.padded.fastbuild_update_0_0_bothgeneric dEQP-VK.ray_tracing_pipeline.acceleration_structures.flags.traditional_structures.gpu_built.triangles.different_instances.padded.0_update_0_0_bothgeneric dEQP-VK.ray_tracing_pipeline.shader_binding_table.indexing_hit.sbt_offset_0.no_shaderrecord.1_5_extraSBTRecordStrideBits +dEQP-VK.reconvergence.maximal.compute.nesting2.5.18 +dEQP-VK.reconvergence.maximal.compute.nesting2.6.22 dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed88_geometry dEQP-VK.renderpasses.renderpass2.suballocation.attachment_allocation.roll.56 dEQP-VK.robustness.robustness2.push.notemplate.r32ui.unroll.volatile.storage_texel_buffer.no_fmt_qual.len_36.samples_1.1d.comp +dEQP-VK.sparse_resources.buffer.ssbo.sparse_residency.buffer_size_2_24 dEQP-VK.sparse_resources.image_sparse_residency.mutable.2d_array.r16_unorm_r8g8_sint_r8g8_snorm dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.uniform_float_16_to_32.uniform_buffer_block_vector_float_const_idx_6_tesse dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.uniform_float_16_to_64.uniform_buffer_block_vector_float_geom @@ -46,6 +55,7 @@ dEQP-VK.spirv_assembly.type.scalar.u8.bit_field_s_extract_offset64_count64_comp dEQP-VK.synchronization.cross_instance.suballocated.write_clear_color_image_read_image_compute_indirect.image_64x64x8_r32_sfloat_timeline_semaphore_zircon_handle dEQP-VK.synchronization.op.multi_queue.fence.write_draw_read_image_vertex.image_128x128_r16_uint_concurrent_maintenance9 dEQP-VK.texture.swizzle.component_mapping.color.r16_snorm_2d_pot_bbbb +dEQP-VK.wsi.direct_drm.swapchain.create.image_array_layers dEQP-VK.api.info.image_format_properties2.2d.optimal.g16_b16r16_2plane_422_unorm dEQP-VK.api.info.image_format_properties2.2d.optimal.g8_b8r8_2plane_420_unorm diff --git a/.gitlab-ci/expectations/virt/venus-skips.txt b/.gitlab-ci/expectations/virt/venus-skips.txt index 2fad9c94..b6306ed6 100644 --- a/.gitlab-ci/expectations/virt/venus-skips.txt +++ b/.gitlab-ci/expectations/virt/venus-skips.txt @@ -25,11 +25,20 @@ dEQP-VK.texture.explicit_lod.2d.sizes.128x128_nearest_linear_mipmap_linear_repea dEQP-VK.binding_model.mutable_descriptor.multiple_arrays_mixed.* # uprev Mesa in Virglrenderer, Timeout +dEQP-VK.pipeline.fast_linked_library.blend.dual_source.multi_attachments.b4g4r4a4_unorm_pack16 dEQP-VK.texture.explicit_lod.2d.sizes.128x128_nearest_linear_mipmap_linear_clamp dEQP-VK.ray_tracing_pipeline.acceleration_structures.dynamic_indexing.dynamic_indexing dEQP-VK.ray_tracing_pipeline.build.gpu.level_instances.aabbs_65536_1_1 +dEQP-VK.synchronization.internally_synchronized_objects.pipeline_cache_compute # uprev Mesa in Virglrenderer dEQP-VK.pipeline.monolithic.blend.dual_source.multi_attachments.a1r5g5b5_unorm_pack16 dEQP-VK.pipeline.pipeline_library.blend.dual_source.multi_attachments.a2b10g10r10_unorm_pack32 +# Skip broken tests: +# https://gerrit.khronos.org/c/vk-gl-cts/+/15969 +# https://gerrit.khronos.org/c/vk-gl-cts/+/19422 +# https://gerrit.khronos.org/c/vk-gl-cts/+/19625 +dEQP-VK.image.swapchain_mutable.direct_drm.* +dEQP-VK.wsi.acquire_drm_display.* +dEQP-VK.wsi.direct_drm.* diff --git a/.gitlab-ci/expectations/virt/virgl-gl-fails.txt b/.gitlab-ci/expectations/virt/virgl-gl-fails.txt index b9ac5d00..4c53464d 100644 --- a/.gitlab-ci/expectations/virt/virgl-gl-fails.txt +++ b/.gitlab-ci/expectations/virt/virgl-gl-fails.txt @@ -151,30 +151,18 @@ spec@arb_texture_compression@texwrap formats bordercolor-swizzled@GL_COMPRESSED_ spec@arb_texture_compression@texwrap formats bordercolor-swizzled@GL_COMPRESSED_RGB- swizzled- border color only,Fail spec@arb_texture_cube_map_array@fbo-generatemipmap-cubemap array s3tc_dxt1,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGB16F- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGB32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA16F- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB16F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB32F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA16F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA32F- swizzled- border color only,Fail spec@arb_texture_rectangle@copyteximage rect,Fail spec@arb_texture_rectangle@copyteximage rect samples=2,Fail spec@arb_texture_rectangle@copyteximage rect samples=4,Fail @@ -194,20 +182,15 @@ spec@arb_texture_rg@texwrap formats bordercolor-swizzled@GL_RG16- swizzled- bord spec@arb_texture_rg@texwrap formats bordercolor-swizzled@GL_RG8- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor,Fail spec@arb_texture_rg@texwrap formats-float bordercolor@GL_R16F- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor@GL_R32F- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor@GL_RG16F- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor@GL_RG32F- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_R16F- swizzled- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_R32F- swizzled- border color only,Fail spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG16F- swizzled- border color only,Fail -spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG32F- swizzled- border color only,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_0,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_2,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_any,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic@arb_transform_feedback_overflow_query-buffer_object_single,Fail spec@arb_transform_feedback_overflow_query@arb_transform_feedback_overflow_query-basic,Fail -spec@egl 1.4@eglterminate then unbind context,Fail spec@egl_ext_device_base@conformance@configless_tests,Fail spec@egl_ext_device_base@conformance,Fail spec@egl_ext_device_base@conformance@pbuffer_tests,Fail @@ -379,7 +362,6 @@ spec@nv_copy_depth_to_color@nv_copy_depth_to_color 1 0x76356278,Fail spec@nv_copy_depth_to_color@nv_copy_depth_to_color,Fail spec@nv_copy_image@nv_copy_image-formats,Fail spec@nv_copy_image@nv_copy_image-formats@Source: GL_DEPTH_COMPONENT24/Destination: GL_DEPTH_COMPONENT24,Fail -spec@nv_read_depth@read_depth_gles3,Fail spec@!opengl 1.0@depth-clear-precision-check@depth32,Fail spec@!opengl 1.0@depth-clear-precision-check,Fail spec@!opengl 1.0@gl-1.0-drawbuffer-modes,Fail @@ -518,6 +500,26 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvyu,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_vyuy,Fail # uprev Mesa in Virglrenderer +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.2,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.8,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.6,Crash KHR-GL30.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit,Fail KHR-GL30.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Fail KHR-GL31.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit,Fail @@ -538,6 +540,7 @@ spec@arb_spirv_extensions@execution@storage_buffer_storage_class@unsized-array,F spec@arb_tessellation_shader@execution@tcs-output-unmatched,Fail spec@arb_texture_rectangle@copyteximage rect samples=6,Fail spec@arb_texture_rectangle@copyteximage rect samples=8,Fail +spec@arb_texture_view@tex-view,Fail spec@egl_ext_device_query_name@conformance,Fail spec@ext_framebuffer_multisample@interpolation 6 centroid-edges,Fail spec@ext_framebuffer_multisample@interpolation 8 centroid-edges,Fail @@ -545,6 +548,79 @@ spec@ext_framebuffer_multisample@no-color 6 depth single,Fail spec@ext_framebuffer_multisample@no-color 6 depth-computed single,Fail spec@ext_framebuffer_multisample@no-color 8 depth single,Fail spec@ext_framebuffer_multisample@no-color 8 depth-computed single,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-NV12-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-NV12-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-NV12-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P010-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P010-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P010-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P012-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P012-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P012-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P016-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P016-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P016-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R8-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R8-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R8-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-UYVY-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-UYVY-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-UYVY-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-YUYV-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-YUYV-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-YUYV-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-NV12-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-NV12-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-NV12-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P010-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P010-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P010-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P012-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P012-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P012-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P016-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P016-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P016-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R16-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R16-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R16-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R8-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R8-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R8-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-UYVY-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-UYVY-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-UYVY-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-YUYV-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-YUYV-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-YUYV-DRM_FORMAT_MOD_LINEAR-stress_test,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Fail -spec@ext_image_dma_buf_import@ext_image_dma_buf_import-tex-modifier,Fail +spec@ext_transform_feedback2@draw-auto offset,Fail diff --git a/.gitlab-ci/expectations/virt/virgl-gl-skips.txt b/.gitlab-ci/expectations/virt/virgl-gl-skips.txt index 79e8a60a..ae6919ec 100644 --- a/.gitlab-ci/expectations/virt/virgl-gl-skips.txt +++ b/.gitlab-ci/expectations/virt/virgl-gl-skips.txt @@ -31,3 +31,7 @@ spec@glsl-1.50@execution@geometry@dynamic_input_array_index spec@glsl-1.50@execution@interface-blocks-api-access-members spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec4-index-wr-before-gs spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec3-index-wr-before-gs + +# Crashes llvmpipe following Mesa uprev +# crosvm: ../src/gallium/auxiliary/gallivm/lp_bld_arit.c:1469: lp_build_clamp: Assertion `lp_check_value(bld->type, a)' failed. +spec@!opengl 1.1@large-tex diff --git a/.gitlab-ci/expectations/virt/virgl-gles-fails.txt b/.gitlab-ci/expectations/virt/virgl-gles-fails.txt index 8bde4b6f..9b426ae9 100644 --- a/.gitlab-ci/expectations/virt/virgl-gles-fails.txt +++ b/.gitlab-ci/expectations/virt/virgl-gles-fails.txt @@ -156,7 +156,6 @@ spec@arb_occlusion_query@occlusion_query_meta_fragments,Fail spec@arb_occlusion_query@occlusion_query_meta_no_fragments,Fail spec@arb_occlusion_query@occlusion_query_meta_save,Fail spec@arb_point_parameters@arb_point_parameters-point-attenuation@Aliased combinations,Fail -spec@arb_point_parameters@arb_point_parameters-point-attenuation@Antialiased combinations,Fail spec@arb_point_parameters@arb_point_parameters-point-attenuation,Fail spec@arb_point_sprite@arb_point_sprite-checkerboard,Fail spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex,ExpectedFail @@ -274,30 +273,18 @@ spec@arb_texture_compression@texwrap formats bordercolor-swizzled@GL_COMPRESSED_ spec@arb_texture_cube_map_array@arb_texture_cube_map_array-sampler-cube-array-shadow,Fail spec@arb_texture_cube_map_array@fbo-generatemipmap-cubemap array s3tc_dxt1,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_ALPHA32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_INTENSITY32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA16F_ARB- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_LUMINANCE_ALPHA32F_ARB- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGB16F- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGB32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA16F- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor@GL_RGBA32F- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_ALPHA32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_INTENSITY32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA16F_ARB- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_LUMINANCE_ALPHA32F_ARB- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB16F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB32F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA16F- swizzled- border color only,Fail -spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGBA32F- swizzled- border color only,Fail spec@arb_texture_query_lod@execution@fs-texturequerylod-nearest-biased,Fail spec@arb_texture_rectangle@texwrap rect bordercolor,Fail spec@arb_texture_rectangle@texwrap rect bordercolor@GL_RGBA8- border color only,Fail @@ -2260,7 +2247,6 @@ spec@nv_primitive_restart@primitive-restart-vbo_combined_vertex_and_index,Fail spec@nv_primitive_restart@primitive-restart-vbo_index_only,Fail spec@nv_primitive_restart@primitive-restart-vbo_separate_vertex_and_index,Fail spec@nv_primitive_restart@primitive-restart-vbo_vertex_only,Fail -spec@nv_read_depth@read_depth_gles3,Fail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3,ExpectedFail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3@oes_egl_image_external_essl3_imageLoad,ExpectedFail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3@oes_egl_image_external_essl3_imageStore,ExpectedFail @@ -3093,6 +3079,26 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvyu,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_vyuy,Fail # uprev Mesa in Virglrenderer +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.interleaved.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.7,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.2,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.lines.8,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.points.6,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.1,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.4,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.5,Crash +dEQP-GLES3.functional.transform_feedback.random.separate.triangles.6,Crash KHR-GL30.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit,Fail KHR-GL30.texture_lod_bias.texture_lod_bias_all,Fail KHR-GL31.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit,Fail @@ -3146,6 +3152,7 @@ spec@arb_sample_shading@samplemask 8@noms mask_in_one,Fail spec@arb_sample_shading@samplemask 8@noms partition,Fail spec@arb_sample_shading@samplemask 8@sample mask_in_one,Fail spec@arb_spirv_extensions@execution@storage_buffer_storage_class@unsized-array,Fail +spec@arb_texture_view@tex-view,Fail spec@egl_ext_device_query_name@conformance,Fail spec@ext_framebuffer_multisample@alpha-to-one-dual-src-blend 6,Fail spec@ext_framebuffer_multisample@alpha-to-one-dual-src-blend 8,Fail @@ -3183,8 +3190,81 @@ spec@ext_framebuffer_multisample@sample-alpha-to-one 6,Fail spec@ext_framebuffer_multisample@sample-alpha-to-one 8,Fail spec@ext_framebuffer_multisample@upsample 6 stencil,Fail spec@ext_framebuffer_multisample@upsample 8 stencil,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-AR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-NV12-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-NV12-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-NV12-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P010-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P010-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P010-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P012-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P012-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P012-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P016-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P016-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-P016-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R8-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R8-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R8-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-UYVY-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-UYVY-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-UYVY-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-XR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-YUYV-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-YUYV-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-YUYV-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-AR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-NV12-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-NV12-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-NV12-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P010-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P010-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P010-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P012-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P012-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P012-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P016-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P016-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-P016-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R16-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R16-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R16-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R8-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R8-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-R8-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-UYVY-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-UYVY-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-UYVY-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XB24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XB24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XB24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XR24-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XR24-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-XR24-DRM_FORMAT_MOD_LINEAR-stress_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-YUYV-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-YUYV-DRM_FORMAT_MOD_LINEAR-modifiers_test,Fail +spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@pregen-YUYV-DRM_FORMAT_MOD_LINEAR-stress_test,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Fail -spec@ext_image_dma_buf_import@ext_image_dma_buf_import-tex-modifier,Fail +spec@ext_transform_feedback2@draw-auto offset,Fail spec@glsl-1.40@uniform_buffer@two-stages,Fail spec@nv_copy_image@nv_copy_image-formats --samples=8,Fail spec@nv_copy_image@nv_copy_image-formats --samples=8@Source: GL_ALPHA/Destination: GL_ALPHA,Fail @@ -3204,3 +3284,5 @@ spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one_write- KHR-GL30.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Fail KHR-GL31.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Fail KHR-GL32.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Fail + +spec@arb_sample_shading@builtin-gl-sample-position 2,Fail diff --git a/.gitlab-ci/expectations/virt/virgl-gles-skips.txt b/.gitlab-ci/expectations/virt/virgl-gles-skips.txt index 10d564bf..cf4a3cd5 100644 --- a/.gitlab-ci/expectations/virt/virgl-gles-skips.txt +++ b/.gitlab-ci/expectations/virt/virgl-gles-skips.txt @@ -190,3 +190,7 @@ spec@arb_multi_draw_indirect@gl-3.0-multidrawarrays-vertexid -indirect spec@glsl-1.50@execution@geometry@dynamic_input_array_index spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec4-index-wr-before-gs spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec3-index-wr-before-gs + +# Crashes llvmpipe following Mesa uprev +# crosvm: ../src/gallium/auxiliary/gallivm/lp_bld_arit.c:1469: lp_build_clamp: Assertion `lp_check_value(bld->type, a)' failed. +spec@!opengl 1.1@large-tex diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index e867c168..cecc39bd 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -3,6 +3,18 @@ set -e set -o xtrace +comma_separated() { + local IFS=, + echo "$*" +} + +no_werror() { + # shellcheck disable=SC2048 + for i in $*; do + echo "-D${i}:werror=false " + done +} + CROSS_FILE=/cross_file-"$CROSS".txt # We need to control the version of llvm-config we're using, so we'll @@ -60,8 +72,20 @@ RET=0 RESULTS_DIR=$(pwd)/results/${TEST_SUITE:-build} rm -rf _build +# these are built as Meson subprojects; we want to use Meson's +# --force-fallback-for to ensure that we build the subprojects from their wrap +# files, and we also want to disable Werror on those, since we do not control +# these projects and making them warning-free is not our goal. +# shellcheck disable=2206 +meson_subprojects=( + venus-protocol + ${FORCE_FALLBACK_FOR:-} +) + meson setup _build --native-file=native.file \ --wrap-mode=${WRAP_DEBUG:-nofallback} \ + --force-fallback-for "$(comma_separated "${meson_subprojects[@]}")" \ + $(no_werror "${meson_subprojects[@]}") \ ${CROSS+--cross "$CROSS_FILE"} \ -D prefix=$(pwd)/install \ -D libdir=lib \ diff --git a/config.h.meson b/config.h.meson index 55497ffb..3f894fd4 100644 --- a/config.h.meson +++ b/config.h.meson @@ -46,6 +46,7 @@ #mesondefine ENABLE_DRM_I915 #mesondefine ENABLE_LIBDRM #mesondefine ENABLE_RENDER_SERVER +#mesondefine ENABLE_SAME_PROCESS_RENDER_SERVER #mesondefine ENABLE_RENDER_SERVER_WORKER_PROCESS #mesondefine ENABLE_RENDER_SERVER_WORKER_THREAD #mesondefine ENABLE_RENDER_SERVER_WORKER_MINIJAIL diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std.h b/include/vk_video/vulkan_video_codec_av1std.h similarity index 99% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std.h rename to include/vk_video/vulkan_video_codec_av1std.h index 932d0f66..5347b363 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std.h +++ b/include/vk_video/vulkan_video_codec_av1std.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std_decode.h b/include/vk_video/vulkan_video_codec_av1std_decode.h similarity index 97% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std_decode.h rename to include/vk_video/vulkan_video_codec_av1std_decode.h index 522628e8..e262e961 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std_decode.h +++ b/include/vk_video/vulkan_video_codec_av1std_decode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std_encode.h b/include/vk_video/vulkan_video_codec_av1std_encode.h similarity index 98% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std_encode.h rename to include/vk_video/vulkan_video_codec_av1std_encode.h index ca5f6f47..8afb2537 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_av1std_encode.h +++ b/include/vk_video/vulkan_video_codec_av1std_encode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std.h b/include/vk_video/vulkan_video_codec_h264std.h similarity index 98% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std.h rename to include/vk_video/vulkan_video_codec_h264std.h index 7e8da7d2..2ae89324 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std.h +++ b/include/vk_video/vulkan_video_codec_h264std.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_H264STD_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* @@ -44,6 +44,8 @@ typedef enum StdVideoH264ProfileIdc { STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66, STD_VIDEO_H264_PROFILE_IDC_MAIN = 77, STD_VIDEO_H264_PROFILE_IDC_HIGH = 100, + STD_VIDEO_H264_PROFILE_IDC_HIGH_10 = 110, + STD_VIDEO_H264_PROFILE_IDC_HIGH_422 = 122, STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244, STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std_decode.h b/include/vk_video/vulkan_video_codec_h264std_decode.h similarity index 96% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std_decode.h rename to include/vk_video/vulkan_video_codec_h264std_decode.h index 01facd73..fa114058 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std_decode.h +++ b/include/vk_video/vulkan_video_codec_h264std_decode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std_encode.h b/include/vk_video/vulkan_video_codec_h264std_encode.h similarity index 98% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std_encode.h rename to include/vk_video/vulkan_video_codec_h264std_encode.h index 410b1b25..aba6fbf3 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h264std_encode.h +++ b/include/vk_video/vulkan_video_codec_h264std_encode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std.h b/include/vk_video/vulkan_video_codec_h265std.h similarity index 99% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std.h rename to include/vk_video/vulkan_video_codec_h265std.h index 20e97e39..cf0cbefc 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std.h +++ b/include/vk_video/vulkan_video_codec_h265std.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_H265STD_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std_decode.h b/include/vk_video/vulkan_video_codec_h265std_decode.h similarity index 96% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std_decode.h rename to include/vk_video/vulkan_video_codec_h265std_decode.h index a2ddcaa4..7cfe54f2 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std_decode.h +++ b/include/vk_video/vulkan_video_codec_h265std_decode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std_encode.h b/include/vk_video/vulkan_video_codec_h265std_encode.h similarity index 98% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std_encode.h rename to include/vk_video/vulkan_video_codec_h265std_encode.h index fe2f28d5..fd8ee03b 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_h265std_encode.h +++ b/include/vk_video/vulkan_video_codec_h265std_encode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_vp9std.h b/include/vk_video/vulkan_video_codec_vp9std.h similarity index 98% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_vp9std.h rename to include/vk_video/vulkan_video_codec_vp9std.h index 3d10e39d..312a7857 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_vp9std.h +++ b/include/vk_video/vulkan_video_codec_vp9std.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_VP9STD_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codec_vp9std_decode.h b/include/vk_video/vulkan_video_codec_vp9std_decode.h similarity index 96% rename from src/venus/venus-protocol/vk_video/vulkan_video_codec_vp9std_decode.h rename to include/vk_video/vulkan_video_codec_vp9std_decode.h index 42b9bd3f..2a7ecdc9 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codec_vp9std_decode.h +++ b/include/vk_video/vulkan_video_codec_vp9std_decode.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODEC_VP9STD_DECODE_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_video/vulkan_video_codecs_common.h b/include/vk_video/vulkan_video_codecs_common.h similarity index 86% rename from src/venus/venus-protocol/vk_video/vulkan_video_codecs_common.h rename to include/vk_video/vulkan_video_codecs_common.h index a5f0f3d9..faedbef4 100644 --- a/src/venus/venus-protocol/vk_video/vulkan_video_codecs_common.h +++ b/include/vk_video/vulkan_video_codecs_common.h @@ -2,9 +2,9 @@ #define VULKAN_VIDEO_CODECS_COMMON_H_ 1 /* -** Copyright 2015-2025 The Khronos Group Inc. +** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vk_platform.h b/include/vulkan/vk_platform.h similarity index 98% rename from src/venus/venus-protocol/vk_platform.h rename to include/vulkan/vk_platform.h index e431c763..bbe60245 100644 --- a/src/venus/venus-protocol/vk_platform.h +++ b/include/vulkan/vk_platform.h @@ -3,8 +3,7 @@ // /* ** Copyright 2014-2026 The Khronos Group Inc. -** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ diff --git a/src/venus/venus-protocol/vulkan.h b/include/vulkan/vulkan.h similarity index 97% rename from src/venus/venus-protocol/vulkan.h rename to include/vulkan/vulkan.h index 2ed8d9c7..934d9b1e 100644 --- a/src/venus/venus-protocol/vulkan.h +++ b/include/vulkan/vulkan.h @@ -3,8 +3,7 @@ /* ** Copyright 2015-2026 The Khronos Group Inc. -** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ #include "vk_platform.h" diff --git a/src/venus/venus-protocol/vulkan_beta.h b/include/vulkan/vulkan_beta.h similarity index 99% rename from src/venus/venus-protocol/vulkan_beta.h rename to include/vulkan/vulkan_beta.h index 147a3f3c..c84b1d48 100644 --- a/src/venus/venus-protocol/vulkan_beta.h +++ b/include/vulkan/vulkan_beta.h @@ -4,7 +4,7 @@ /* ** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/src/venus/venus-protocol/vulkan_core.h b/include/vulkan/vulkan_core.h similarity index 93% rename from src/venus/venus-protocol/vulkan_core.h rename to include/vulkan/vulkan_core.h index a48e82be..64b8803d 100644 --- a/src/venus/venus-protocol/vulkan_core.h +++ b/include/vulkan/vulkan_core.h @@ -4,7 +4,7 @@ /* ** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* @@ -66,7 +66,7 @@ extern "C" { //#define VK_API_VERSION VK_MAKE_API_VERSION(0, 1, 0, 0) // Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 343 +#define VK_HEADER_VERSION 357 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION) @@ -96,8 +96,6 @@ typedef uint64_t VkDeviceAddress; typedef uint64_t VkDeviceSize; typedef uint32_t VkFlags; typedef uint32_t VkSampleMask; -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) VK_DEFINE_HANDLE(VkInstance) VK_DEFINE_HANDLE(VkPhysicalDevice) VK_DEFINE_HANDLE(VkDevice) @@ -106,6 +104,8 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) VK_DEFINE_HANDLE(VkCommandBuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) @@ -115,8 +115,8 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) @@ -318,12 +318,12 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52, VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000, @@ -640,6 +640,13 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_FEATURES_AMD = 1000133000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_PROPERTIES_AMD = 1000133001, + VK_STRUCTURE_TYPE_GPA_SAMPLE_BEGIN_INFO_AMD = 1000133002, + VK_STRUCTURE_TYPE_GPA_SESSION_CREATE_INFO_AMD = 1000133003, + VK_STRUCTURE_TYPE_GPA_DEVICE_CLOCK_MODE_INFO_AMD = 1000133004, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_PROPERTIES_2_AMD = 1000133005, + VK_STRUCTURE_TYPE_GPA_DEVICE_GET_CLOCK_INFO_AMD = 1000133006, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000, #endif @@ -739,6 +746,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000, VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_CONVERSION_FEATURES_QCOM = 1000172000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ELAPSED_TIMER_QUERY_FEATURES_QCOM = 1000173000, VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, @@ -797,6 +805,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CONSTANT_DATA_FEATURES_KHR = 1000231000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ABORT_FEATURES_KHR = 1000233000, + VK_STRUCTURE_TYPE_DEVICE_FAULT_SHADER_ABORT_MESSAGE_INFO_KHR = 1000233001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ABORT_PROPERTIES_KHR = 1000233002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, @@ -877,6 +889,14 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000, VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001, + VK_STRUCTURE_TYPE_PERF_HINT_INFO_QCOM = 1000302000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_PERF_HINT_FEATURES_QCOM = 1000302001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_PERF_HINT_PROPERTIES_QCOM = 1000302002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_3_FEATURES_QCOM = 1000303000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MULTIPLE_WAIT_QUEUES_FEATURES_QCOM = 1000304000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MULTIPLE_WAIT_QUEUES_PROPERTIES_QCOM = 1000304001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SPLIT_BARRIER_FEATURES_EXT = 1000305000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SPLIT_BARRIER_PROPERTIES_EXT = 1000305001, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000, #endif @@ -924,6 +944,22 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011, VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009, + VK_STRUCTURE_TYPE_DEVICE_MEMORY_COPY_KHR = 1000318000, + VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_INFO_KHR = 1000318001, + VK_STRUCTURE_TYPE_DEVICE_MEMORY_IMAGE_COPY_KHR = 1000318002, + VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_IMAGE_INFO_KHR = 1000318003, + VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIERS_INFO_KHR = 1000318004, + VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIER_KHR = 1000318005, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_ADDRESS_COMMANDS_FEATURES_KHR = 1000318006, + VK_STRUCTURE_TYPE_BIND_INDEX_BUFFER_3_INFO_KHR = 1000318007, + VK_STRUCTURE_TYPE_BIND_VERTEX_BUFFER_3_INFO_KHR = 1000318008, + VK_STRUCTURE_TYPE_DRAW_INDIRECT_2_INFO_KHR = 1000318009, + VK_STRUCTURE_TYPE_DRAW_INDIRECT_COUNT_2_INFO_KHR = 1000318010, + VK_STRUCTURE_TYPE_DISPATCH_INDIRECT_2_INFO_KHR = 1000318011, + VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_2_EXT = 1000318012, + VK_STRUCTURE_TYPE_BIND_TRANSFORM_FEEDBACK_BUFFER_2_INFO_EXT = 1000318013, + VK_STRUCTURE_TYPE_MEMORY_MARKER_INFO_AMD = 1000318014, + VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_2_KHR = 1000318015, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002, @@ -1038,6 +1074,8 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002, + VK_STRUCTURE_TYPE_DISPATCH_PARAMETERS_ARM = 1000417003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_PROPERTIES_ARM = 1000417004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000, VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000, @@ -1212,6 +1250,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROPERTIES_ARM = 1000507018, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_INFO_ARM = 1000507019, VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_TENSOR_SEMI_STRUCTURED_SPARSITY_INFO_ARM = 1000507015, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_TOSA_PROPERTIES_ARM = 1000508000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000, VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000201000, @@ -1304,6 +1343,8 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000, + VK_STRUCTURE_TYPE_TENSOR_EXPLICIT_TILING_FORMAT_PROPERTIES_ARM = 1000565000, + VK_STRUCTURE_TYPE_TENSOR_ROLLING_BACKING_CREATE_INFO_ARM = 1000565001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT = 1000567000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV = 1000569000, @@ -1334,6 +1375,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_KHR = 1000573000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_PROPERTIES_KHR = 1000573001, + VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_KHR = 1000573002, + VK_STRUCTURE_TYPE_DEVICE_FAULT_DEBUG_INFO_KHR = 1000573003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR = 1000574000, VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR = 1000574002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000, @@ -1361,6 +1406,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV = 1000593001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV = 1000593002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_OPACITY_MICROMAP_FEATURES_ARM = 1000596000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_FEEDBACK_2_FEATURES_KHR = 1000598000, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_FEEDBACK_2_CAPABILITIES_KHR = 1000598001, + VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_CREATE_INFO_KHR = 1000598002, VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT = 1000602000, VK_STRUCTURE_TYPE_MEMORY_METAL_HANDLE_PROPERTIES_EXT = 1000602001, VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT = 1000602002, @@ -1370,6 +1418,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_ARM = 1000605002, VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_ARM = 1000605003, VK_STRUCTURE_TYPE_RENDER_PASS_PERFORMANCE_COUNTERS_BY_REGION_BEGIN_INFO_ARM = 1000605004, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INSTRUMENTATION_FEATURES_ARM = 1000607000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INSTRUMENTATION_PROPERTIES_ARM = 1000607001, + VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_CREATE_INFO_ARM = 1000607002, + VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_METRIC_DESCRIPTION_ARM = 1000607003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT = 1000608000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FORMAT_PACK_FEATURES_ARM = 1000609000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE = 1000611000, @@ -1377,17 +1429,19 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE = 1000611002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR = 1000286000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR = 1000286001, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV = 1000613000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV = 1000613001, -#endif + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SWAPCHAIN_FEATURES_EXT = 1000616000, + VK_STRUCTURE_TYPE_SWAPCHAIN_FLAGS_SURFACE_CAPABILITIES_EXT = 1000616001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_EXT = 1000425000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_EXT = 1000425001, VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_EXT = 1000425002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_DEVICE_MEMORY_FEATURES_EXT = 1000620000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_KHR = 1000361000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_KHR = 1000623000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_KHR = 1000623001, + VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MICROMAP_DATA_KHR = 1000623002, + VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_KHR = 1000623003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_64_BIT_INDEXING_FEATURES_EXT = 1000627000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_RESOLVE_FEATURES_EXT = 1000628000, VK_STRUCTURE_TYPE_BEGIN_CUSTOM_RESOLVE_INFO_EXT = 1000628001, @@ -1399,14 +1453,41 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_FLAGS_INFO_KHR = 1000630002, VK_STRUCTURE_TYPE_RENDERING_END_INFO_KHR = 1000619003, VK_STRUCTURE_TYPE_RESOLVE_IMAGE_MODE_INFO_KHR = 1000630004, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_OPTICAL_FLOW_FEATURES_ARM = 1000631000, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_OPTICAL_FLOW_PROPERTIES_ARM = 1000631001, + VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_INFO_ARM = 1000631003, + VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_ARM = 1000631004, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_DISPATCH_INFO_ARM = 1000631005, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_CREATE_INFO_ARM = 1000631002, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_IMAGE_LAYOUT_ARM = 1000631006, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CREATE_INFO_ARM = 1000631007, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CONNECTION_ARM = 1000631008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_FEATURES_EXT = 1000635000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_PROPERTIES_EXT = 1000635001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CACHE_INCREMENTAL_MODE_FEATURES_SEC = 1000637000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT = 1000642000, VK_STRUCTURE_TYPE_COMPUTE_OCCUPANCY_PRIORITY_PARAMETERS_NV = 1000645000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_OCCUPANCY_PRIORITY_FEATURES_NV = 1000645001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_11_FEATURES_KHR = 1000657000, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_OPTIMAL_IMAGE_TRANSFER_GRANULARITY_PROPERTIES_KHR = 1000657001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_PARTITIONED_FEATURES_EXT = 1000662000, VK_STRUCTURE_TYPE_UBM_SURFACE_CREATE_INFO_SEC = 1000664000, + VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_4_KHR = 1000668000, + VK_STRUCTURE_TYPE_IMAGE_CREATE_FLAGS_2_CREATE_INFO_KHR = 1000668001, + VK_STRUCTURE_TYPE_IMAGE_USAGE_FLAGS_2_CREATE_INFO_KHR = 1000668002, + VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_2_CREATE_INFO_KHR = 1000668003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_FLAGS_FEATURES_KHR = 1000668004, + VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_2_CREATE_INFO_KHR = 1000668005, + VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_2_KHR = 1000668006, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OCP_MICROSCALING_TYPES_FEATURES_EXT = 1000672000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MIXED_FLOAT_DOT_PRODUCT_FEATURES_VALVE = 1000673000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_THROTTLE_HINT_FEATURES_SEC = 1000674000, + VK_STRUCTURE_TYPE_THROTTLE_HINT_SUBMIT_INFO_SEC = 1000674001, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_NEURAL_STATISTICS_CREATE_INFO_ARM = 1000676000, + VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_NEURAL_STATISTICS_CREATE_INFO_ARM = 1000676001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_FEATURES_ARM = 1000676002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_RESTART_INDEX_FEATURES_EXT = 1000678000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_DECODE_VECTOR_FEATURES_NV = 1000689000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, // VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT is a legacy alias @@ -1665,52 +1746,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkStructureType; -typedef enum VkImageLayout { - VK_IMAGE_LAYOUT_UNDEFINED = 0, - VK_IMAGE_LAYOUT_GENERAL = 1, - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, - VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, - VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, - VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, - VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, - VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, - VK_IMAGE_LAYOUT_PREINITIALIZED = 8, - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, - VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, - VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL = 1000241000, - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL = 1000241001, - VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL = 1000241002, - VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003, - VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000, - VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001, - VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000, - VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, - VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000, - VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001, - VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR = 1000024002, - VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, - VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, - VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, - VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000, - VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001, - VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002, - VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, - VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM = 1000460000, - VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000, - VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT = 1000620000, - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, - VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, - VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, - VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ, - VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, - VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, - VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, - VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, - VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, - VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF -} VkImageLayout; - typedef enum VkObjectType { VK_OBJECT_TYPE_UNKNOWN = 0, VK_OBJECT_TYPE_INSTANCE = 1, @@ -1751,6 +1786,7 @@ typedef enum VkObjectType { VK_OBJECT_TYPE_CU_MODULE_NVX = 1000029000, VK_OBJECT_TYPE_CU_FUNCTION_NVX = 1000029001, VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000128000, + VK_OBJECT_TYPE_GPA_SESSION_AMD = 1000133000, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000, VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000, @@ -1774,6 +1810,7 @@ typedef enum VkObjectType { VK_OBJECT_TYPE_EXTERNAL_COMPUTE_QUEUE_NV = 1000556000, VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT = 1000572000, VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT = 1000572001, + VK_OBJECT_TYPE_SHADER_INSTRUMENTATION_ARM = 1000607000, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT, @@ -1789,6 +1826,7 @@ typedef enum VkVendorId { VK_VENDOR_ID_MESA = 0x10005, VK_VENDOR_ID_POCL = 0x10006, VK_VENDOR_ID_MOBILEYE = 0x10007, + VK_VENDOR_ID_APE = 0x10008, VK_VENDOR_ID_MAX_ENUM = 0x7FFFFFFF } VkVendorId; @@ -2199,6 +2237,7 @@ typedef enum VkQueryType { VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000, + VK_QUERY_TYPE_TIME_ELAPSED_QCOM = 1000173000, VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000, VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000, VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000, @@ -2216,6 +2255,52 @@ typedef enum VkSharingMode { VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF } VkSharingMode; +typedef enum VkImageLayout { + VK_IMAGE_LAYOUT_UNDEFINED = 0, + VK_IMAGE_LAYOUT_GENERAL = 1, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, + VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, + VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, + VK_IMAGE_LAYOUT_PREINITIALIZED = 8, + VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, + VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, + VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL = 1000241000, + VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL = 1000241001, + VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL = 1000241002, + VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003, + VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000, + VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001, + VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000, + VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, + VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000, + VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001, + VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR = 1000024002, + VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, + VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, + VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, + VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000, + VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001, + VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002, + VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, + VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM = 1000460000, + VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000, + VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT = 1000620000, + VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, + VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, + VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, + VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ, + VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, + VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, + VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, + VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, + VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, + VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, + VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF +} VkImageLayout; + typedef enum VkComponentSwizzle { VK_COMPONENT_SWIZZLE_IDENTITY = 0, VK_COMPONENT_SWIZZLE_ZERO = 1, @@ -2292,12 +2377,6 @@ typedef enum VkSamplerAddressMode { VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF } VkSamplerAddressMode; -typedef enum VkSamplerMipmapMode { - VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, - VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, - VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF -} VkSamplerMipmapMode; - typedef enum VkCompareOp { VK_COMPARE_OP_NEVER = 0, VK_COMPARE_OP_LESS = 1, @@ -2310,6 +2389,12 @@ typedef enum VkCompareOp { VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF } VkCompareOp; +typedef enum VkSamplerMipmapMode { + VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, + VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, + VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF +} VkSamplerMipmapMode; + typedef enum VkDescriptorType { VK_DESCRIPTOR_TYPE_SAMPLER = 0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, @@ -2526,6 +2611,38 @@ typedef enum VkFrontFace { VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF } VkFrontFace; +typedef enum VkLogicOp { + VK_LOGIC_OP_CLEAR = 0, + VK_LOGIC_OP_AND = 1, + VK_LOGIC_OP_AND_REVERSE = 2, + VK_LOGIC_OP_COPY = 3, + VK_LOGIC_OP_AND_INVERTED = 4, + VK_LOGIC_OP_NO_OP = 5, + VK_LOGIC_OP_XOR = 6, + VK_LOGIC_OP_OR = 7, + VK_LOGIC_OP_NOR = 8, + VK_LOGIC_OP_EQUIVALENT = 9, + VK_LOGIC_OP_INVERT = 10, + VK_LOGIC_OP_OR_REVERSE = 11, + VK_LOGIC_OP_COPY_INVERTED = 12, + VK_LOGIC_OP_OR_INVERTED = 13, + VK_LOGIC_OP_NAND = 14, + VK_LOGIC_OP_SET = 15, + VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF +} VkLogicOp; + +typedef enum VkStencilOp { + VK_STENCIL_OP_KEEP = 0, + VK_STENCIL_OP_ZERO = 1, + VK_STENCIL_OP_REPLACE = 2, + VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, + VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, + VK_STENCIL_OP_INVERT = 5, + VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, + VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, + VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF +} VkStencilOp; + typedef enum VkVertexInputRate { VK_VERTEX_INPUT_RATE_VERTEX = 0, VK_VERTEX_INPUT_RATE_INSTANCE = 1, @@ -2555,38 +2672,6 @@ typedef enum VkPolygonMode { VK_POLYGON_MODE_MAX_ENUM = 0x7FFFFFFF } VkPolygonMode; -typedef enum VkStencilOp { - VK_STENCIL_OP_KEEP = 0, - VK_STENCIL_OP_ZERO = 1, - VK_STENCIL_OP_REPLACE = 2, - VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, - VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, - VK_STENCIL_OP_INVERT = 5, - VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, - VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, - VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF -} VkStencilOp; - -typedef enum VkLogicOp { - VK_LOGIC_OP_CLEAR = 0, - VK_LOGIC_OP_AND = 1, - VK_LOGIC_OP_AND_REVERSE = 2, - VK_LOGIC_OP_COPY = 3, - VK_LOGIC_OP_AND_INVERTED = 4, - VK_LOGIC_OP_NO_OP = 5, - VK_LOGIC_OP_XOR = 6, - VK_LOGIC_OP_OR = 7, - VK_LOGIC_OP_NOR = 8, - VK_LOGIC_OP_EQUIVALENT = 9, - VK_LOGIC_OP_INVERT = 10, - VK_LOGIC_OP_OR_REVERSE = 11, - VK_LOGIC_OP_COPY_INVERTED = 12, - VK_LOGIC_OP_OR_INVERTED = 13, - VK_LOGIC_OP_NAND = 14, - VK_LOGIC_OP_SET = 15, - VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF -} VkLogicOp; - typedef enum VkAttachmentLoadOp { VK_ATTACHMENT_LOAD_OP_LOAD = 0, VK_ATTACHMENT_LOAD_OP_CLEAR = 1, @@ -2615,67 +2700,6 @@ typedef enum VkSubpassContents { VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF } VkSubpassContents; -typedef enum VkAccessFlagBits { - VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, - VK_ACCESS_INDEX_READ_BIT = 0x00000002, - VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, - VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, - VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, - VK_ACCESS_SHADER_READ_BIT = 0x00000020, - VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, - VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, - VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, - VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, - VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, - VK_ACCESS_HOST_READ_BIT = 0x00002000, - VK_ACCESS_HOST_WRITE_BIT = 0x00004000, - VK_ACCESS_MEMORY_READ_BIT = 0x00008000, - VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, - VK_ACCESS_NONE = 0, - VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000, - VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000, - VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000, - VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000, - VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000, - VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000, - VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000, - VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000, - VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000, - VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000, - VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000, - VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, - VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, - VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, - VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT, - VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT, - VK_ACCESS_NONE_KHR = VK_ACCESS_NONE, - VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkAccessFlagBits; -typedef VkFlags VkAccessFlags; - -typedef enum VkImageAspectFlagBits { - VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, - VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, - VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, - VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, - VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010, - VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020, - VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040, - VK_IMAGE_ASPECT_NONE = 0, - VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080, - VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100, - VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200, - VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400, - VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT, - VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT, - VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT, - VK_IMAGE_ASPECT_NONE_KHR = VK_IMAGE_ASPECT_NONE, - VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkImageAspectFlagBits; -typedef VkFlags VkImageAspectFlags; - typedef enum VkFormatFeatureFlagBits { VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, @@ -2744,6 +2768,7 @@ typedef enum VkImageCreateFlagBits { VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000, VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000, VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT = 0x00008000, + VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR = 0x00400000, VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, @@ -2842,22 +2867,53 @@ typedef enum VkQueueFlagBits { VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkQueueFlagBits; typedef VkFlags VkQueueFlags; -typedef VkFlags VkDeviceCreateFlags; - -typedef enum VkDeviceQueueCreateFlagBits { - VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001, - VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR = 0x00000004, - VK_DEVICE_QUEUE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkDeviceQueueCreateFlagBits; -typedef VkFlags VkDeviceQueueCreateFlags; -typedef enum VkPipelineStageFlagBits { - VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, - VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, - VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, - VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, - VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, - VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, +typedef enum VkShaderStageFlagBits { + VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, + VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, + VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, + VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, + VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, + VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, + VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, + VK_SHADER_STAGE_ALL = 0x7FFFFFFF, + VK_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, + VK_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, + VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, + VK_SHADER_STAGE_MISS_BIT_KHR = 0x00000800, + VK_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000, + VK_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000, + VK_SHADER_STAGE_TASK_BIT_EXT = 0x00000040, + VK_SHADER_STAGE_MESH_BIT_EXT = 0x00000080, + VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI = 0x00004000, + VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI = 0x00080000, + VK_SHADER_STAGE_RAYGEN_BIT_NV = VK_SHADER_STAGE_RAYGEN_BIT_KHR, + VK_SHADER_STAGE_ANY_HIT_BIT_NV = VK_SHADER_STAGE_ANY_HIT_BIT_KHR, + VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, + VK_SHADER_STAGE_MISS_BIT_NV = VK_SHADER_STAGE_MISS_BIT_KHR, + VK_SHADER_STAGE_INTERSECTION_BIT_NV = VK_SHADER_STAGE_INTERSECTION_BIT_KHR, + VK_SHADER_STAGE_CALLABLE_BIT_NV = VK_SHADER_STAGE_CALLABLE_BIT_KHR, + VK_SHADER_STAGE_TASK_BIT_NV = VK_SHADER_STAGE_TASK_BIT_EXT, + VK_SHADER_STAGE_MESH_BIT_NV = VK_SHADER_STAGE_MESH_BIT_EXT, + VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkShaderStageFlagBits; +typedef VkFlags VkShaderStageFlags; +typedef VkFlags VkDeviceCreateFlags; + +typedef enum VkDeviceQueueCreateFlagBits { + VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001, + VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR = 0x00000004, + VK_DEVICE_QUEUE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkDeviceQueueCreateFlagBits; +typedef VkFlags VkDeviceQueueCreateFlags; + +typedef enum VkPipelineStageFlagBits { + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, + VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, + VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, + VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, + VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, + VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, @@ -2896,11 +2952,26 @@ typedef enum VkMemoryMapFlagBits { } VkMemoryMapFlagBits; typedef VkFlags VkMemoryMapFlags; -typedef enum VkSparseMemoryBindFlagBits { - VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, - VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSparseMemoryBindFlagBits; -typedef VkFlags VkSparseMemoryBindFlags; +typedef enum VkImageAspectFlagBits { + VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, + VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, + VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, + VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, + VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010, + VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020, + VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040, + VK_IMAGE_ASPECT_NONE = 0, + VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080, + VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100, + VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200, + VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400, + VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT, + VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT, + VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT, + VK_IMAGE_ASPECT_NONE_KHR = VK_IMAGE_ASPECT_NONE, + VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkImageAspectFlagBits; +typedef VkFlags VkImageAspectFlags; typedef enum VkSparseImageFormatFlagBits { VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, @@ -2910,6 +2981,12 @@ typedef enum VkSparseImageFormatFlagBits { } VkSparseImageFormatFlagBits; typedef VkFlags VkSparseImageFormatFlags; +typedef enum VkSparseMemoryBindFlagBits { + VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, + VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkSparseMemoryBindFlagBits; +typedef VkFlags VkSparseMemoryBindFlags; + typedef enum VkFenceCreateFlagBits { VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF @@ -3012,6 +3089,46 @@ typedef enum VkImageViewCreateFlagBits { } VkImageViewCreateFlagBits; typedef VkFlags VkImageViewCreateFlags; +typedef enum VkAccessFlagBits { + VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, + VK_ACCESS_INDEX_READ_BIT = 0x00000002, + VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, + VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, + VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, + VK_ACCESS_SHADER_READ_BIT = 0x00000020, + VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, + VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, + VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, + VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, + VK_ACCESS_HOST_READ_BIT = 0x00002000, + VK_ACCESS_HOST_WRITE_BIT = 0x00004000, + VK_ACCESS_MEMORY_READ_BIT = 0x00008000, + VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, + VK_ACCESS_NONE = 0, + VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000, + VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000, + VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000, + VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000, + VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000, + VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000, + VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000, + VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000, + VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000, + VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000, + VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000, + VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, + VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, + VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, + VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT, + VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT, + VK_ACCESS_NONE_KHR = VK_ACCESS_NONE, + VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkAccessFlagBits; +typedef VkFlags VkAccessFlags; + typedef enum VkDependencyFlagBits { VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004, @@ -3039,6 +3156,12 @@ typedef enum VkCommandPoolResetFlagBits { } VkCommandPoolResetFlagBits; typedef VkFlags VkCommandPoolResetFlags; +typedef enum VkQueryControlFlagBits { + VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, + VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkQueryControlFlagBits; +typedef VkFlags VkQueryControlFlags; + typedef enum VkCommandBufferUsageFlagBits { VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, @@ -3047,12 +3170,6 @@ typedef enum VkCommandBufferUsageFlagBits { } VkCommandBufferUsageFlagBits; typedef VkFlags VkCommandBufferUsageFlags; -typedef enum VkQueryControlFlagBits { - VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, - VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkQueryControlFlagBits; -typedef VkFlags VkQueryControlFlags; - typedef enum VkCommandBufferResetFlagBits { VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF @@ -3106,10 +3223,10 @@ typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000, VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000, VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000, - VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000, #endif + VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR = 0x01000000, // VK_PIPELINE_CREATE_DISPATCH_BASE is a legacy alias VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, @@ -3122,12 +3239,20 @@ typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, + VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR, VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineCreateFlagBits; typedef VkFlags VkPipelineCreateFlags; +typedef enum VkPipelineLayoutCreateFlagBits { + VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT = 0x00000002, + VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR = 0x00000004, + VK_PIPELINE_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkPipelineLayoutCreateFlagBits; +typedef VkFlags VkPipelineLayoutCreateFlags; + typedef enum VkPipelineShaderStageCreateFlagBits { VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT = 0x00000001, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT = 0x00000002, @@ -3137,43 +3262,6 @@ typedef enum VkPipelineShaderStageCreateFlagBits { } VkPipelineShaderStageCreateFlagBits; typedef VkFlags VkPipelineShaderStageCreateFlags; -typedef enum VkShaderStageFlagBits { - VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, - VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, - VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, - VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, - VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, - VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, - VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, - VK_SHADER_STAGE_ALL = 0x7FFFFFFF, - VK_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, - VK_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, - VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, - VK_SHADER_STAGE_MISS_BIT_KHR = 0x00000800, - VK_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000, - VK_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000, - VK_SHADER_STAGE_TASK_BIT_EXT = 0x00000040, - VK_SHADER_STAGE_MESH_BIT_EXT = 0x00000080, - VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI = 0x00004000, - VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI = 0x00080000, - VK_SHADER_STAGE_RAYGEN_BIT_NV = VK_SHADER_STAGE_RAYGEN_BIT_KHR, - VK_SHADER_STAGE_ANY_HIT_BIT_NV = VK_SHADER_STAGE_ANY_HIT_BIT_KHR, - VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, - VK_SHADER_STAGE_MISS_BIT_NV = VK_SHADER_STAGE_MISS_BIT_KHR, - VK_SHADER_STAGE_INTERSECTION_BIT_NV = VK_SHADER_STAGE_INTERSECTION_BIT_KHR, - VK_SHADER_STAGE_CALLABLE_BIT_NV = VK_SHADER_STAGE_CALLABLE_BIT_KHR, - VK_SHADER_STAGE_TASK_BIT_NV = VK_SHADER_STAGE_TASK_BIT_EXT, - VK_SHADER_STAGE_MESH_BIT_NV = VK_SHADER_STAGE_MESH_BIT_EXT, - VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkShaderStageFlagBits; - -typedef enum VkPipelineLayoutCreateFlagBits { - VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT = 0x00000002, - VK_PIPELINE_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkPipelineLayoutCreateFlagBits; -typedef VkFlags VkPipelineLayoutCreateFlags; -typedef VkFlags VkShaderStageFlags; - typedef enum VkSamplerCreateFlagBits { VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = 0x00000001, VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 0x00000002, @@ -3229,12 +3317,13 @@ typedef enum VkCullModeFlagBits { VK_CULL_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkCullModeFlagBits; typedef VkFlags VkCullModeFlags; -typedef VkFlags VkPipelineVertexInputStateCreateFlags; -typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; -typedef VkFlags VkPipelineTessellationStateCreateFlags; -typedef VkFlags VkPipelineViewportStateCreateFlags; -typedef VkFlags VkPipelineRasterizationStateCreateFlags; -typedef VkFlags VkPipelineMultisampleStateCreateFlags; + +typedef enum VkPipelineColorBlendStateCreateFlagBits { + VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 0x00000001, + VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, + VK_PIPELINE_COLOR_BLEND_STATE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkPipelineColorBlendStateCreateFlagBits; +typedef VkFlags VkPipelineColorBlendStateCreateFlags; typedef enum VkPipelineDepthStencilStateCreateFlagBits { VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000001, @@ -3244,14 +3333,13 @@ typedef enum VkPipelineDepthStencilStateCreateFlagBits { VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineDepthStencilStateCreateFlagBits; typedef VkFlags VkPipelineDepthStencilStateCreateFlags; - -typedef enum VkPipelineColorBlendStateCreateFlagBits { - VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 0x00000001, - VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, - VK_PIPELINE_COLOR_BLEND_STATE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkPipelineColorBlendStateCreateFlagBits; -typedef VkFlags VkPipelineColorBlendStateCreateFlags; typedef VkFlags VkPipelineDynamicStateCreateFlags; +typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; +typedef VkFlags VkPipelineMultisampleStateCreateFlags; +typedef VkFlags VkPipelineRasterizationStateCreateFlags; +typedef VkFlags VkPipelineTessellationStateCreateFlags; +typedef VkFlags VkPipelineVertexInputStateCreateFlags; +typedef VkFlags VkPipelineViewportStateCreateFlags; typedef enum VkAttachmentDescriptionFlagBits { VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, @@ -3340,46 +3428,6 @@ typedef struct VkBaseOutStructure { struct VkBaseOutStructure* pNext; } VkBaseOutStructure; -typedef struct VkBufferMemoryBarrier { - VkStructureType sType; - const void* pNext; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; - uint32_t srcQueueFamilyIndex; - uint32_t dstQueueFamilyIndex; - VkBuffer buffer; - VkDeviceSize offset; - VkDeviceSize size; -} VkBufferMemoryBarrier; - -typedef struct VkImageSubresourceRange { - VkImageAspectFlags aspectMask; - uint32_t baseMipLevel; - uint32_t levelCount; - uint32_t baseArrayLayer; - uint32_t layerCount; -} VkImageSubresourceRange; - -typedef struct VkImageMemoryBarrier { - VkStructureType sType; - const void* pNext; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; - VkImageLayout oldLayout; - VkImageLayout newLayout; - uint32_t srcQueueFamilyIndex; - uint32_t dstQueueFamilyIndex; - VkImage image; - VkImageSubresourceRange subresourceRange; -} VkImageMemoryBarrier; - -typedef struct VkMemoryBarrier { - VkStructureType sType; - const void* pNext; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; -} VkMemoryBarrier; - typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( void* pUserData, size_t size, @@ -3680,9 +3728,9 @@ typedef struct VkDeviceCreateInfo { VkDeviceCreateFlags flags; uint32_t queueCreateInfoCount; const VkDeviceQueueCreateInfo* pQueueCreateInfos; - // enabledLayerCount is legacy and should not be used + // enabledLayerCount is legacy and not used uint32_t enabledLayerCount; - // ppEnabledLayerNames is legacy and should not be used + // ppEnabledLayerNames is legacy and not used const char* const* ppEnabledLayerNames; uint32_t enabledExtensionCount; const char* const* ppEnabledExtensionNames; @@ -3734,32 +3782,18 @@ typedef struct VkMemoryRequirements { uint32_t memoryTypeBits; } VkMemoryRequirements; -typedef struct VkSparseMemoryBind { - VkDeviceSize resourceOffset; - VkDeviceSize size; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - VkSparseMemoryBindFlags flags; -} VkSparseMemoryBind; - -typedef struct VkSparseBufferMemoryBindInfo { - VkBuffer buffer; - uint32_t bindCount; - const VkSparseMemoryBind* pBinds; -} VkSparseBufferMemoryBindInfo; - -typedef struct VkSparseImageOpaqueMemoryBindInfo { - VkImage image; - uint32_t bindCount; - const VkSparseMemoryBind* pBinds; -} VkSparseImageOpaqueMemoryBindInfo; - typedef struct VkImageSubresource { VkImageAspectFlags aspectMask; uint32_t mipLevel; uint32_t arrayLayer; } VkImageSubresource; +typedef struct VkSparseImageFormatProperties { + VkImageAspectFlags aspectMask; + VkExtent3D imageGranularity; + VkSparseImageFormatFlags flags; +} VkSparseImageFormatProperties; + typedef struct VkSparseImageMemoryBind { VkImageSubresource subresource; VkOffset3D offset; @@ -3775,6 +3809,34 @@ typedef struct VkSparseImageMemoryBindInfo { const VkSparseImageMemoryBind* pBinds; } VkSparseImageMemoryBindInfo; +typedef struct VkSparseImageMemoryRequirements { + VkSparseImageFormatProperties formatProperties; + uint32_t imageMipTailFirstLod; + VkDeviceSize imageMipTailSize; + VkDeviceSize imageMipTailOffset; + VkDeviceSize imageMipTailStride; +} VkSparseImageMemoryRequirements; + +typedef struct VkSparseMemoryBind { + VkDeviceSize resourceOffset; + VkDeviceSize size; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + VkSparseMemoryBindFlags flags; +} VkSparseMemoryBind; + +typedef struct VkSparseBufferMemoryBindInfo { + VkBuffer buffer; + uint32_t bindCount; + const VkSparseMemoryBind* pBinds; +} VkSparseBufferMemoryBindInfo; + +typedef struct VkSparseImageOpaqueMemoryBindInfo { + VkImage image; + uint32_t bindCount; + const VkSparseMemoryBind* pBinds; +} VkSparseImageOpaqueMemoryBindInfo; + typedef struct VkBindSparseInfo { VkStructureType sType; const void* pNext; @@ -3790,20 +3852,6 @@ typedef struct VkBindSparseInfo { const VkSemaphore* pSignalSemaphores; } VkBindSparseInfo; -typedef struct VkSparseImageFormatProperties { - VkImageAspectFlags aspectMask; - VkExtent3D imageGranularity; - VkSparseImageFormatFlags flags; -} VkSparseImageFormatProperties; - -typedef struct VkSparseImageMemoryRequirements { - VkSparseImageFormatProperties formatProperties; - uint32_t imageMipTailFirstLod; - VkDeviceSize imageMipTailSize; - VkDeviceSize imageMipTailOffset; - VkDeviceSize imageMipTailStride; -} VkSparseImageMemoryRequirements; - typedef struct VkFenceCreateInfo { VkStructureType sType; const void* pNext; @@ -3869,6 +3917,14 @@ typedef struct VkComponentMapping { VkComponentSwizzle a; } VkComponentMapping; +typedef struct VkImageSubresourceRange { + VkImageAspectFlags aspectMask; + uint32_t baseMipLevel; + uint32_t levelCount; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkImageSubresourceRange; + typedef struct VkImageViewCreateInfo { VkStructureType sType; const void* pNext; @@ -3943,6 +3999,38 @@ typedef struct VkImageCopy { VkExtent3D extent; } VkImageCopy; +typedef struct VkBufferMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkBuffer buffer; + VkDeviceSize offset; + VkDeviceSize size; +} VkBufferMemoryBarrier; + +typedef struct VkImageMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkImageLayout oldLayout; + VkImageLayout newLayout; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkImage image; + VkImageSubresourceRange subresourceRange; +} VkImageMemoryBarrier; + +typedef struct VkMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; +} VkMemoryBarrier; + typedef struct VkDispatchIndirectCommand { uint32_t x; uint32_t y; @@ -4148,97 +4236,12 @@ typedef struct VkDrawIndexedIndirectCommand { uint32_t firstInstance; } VkDrawIndexedIndirectCommand; -typedef struct VkDrawIndirectCommand { - uint32_t vertexCount; - uint32_t instanceCount; - uint32_t firstVertex; - uint32_t firstInstance; -} VkDrawIndirectCommand; - -typedef struct VkVertexInputBindingDescription { - uint32_t binding; - uint32_t stride; - VkVertexInputRate inputRate; -} VkVertexInputBindingDescription; - -typedef struct VkVertexInputAttributeDescription { - uint32_t location; - uint32_t binding; - VkFormat format; - uint32_t offset; -} VkVertexInputAttributeDescription; - -typedef struct VkPipelineVertexInputStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineVertexInputStateCreateFlags flags; - uint32_t vertexBindingDescriptionCount; - const VkVertexInputBindingDescription* pVertexBindingDescriptions; - uint32_t vertexAttributeDescriptionCount; - const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; -} VkPipelineVertexInputStateCreateInfo; - -typedef struct VkPipelineInputAssemblyStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineInputAssemblyStateCreateFlags flags; - VkPrimitiveTopology topology; - VkBool32 primitiveRestartEnable; -} VkPipelineInputAssemblyStateCreateInfo; - -typedef struct VkPipelineTessellationStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineTessellationStateCreateFlags flags; - uint32_t patchControlPoints; -} VkPipelineTessellationStateCreateInfo; - -typedef struct VkViewport { - float x; - float y; - float width; - float height; - float minDepth; - float maxDepth; -} VkViewport; - -typedef struct VkPipelineViewportStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineViewportStateCreateFlags flags; - uint32_t viewportCount; - const VkViewport* pViewports; - uint32_t scissorCount; - const VkRect2D* pScissors; -} VkPipelineViewportStateCreateInfo; - -typedef struct VkPipelineRasterizationStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineRasterizationStateCreateFlags flags; - VkBool32 depthClampEnable; - VkBool32 rasterizerDiscardEnable; - VkPolygonMode polygonMode; - VkCullModeFlags cullMode; - VkFrontFace frontFace; - VkBool32 depthBiasEnable; - float depthBiasConstantFactor; - float depthBiasClamp; - float depthBiasSlopeFactor; - float lineWidth; -} VkPipelineRasterizationStateCreateInfo; - -typedef struct VkPipelineMultisampleStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineMultisampleStateCreateFlags flags; - VkSampleCountFlagBits rasterizationSamples; - VkBool32 sampleShadingEnable; - float minSampleShading; - const VkSampleMask* pSampleMask; - VkBool32 alphaToCoverageEnable; - VkBool32 alphaToOneEnable; -} VkPipelineMultisampleStateCreateInfo; +typedef struct VkDrawIndirectCommand { + uint32_t vertexCount; + uint32_t instanceCount; + uint32_t firstVertex; + uint32_t firstInstance; +} VkDrawIndirectCommand; typedef struct VkStencilOpState { VkStencilOp failOp; @@ -4250,20 +4253,27 @@ typedef struct VkStencilOpState { uint32_t reference; } VkStencilOpState; -typedef struct VkPipelineDepthStencilStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineDepthStencilStateCreateFlags flags; - VkBool32 depthTestEnable; - VkBool32 depthWriteEnable; - VkCompareOp depthCompareOp; - VkBool32 depthBoundsTestEnable; - VkBool32 stencilTestEnable; - VkStencilOpState front; - VkStencilOpState back; - float minDepthBounds; - float maxDepthBounds; -} VkPipelineDepthStencilStateCreateInfo; +typedef struct VkVertexInputAttributeDescription { + uint32_t location; + uint32_t binding; + VkFormat format; + uint32_t offset; +} VkVertexInputAttributeDescription; + +typedef struct VkVertexInputBindingDescription { + uint32_t binding; + uint32_t stride; + VkVertexInputRate inputRate; +} VkVertexInputBindingDescription; + +typedef struct VkViewport { + float x; + float y; + float width; + float height; + float minDepth; + float maxDepth; +} VkViewport; typedef struct VkPipelineColorBlendAttachmentState { VkBool32 blendEnable; @@ -4287,6 +4297,21 @@ typedef struct VkPipelineColorBlendStateCreateInfo { float blendConstants[4]; } VkPipelineColorBlendStateCreateInfo; +typedef struct VkPipelineDepthStencilStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineDepthStencilStateCreateFlags flags; + VkBool32 depthTestEnable; + VkBool32 depthWriteEnable; + VkCompareOp depthCompareOp; + VkBool32 depthBoundsTestEnable; + VkBool32 stencilTestEnable; + VkStencilOpState front; + VkStencilOpState back; + float minDepthBounds; + float maxDepthBounds; +} VkPipelineDepthStencilStateCreateInfo; + typedef struct VkPipelineDynamicStateCreateInfo { VkStructureType sType; const void* pNext; @@ -4295,6 +4320,69 @@ typedef struct VkPipelineDynamicStateCreateInfo { const VkDynamicState* pDynamicStates; } VkPipelineDynamicStateCreateInfo; +typedef struct VkPipelineInputAssemblyStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineInputAssemblyStateCreateFlags flags; + VkPrimitiveTopology topology; + VkBool32 primitiveRestartEnable; +} VkPipelineInputAssemblyStateCreateInfo; + +typedef struct VkPipelineMultisampleStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineMultisampleStateCreateFlags flags; + VkSampleCountFlagBits rasterizationSamples; + VkBool32 sampleShadingEnable; + float minSampleShading; + const VkSampleMask* pSampleMask; + VkBool32 alphaToCoverageEnable; + VkBool32 alphaToOneEnable; +} VkPipelineMultisampleStateCreateInfo; + +typedef struct VkPipelineRasterizationStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineRasterizationStateCreateFlags flags; + VkBool32 depthClampEnable; + VkBool32 rasterizerDiscardEnable; + VkPolygonMode polygonMode; + VkCullModeFlags cullMode; + VkFrontFace frontFace; + VkBool32 depthBiasEnable; + float depthBiasConstantFactor; + float depthBiasClamp; + float depthBiasSlopeFactor; + float lineWidth; +} VkPipelineRasterizationStateCreateInfo; + +typedef struct VkPipelineTessellationStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineTessellationStateCreateFlags flags; + uint32_t patchControlPoints; +} VkPipelineTessellationStateCreateInfo; + +typedef struct VkPipelineVertexInputStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineVertexInputStateCreateFlags flags; + uint32_t vertexBindingDescriptionCount; + const VkVertexInputBindingDescription* pVertexBindingDescriptions; + uint32_t vertexAttributeDescriptionCount; + const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; +} VkPipelineVertexInputStateCreateInfo; + +typedef struct VkPipelineViewportStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineViewportStateCreateFlags flags; + uint32_t viewportCount; + const VkViewport* pViewports; + uint32_t scissorCount; + const VkRect2D* pScissors; +} VkPipelineViewportStateCreateInfo; + typedef struct VkGraphicsPipelineCreateInfo { VkStructureType sType; const void* pNext; @@ -4346,6 +4434,16 @@ typedef struct VkFramebufferCreateInfo { uint32_t layers; } VkFramebufferCreateInfo; +typedef struct VkSubpassDependency { + uint32_t srcSubpass; + uint32_t dstSubpass; + VkPipelineStageFlags srcStageMask; + VkPipelineStageFlags dstStageMask; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkDependencyFlags dependencyFlags; +} VkSubpassDependency; + typedef struct VkSubpassDescription { VkSubpassDescriptionFlags flags; VkPipelineBindPoint pipelineBindPoint; @@ -4359,16 +4457,6 @@ typedef struct VkSubpassDescription { const uint32_t* pPreserveAttachments; } VkSubpassDescription; -typedef struct VkSubpassDependency { - uint32_t srcSubpass; - uint32_t dstSubpass; - VkPipelineStageFlags srcStageMask; - VkPipelineStageFlags dstStageMask; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; - VkDependencyFlags dependencyFlags; -} VkSubpassDependency; - typedef struct VkRenderPassCreateInfo { VkStructureType sType; const void* pNext; @@ -4386,6 +4474,12 @@ typedef struct VkClearDepthStencilValue { uint32_t stencil; } VkClearDepthStencilValue; +typedef struct VkClearRect { + VkRect2D rect; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkClearRect; + typedef union VkClearValue { VkClearColorValue color; VkClearDepthStencilValue depthStencil; @@ -4397,12 +4491,6 @@ typedef struct VkClearAttachment { VkClearValue clearValue; } VkClearAttachment; -typedef struct VkClearRect { - VkRect2D rect; - uint32_t baseArrayLayer; - uint32_t layerCount; -} VkClearRect; - typedef struct VkImageBlit { VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffsets[2]; @@ -5377,6 +5465,14 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) #define VK_LUID_SIZE 8U #define VK_QUEUE_FAMILY_EXTERNAL (~1U) +typedef enum VkPointClippingBehavior { + VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, + VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, + VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, + VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY, + VK_POINT_CLIPPING_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF +} VkPointClippingBehavior; + typedef enum VkDescriptorUpdateTemplateType { VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS = 1, @@ -5415,14 +5511,6 @@ typedef enum VkChromaLocation { VK_CHROMA_LOCATION_MAX_ENUM = 0x7FFFFFFF } VkChromaLocation; -typedef enum VkPointClippingBehavior { - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, - VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, - VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY, - VK_POINT_CLIPPING_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF -} VkPointClippingBehavior; - typedef enum VkTessellationDomainOrigin { VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0, VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1, @@ -5431,6 +5519,25 @@ typedef enum VkTessellationDomainOrigin { VK_TESSELLATION_DOMAIN_ORIGIN_MAX_ENUM = 0x7FFFFFFF } VkTessellationDomainOrigin; +typedef enum VkSubgroupFeatureFlagBits { + VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, + VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, + VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004, + VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008, + VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010, + VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, + VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, + VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, + VK_SUBGROUP_FEATURE_ROTATE_BIT = 0x00000200, + VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT = 0x00000400, + VK_SUBGROUP_FEATURE_PARTITIONED_BIT_EXT = 0x00000100, + VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_EXT, + VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_BIT, + VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT, + VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkSubgroupFeatureFlagBits; +typedef VkFlags VkSubgroupFeatureFlags; + typedef enum VkPeerMemoryFeatureFlagBits { VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001, VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002, @@ -5559,25 +5666,6 @@ typedef enum VkExternalSemaphoreFeatureFlagBits { VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalSemaphoreFeatureFlagBits; typedef VkFlags VkExternalSemaphoreFeatureFlags; - -typedef enum VkSubgroupFeatureFlagBits { - VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, - VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, - VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004, - VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008, - VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010, - VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, - VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, - VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, - VK_SUBGROUP_FEATURE_ROTATE_BIT = 0x00000200, - VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT = 0x00000400, - VK_SUBGROUP_FEATURE_PARTITIONED_BIT_EXT = 0x00000100, - VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_EXT, - VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_BIT, - VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT, - VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSubgroupFeatureFlagBits; -typedef VkFlags VkSubgroupFeatureFlags; typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; typedef struct VkBindBufferMemoryInfo { VkStructureType sType; @@ -6281,6 +6369,8 @@ typedef enum VkDriverId { VK_DRIVER_ID_MESA_HONEYKRISP = 26, VK_DRIVER_ID_VULKAN_SC_EMULATION_ON_VULKAN = 27, VK_DRIVER_ID_MESA_KOSMICKRISP = 28, + VK_DRIVER_ID_MESA_GFXSTREAM = 29, + VK_DRIVER_ID_APE_SOFT = 30, VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY, VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE, VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV, @@ -6363,6 +6453,22 @@ typedef enum VkDescriptorBindingFlagBits { VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDescriptorBindingFlagBits; typedef VkFlags VkDescriptorBindingFlags; +typedef struct VkConformanceVersion { + uint8_t major; + uint8_t minor; + uint8_t subminor; + uint8_t patch; +} VkConformanceVersion; + +typedef struct VkPhysicalDeviceDriverProperties { + VkStructureType sType; + void* pNext; + VkDriverId driverID; + char driverName[VK_MAX_DRIVER_NAME_SIZE]; + char driverInfo[VK_MAX_DRIVER_INFO_SIZE]; + VkConformanceVersion conformanceVersion; +} VkPhysicalDeviceDriverProperties; + typedef struct VkPhysicalDeviceVulkan11Features { VkStructureType sType; void* pNext; @@ -6452,13 +6558,6 @@ typedef struct VkPhysicalDeviceVulkan12Features { VkBool32 subgroupBroadcastDynamicId; } VkPhysicalDeviceVulkan12Features; -typedef struct VkConformanceVersion { - uint8_t major; - uint8_t minor; - uint8_t subminor; - uint8_t patch; -} VkConformanceVersion; - typedef struct VkPhysicalDeviceVulkan12Properties { VkStructureType sType; void* pNext; @@ -6523,15 +6622,6 @@ typedef struct VkImageFormatListCreateInfo { const VkFormat* pViewFormats; } VkImageFormatListCreateInfo; -typedef struct VkPhysicalDeviceDriverProperties { - VkStructureType sType; - void* pNext; - VkDriverId driverID; - char driverName[VK_MAX_DRIVER_NAME_SIZE]; - char driverInfo[VK_MAX_DRIVER_INFO_SIZE]; - VkConformanceVersion conformanceVersion; -} VkPhysicalDeviceDriverProperties; - typedef struct VkPhysicalDeviceVulkanMemoryModelFeatures { VkStructureType sType; void* pNext; @@ -6821,6 +6911,17 @@ typedef struct VkSubpassDependency2 { int32_t viewOffset; } VkSubpassDependency2; +typedef struct VkSubpassBeginInfo { + VkStructureType sType; + const void* pNext; + VkSubpassContents contents; +} VkSubpassBeginInfo; + +typedef struct VkSubpassEndInfo { + VkStructureType sType; + const void* pNext; +} VkSubpassEndInfo; + typedef struct VkRenderPassCreateInfo2 { VkStructureType sType; const void* pNext; @@ -6835,17 +6936,6 @@ typedef struct VkRenderPassCreateInfo2 { const uint32_t* pCorrelatedViewMasks; } VkRenderPassCreateInfo2; -typedef struct VkSubpassBeginInfo { - VkStructureType sType; - const void* pNext; - VkSubpassContents contents; -} VkSubpassBeginInfo; - -typedef struct VkSubpassEndInfo { - VkStructureType sType; - const void* pNext; -} VkSubpassEndInfo; - typedef struct VkSubpassDescriptionDepthStencilResolve { VkStructureType sType; const void* pNext; @@ -6887,13 +6977,6 @@ typedef struct VkFramebufferAttachmentImageInfo { const VkFormat* pViewFormats; } VkFramebufferAttachmentImageInfo; -typedef struct VkFramebufferAttachmentsCreateInfo { - VkStructureType sType; - const void* pNext; - uint32_t attachmentImageInfoCount; - const VkFramebufferAttachmentImageInfo* pAttachmentImageInfos; -} VkFramebufferAttachmentsCreateInfo; - typedef struct VkRenderPassAttachmentBeginInfo { VkStructureType sType; const void* pNext; @@ -6901,6 +6984,13 @@ typedef struct VkRenderPassAttachmentBeginInfo { const VkImageView* pAttachments; } VkRenderPassAttachmentBeginInfo; +typedef struct VkFramebufferAttachmentsCreateInfo { + VkStructureType sType; + const void* pNext; + uint32_t attachmentImageInfoCount; + const VkFramebufferAttachmentImageInfo* pAttachmentImageInfos; +} VkFramebufferAttachmentsCreateInfo; + typedef struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures { VkStructureType sType; void* pNext; @@ -7247,6 +7337,7 @@ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = 0x400000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM = 0x100000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 0x00000001ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 0x00000002ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 0x00000004ULL; @@ -7289,10 +7380,14 @@ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TENSOR_DATA_GRAPH_BIT_ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COPY_IMAGE_INDIRECT_DST_BIT_KHR = 0x800000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x2000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x4000000000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_2D_BIT_IMG = 0x200000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR = 0x10000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR = 0x20000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR = 0x40000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR = 0x80000000000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DATA_GRAPH_OPTICAL_FLOW_IMAGE_BIT_ARM = 0x100000000000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DATA_GRAPH_OPTICAL_FLOW_VECTOR_BIT_ARM = 0x200000000000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DATA_GRAPH_OPTICAL_FLOW_COST_BIT_ARM = 0x400000000000000ULL; typedef enum VkPipelineCreationFeedbackFlagBits { @@ -8161,6 +8256,8 @@ static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL; #endif static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT = 0x10000000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL; @@ -8185,8 +8282,6 @@ static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STO static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL; -static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL; -static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL; #ifdef VK_ENABLE_BETA_EXTENSIONS static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX = 0x200000000ULL; #endif @@ -8224,6 +8319,7 @@ static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_ #endif static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT = 0x1000000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_BUILT_IN_PRIMITIVES_BIT_KHR = 0x00001000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_SPHERES_AND_LINEAR_SWEPT_SPHERES_BIT_NV = 0x200000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL; @@ -8250,17 +8346,21 @@ static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BI static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL; -static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL; +#ifdef VK_ENABLE_BETA_EXTENSIONS static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL; +#endif static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM = 0x2000000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INSTRUMENT_SHADERS_BIT_ARM = 0x8000000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x10000000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR = 0x01000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR = 0x20000000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT = 0x80000000000ULL; typedef struct VkPhysicalDeviceVulkan14Features { @@ -8377,6 +8477,12 @@ typedef struct VkPhysicalDeviceMaintenance5Properties { VkBool32 nonStrictWideLinesUseParallelogram; } VkPhysicalDeviceMaintenance5Properties; +typedef struct VkSubresourceLayout2 { + VkStructureType sType; + void* pNext; + VkSubresourceLayout subresourceLayout; +} VkSubresourceLayout2; + typedef struct VkImageSubresource2 { VkStructureType sType; void* pNext; @@ -8390,12 +8496,6 @@ typedef struct VkDeviceImageSubresourceInfo { const VkImageSubresource2* pSubresource; } VkDeviceImageSubresourceInfo; -typedef struct VkSubresourceLayout2 { - VkStructureType sType; - void* pNext; - VkSubresourceLayout subresourceLayout; -} VkSubresourceLayout2; - typedef struct VkBufferUsageFlags2CreateInfo { VkStructureType sType; const void* pNext; @@ -8872,6 +8972,7 @@ typedef enum VkSurfaceTransformFlagBitsKHR { VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkSurfaceTransformFlagBitsKHR; +typedef VkFlags VkSurfaceTransformFlagsKHR; typedef enum VkCompositeAlphaFlagBitsKHR { VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, @@ -8881,7 +8982,6 @@ typedef enum VkCompositeAlphaFlagBitsKHR { VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkCompositeAlphaFlagBitsKHR; typedef VkFlags VkCompositeAlphaFlagsKHR; -typedef VkFlags VkSurfaceTransformFlagsKHR; typedef struct VkSurfaceCapabilitiesKHR { uint32_t minImageCount; uint32_t maxImageCount; @@ -8961,6 +9061,7 @@ typedef enum VkSwapchainCreateFlagBitsKHR { VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR = 0x00000040, VK_SWAPCHAIN_CREATE_PRESENT_WAIT_2_BIT_KHR = 0x00000080, VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR = 0x00000008, + VK_SWAPCHAIN_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00000100, VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT = VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR, VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkSwapchainCreateFlagBitsKHR; @@ -11689,6 +11790,18 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateKHR( #endif +// VK_KHR_shader_constant_data is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_shader_constant_data 1 +#define VK_KHR_SHADER_CONSTANT_DATA_SPEC_VERSION 1 +#define VK_KHR_SHADER_CONSTANT_DATA_EXTENSION_NAME "VK_KHR_shader_constant_data" +typedef struct VkPhysicalDeviceShaderConstantDataFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 shaderConstantData; +} VkPhysicalDeviceShaderConstantDataFeaturesKHR; + + + // VK_KHR_dynamic_rendering_local_read is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_dynamic_rendering_local_read 1 #define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION 1 @@ -11717,6 +11830,31 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndicesKHR( #endif +// VK_KHR_shader_abort is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_shader_abort 1 +#define VK_KHR_SHADER_ABORT_SPEC_VERSION 1 +#define VK_KHR_SHADER_ABORT_EXTENSION_NAME "VK_KHR_shader_abort" +typedef struct VkPhysicalDeviceShaderAbortFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 shaderAbort; +} VkPhysicalDeviceShaderAbortFeaturesKHR; + +typedef struct VkDeviceFaultShaderAbortMessageInfoKHR { + VkStructureType sType; + void* pNext; + uint64_t messageDataSize; + void* pMessageData; +} VkDeviceFaultShaderAbortMessageInfoKHR; + +typedef struct VkPhysicalDeviceShaderAbortPropertiesKHR { + VkStructureType sType; + void* pNext; + uint64_t maxShaderAbortMessageSize; +} VkPhysicalDeviceShaderAbortPropertiesKHR; + + + // VK_KHR_shader_quad_control is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_quad_control 1 #define VK_KHR_SHADER_QUAD_CONTROL_SPEC_VERSION 1 @@ -12095,6 +12233,13 @@ typedef enum VkVideoEncodeFeedbackFlagBitsKHR { VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR = 0x00000020, + VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR = 0x00000040, + VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR = 0x00000080, + VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR = 0x00000100, + VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR = 0x00000200, VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeFeedbackFlagBitsKHR; typedef VkFlags VkVideoEncodeFeedbackFlagsKHR; @@ -12325,6 +12470,376 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2KHR( #endif +// VK_KHR_device_address_commands is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_device_address_commands 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) +#define VK_KHR_DEVICE_ADDRESS_COMMANDS_SPEC_VERSION 1 +#define VK_KHR_DEVICE_ADDRESS_COMMANDS_EXTENSION_NAME "VK_KHR_device_address_commands" + +typedef enum VkAccelerationStructureTypeKHR { + VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0, + VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1, + VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2, + VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR = 1000623000, + VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, + VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, + VK_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkAccelerationStructureTypeKHR; + +typedef enum VkAddressCommandFlagBitsKHR { + VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR = 0x00000001, + VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR = 0x00000002, + VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR = 0x00000004, + VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR = 0x00000008, + VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR = 0x00000010, + VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR = 0x00000020, + VK_ADDRESS_COMMAND_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkAddressCommandFlagBitsKHR; +typedef VkFlags VkAddressCommandFlagsKHR; + +typedef enum VkConditionalRenderingFlagBitsEXT { + VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001, + VK_CONDITIONAL_RENDERING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF +} VkConditionalRenderingFlagBitsEXT; +typedef VkFlags VkConditionalRenderingFlagsEXT; + +typedef enum VkAccelerationStructureCreateFlagBitsKHR { + VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000001, + VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008, + VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 0x00000004, + VK_ACCELERATION_STRUCTURE_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkAccelerationStructureCreateFlagBitsKHR; +typedef VkFlags VkAccelerationStructureCreateFlagsKHR; +typedef struct VkDeviceAddressRangeKHR { + VkDeviceAddress address; + VkDeviceSize size; +} VkDeviceAddressRangeKHR; + +typedef struct VkStridedDeviceAddressRangeKHR { + VkDeviceAddress address; + VkDeviceSize size; + VkDeviceSize stride; +} VkStridedDeviceAddressRangeKHR; + +typedef struct VkDeviceMemoryCopyKHR { + VkStructureType sType; + const void* pNext; + VkDeviceAddressRangeKHR srcRange; + VkAddressCommandFlagsKHR srcFlags; + VkDeviceAddressRangeKHR dstRange; + VkAddressCommandFlagsKHR dstFlags; +} VkDeviceMemoryCopyKHR; + +typedef struct VkCopyDeviceMemoryInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t regionCount; + const VkDeviceMemoryCopyKHR* pRegions; +} VkCopyDeviceMemoryInfoKHR; + +typedef struct VkDeviceMemoryImageCopyKHR { + VkStructureType sType; + const void* pNext; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; + uint32_t addressRowLength; + uint32_t addressImageHeight; + VkImageSubresourceLayers imageSubresource; + VkImageLayout imageLayout; + VkOffset3D imageOffset; + VkExtent3D imageExtent; +} VkDeviceMemoryImageCopyKHR; + +typedef struct VkCopyDeviceMemoryImageInfoKHR { + VkStructureType sType; + const void* pNext; + VkImage image; + uint32_t regionCount; + const VkDeviceMemoryImageCopyKHR* pRegions; +} VkCopyDeviceMemoryImageInfoKHR; + +typedef struct VkMemoryRangeBarrierKHR { + VkStructureType sType; + const void* pNext; + VkPipelineStageFlags2 srcStageMask; + VkAccessFlags2 srcAccessMask; + VkPipelineStageFlags2 dstStageMask; + VkAccessFlags2 dstAccessMask; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; +} VkMemoryRangeBarrierKHR; + +typedef struct VkMemoryRangeBarriersInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t memoryRangeBarrierCount; + const VkMemoryRangeBarrierKHR* pMemoryRangeBarriers; +} VkMemoryRangeBarriersInfoKHR; + +typedef struct VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 deviceAddressCommands; +} VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR; + +typedef struct VkBindIndexBuffer3InfoKHR { + VkStructureType sType; + const void* pNext; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; + VkIndexType indexType; +} VkBindIndexBuffer3InfoKHR; + +typedef struct VkBindVertexBuffer3InfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 setStride; + VkStridedDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; +} VkBindVertexBuffer3InfoKHR; + +typedef struct VkDrawIndirect2InfoKHR { + VkStructureType sType; + const void* pNext; + VkStridedDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; + uint32_t drawCount; +} VkDrawIndirect2InfoKHR; + +typedef struct VkDrawIndirectCount2InfoKHR { + VkStructureType sType; + const void* pNext; + VkStridedDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; + VkDeviceAddressRangeKHR countAddressRange; + VkAddressCommandFlagsKHR countAddressFlags; + uint32_t maxDrawCount; +} VkDrawIndirectCount2InfoKHR; + +typedef struct VkDispatchIndirect2InfoKHR { + VkStructureType sType; + const void* pNext; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; +} VkDispatchIndirect2InfoKHR; + +typedef struct VkConditionalRenderingBeginInfo2EXT { + VkStructureType sType; + const void* pNext; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; + VkConditionalRenderingFlagsEXT flags; +} VkConditionalRenderingBeginInfo2EXT; + +typedef struct VkBindTransformFeedbackBuffer2InfoEXT { + VkStructureType sType; + const void* pNext; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; +} VkBindTransformFeedbackBuffer2InfoEXT; + +typedef struct VkMemoryMarkerInfoAMD { + VkStructureType sType; + const void* pNext; + VkPipelineStageFlags2KHR stage; + VkDeviceAddressRangeKHR dstRange; + VkAddressCommandFlagsKHR dstFlags; + uint32_t marker; +} VkMemoryMarkerInfoAMD; + +typedef struct VkAccelerationStructureCreateInfo2KHR { + VkStructureType sType; + const void* pNext; + VkAccelerationStructureCreateFlagsKHR createFlags; + VkDeviceAddressRangeKHR addressRange; + VkAddressCommandFlagsKHR addressFlags; + VkAccelerationStructureTypeKHR type; +} VkAccelerationStructureCreateInfo2KHR; + +typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer3KHR)(VkCommandBuffer commandBuffer, const VkBindIndexBuffer3InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers3KHR)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBindVertexBuffer3InfoKHR* pBindingInfos); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect2KHR)(VkCommandBuffer commandBuffer, const VkDrawIndirect2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect2KHR)(VkCommandBuffer commandBuffer, const VkDrawIndirect2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect2KHR)(VkCommandBuffer commandBuffer, const VkDispatchIndirect2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryKHR)(VkCommandBuffer commandBuffer, const VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfo); +typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToImageKHR)(VkCommandBuffer commandBuffer, const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); +typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToMemoryKHR)(VkCommandBuffer commandBuffer, const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); +typedef void (VKAPI_PTR *PFN_vkCmdUpdateMemoryKHR)(VkCommandBuffer commandBuffer, const VkDeviceAddressRangeKHR* pDstRange, VkAddressCommandFlagsKHR dstFlags, VkDeviceSize dataSize, const void* pData); +typedef void (VKAPI_PTR *PFN_vkCmdFillMemoryKHR)(VkCommandBuffer commandBuffer, const VkDeviceAddressRangeKHR* pDstRange, VkAddressCommandFlagsKHR dstFlags, uint32_t data); +typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResultsToMemoryKHR)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const VkStridedDeviceAddressRangeKHR* pDstRange, VkAddressCommandFlagsKHR dstFlags, VkQueryResultFlags queryResultFlags); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCount2KHR)(VkCommandBuffer commandBuffer, const VkDrawIndirectCount2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCount2KHR)(VkCommandBuffer commandBuffer, const VkDrawIndirectCount2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdBeginConditionalRendering2EXT)(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin); +typedef void (VKAPI_PTR *PFN_vkCmdBindTransformFeedbackBuffers2EXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfos); +typedef void (VKAPI_PTR *PFN_vkCmdBeginTransformFeedback2EXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterRange, uint32_t counterRangeCount, const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); +typedef void (VKAPI_PTR *PFN_vkCmdEndTransformFeedback2EXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterRange, uint32_t counterRangeCount, const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectByteCount2EXT)(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfo, uint32_t counterOffset, uint32_t vertexStride); +typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirect2EXT)(VkCommandBuffer commandBuffer, const VkDrawIndirect2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectCount2EXT)(VkCommandBuffer commandBuffer, const VkDrawIndirectCount2InfoKHR* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdWriteMarkerToMemoryAMD)(VkCommandBuffer commandBuffer, const VkMemoryMarkerInfoAMD* pInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructure2KHR)(VkDevice device, const VkAccelerationStructureCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer3KHR( + VkCommandBuffer commandBuffer, + const VkBindIndexBuffer3InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers3KHR( + VkCommandBuffer commandBuffer, + uint32_t firstBinding, + uint32_t bindingCount, + const VkBindVertexBuffer3InfoKHR* pBindingInfos); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect2KHR( + VkCommandBuffer commandBuffer, + const VkDrawIndirect2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect2KHR( + VkCommandBuffer commandBuffer, + const VkDrawIndirect2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect2KHR( + VkCommandBuffer commandBuffer, + const VkDispatchIndirect2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryKHR( + VkCommandBuffer commandBuffer, + const VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToImageKHR( + VkCommandBuffer commandBuffer, + const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToMemoryKHR( + VkCommandBuffer commandBuffer, + const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdUpdateMemoryKHR( + VkCommandBuffer commandBuffer, + const VkDeviceAddressRangeKHR* pDstRange, + VkAddressCommandFlagsKHR dstFlags, + VkDeviceSize dataSize, + const void* pData); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdFillMemoryKHR( + VkCommandBuffer commandBuffer, + const VkDeviceAddressRangeKHR* pDstRange, + VkAddressCommandFlagsKHR dstFlags, + uint32_t data); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResultsToMemoryKHR( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount, + const VkStridedDeviceAddressRangeKHR* pDstRange, + VkAddressCommandFlagsKHR dstFlags, + VkQueryResultFlags queryResultFlags); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCount2KHR( + VkCommandBuffer commandBuffer, + const VkDrawIndirectCount2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCount2KHR( + VkCommandBuffer commandBuffer, + const VkDrawIndirectCount2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBeginConditionalRendering2EXT( + VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBindTransformFeedbackBuffers2EXT( + VkCommandBuffer commandBuffer, + uint32_t firstBinding, + uint32_t bindingCount, + const VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfos); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBeginTransformFeedback2EXT( + VkCommandBuffer commandBuffer, + uint32_t firstCounterRange, + uint32_t counterRangeCount, + const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdEndTransformFeedback2EXT( + VkCommandBuffer commandBuffer, + uint32_t firstCounterRange, + uint32_t counterRangeCount, + const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCount2EXT( + VkCommandBuffer commandBuffer, + uint32_t instanceCount, + uint32_t firstInstance, + const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfo, + uint32_t counterOffset, + uint32_t vertexStride); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirect2EXT( + VkCommandBuffer commandBuffer, + const VkDrawIndirect2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCount2EXT( + VkCommandBuffer commandBuffer, + const VkDrawIndirectCount2InfoKHR* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdWriteMarkerToMemoryAMD( + VkCommandBuffer commandBuffer, + const VkMemoryMarkerInfoAMD* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructure2KHR( + VkDevice device, + const VkAccelerationStructureCreateInfo2KHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure); +#endif +#endif + + // VK_KHR_fragment_shader_barycentric is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_fragment_shader_barycentric 1 #define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1 @@ -12994,6 +13509,11 @@ typedef enum VkComponentTypeKHR { VK_COMPONENT_TYPE_UINT8_PACKED_NV = 1000491001, VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT = 1000491002, VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT = 1000491003, + VK_COMPONENT_TYPE_FLOAT6_E2M3_EXT = 1000672000, + VK_COMPONENT_TYPE_FLOAT6_E3M2_EXT = 1000672001, + VK_COMPONENT_TYPE_FLOAT4_E2M1_EXT = 1000672002, + VK_COMPONENT_TYPE_FLOAT8_UNSIGNED_E8M0_EXT = 1000672003, + VK_COMPONENT_TYPE_MXINT8_EXT = 1000672004, VK_COMPONENT_TYPE_FLOAT16_NV = VK_COMPONENT_TYPE_FLOAT16_KHR, VK_COMPONENT_TYPE_FLOAT32_NV = VK_COMPONENT_TYPE_FLOAT32_KHR, VK_COMPONENT_TYPE_FLOAT64_NV = VK_COMPONENT_TYPE_FLOAT64_KHR, @@ -13604,12 +14124,6 @@ typedef enum VkAddressCopyFlagBitsKHR { VK_ADDRESS_COPY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkAddressCopyFlagBitsKHR; typedef VkFlags VkAddressCopyFlagsKHR; -typedef struct VkStridedDeviceAddressRangeKHR { - VkDeviceAddress address; - VkDeviceSize size; - VkDeviceSize stride; -} VkStridedDeviceAddressRangeKHR; - typedef struct VkCopyMemoryIndirectCommandKHR { VkDeviceAddress srcAddress; VkDeviceAddress dstAddress; @@ -13865,6 +14379,124 @@ typedef struct VkPhysicalDeviceLayeredApiVulkanPropertiesKHR { +// VK_KHR_device_fault is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_device_fault 1 +#define VK_KHR_DEVICE_FAULT_SPEC_VERSION 1 +#define VK_KHR_DEVICE_FAULT_EXTENSION_NAME "VK_KHR_device_fault" + +typedef enum VkDeviceFaultAddressTypeKHR { + VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_KHR = 0, + VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_KHR = 1, + VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_KHR = 2, + VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_KHR = 3, + VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_KHR = 4, + VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_KHR = 5, + VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_KHR = 6, + VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_KHR, + VK_DEVICE_FAULT_ADDRESS_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkDeviceFaultAddressTypeKHR; + +typedef enum VkDeviceFaultVendorBinaryHeaderVersionKHR { + VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_KHR = 1, + VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_KHR, + VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_MAX_ENUM_KHR = 0x7FFFFFFF +} VkDeviceFaultVendorBinaryHeaderVersionKHR; + +typedef enum VkDeviceFaultFlagBitsKHR { + VK_DEVICE_FAULT_FLAG_DEVICE_LOST_KHR = 0x00000001, + VK_DEVICE_FAULT_FLAG_MEMORY_ADDRESS_KHR = 0x00000002, + VK_DEVICE_FAULT_FLAG_INSTRUCTION_ADDRESS_KHR = 0x00000004, + VK_DEVICE_FAULT_FLAG_VENDOR_KHR = 0x00000008, + VK_DEVICE_FAULT_FLAG_WATCHDOG_TIMEOUT_KHR = 0x00000010, + VK_DEVICE_FAULT_FLAG_OVERFLOW_KHR = 0x00000020, + VK_DEVICE_FAULT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkDeviceFaultFlagBitsKHR; +typedef VkFlags VkDeviceFaultFlagsKHR; +typedef struct VkPhysicalDeviceFaultFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 deviceFault; + VkBool32 deviceFaultVendorBinary; + VkBool32 deviceFaultReportMasked; + VkBool32 deviceFaultDeviceLostOnMasked; +} VkPhysicalDeviceFaultFeaturesKHR; + +typedef struct VkPhysicalDeviceFaultPropertiesKHR { + VkStructureType sType; + void* pNext; + uint32_t maxDeviceFaultCount; +} VkPhysicalDeviceFaultPropertiesKHR; + +typedef struct VkDeviceFaultAddressInfoKHR { + VkDeviceFaultAddressTypeKHR addressType; + VkDeviceAddress reportedAddress; + VkDeviceSize addressPrecision; +} VkDeviceFaultAddressInfoKHR; + +typedef struct VkDeviceFaultVendorInfoKHR { + char description[VK_MAX_DESCRIPTION_SIZE]; + uint64_t vendorFaultCode; + uint64_t vendorFaultData; +} VkDeviceFaultVendorInfoKHR; + +typedef struct VkDeviceFaultInfoKHR { + VkStructureType sType; + void* pNext; + VkDeviceFaultFlagsKHR flags; + uint64_t groupId; + char description[VK_MAX_DESCRIPTION_SIZE]; + VkDeviceFaultAddressInfoKHR faultAddressInfo; + VkDeviceFaultAddressInfoKHR instructionAddressInfo; + VkDeviceFaultVendorInfoKHR vendorInfo; +} VkDeviceFaultInfoKHR; + +typedef struct VkDeviceFaultDebugInfoKHR { + VkStructureType sType; + void* pNext; + uint32_t vendorBinarySize; + void* pVendorBinaryData; +} VkDeviceFaultDebugInfoKHR; + +typedef struct VkDeviceFaultVendorBinaryHeaderVersionOneKHR { + uint32_t headerSize; + VkDeviceFaultVendorBinaryHeaderVersionKHR headerVersion; + uint32_t vendorID; + uint32_t deviceID; + uint32_t driverVersion; + uint8_t pipelineCacheUUID[VK_UUID_SIZE]; + uint32_t applicationNameOffset; + uint32_t applicationVersion; + uint32_t engineNameOffset; + uint32_t engineVersion; + uint32_t apiVersion; +} VkDeviceFaultVendorBinaryHeaderVersionOneKHR; + +typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceFaultReportsKHR)(VkDevice device, uint64_t timeout, uint32_t* pFaultCounts, VkDeviceFaultInfoKHR* pFaultInfo); +typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceFaultDebugInfoKHR)(VkDevice device, VkDeviceFaultDebugInfoKHR* pDebugInfo); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceFaultReportsKHR( + VkDevice device, + uint64_t timeout, + uint32_t* pFaultCounts, + VkDeviceFaultInfoKHR* pFaultInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceFaultDebugInfoKHR( + VkDevice device, + VkDeviceFaultDebugInfoKHR* pDebugInfo); +#endif +#endif + + // VK_KHR_maintenance8 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance8 1 #define VK_KHR_MAINTENANCE_8_SPEC_VERSION 1 @@ -13968,6 +14600,40 @@ typedef struct VkVideoDecodeAV1InlineSessionParametersInfoKHR { +// VK_KHR_video_encode_feedback2 is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_encode_feedback2 1 +#define VK_KHR_VIDEO_ENCODE_FEEDBACK_2_SPEC_VERSION 1 +#define VK_KHR_VIDEO_ENCODE_FEEDBACK_2_EXTENSION_NAME "VK_KHR_video_encode_feedback2" + +typedef enum VkVideoEncodePerPartitionFeedbackFlagBitsKHR { + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodePerPartitionFeedbackFlagBitsKHR; +typedef VkFlags VkVideoEncodePerPartitionFeedbackFlagsKHR; +typedef struct VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 videoEncodeFeedback2; +} VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR; + +typedef struct VkVideoEncodeFeedback2CapabilitiesKHR { + VkStructureType sType; + void* pNext; + uint32_t maxPerPartitionFeedbackEntries; + VkVideoEncodePerPartitionFeedbackFlagsKHR supportedPerPartitionEncodeFeedbackFlags; +} VkVideoEncodeFeedback2CapabilitiesKHR; + +typedef struct VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t maxPerPartitionFeedbackEntries; + VkVideoEncodePerPartitionFeedbackFlagsKHR perPartitionEncodeFeedbackFlags; +} VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR; + + + // VK_KHR_depth_clamp_zero_one is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_depth_clamp_zero_one 1 #define VK_KHR_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION 1 @@ -14013,6 +14679,86 @@ typedef struct VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR { +// VK_KHR_opacity_micromap is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_opacity_micromap 1 +#define VK_KHR_OPACITY_MICROMAP_SPEC_VERSION 1 +#define VK_KHR_OPACITY_MICROMAP_EXTENSION_NAME "VK_KHR_opacity_micromap" + +typedef enum VkOpacityMicromapFormatKHR { + VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR = 1, + VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR = 2, + VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT = VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR, + VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT = VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR, + VK_OPACITY_MICROMAP_FORMAT_MAX_ENUM_KHR = 0x7FFFFFFF +} VkOpacityMicromapFormatKHR; + +typedef enum VkOpacityMicromapSpecialIndexKHR { + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR = -1, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR = -2, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR = -3, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR = -4, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV = -5, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR, + VK_OPACITY_MICROMAP_SPECIAL_INDEX_MAX_ENUM_KHR = 0x7FFFFFFF +} VkOpacityMicromapSpecialIndexKHR; + +typedef enum VkAccelerationStructureSerializedBlockTypeKHR { + VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR = 0, + VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkAccelerationStructureSerializedBlockTypeKHR; +typedef struct VkMicromapUsageKHR { + uint32_t count; + uint32_t subdivisionLevel; + VkOpacityMicromapFormatKHR format; +} VkMicromapUsageKHR; + +typedef struct VkAccelerationStructureGeometryMicromapDataKHR { + VkStructureType sType; + const void* pNext; + uint32_t usageCountsCount; + const VkMicromapUsageKHR* pUsageCounts; + const VkMicromapUsageKHR* const* ppUsageCounts; + VkDeviceAddress data; + VkDeviceAddress triangleArray; + VkDeviceSize triangleArrayStride; +} VkAccelerationStructureGeometryMicromapDataKHR; + +typedef struct VkPhysicalDeviceOpacityMicromapFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 micromap; +} VkPhysicalDeviceOpacityMicromapFeaturesKHR; + +typedef struct VkPhysicalDeviceOpacityMicromapPropertiesKHR { + VkStructureType sType; + void* pNext; + uint32_t maxOpacity2StateSubdivisionLevel; + uint32_t maxOpacity4StateSubdivisionLevel; + uint32_t maxOpacityLossy4StateSubdivisionLevel; + uint64_t maxMicromapTriangles; +} VkPhysicalDeviceOpacityMicromapPropertiesKHR; + +typedef struct VkMicromapTriangleKHR { + uint32_t dataOffset; + uint16_t subdivisionLevel; + uint16_t format; +} VkMicromapTriangleKHR; + +typedef struct VkAccelerationStructureTrianglesOpacityMicromapKHR { + VkStructureType sType; + void* pNext; + VkIndexType indexType; + VkDeviceAddress indexBuffer; + VkDeviceSize indexStride; + uint32_t baseTriangle; + VkAccelerationStructureKHR micromap; +} VkAccelerationStructureTrianglesOpacityMicromapKHR; + + + // VK_KHR_maintenance10 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance10 1 #define VK_KHR_MAINTENANCE_10_SPEC_VERSION 1 @@ -14076,6 +14822,135 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering2KHR( #endif +// VK_KHR_maintenance11 is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_maintenance11 1 +#define VK_KHR_MAINTENANCE_11_SPEC_VERSION 1 +#define VK_KHR_MAINTENANCE_11_EXTENSION_NAME "VK_KHR_maintenance11" +typedef struct VkPhysicalDeviceMaintenance11FeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 maintenance11; +} VkPhysicalDeviceMaintenance11FeaturesKHR; + +typedef struct VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR { + VkStructureType sType; + void* pNext; + VkExtent3D optimalImageTransferGranularity; +} VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR; + + + +// VK_KHR_extended_flags is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_extended_flags 1 +#define VK_KHR_EXTENDED_FLAGS_SPEC_VERSION 1 +#define VK_KHR_EXTENDED_FLAGS_EXTENSION_NAME "VK_KHR_extended_flags" +typedef VkFlags64 VkFormatFeatureFlags4KHR; + +// Flag bits for VkFormatFeatureFlagBits4KHR +typedef VkFlags64 VkFormatFeatureFlagBits4KHR; + +typedef VkFlags64 VkImageUsageFlags2KHR; + +// Flag bits for VkImageUsageFlagBits2KHR +typedef VkFlags64 VkImageUsageFlagBits2KHR; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLED_BIT_KHR = 0x00000004ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_STORAGE_BIT_KHR = 0x00000008ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000010ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000020ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSIENT_ATTACHMENT_BIT_KHR = 0x00000040ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_INPUT_ATTACHMENT_BIT_KHR = 0x00000080ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00000400ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x00040000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_HOST_TRANSFER_BIT_KHR = 0x00400000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TENSOR_ALIASING_BIT_ARM = 0x00800000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000ULL; +static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TILE_MEMORY_BIT_QCOM = 0x08000000ULL; + +typedef VkFlags64 VkImageCreateFlags2KHR; + +// Flag bits for VkImageCreateFlagBits2KHR +typedef VkFlags64 VkImageCreateFlagBits2KHR; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR = 0x00000001ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_RESIDENCY_BIT_KHR = 0x00000002ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_ALIASED_BIT_KHR = 0x00000004ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_MUTABLE_FORMAT_BIT_KHR = 0x00000008ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_CUBE_COMPATIBLE_BIT_KHR = 0x00000010ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR = 0x00400000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000040ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 0x00000080ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_EXTENDED_USAGE_BIT_KHR = 0x00000100ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_DISJOINT_BIT_KHR = 0x00000200ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_ALIAS_BIT_KHR = 0x00000400ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_PROTECTED_BIT_KHR = 0x00000800ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_CORNER_SAMPLED_BIT_NV = 0x00002000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SUBSAMPLED_BIT_EXT = 0x00004000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT = 0x00008000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00010000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000ULL; +static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000ULL; + +typedef struct VkFormatProperties4KHR { + VkStructureType sType; + void* pNext; + VkFormatFeatureFlags4KHR linearTilingFeatures; + VkFormatFeatureFlags4KHR optimalTilingFeatures; + VkFormatFeatureFlags4KHR bufferFeatures; +} VkFormatProperties4KHR; + +typedef struct VkImageUsageFlags2CreateInfoKHR { + VkStructureType sType; + void* pNext; + VkImageUsageFlags2KHR usage; +} VkImageUsageFlags2CreateInfoKHR; + +typedef struct VkImageCreateFlags2CreateInfoKHR { + VkStructureType sType; + void* pNext; + VkImageCreateFlags2KHR flags; +} VkImageCreateFlags2CreateInfoKHR; + +typedef struct VkImageViewUsage2CreateInfoKHR { + VkStructureType sType; + void* pNext; + VkImageUsageFlags2KHR usage; +} VkImageViewUsage2CreateInfoKHR; + +typedef struct VkPhysicalDeviceExtendedFlagsFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 extendedFlags; +} VkPhysicalDeviceExtendedFlagsFeaturesKHR; + +typedef struct VkImageStencilUsage2CreateInfoKHR { + VkStructureType sType; + void* pNext; + VkImageUsageFlags2KHR stencilUsage; +} VkImageStencilUsage2CreateInfoKHR; + +typedef struct VkSharedPresentSurfaceCapabilities2KHR { + VkStructureType sType; + void* pNext; + VkImageUsageFlags2KHR sharedPresentSupportedUsageFlags; +} VkSharedPresentSurfaceCapabilities2KHR; + + + // VK_EXT_debug_report is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) @@ -14851,12 +15726,6 @@ typedef VkPipelineRobustnessCreateInfo VkPipelineRobustnessCreateInfoEXT; #define VK_EXT_conditional_rendering 1 #define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 2 #define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering" - -typedef enum VkConditionalRenderingFlagBitsEXT { - VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001, - VK_CONDITIONAL_RENDERING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkConditionalRenderingFlagBitsEXT; -typedef VkFlags VkConditionalRenderingFlagsEXT; typedef struct VkConditionalRenderingBeginInfoEXT { VkStructureType sType; const void* pNext; @@ -15547,6 +16416,285 @@ typedef VkPhysicalDeviceSamplerFilterMinmaxProperties VkPhysicalDeviceSamplerFil #define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16" +// VK_AMD_gpa_interface is a preprocessor guard. Do not pass it to API calls. +#define VK_AMD_gpa_interface 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkGpaSessionAMD) +#define VK_AMD_GPA_INTERFACE_SPEC_VERSION 1 +#define VK_AMD_GPA_INTERFACE_EXTENSION_NAME "VK_AMD_gpa_interface" + +typedef enum VkGpaPerfBlockAMD { + VK_GPA_PERF_BLOCK_CPF_AMD = 0, + VK_GPA_PERF_BLOCK_IA_AMD = 1, + VK_GPA_PERF_BLOCK_VGT_AMD = 2, + VK_GPA_PERF_BLOCK_PA_AMD = 3, + VK_GPA_PERF_BLOCK_SC_AMD = 4, + VK_GPA_PERF_BLOCK_SPI_AMD = 5, + VK_GPA_PERF_BLOCK_SQ_AMD = 6, + VK_GPA_PERF_BLOCK_SX_AMD = 7, + VK_GPA_PERF_BLOCK_TA_AMD = 8, + VK_GPA_PERF_BLOCK_TD_AMD = 9, + VK_GPA_PERF_BLOCK_TCP_AMD = 10, + VK_GPA_PERF_BLOCK_TCC_AMD = 11, + VK_GPA_PERF_BLOCK_TCA_AMD = 12, + VK_GPA_PERF_BLOCK_DB_AMD = 13, + VK_GPA_PERF_BLOCK_CB_AMD = 14, + VK_GPA_PERF_BLOCK_GDS_AMD = 15, + VK_GPA_PERF_BLOCK_SRBM_AMD = 16, + VK_GPA_PERF_BLOCK_GRBM_AMD = 17, + VK_GPA_PERF_BLOCK_GRBM_SE_AMD = 18, + VK_GPA_PERF_BLOCK_RLC_AMD = 19, + VK_GPA_PERF_BLOCK_DMA_AMD = 20, + VK_GPA_PERF_BLOCK_MC_AMD = 21, + VK_GPA_PERF_BLOCK_CPG_AMD = 22, + VK_GPA_PERF_BLOCK_CPC_AMD = 23, + VK_GPA_PERF_BLOCK_WD_AMD = 24, + VK_GPA_PERF_BLOCK_TCS_AMD = 25, + VK_GPA_PERF_BLOCK_ATC_AMD = 26, + VK_GPA_PERF_BLOCK_ATC_L2_AMD = 27, + VK_GPA_PERF_BLOCK_MC_VM_L2_AMD = 28, + VK_GPA_PERF_BLOCK_EA_AMD = 29, + VK_GPA_PERF_BLOCK_RPB_AMD = 30, + VK_GPA_PERF_BLOCK_RMI_AMD = 31, + VK_GPA_PERF_BLOCK_UMCCH_AMD = 32, + VK_GPA_PERF_BLOCK_GE_AMD = 33, + VK_GPA_PERF_BLOCK_GL1A_AMD = 34, + VK_GPA_PERF_BLOCK_GL1C_AMD = 35, + VK_GPA_PERF_BLOCK_GL1CG_AMD = 36, + VK_GPA_PERF_BLOCK_GL2A_AMD = 37, + VK_GPA_PERF_BLOCK_GL2C_AMD = 38, + VK_GPA_PERF_BLOCK_CHA_AMD = 39, + VK_GPA_PERF_BLOCK_CHC_AMD = 40, + VK_GPA_PERF_BLOCK_CHCG_AMD = 41, + VK_GPA_PERF_BLOCK_GUS_AMD = 42, + VK_GPA_PERF_BLOCK_GCR_AMD = 43, + VK_GPA_PERF_BLOCK_PH_AMD = 44, + VK_GPA_PERF_BLOCK_UTCL1_AMD = 45, + VK_GPA_PERF_BLOCK_GE_DIST_AMD = 46, + VK_GPA_PERF_BLOCK_GE_SE_AMD = 47, + VK_GPA_PERF_BLOCK_DF_MALL_AMD = 48, + VK_GPA_PERF_BLOCK_SQ_WGP_AMD = 49, + VK_GPA_PERF_BLOCK_PC_AMD = 50, + VK_GPA_PERF_BLOCK_GL1XA_AMD = 51, + VK_GPA_PERF_BLOCK_GL1XC_AMD = 52, + VK_GPA_PERF_BLOCK_WGS_AMD = 53, + VK_GPA_PERF_BLOCK_EACPWD_AMD = 54, + VK_GPA_PERF_BLOCK_EASE_AMD = 55, + VK_GPA_PERF_BLOCK_RLCUSER_AMD = 56, + VK_GPA_PERF_BLOCK_GE1_AMD = VK_GPA_PERF_BLOCK_GE_AMD, + VK_GPA_PERF_BLOCK_RLCLOCAL_AMD = VK_GPA_PERF_BLOCK_RLCUSER_AMD, + VK_GPA_PERF_BLOCK_MAX_ENUM_AMD = 0x7FFFFFFF +} VkGpaPerfBlockAMD; + +typedef enum VkGpaSampleTypeAMD { + VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD = 0, + VK_GPA_SAMPLE_TYPE_TRACE_AMD = 1, + VK_GPA_SAMPLE_TYPE_TIMING_AMD = 2, + VK_GPA_SAMPLE_TYPE_MAX_ENUM_AMD = 0x7FFFFFFF +} VkGpaSampleTypeAMD; + +typedef enum VkGpaDeviceClockModeAMD { + VK_GPA_DEVICE_CLOCK_MODE_DEFAULT_AMD = 0, + VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD = 1, + VK_GPA_DEVICE_CLOCK_MODE_PROFILING_AMD = 2, + VK_GPA_DEVICE_CLOCK_MODE_MIN_MEMORY_AMD = 3, + VK_GPA_DEVICE_CLOCK_MODE_MIN_ENGINE_AMD = 4, + VK_GPA_DEVICE_CLOCK_MODE_PEAK_AMD = 5, + VK_GPA_DEVICE_CLOCK_MODE_MAX_ENUM_AMD = 0x7FFFFFFF +} VkGpaDeviceClockModeAMD; + +typedef enum VkGpaSqShaderStageFlagBitsAMD { + VK_GPA_SQ_SHADER_STAGE_PS_BIT_AMD = 0x00000001, + VK_GPA_SQ_SHADER_STAGE_VS_BIT_AMD = 0x00000002, + VK_GPA_SQ_SHADER_STAGE_GS_BIT_AMD = 0x00000004, + VK_GPA_SQ_SHADER_STAGE_ES_BIT_AMD = 0x00000008, + VK_GPA_SQ_SHADER_STAGE_HS_BIT_AMD = 0x00000010, + VK_GPA_SQ_SHADER_STAGE_LS_BIT_AMD = 0x00000020, + VK_GPA_SQ_SHADER_STAGE_CS_BIT_AMD = 0x00000040, + VK_GPA_SQ_SHADER_STAGE_FLAG_BITS_MAX_ENUM_AMD = 0x7FFFFFFF +} VkGpaSqShaderStageFlagBitsAMD; +typedef VkFlags VkGpaSqShaderStageFlagsAMD; +typedef VkFlags VkGpaPerfBlockPropertiesFlagsAMD; +typedef VkFlags VkPhysicalDeviceGpaPropertiesFlagsAMD; +typedef struct VkGpaPerfBlockPropertiesAMD { + VkGpaPerfBlockAMD blockType; + VkGpaPerfBlockPropertiesFlagsAMD flags; + uint32_t instanceCount; + uint32_t maxEventID; + uint32_t maxGlobalOnlyCounters; + uint32_t maxGlobalSharedCounters; + uint32_t maxStreamingCounters; +} VkGpaPerfBlockPropertiesAMD; + +typedef struct VkPhysicalDeviceGpaFeaturesAMD { + VkStructureType sType; + void* pNext; + VkBool32 perfCounters; + VkBool32 streamingPerfCounters; + VkBool32 sqThreadTracing; + VkBool32 clockModes; +} VkPhysicalDeviceGpaFeaturesAMD; + +typedef struct VkPhysicalDeviceGpaPropertiesAMD { + VkStructureType sType; + void* pNext; + VkPhysicalDeviceGpaPropertiesFlagsAMD flags; + VkDeviceSize maxSqttSeBufferSize; + uint32_t shaderEngineCount; + uint32_t perfBlockCount; + VkGpaPerfBlockPropertiesAMD* pPerfBlocks; +} VkPhysicalDeviceGpaPropertiesAMD; + +typedef struct VkPhysicalDeviceGpaProperties2AMD { + VkStructureType sType; + void* pNext; + uint32_t revisionId; +} VkPhysicalDeviceGpaProperties2AMD; + +typedef struct VkGpaPerfCounterAMD { + VkGpaPerfBlockAMD blockType; + uint32_t blockInstance; + uint32_t eventID; +} VkGpaPerfCounterAMD; + +typedef struct VkGpaSampleBeginInfoAMD { + VkStructureType sType; + const void* pNext; + VkGpaSampleTypeAMD sampleType; + VkBool32 sampleInternalOperations; + VkBool32 cacheFlushOnCounterCollection; + VkBool32 sqShaderMaskEnable; + VkGpaSqShaderStageFlagsAMD sqShaderMask; + uint32_t perfCounterCount; + const VkGpaPerfCounterAMD* pPerfCounters; + uint32_t streamingPerfTraceSampleInterval; + VkDeviceSize perfCounterDeviceMemoryLimit; + VkBool32 sqThreadTraceEnable; + VkBool32 sqThreadTraceSuppressInstructionTokens; + VkDeviceSize sqThreadTraceDeviceMemoryLimit; + VkPipelineStageFlags timingPreSample; + VkPipelineStageFlags timingPostSample; +} VkGpaSampleBeginInfoAMD; + +typedef struct VkGpaDeviceClockModeInfoAMD { + VkStructureType sType; + const void* pNext; + VkGpaDeviceClockModeAMD clockMode; + float memoryClockRatioToPeak; + float engineClockRatioToPeak; +} VkGpaDeviceClockModeInfoAMD; + +typedef struct VkGpaDeviceGetClockInfoAMD { + VkStructureType sType; + void* pNext; + float memoryClockRatioToPeak; + float engineClockRatioToPeak; + uint32_t memoryClockFrequency; + uint32_t engineClockFrequency; +} VkGpaDeviceGetClockInfoAMD; + +typedef struct VkGpaSessionCreateInfoAMD { + VkStructureType sType; + const void* pNext; + VkGpaSessionAMD secondaryCopySource; +} VkGpaSessionCreateInfoAMD; + +typedef VkResult (VKAPI_PTR *PFN_vkCreateGpaSessionAMD)(VkDevice device, const VkGpaSessionCreateInfoAMD* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkGpaSessionAMD* pGpaSession); +typedef void (VKAPI_PTR *PFN_vkDestroyGpaSessionAMD)(VkDevice device, VkGpaSessionAMD gpaSession, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkSetGpaDeviceClockModeAMD)(VkDevice device, VkGpaDeviceClockModeInfoAMD* pInfo); +typedef VkResult (VKAPI_PTR *PFN_vkGetGpaDeviceClockInfoAMD)(VkDevice device, VkGpaDeviceGetClockInfoAMD* pInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCmdBeginGpaSessionAMD)(VkCommandBuffer commandBuffer, VkGpaSessionAMD gpaSession); +typedef VkResult (VKAPI_PTR *PFN_vkCmdEndGpaSessionAMD)(VkCommandBuffer commandBuffer, VkGpaSessionAMD gpaSession); +typedef VkResult (VKAPI_PTR *PFN_vkCmdBeginGpaSampleAMD)(VkCommandBuffer commandBuffer, VkGpaSessionAMD gpaSession, const VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfo, uint32_t* pSampleID); +typedef void (VKAPI_PTR *PFN_vkCmdEndGpaSampleAMD)(VkCommandBuffer commandBuffer, VkGpaSessionAMD gpaSession, uint32_t sampleID); +typedef VkResult (VKAPI_PTR *PFN_vkGetGpaSessionStatusAMD)(VkDevice device, VkGpaSessionAMD gpaSession); +typedef VkResult (VKAPI_PTR *PFN_vkGetGpaSessionResultsAMD)(VkDevice device, VkGpaSessionAMD gpaSession, uint32_t sampleID, size_t* pSizeInBytes, void* pData); +typedef VkResult (VKAPI_PTR *PFN_vkResetGpaSessionAMD)(VkDevice device, VkGpaSessionAMD gpaSession); +typedef void (VKAPI_PTR *PFN_vkCmdCopyGpaSessionResultsAMD)(VkCommandBuffer commandBuffer, VkGpaSessionAMD gpaSession); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateGpaSessionAMD( + VkDevice device, + const VkGpaSessionCreateInfoAMD* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkGpaSessionAMD* pGpaSession); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkDestroyGpaSessionAMD( + VkDevice device, + VkGpaSessionAMD gpaSession, + const VkAllocationCallbacks* pAllocator); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkSetGpaDeviceClockModeAMD( + VkDevice device, + VkGpaDeviceClockModeInfoAMD* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetGpaDeviceClockInfoAMD( + VkDevice device, + VkGpaDeviceGetClockInfoAMD* pInfo); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCmdBeginGpaSessionAMD( + VkCommandBuffer commandBuffer, + VkGpaSessionAMD gpaSession); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCmdEndGpaSessionAMD( + VkCommandBuffer commandBuffer, + VkGpaSessionAMD gpaSession); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCmdBeginGpaSampleAMD( + VkCommandBuffer commandBuffer, + VkGpaSessionAMD gpaSession, + const VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfo, + uint32_t* pSampleID); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdEndGpaSampleAMD( + VkCommandBuffer commandBuffer, + VkGpaSessionAMD gpaSession, + uint32_t sampleID); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetGpaSessionStatusAMD( + VkDevice device, + VkGpaSessionAMD gpaSession); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetGpaSessionResultsAMD( + VkDevice device, + VkGpaSessionAMD gpaSession, + uint32_t sampleID, + size_t* pSizeInBytes, + void* pData); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkResetGpaSessionAMD( + VkDevice device, + VkGpaSessionAMD gpaSession); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdCopyGpaSessionResultsAMD( + VkCommandBuffer commandBuffer, + VkGpaSessionAMD gpaSession); +#endif +#endif + + // VK_EXT_descriptor_heap is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_descriptor_heap 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorARM) @@ -15599,10 +16747,7 @@ typedef struct VkHostAddressRangeConstEXT { size_t size; } VkHostAddressRangeConstEXT; -typedef struct VkDeviceAddressRangeEXT { - VkDeviceAddress address; - VkDeviceSize size; -} VkDeviceAddressRangeEXT; +typedef VkDeviceAddressRangeKHR VkDeviceAddressRangeEXT; typedef struct VkTexelBufferDescriptorInfoEXT { VkStructureType sType; @@ -16449,21 +17594,13 @@ typedef enum VkGeometryTypeKHR { #ifdef VK_ENABLE_BETA_EXTENSIONS VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX = 1000478000, #endif + VK_GEOMETRY_TYPE_MICROMAP_KHR = 1000623000, VK_GEOMETRY_TYPE_TRIANGLES_NV = VK_GEOMETRY_TYPE_TRIANGLES_KHR, VK_GEOMETRY_TYPE_AABBS_NV = VK_GEOMETRY_TYPE_AABBS_KHR, VK_GEOMETRY_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkGeometryTypeKHR; typedef VkGeometryTypeKHR VkGeometryTypeNV; - -typedef enum VkAccelerationStructureTypeKHR { - VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0, - VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1, - VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2, - VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, - VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, - VK_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF -} VkAccelerationStructureTypeKHR; typedef VkAccelerationStructureTypeKHR VkAccelerationStructureTypeNV; @@ -16504,15 +17641,17 @@ typedef enum VkGeometryInstanceFlagBitsKHR { VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 0x00000002, VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004, VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008, - VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT = 0x00000010, - VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT = 0x00000020, + VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR = 0x00000010, + VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR = 0x00000020, VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR, VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR, VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR, VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR, + VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR, // VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT is a legacy alias VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT, + VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR, // VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT is a legacy alias VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT, VK_GEOMETRY_INSTANCE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF @@ -16530,21 +17669,24 @@ typedef enum VkBuildAccelerationStructureFlagBitsKHR { VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008, VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010, VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020, - VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT = 0x00000040, - VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT = 0x00000080, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT = 0x00000100, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV = 0x00000200, #endif VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR = 0x00000800, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV = 0x00001000, + VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR = 0x00000040, + VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR = 0x00000080, + VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR = 0x00000400, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR, + VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR, // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT is a legacy alias VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT, + VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR, // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT is a legacy alias VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT, // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT is a legacy alias @@ -16558,10 +17700,10 @@ typedef enum VkBuildAccelerationStructureFlagBitsKHR { VK_BUILD_ACCELERATION_STRUCTURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkBuildAccelerationStructureFlagBitsKHR; typedef VkFlags VkBuildAccelerationStructureFlagsKHR; -typedef VkBuildAccelerationStructureFlagsKHR VkBuildAccelerationStructureFlagsNV; - typedef VkBuildAccelerationStructureFlagBitsKHR VkBuildAccelerationStructureFlagBitsNV; +typedef VkBuildAccelerationStructureFlagsKHR VkBuildAccelerationStructureFlagsNV; + typedef struct VkRayTracingShaderGroupCreateInfoNV { VkStructureType sType; const void* pNext; @@ -16625,13 +17767,13 @@ typedef struct VkGeometryNV { } VkGeometryNV; typedef struct VkAccelerationStructureInfoNV { - VkStructureType sType; - const void* pNext; - VkAccelerationStructureTypeNV type; - VkBuildAccelerationStructureFlagsNV flags; - uint32_t instanceCount; - uint32_t geometryCount; - const VkGeometryNV* pGeometries; + VkStructureType sType; + const void* pNext; + VkAccelerationStructureTypeNV type; + VkBuildAccelerationStructureFlagsKHR flags; + uint32_t instanceCount; + uint32_t geometryCount; + const VkGeometryNV* pGeometries; } VkAccelerationStructureInfoNV; typedef struct VkAccelerationStructureCreateInfoNV { @@ -16708,7 +17850,7 @@ typedef VkAccelerationStructureInstanceKHR VkAccelerationStructureInstanceNV; typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureNV)(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure); typedef void (VKAPI_PTR *PFN_vkDestroyAccelerationStructureNV)(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsNV)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements); +typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsNV)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef VkResult (VKAPI_PTR *PFN_vkBindAccelerationStructureMemoryNV)(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureNV)(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset); typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureNV)(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode); @@ -16740,7 +17882,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyAccelerationStructureNV( VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureMemoryRequirementsNV( VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, - VkMemoryRequirements2KHR* pMemoryRequirements); + VkMemoryRequirements2* pMemoryRequirements); #endif #ifndef VK_ONLY_EXPORTED_PROTOTYPES @@ -16902,6 +18044,18 @@ typedef struct VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM { +// VK_QCOM_elapsed_timer_query is a preprocessor guard. Do not pass it to API calls. +#define VK_QCOM_elapsed_timer_query 1 +#define VK_QCOM_ELAPSED_TIMER_QUERY_SPEC_VERSION 1 +#define VK_QCOM_ELAPSED_TIMER_QUERY_EXTENSION_NAME "VK_QCOM_elapsed_timer_query" +typedef struct VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM { + VkStructureType sType; + void* pNext; + VkBool32 elapsedTimerQuery; +} VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM; + + + // VK_EXT_global_priority is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_global_priority 1 #define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 @@ -18998,6 +20152,98 @@ typedef struct VkDeviceDiagnosticsConfigCreateInfoNV { #define VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME "VK_QCOM_render_pass_store_ops" +// VK_QCOM_queue_perf_hint is a preprocessor guard. Do not pass it to API calls. +#define VK_QCOM_queue_perf_hint 1 +#define VK_QCOM_QUEUE_PERF_HINT_SPEC_VERSION 1 +#define VK_QCOM_QUEUE_PERF_HINT_EXTENSION_NAME "VK_QCOM_queue_perf_hint" + +typedef enum VkPerfHintTypeQCOM { + VK_PERF_HINT_TYPE_DEFAULT_QCOM = 0, + VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM = 1, + VK_PERF_HINT_TYPE_FREQUENCY_MAX_QCOM = 2, + VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM = 3, + VK_PERF_HINT_TYPE_MAX_ENUM_QCOM = 0x7FFFFFFF +} VkPerfHintTypeQCOM; +typedef struct VkPerfHintInfoQCOM { + VkStructureType sType; + void* pNext; + VkPerfHintTypeQCOM type; + uint32_t scale; +} VkPerfHintInfoQCOM; + +typedef struct VkPhysicalDeviceQueuePerfHintFeaturesQCOM { + VkStructureType sType; + void* pNext; + VkBool32 queuePerfHint; +} VkPhysicalDeviceQueuePerfHintFeaturesQCOM; + +typedef struct VkPhysicalDeviceQueuePerfHintPropertiesQCOM { + VkStructureType sType; + void* pNext; + VkQueueFlags supportedQueues; +} VkPhysicalDeviceQueuePerfHintPropertiesQCOM; + +typedef VkResult (VKAPI_PTR *PFN_vkQueueSetPerfHintQCOM)(VkQueue queue, const VkPerfHintInfoQCOM* pPerfHintInfo); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSetPerfHintQCOM( + VkQueue queue, + const VkPerfHintInfoQCOM* pPerfHintInfo); +#endif +#endif + + +// VK_QCOM_image_processing3 is a preprocessor guard. Do not pass it to API calls. +#define VK_QCOM_image_processing3 1 +#define VK_QCOM_IMAGE_PROCESSING_3_SPEC_VERSION 1 +#define VK_QCOM_IMAGE_PROCESSING_3_EXTENSION_NAME "VK_QCOM_image_processing3" +typedef struct VkPhysicalDeviceImageProcessing3FeaturesQCOM { + VkStructureType sType; + void* pNext; + VkBool32 imageGatherLinear; + VkBool32 imageGatherExtendedModes; + VkBool32 blockMatchExtendedClampToEdge; +} VkPhysicalDeviceImageProcessing3FeaturesQCOM; + + + +// VK_QCOM_shader_multiple_wait_queues is a preprocessor guard. Do not pass it to API calls. +#define VK_QCOM_shader_multiple_wait_queues 1 +#define VK_QCOM_SHADER_MULTIPLE_WAIT_QUEUES_SPEC_VERSION 1 +#define VK_QCOM_SHADER_MULTIPLE_WAIT_QUEUES_EXTENSION_NAME "VK_QCOM_shader_multiple_wait_queues" +typedef struct VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM { + VkStructureType sType; + void* pNext; + VkBool32 shaderMultipleWaitQueues; +} VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM; + +typedef struct VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM { + VkStructureType sType; + void* pNext; + uint32_t maxShaderWaitQueues; +} VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM; + + + +// VK_EXT_shader_split_barrier is a preprocessor guard. Do not pass it to API calls. +#define VK_EXT_shader_split_barrier 1 +#define VK_EXT_SHADER_SPLIT_BARRIER_SPEC_VERSION 1 +#define VK_EXT_SHADER_SPLIT_BARRIER_EXTENSION_NAME "VK_EXT_shader_split_barrier" +typedef struct VkPhysicalDeviceShaderSplitBarrierFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 shaderSplitBarrier; +} VkPhysicalDeviceShaderSplitBarrierFeaturesEXT; + +typedef struct VkPhysicalDeviceShaderSplitBarrierPropertiesEXT { + VkStructureType sType; + void* pNext; + uint32_t splitBarrierReservedSharedMemory; +} VkPhysicalDeviceShaderSplitBarrierPropertiesEXT; + + + // VK_QCOM_tile_shading is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_tile_shading 1 #define VK_QCOM_TILE_SHADING_SPEC_VERSION 2 @@ -19086,7 +20332,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndPerTileExecutionQCOM( // VK_NV_low_latency is a preprocessor guard. Do not pass it to API calls. #define VK_NV_low_latency 1 -#define VK_NV_LOW_LATENCY_SPEC_VERSION 1 +#define VK_NV_LOW_LATENCY_SPEC_VERSION 2 #define VK_NV_LOW_LATENCY_EXTENSION_NAME "VK_NV_low_latency" typedef struct VkQueryLowLatencySupportNV { VkStructureType sType; @@ -19094,11 +20340,64 @@ typedef struct VkQueryLowLatencySupportNV { void* pQueriedLowLatencyData; } VkQueryLowLatencySupportNV; +typedef void (VKAPI_PTR *PFN_vkSetLatencySleepModeLegacyNV)(VkDevice device, VkBool32 lowLatencyMode, VkBool32 lowLatencyBoost, uint32_t minimumIntervalUs); +typedef void (VKAPI_PTR *PFN_vkLatencySleepLegacyNV)(VkDevice device, VkSemaphore signalSemaphore, uint64_t value); +typedef void (VKAPI_PTR *PFN_vkSetLatencyMarkerLegacyNV)(VkDevice device, uint64_t frameID, uint32_t marker); +typedef void (VKAPI_PTR *PFN_vkGetLatencyTimingsLegacyNV)(VkDevice device, void* pTimings); +typedef void (VKAPI_PTR *PFN_vkQueueNotifyOutOfBandLegacyNV)(VkQueue queue, uint32_t queueType); +typedef void (VKAPI_PTR *PFN_vkGetSleepStatusLegacyNV)(VkDevice device, VkBool32* pLowLatencyMode); +typedef void (VKAPI_PTR *PFN_vkShutdownLatencyDeviceLegacyNV)(VkDevice device); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkSetLatencySleepModeLegacyNV( + VkDevice device, + VkBool32 lowLatencyMode, + VkBool32 lowLatencyBoost, + uint32_t minimumIntervalUs); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkLatencySleepLegacyNV( + VkDevice device, + VkSemaphore signalSemaphore, + uint64_t value); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkSetLatencyMarkerLegacyNV( + VkDevice device, + uint64_t frameID, + uint32_t marker); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetLatencyTimingsLegacyNV( + VkDevice device, + void* pTimings); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkQueueNotifyOutOfBandLegacyNV( + VkQueue queue, + uint32_t queueType); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetSleepStatusLegacyNV( + VkDevice device, + VkBool32* pLowLatencyMode); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkShutdownLatencyDeviceLegacyNV( + VkDevice device); +#endif +#endif // VK_EXT_descriptor_buffer is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_descriptor_buffer 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) #define VK_EXT_DESCRIPTOR_BUFFER_SPEC_VERSION 1 #define VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME "VK_EXT_descriptor_buffer" typedef struct VkPhysicalDeviceDescriptorBufferPropertiesEXT { @@ -19139,12 +20438,6 @@ typedef struct VkPhysicalDeviceDescriptorBufferPropertiesEXT { VkDeviceSize descriptorBufferAddressSpaceSize; } VkPhysicalDeviceDescriptorBufferPropertiesEXT; -typedef struct VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { - VkStructureType sType; - void* pNext; - size_t combinedImageSamplerDensityMapDescriptorSize; -} VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; - typedef struct VkPhysicalDeviceDescriptorBufferFeaturesEXT { VkStructureType sType; void* pNext; @@ -19232,6 +20525,12 @@ typedef struct VkAccelerationStructureCaptureDescriptorDataInfoEXT { VkAccelerationStructureNV accelerationStructureNV; } VkAccelerationStructureCaptureDescriptorDataInfoEXT; +typedef struct VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { + VkStructureType sType; + void* pNext; + size_t combinedImageSamplerDensityMapDescriptorSize; +} VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; + typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSizeEXT)(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes); typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset); typedef void (VKAPI_PTR *PFN_vkGetDescriptorEXT)(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor); @@ -19676,22 +20975,10 @@ typedef struct VkPhysicalDevice4444FormatsFeaturesEXT { #define VK_EXT_device_fault 1 #define VK_EXT_DEVICE_FAULT_SPEC_VERSION 2 #define VK_EXT_DEVICE_FAULT_EXTENSION_NAME "VK_EXT_device_fault" +typedef VkDeviceFaultAddressTypeKHR VkDeviceFaultAddressTypeEXT; + +typedef VkDeviceFaultVendorBinaryHeaderVersionKHR VkDeviceFaultVendorBinaryHeaderVersionEXT; -typedef enum VkDeviceFaultAddressTypeEXT { - VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = 0, - VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = 1, - VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = 2, - VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = 3, - VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = 4, - VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = 5, - VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = 6, - VK_DEVICE_FAULT_ADDRESS_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDeviceFaultAddressTypeEXT; - -typedef enum VkDeviceFaultVendorBinaryHeaderVersionEXT { - VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = 1, - VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDeviceFaultVendorBinaryHeaderVersionEXT; typedef struct VkPhysicalDeviceFaultFeaturesEXT { VkStructureType sType; void* pNext; @@ -19707,40 +20994,20 @@ typedef struct VkDeviceFaultCountsEXT { VkDeviceSize vendorBinarySize; } VkDeviceFaultCountsEXT; -typedef struct VkDeviceFaultAddressInfoEXT { - VkDeviceFaultAddressTypeEXT addressType; - VkDeviceAddress reportedAddress; - VkDeviceSize addressPrecision; -} VkDeviceFaultAddressInfoEXT; - -typedef struct VkDeviceFaultVendorInfoEXT { - char description[VK_MAX_DESCRIPTION_SIZE]; - uint64_t vendorFaultCode; - uint64_t vendorFaultData; -} VkDeviceFaultVendorInfoEXT; - typedef struct VkDeviceFaultInfoEXT { VkStructureType sType; void* pNext; char description[VK_MAX_DESCRIPTION_SIZE]; - VkDeviceFaultAddressInfoEXT* pAddressInfos; - VkDeviceFaultVendorInfoEXT* pVendorInfos; + VkDeviceFaultAddressInfoKHR* pAddressInfos; + VkDeviceFaultVendorInfoKHR* pVendorInfos; void* pVendorBinaryData; } VkDeviceFaultInfoEXT; -typedef struct VkDeviceFaultVendorBinaryHeaderVersionOneEXT { - uint32_t headerSize; - VkDeviceFaultVendorBinaryHeaderVersionEXT headerVersion; - uint32_t vendorID; - uint32_t deviceID; - uint32_t driverVersion; - uint8_t pipelineCacheUUID[VK_UUID_SIZE]; - uint32_t applicationNameOffset; - uint32_t applicationVersion; - uint32_t engineNameOffset; - uint32_t engineVersion; - uint32_t apiVersion; -} VkDeviceFaultVendorBinaryHeaderVersionOneEXT; +typedef VkDeviceFaultAddressInfoKHR VkDeviceFaultAddressInfoEXT; + +typedef VkDeviceFaultVendorInfoKHR VkDeviceFaultVendorInfoEXT; + +typedef VkDeviceFaultVendorBinaryHeaderVersionOneKHR VkDeviceFaultVendorBinaryHeaderVersionOneEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceFaultInfoEXT)(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo); @@ -20054,13 +21321,13 @@ typedef struct VkPhysicalDevicePipelinePropertiesFeaturesEXT { VkBool32 pipelinePropertiesIdentifier; } VkPhysicalDevicePipelinePropertiesFeaturesEXT; -typedef VkResult (VKAPI_PTR *PFN_vkGetPipelinePropertiesEXT)(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPipelinePropertiesEXT)(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, VkBaseOutStructure* pPipelineProperties); #ifndef VK_NO_PROTOTYPES #ifndef VK_ONLY_EXPORTED_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelinePropertiesEXT( VkDevice device, - const VkPipelineInfoEXT* pPipelineInfo, + const VkPipelineInfoKHR* pPipelineInfo, VkBaseOutStructure* pPipelineProperties); #endif #endif @@ -20421,21 +21688,10 @@ typedef enum VkCopyMicromapModeEXT { VK_COPY_MICROMAP_MODE_COMPACT_EXT = 3, VK_COPY_MICROMAP_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkCopyMicromapModeEXT; +typedef VkOpacityMicromapFormatKHR VkOpacityMicromapFormatEXT; + +typedef VkOpacityMicromapSpecialIndexKHR VkOpacityMicromapSpecialIndexEXT; -typedef enum VkOpacityMicromapFormatEXT { - VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT = 1, - VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT = 2, - VK_OPACITY_MICROMAP_FORMAT_MAX_ENUM_EXT = 0x7FFFFFFF -} VkOpacityMicromapFormatEXT; - -typedef enum VkOpacityMicromapSpecialIndexEXT { - VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = -1, - VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = -2, - VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = -3, - VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = -4, - VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV = -5, - VK_OPACITY_MICROMAP_SPECIAL_INDEX_MAX_ENUM_EXT = 0x7FFFFFFF -} VkOpacityMicromapSpecialIndexEXT; typedef enum VkAccelerationStructureCompatibilityKHR { VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0, @@ -20506,6 +21762,7 @@ typedef struct VkPhysicalDeviceOpacityMicromapFeaturesEXT { void* pNext; VkBool32 micromap; VkBool32 micromapCaptureReplay; + // micromapHostCommands is legacy, but no reason was given in the API XML VkBool32 micromapHostCommands; } VkPhysicalDeviceOpacityMicromapFeaturesEXT; @@ -20567,26 +21824,22 @@ typedef struct VkAccelerationStructureTrianglesOpacityMicromapEXT { VkMicromapEXT micromap; } VkAccelerationStructureTrianglesOpacityMicromapEXT; -typedef struct VkMicromapTriangleEXT { - uint32_t dataOffset; - uint16_t subdivisionLevel; - uint16_t format; -} VkMicromapTriangleEXT; - -typedef VkResult (VKAPI_PTR *PFN_vkCreateMicromapEXT)(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap); -typedef void (VKAPI_PTR *PFN_vkDestroyMicromapEXT)(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkCmdBuildMicromapsEXT)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); -typedef VkResult (VKAPI_PTR *PFN_vkBuildMicromapsEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); -typedef VkResult (VKAPI_PTR *PFN_vkCopyMicromapEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo); -typedef VkResult (VKAPI_PTR *PFN_vkCopyMicromapToMemoryEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo); -typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToMicromapEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo); -typedef VkResult (VKAPI_PTR *PFN_vkWriteMicromapsPropertiesEXT)(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride); -typedef void (VKAPI_PTR *PFN_vkCmdCopyMicromapEXT)(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); -typedef void (VKAPI_PTR *PFN_vkCmdCopyMicromapToMemoryEXT)(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); -typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToMicromapEXT)(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); -typedef void (VKAPI_PTR *PFN_vkCmdWriteMicromapsPropertiesEXT)(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); -typedef void (VKAPI_PTR *PFN_vkGetDeviceMicromapCompatibilityEXT)(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility); -typedef void (VKAPI_PTR *PFN_vkGetMicromapBuildSizesEXT)(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo); +typedef VkMicromapTriangleKHR VkMicromapTriangleEXT; + +typedef VkResult (VKAPI_PTR *PFN_vkCreateMicromapEXT)(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap); +typedef void (VKAPI_PTR *PFN_vkDestroyMicromapEXT)(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); +typedef void (VKAPI_PTR *PFN_vkCmdBuildMicromapsEXT)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); +typedef VkResult (VKAPI_PTR *PFN_vkBuildMicromapsEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); +typedef VkResult (VKAPI_PTR *PFN_vkCopyMicromapEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyMicromapToMemoryEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToMicromapEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo); +typedef VkResult (VKAPI_PTR *PFN_vkWriteMicromapsPropertiesEXT)(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride); +typedef void (VKAPI_PTR *PFN_vkCmdCopyMicromapEXT)(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdCopyMicromapToMemoryEXT)(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToMicromapEXT)(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); +typedef void (VKAPI_PTR *PFN_vkCmdWriteMicromapsPropertiesEXT)(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); +typedef void (VKAPI_PTR *PFN_vkGetDeviceMicromapCompatibilityEXT)(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility); +typedef void (VKAPI_PTR *PFN_vkGetMicromapBuildSizesEXT)(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo); #ifndef VK_NO_PROTOTYPES #ifndef VK_ONLY_EXPORTED_PROTOTYPES @@ -20807,13 +22060,14 @@ typedef struct VkPhysicalDeviceShaderCorePropertiesARM { // VK_ARM_scheduling_controls is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_scheduling_controls 1 -#define VK_ARM_SCHEDULING_CONTROLS_SPEC_VERSION 1 +#define VK_ARM_SCHEDULING_CONTROLS_SPEC_VERSION 2 #define VK_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME "VK_ARM_scheduling_controls" typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagsARM; // Flag bits for VkPhysicalDeviceSchedulingControlsFlagBitsARM typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagBitsARM; static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM = 0x00000001ULL; +static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_ARM = 0x00000002ULL; typedef struct VkDeviceQueueShaderCoreControlCreateInfoARM { VkStructureType sType; @@ -20833,6 +22087,31 @@ typedef struct VkPhysicalDeviceSchedulingControlsPropertiesARM { VkPhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags; } VkPhysicalDeviceSchedulingControlsPropertiesARM; +typedef struct VkDispatchParametersARM { + VkStructureType sType; + void* pNext; + uint32_t workGroupBatchSize; + uint32_t maxQueuedWorkGroupBatches; + uint32_t maxWarpsPerShaderCore; +} VkDispatchParametersARM; + +typedef struct VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM { + VkStructureType sType; + void* pNext; + uint32_t schedulingControlsMaxWarpsCount; + uint32_t schedulingControlsMaxQueuedBatchesCount; + uint32_t schedulingControlsMaxWorkGroupBatchSize; +} VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM; + +typedef void (VKAPI_PTR *PFN_vkCmdSetDispatchParametersARM)(VkCommandBuffer commandBuffer, const VkDispatchParametersARM* pDispatchParameters); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetDispatchParametersARM( + VkCommandBuffer commandBuffer, + const VkDispatchParametersARM* pDispatchParameters); +#endif +#endif // VK_EXT_image_sliced_view_of_3d is a preprocessor guard. Do not pass it to API calls. @@ -21046,11 +22325,11 @@ typedef VkFlags64 VkMemoryDecompressionMethodFlagsEXT; typedef VkMemoryDecompressionMethodFlagsEXT VkMemoryDecompressionMethodFlagsNV; typedef struct VkDecompressMemoryRegionNV { - VkDeviceAddress srcAddress; - VkDeviceAddress dstAddress; - VkDeviceSize compressedSize; - VkDeviceSize decompressedSize; - VkMemoryDecompressionMethodFlagsNV decompressionMethod; + VkDeviceAddress srcAddress; + VkDeviceAddress dstAddress; + VkDeviceSize compressedSize; + VkDeviceSize decompressedSize; + VkMemoryDecompressionMethodFlagsEXT decompressionMethod; } VkDecompressMemoryRegionNV; typedef struct VkPhysicalDeviceMemoryDecompressionFeaturesEXT { @@ -21692,6 +22971,11 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorViewARM) typedef enum VkTensorTilingARM { VK_TENSOR_TILING_OPTIMAL_ARM = 0, VK_TENSOR_TILING_LINEAR_ARM = 1, + VK_TENSOR_TILING_BRICK_16_WIDE_ARM = 1000565000, + VK_TENSOR_TILING_BRICK_8_WIDE_ARM = 1000565001, + VK_TENSOR_TILING_BRICK_4_WIDE_ARM = 1000565002, + VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM = 1000565003, + VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM = 1000565004, VK_TENSOR_TILING_MAX_ENUM_ARM = 0x7FFFFFFF } VkTensorTilingARM; typedef VkFlags64 VkTensorCreateFlagsARM; @@ -22314,6 +23598,7 @@ typedef enum VkDepthClampModeEXT { typedef enum VkShaderCreateFlagBitsEXT { VK_SHADER_CREATE_LINK_STAGE_BIT_EXT = 0x00000001, VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT = 0x00000400, + VK_SHADER_CREATE_INSTRUMENT_SHADER_BIT_ARM = 0x00000800, VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 0x00000002, VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = 0x00000004, VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT = 0x00000008, @@ -22321,7 +23606,9 @@ typedef enum VkShaderCreateFlagBitsEXT { VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = 0x00000020, VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00000040, VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT = 0x00000080, + VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT = 0x00001000, VK_SHADER_CREATE_64_BIT_INDEXING_BIT_EXT = 0x00008000, + VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR = 0x00040000, VK_SHADER_CREATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkShaderCreateFlagBitsEXT; typedef VkFlags VkShaderCreateFlagsEXT; @@ -22863,6 +24150,8 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDataGraphPipelineSessionARM) typedef enum VkDataGraphPipelineSessionBindPointARM { VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM = 0, + VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_OPTICAL_FLOW_CACHE_ARM = 1000631001, + VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_NEURAL_ACCELERATOR_STATISTICS_ARM = 1000676000, VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_MAX_ENUM_ARM = 0x7FFFFFFF } VkDataGraphPipelineSessionBindPointARM; @@ -22874,6 +24163,8 @@ typedef enum VkDataGraphPipelineSessionBindPointTypeARM { typedef enum VkDataGraphPipelinePropertyARM { VK_DATA_GRAPH_PIPELINE_PROPERTY_CREATION_LOG_ARM = 0, VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM = 1, + VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_DEBUG_DATABASE_ARM = 1000676000, + VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_STATISTICS_INFO_ARM = 1000676001, VK_DATA_GRAPH_PIPELINE_PROPERTY_MAX_ENUM_ARM = 0x7FFFFFFF } VkDataGraphPipelinePropertyARM; @@ -22888,6 +24179,7 @@ typedef enum VkPhysicalDeviceDataGraphOperationTypeARM { VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM = 0, VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_NEURAL_MODEL_QCOM = 1000629000, VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_BUILTIN_MODEL_QCOM = 1000629001, + VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_OPTICAL_FLOW_ARM = 1000631000, VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_MAX_ENUM_ARM = 0x7FFFFFFF } VkPhysicalDeviceDataGraphOperationTypeARM; typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagsARM; @@ -22895,6 +24187,7 @@ typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagsARM; // Flag bits for VkDataGraphPipelineSessionCreateFlagBitsARM typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagBitsARM; static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM = 0x00000001ULL; +static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_OPTICAL_FLOW_CACHE_BIT_ARM = 0x00000002ULL; typedef VkFlags64 VkDataGraphPipelineDispatchFlagsARM; @@ -22935,7 +24228,7 @@ typedef struct VkDataGraphPipelineCompilerControlCreateInfoARM { typedef struct VkDataGraphPipelineCreateInfoARM { VkStructureType sType; const void* pNext; - VkPipelineCreateFlags2KHR flags; + VkPipelineCreateFlags2 flags; VkPipelineLayout layout; uint32_t resourceInfoCount; const VkDataGraphPipelineResourceInfoARM* pResourceInfos; @@ -23166,6 +24459,54 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEngi #endif +// VK_ARM_data_graph_instruction_set_tosa is a preprocessor guard. Do not pass it to API calls. +#define VK_ARM_data_graph_instruction_set_tosa 1 +#define VK_MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM 128U +#define VK_ARM_DATA_GRAPH_INSTRUCTION_SET_TOSA_SPEC_VERSION 1 +#define VK_ARM_DATA_GRAPH_INSTRUCTION_SET_TOSA_EXTENSION_NAME "VK_ARM_data_graph_instruction_set_tosa" + +typedef enum VkDataGraphTOSALevelARM { + VK_DATA_GRAPH_TOSA_LEVEL_NONE_ARM = 0, + VK_DATA_GRAPH_TOSA_LEVEL_8K_ARM = 1, + VK_DATA_GRAPH_TOSALEVEL_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphTOSALevelARM; + +typedef enum VkDataGraphTOSAQualityFlagBitsARM { + VK_DATA_GRAPH_TOSA_QUALITY_ACCELERATED_ARM = 0x00000001, + VK_DATA_GRAPH_TOSA_QUALITY_CONFORMANT_ARM = 0x00000002, + VK_DATA_GRAPH_TOSA_QUALITY_EXPERIMENTAL_ARM = 0x00000004, + VK_DATA_GRAPH_TOSA_QUALITY_DEPRECATED_ARM = 0x00000008, + VK_DATA_GRAPH_TOSAQUALITY_FLAG_BITS_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphTOSAQualityFlagBitsARM; +typedef VkFlags VkDataGraphTOSAQualityFlagsARM; +typedef struct VkDataGraphTOSANameQualityARM { + char name[VK_MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM]; + VkDataGraphTOSAQualityFlagsARM qualityFlags; +} VkDataGraphTOSANameQualityARM; + +typedef struct VkQueueFamilyDataGraphTOSAPropertiesARM { + VkStructureType sType; + void* pNext; + uint32_t profileCount; + const VkDataGraphTOSANameQualityARM* pProfiles; + uint32_t extensionCount; + const VkDataGraphTOSANameQualityARM* pExtensions; + VkDataGraphTOSALevelARM level; +} VkQueueFamilyDataGraphTOSAPropertiesARM; + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, VkBaseOutStructure* pProperties); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + const VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + VkBaseOutStructure* pProperties); +#endif +#endif + + // VK_QCOM_multiview_per_view_render_areas is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_multiview_per_view_render_areas 1 #define VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_SPEC_VERSION 1 @@ -23564,6 +24905,29 @@ typedef struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT { +// VK_ARM_tensor_controls is a preprocessor guard. Do not pass it to API calls. +#define VK_ARM_tensor_controls 1 +#define VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM 4U +#define VK_ARM_TENSOR_CONTROLS_SPEC_VERSION 1 +#define VK_ARM_TENSOR_CONTROLS_EXTENSION_NAME "VK_ARM_tensor_controls" +typedef struct VkTensorRollingBackingCreateInfoARM { + VkStructureType sType; + const void* pNext; + uint32_t wraps[VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM]; +} VkTensorRollingBackingCreateInfoARM; + +typedef struct VkTensorExplicitTilingFormatPropertiesARM { + VkStructureType sType; + void* pNext; + VkFormatFeatureFlags2 brick16TilingTensorFeatures; + VkFormatFeatureFlags2 brick8TilingTensorFeatures; + VkFormatFeatureFlags2 brick4TilingTensorFeatures; + VkFormatFeatureFlags2 blockUTilingTensorFeatures; + VkFormatFeatureFlags2 blockU64kTilingTensorFeatures; +} VkTensorExplicitTilingFormatPropertiesARM; + + + // VK_EXT_shader_float8 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_float8 1 #define VK_EXT_SHADER_FLOAT8_SPEC_VERSION 1 @@ -24309,7 +25673,7 @@ typedef struct VkPhysicalDevicePushConstantBankPropertiesNV { // VK_EXT_ray_tracing_invocation_reorder is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_ray_tracing_invocation_reorder 1 -#define VK_EXT_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION 1 +#define VK_EXT_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION 2 #define VK_EXT_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME "VK_EXT_ray_tracing_invocation_reorder" typedef struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT { VkStructureType sType; @@ -24427,6 +25791,12 @@ typedef struct VkPhysicalDevicePipelineOpacityMicromapFeaturesARM { +// VK_IMG_filter_linear_2d is a preprocessor guard. Do not pass it to API calls. +#define VK_IMG_filter_linear_2d 1 +#define VK_IMG_FILTER_LINEAR_2D_SPEC_VERSION 1 +#define VK_IMG_FILTER_LINEAR_2D_EXTENSION_NAME "VK_IMG_filter_linear_2d" + + // VK_ARM_performance_counters_by_region is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_performance_counters_by_region 1 #define VK_ARM_PERFORMANCE_COUNTERS_BY_REGION_SPEC_VERSION 1 @@ -24485,6 +25855,103 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceQueueFamilyPerformanceCo #endif +// VK_ARM_shader_instrumentation is a preprocessor guard. Do not pass it to API calls. +#define VK_ARM_shader_instrumentation 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderInstrumentationARM) +#define VK_ARM_SHADER_INSTRUMENTATION_SPEC_VERSION 1 +#define VK_ARM_SHADER_INSTRUMENTATION_EXTENSION_NAME "VK_ARM_shader_instrumentation" +typedef VkFlags VkShaderInstrumentationValuesFlagsARM; +typedef struct VkPhysicalDeviceShaderInstrumentationFeaturesARM { + VkStructureType sType; + void* pNext; + VkBool32 shaderInstrumentation; +} VkPhysicalDeviceShaderInstrumentationFeaturesARM; + +typedef struct VkPhysicalDeviceShaderInstrumentationPropertiesARM { + VkStructureType sType; + void* pNext; + uint32_t numMetrics; + VkBool32 perBasicBlockGranularity; +} VkPhysicalDeviceShaderInstrumentationPropertiesARM; + +typedef struct VkShaderInstrumentationCreateInfoARM { + VkStructureType sType; + void* pNext; +} VkShaderInstrumentationCreateInfoARM; + +typedef struct VkShaderInstrumentationMetricDescriptionARM { + VkStructureType sType; + void* pNext; + char name[VK_MAX_DESCRIPTION_SIZE]; + char description[VK_MAX_DESCRIPTION_SIZE]; +} VkShaderInstrumentationMetricDescriptionARM; + +typedef struct VkShaderInstrumentationMetricDataHeaderARM { + uint32_t resultIndex; + uint32_t resultSubIndex; + VkShaderStageFlags stages; + uint32_t basicBlockIndex; +} VkShaderInstrumentationMetricDataHeaderARM; + +typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM)(VkPhysicalDevice physicalDevice, uint32_t* pDescriptionCount, VkShaderInstrumentationMetricDescriptionARM* pDescriptions); +typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderInstrumentationARM)(VkDevice device, const VkShaderInstrumentationCreateInfoARM* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderInstrumentationARM* pInstrumentation); +typedef void (VKAPI_PTR *PFN_vkDestroyShaderInstrumentationARM)(VkDevice device, VkShaderInstrumentationARM instrumentation, const VkAllocationCallbacks* pAllocator); +typedef void (VKAPI_PTR *PFN_vkCmdBeginShaderInstrumentationARM)(VkCommandBuffer commandBuffer, VkShaderInstrumentationARM instrumentation); +typedef void (VKAPI_PTR *PFN_vkCmdEndShaderInstrumentationARM)(VkCommandBuffer commandBuffer); +typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInstrumentationValuesARM)(VkDevice device, VkShaderInstrumentationARM instrumentation, uint32_t* pMetricBlockCount, void* pMetricValues, VkShaderInstrumentationValuesFlagsARM flags); +typedef void (VKAPI_PTR *PFN_vkClearShaderInstrumentationMetricsARM)(VkDevice device, VkShaderInstrumentationARM instrumentation); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM( + VkPhysicalDevice physicalDevice, + uint32_t* pDescriptionCount, + VkShaderInstrumentationMetricDescriptionARM* pDescriptions); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderInstrumentationARM( + VkDevice device, + const VkShaderInstrumentationCreateInfoARM* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkShaderInstrumentationARM* pInstrumentation); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkDestroyShaderInstrumentationARM( + VkDevice device, + VkShaderInstrumentationARM instrumentation, + const VkAllocationCallbacks* pAllocator); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBeginShaderInstrumentationARM( + VkCommandBuffer commandBuffer, + VkShaderInstrumentationARM instrumentation); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdEndShaderInstrumentationARM( + VkCommandBuffer commandBuffer); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInstrumentationValuesARM( + VkDevice device, + VkShaderInstrumentationARM instrumentation, + uint32_t* pMetricBlockCount, + void* pMetricValues, + VkShaderInstrumentationValuesFlagsARM flags); +#endif + +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkClearShaderInstrumentationMetricsARM( + VkDevice device, + VkShaderInstrumentationARM instrumentation); +#endif +#endif + + // VK_EXT_vertex_attribute_robustness is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_vertex_attribute_robustness 1 #define VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_SPEC_VERSION 1 @@ -24552,6 +26019,24 @@ typedef struct VkPhysicalDevicePresentMeteringFeaturesNV { +// VK_EXT_multisampled_render_to_swapchain is a preprocessor guard. Do not pass it to API calls. +#define VK_EXT_multisampled_render_to_swapchain 1 +#define VK_EXT_MULTISAMPLED_RENDER_TO_SWAPCHAIN_SPEC_VERSION 1 +#define VK_EXT_MULTISAMPLED_RENDER_TO_SWAPCHAIN_EXTENSION_NAME "VK_EXT_multisampled_render_to_swapchain" +typedef struct VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 multisampledRenderToSwapchain; +} VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT; + +typedef struct VkSwapchainFlagsSurfaceCapabilitiesEXT { + VkStructureType sType; + void* pNext; + VkSwapchainCreateFlagsKHR swapchainSupportedFlags; +} VkSwapchainFlagsSurfaceCapabilitiesEXT; + + + // VK_EXT_fragment_density_map_offset is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_fragment_density_map_offset 1 #define VK_EXT_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION 1 @@ -24661,6 +26146,159 @@ typedef struct VkPhysicalDeviceDataGraphModelFeaturesQCOM { +// VK_ARM_data_graph_optical_flow is a preprocessor guard. Do not pass it to API calls. +#define VK_ARM_data_graph_optical_flow 1 +#define VK_ARM_DATA_GRAPH_OPTICAL_FLOW_SPEC_VERSION 1 +#define VK_ARM_DATA_GRAPH_OPTICAL_FLOW_EXTENSION_NAME "VK_ARM_data_graph_optical_flow" + +typedef enum VkDataGraphOpticalFlowPerformanceLevelARM { + VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_ARM = 0, + VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_ARM = 1, + VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_ARM = 2, + VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_ARM = 3, + VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphOpticalFlowPerformanceLevelARM; + +typedef enum VkDataGraphPipelineNodeTypeARM { + VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM = 1000631000, + VK_DATA_GRAPH_PIPELINE_NODE_TYPE_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphPipelineNodeTypeARM; + +typedef enum VkDataGraphPipelineNodeConnectionTypeARM { + VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_INPUT_ARM = 1000631000, + VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_REFERENCE_ARM = 1000631001, + VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM = 1000631002, + VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_FLOW_VECTOR_ARM = 1000631003, + VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM = 1000631004, + VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphPipelineNodeConnectionTypeARM; + +typedef enum VkDataGraphOpticalFlowGridSizeFlagBitsARM { + VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_ARM = 0, + VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_ARM = 0x00000001, + VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_ARM = 0x00000002, + VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_ARM = 0x00000004, + VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_ARM = 0x00000008, + VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_FLAG_BITS_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphOpticalFlowGridSizeFlagBitsARM; +typedef VkFlags VkDataGraphOpticalFlowGridSizeFlagsARM; + +typedef enum VkDataGraphOpticalFlowCreateFlagBitsARM { + VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_HINT_BIT_ARM = 0x00000001, + VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_COST_BIT_ARM = 0x00000002, + VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_RESERVED_30_BIT_ARM = 0x40000000, + VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_FLAG_BITS_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphOpticalFlowCreateFlagBitsARM; +typedef VkFlags VkDataGraphOpticalFlowCreateFlagsARM; + +typedef enum VkDataGraphOpticalFlowImageUsageFlagBitsARM { + VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_UNKNOWN_ARM = 0, + VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_INPUT_BIT_ARM = 0x00000001, + VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_OUTPUT_BIT_ARM = 0x00000002, + VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_HINT_BIT_ARM = 0x00000004, + VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_COST_BIT_ARM = 0x00000008, + VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_FLAG_BITS_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphOpticalFlowImageUsageFlagBitsARM; +typedef VkFlags VkDataGraphOpticalFlowImageUsageFlagsARM; + +typedef enum VkDataGraphOpticalFlowExecuteFlagBitsARM { + VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_ARM = 0x00000001, + VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_UNCHANGED_BIT_ARM = 0x00000002, + VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_UNCHANGED_BIT_ARM = 0x00000004, + VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_IS_PREVIOUS_REFERENCE_BIT_ARM = 0x00000008, + VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_IS_PREVIOUS_INPUT_BIT_ARM = 0x00000010, + VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_FLAG_BITS_MAX_ENUM_ARM = 0x7FFFFFFF +} VkDataGraphOpticalFlowExecuteFlagBitsARM; +typedef VkFlags VkDataGraphOpticalFlowExecuteFlagsARM; +typedef struct VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM { + VkStructureType sType; + void* pNext; + VkBool32 dataGraphOpticalFlow; +} VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM; + +typedef struct VkQueueFamilyDataGraphOpticalFlowPropertiesARM { + VkStructureType sType; + void* pNext; + VkDataGraphOpticalFlowGridSizeFlagsARM supportedOutputGridSizes; + VkDataGraphOpticalFlowGridSizeFlagsARM supportedHintGridSizes; + VkBool32 hintSupported; + VkBool32 costSupported; + uint32_t minWidth; + uint32_t minHeight; + uint32_t maxWidth; + uint32_t maxHeight; +} VkQueueFamilyDataGraphOpticalFlowPropertiesARM; + +typedef struct VkDataGraphPipelineOpticalFlowCreateInfoARM { + VkStructureType sType; + void* pNext; + uint32_t width; + uint32_t height; + VkFormat imageFormat; + VkFormat flowVectorFormat; + VkFormat costFormat; + VkDataGraphOpticalFlowGridSizeFlagsARM outputGridSize; + VkDataGraphOpticalFlowGridSizeFlagsARM hintGridSize; + VkDataGraphOpticalFlowPerformanceLevelARM performanceLevel; + VkDataGraphOpticalFlowCreateFlagsARM flags; +} VkDataGraphPipelineOpticalFlowCreateInfoARM; + +typedef struct VkDataGraphOpticalFlowImageFormatPropertiesARM { + VkStructureType sType; + void* pNext; + VkFormat format; +} VkDataGraphOpticalFlowImageFormatPropertiesARM; + +typedef struct VkDataGraphOpticalFlowImageFormatInfoARM { + VkStructureType sType; + const void* pNext; + VkDataGraphOpticalFlowImageUsageFlagsARM usage; +} VkDataGraphOpticalFlowImageFormatInfoARM; + +typedef struct VkDataGraphPipelineOpticalFlowDispatchInfoARM { + VkStructureType sType; + void* pNext; + VkDataGraphOpticalFlowExecuteFlagsARM flags; + uint32_t meanFlowL1NormHint; +} VkDataGraphPipelineOpticalFlowDispatchInfoARM; + +typedef struct VkDataGraphPipelineResourceInfoImageLayoutARM { + VkStructureType sType; + const void* pNext; + VkImageLayout layout; +} VkDataGraphPipelineResourceInfoImageLayoutARM; + +typedef struct VkDataGraphPipelineSingleNodeConnectionARM { + VkStructureType sType; + void* pNext; + uint32_t set; + uint32_t binding; + VkDataGraphPipelineNodeConnectionTypeARM connection; +} VkDataGraphPipelineSingleNodeConnectionARM; + +typedef struct VkDataGraphPipelineSingleNodeCreateInfoARM { + VkStructureType sType; + void* pNext; + VkDataGraphPipelineNodeTypeARM nodeType; + uint32_t connectionCount; + const VkDataGraphPipelineSingleNodeConnectionARM* pConnections; +} VkDataGraphPipelineSingleNodeCreateInfoARM; + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, const VkDataGraphOpticalFlowImageFormatInfoARM* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkDataGraphOpticalFlowImageFormatPropertiesARM* pImageFormatProperties); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + const VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + const VkDataGraphOpticalFlowImageFormatInfoARM* pOpticalFlowImageFormatInfo, + uint32_t* pFormatCount, + VkDataGraphOpticalFlowImageFormatPropertiesARM* pImageFormatProperties); +#endif +#endif + + // VK_EXT_shader_long_vector is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_long_vector 1 #define VK_EXT_SHADER_LONG_VECTOR_SPEC_VERSION 1 @@ -24746,6 +26384,125 @@ typedef struct VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT { +// VK_EXT_shader_ocp_microscaling_types is a preprocessor guard. Do not pass it to API calls. +#define VK_EXT_shader_ocp_microscaling_types 1 +#define VK_EXT_SHADER_OCP_MICROSCALING_TYPES_SPEC_VERSION 1 +#define VK_EXT_SHADER_OCP_MICROSCALING_TYPES_EXTENSION_NAME "VK_EXT_shader_ocp_microscaling_types" +typedef struct VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 shaderFloat4; + VkBool32 shaderFloat6; + VkBool32 shaderFloat8UnsignedE8M0; + VkBool32 shaderMXInt8; +} VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT; + + + +// VK_VALVE_shader_mixed_float_dot_product is a preprocessor guard. Do not pass it to API calls. +#define VK_VALVE_shader_mixed_float_dot_product 1 +#define VK_VALVE_SHADER_MIXED_FLOAT_DOT_PRODUCT_SPEC_VERSION 1 +#define VK_VALVE_SHADER_MIXED_FLOAT_DOT_PRODUCT_EXTENSION_NAME "VK_VALVE_shader_mixed_float_dot_product" +typedef struct VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE { + VkStructureType sType; + void* pNext; + VkBool32 shaderMixedFloatDotProductFloat16AccFloat32; + VkBool32 shaderMixedFloatDotProductFloat16AccFloat16; + VkBool32 shaderMixedFloatDotProductBFloat16Acc; + VkBool32 shaderMixedFloatDotProductFloat8AccFloat32; +} VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE; + + + +// VK_SEC_throttle_hint is a preprocessor guard. Do not pass it to API calls. +#define VK_SEC_throttle_hint 1 +#define VK_SEC_THROTTLE_HINT_SPEC_VERSION 1 +#define VK_SEC_THROTTLE_HINT_EXTENSION_NAME "VK_SEC_throttle_hint" + +typedef enum VkThrottleHintTypeSEC { + VK_THROTTLE_HINT_TYPE_DEFAULT_SEC = 0, + VK_THROTTLE_HINT_TYPE_LOW_SEC = 1, + VK_THROTTLE_HINT_TYPE_HIGH_SEC = 2, + VK_THROTTLE_HINT_TYPE_MAX_ENUM_SEC = 0x7FFFFFFF +} VkThrottleHintTypeSEC; +typedef struct VkThrottleHintSubmitInfoSEC { + VkStructureType sType; + const void* pNext; + VkThrottleHintTypeSEC throttleHint; +} VkThrottleHintSubmitInfoSEC; + +typedef struct VkPhysicalDeviceThrottleHintFeaturesSEC { + VkStructureType sType; + void* pNext; + VkBool32 throttleHint; +} VkPhysicalDeviceThrottleHintFeaturesSEC; + + + +// VK_ARM_data_graph_neural_accelerator_statistics is a preprocessor guard. Do not pass it to API calls. +#define VK_ARM_data_graph_neural_accelerator_statistics 1 +#define VK_ARM_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_SPEC_VERSION 1 +#define VK_ARM_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_EXTENSION_NAME "VK_ARM_data_graph_neural_accelerator_statistics" + +typedef enum VkNeuralAcceleratorStatisticsModeARM { + VK_NEURAL_ACCELERATOR_STATISTICS_MODE_DISABLED_ARM = 0, + VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS0_ARM = 1, + VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS1_ARM = 2, + VK_NEURAL_ACCELERATOR_STATISTICS_MODE_MAX_ENUM_ARM = 0x7FFFFFFF +} VkNeuralAcceleratorStatisticsModeARM; +typedef struct VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM { + VkStructureType sType; + void* pNext; + VkBool32 dataGraphNeuralAcceleratorStatistics; +} VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM; + +typedef struct VkDataGraphPipelineNeuralStatisticsCreateInfoARM { + VkStructureType sType; + const void* pNext; + VkBool32 allowNeuralStatistics; +} VkDataGraphPipelineNeuralStatisticsCreateInfoARM; + +typedef struct VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM { + VkStructureType sType; + const void* pNext; + VkNeuralAcceleratorStatisticsModeARM mode; +} VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM; + + + +// VK_EXT_primitive_restart_index is a preprocessor guard. Do not pass it to API calls. +#define VK_EXT_primitive_restart_index 1 +#define VK_EXT_PRIMITIVE_RESTART_INDEX_SPEC_VERSION 1 +#define VK_EXT_PRIMITIVE_RESTART_INDEX_EXTENSION_NAME "VK_EXT_primitive_restart_index" +typedef struct VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 primitiveRestartIndex; +} VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT; + +typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveRestartIndexEXT)(VkCommandBuffer commandBuffer, uint32_t primitiveRestartIndex); + +#ifndef VK_NO_PROTOTYPES +#ifndef VK_ONLY_EXPORTED_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartIndexEXT( + VkCommandBuffer commandBuffer, + uint32_t primitiveRestartIndex); +#endif +#endif + + +// VK_NV_cooperative_matrix_decode_vector is a preprocessor guard. Do not pass it to API calls. +#define VK_NV_cooperative_matrix_decode_vector 1 +#define VK_NV_COOPERATIVE_MATRIX_DECODE_VECTOR_SPEC_VERSION 1 +#define VK_NV_COOPERATIVE_MATRIX_DECODE_VECTOR_EXTENSION_NAME "VK_NV_cooperative_matrix_decode_vector" +typedef struct VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV { + VkStructureType sType; + void* pNext; + VkBool32 cooperativeMatrixDecodeVector; +} VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV; + + + // VK_KHR_acceleration_structure is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_acceleration_structure 1 #define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 13 @@ -24756,14 +26513,6 @@ typedef enum VkBuildAccelerationStructureModeKHR { VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1, VK_BUILD_ACCELERATION_STRUCTURE_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkBuildAccelerationStructureModeKHR; - -typedef enum VkAccelerationStructureCreateFlagBitsKHR { - VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000001, - VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008, - VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 0x00000004, - VK_ACCELERATION_STRUCTURE_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkAccelerationStructureCreateFlagBitsKHR; -typedef VkFlags VkAccelerationStructureCreateFlagsKHR; typedef struct VkAccelerationStructureBuildRangeInfoKHR { uint32_t primitiveCount; uint32_t primitiveOffset; @@ -24849,6 +26598,7 @@ typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR { VkBool32 accelerationStructure; VkBool32 accelerationStructureCaptureReplay; VkBool32 accelerationStructureIndirectBuild; + // accelerationStructureHostCommands is legacy, but no reason was given in the API XML VkBool32 accelerationStructureHostCommands; VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind; } VkPhysicalDeviceAccelerationStructureFeaturesKHR; diff --git a/src/venus/venus-protocol/vulkan_metal.h b/include/vulkan/vulkan_metal.h similarity index 99% rename from src/venus/venus-protocol/vulkan_metal.h rename to include/vulkan/vulkan_metal.h index 501c3638..1029b373 100644 --- a/src/venus/venus-protocol/vulkan_metal.h +++ b/include/vulkan/vulkan_metal.h @@ -4,7 +4,7 @@ /* ** Copyright 2015-2026 The Khronos Group Inc. ** -** SPDX-License-Identifier: Apache-2.0 +** SPDX-License-Identifier: Apache-2.0 OR MIT */ /* diff --git a/meson.build b/meson.build index 94d19410..fe477c95 100644 --- a/meson.build +++ b/meson.build @@ -346,8 +346,14 @@ if with_check_gl_errors endif with_venus = get_option('venus') -with_render_server = with_venus +with_render_server = '' +if with_venus + with_render_server = get_option('render-server-mode') +endif with_render_server_worker = get_option('render-server-worker') +if with_render_server_worker == 'auto' + with_render_server_worker = with_render_server +endif render_server_install_dir = get_option('prefix') / get_option('libexecdir') if with_venus and with_host_darwin add_languages('objc', required: true) @@ -357,11 +363,17 @@ if with_venus and with_host_darwin endif if with_venus - venus_dep = [] + dep_venus_protocol = dependency('venus-protocol', + version : '== 1.1.1', + fallback : ['venus-protocol', 'dep_vn_protocol_renderer'], + required : true + ) + + venus_dep = [dep_venus_protocol] if get_option('vulkan-dload') conf_data.set('ENABLE_VULKAN_DLOAD', 1) else - venus_dep = dependency('vulkan') + venus_dep += dependency('vulkan') endif if host_machine.system() in ['freebsd', 'openbsd'] @@ -412,6 +424,13 @@ if with_venus else error('unknown render server worker ' + with_render_server_worker) endif + + if with_render_server == 'thread' + conf_data.set('ENABLE_SAME_PROCESS_RENDER_SERVER', 1) + if with_render_server_worker != 'thread' + error('render-server-worker must be \'thread\' if render-server-mode is \'thread\'') + endif + endif endif with_video = get_option('video') @@ -440,7 +459,7 @@ if with_venus and with_host_darwin add_project_arguments('-DHAVE_CONFIG_H=1', language : 'objc') endif -inc_configuration = include_directories(['.', 'src']) +inc_configuration = include_directories(['.', 'include', 'src']) with_fuzzer = get_option('fuzzer') with_valgrind = get_option('valgrind') @@ -455,7 +474,7 @@ if not with_host_windows subdir('vtest') endif -if with_render_server +if with_render_server == 'process' subdir('server') endif @@ -477,7 +496,8 @@ summary({'c_args': (' ').join(get_option('c_args')), 'drm-i915': with_drm_i915, 'drm-panfrost': with_drm_panfrost, 'drm-msm': with_drm_msm, - 'render server worker': with_render_server ? with_render_server_worker : 'none', + 'render server mode': with_render_server == '' ? 'none' : with_render_server, + 'render server worker': with_render_server == '' ? 'none' : with_render_server_worker, 'video': with_video, 'tests': with_tests, 'fuzzer': with_fuzzer, diff --git a/meson_options.txt b/meson_options.txt index e7e67d91..9d2955de 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -34,28 +34,28 @@ option( option( 'minigbm_allocation', type : 'boolean', - value : 'false', + value : false, description : 'DEPRECATED: enable support for minigbm_allocations' ) option( 'venus', type : 'boolean', - value : 'false', + value : false, description : 'enable support for venus' ) option( 'vulkan-dload', type : 'boolean', - value : 'true', + value : true, description : 'enable loading libvulkan dynamically at runtime instead of linking to it at build-time' ) option( 'vulkan-preload', type : 'boolean', - value : 'false', + value : false, description : 'Enable Vulkan ICD preload inside the render server process. ' + 'This allows sharing of e.g. anon pages allocated within ICD ' + 'loading for free among all render worker processes forked. ' + @@ -67,7 +67,7 @@ option( option( 'check-gl-errors', type : 'boolean', - value : 'true', + value : true, description : 'treat host-side gl errors as fatal' ) @@ -86,38 +86,46 @@ option( ) option( - 'render-server-worker', + 'render-server-mode', type : 'combo', value : 'process', - choices : ['process', 'thread', 'minijail'], + choices : ['process', 'thread'], + description : 'how render server itself is spawned' +) + +option( + 'render-server-worker', + type : 'combo', + value : 'auto', + choices : ['auto', 'process', 'thread', 'minijail'], description : 'how a context in render server is serviced' ) option( 'video', type : 'boolean', - value : 'false', + value : false, description : 'enable support for hardware video acceleration' ) option( 'tests', type : 'boolean', - value : 'false', + value : false, description : 'enable unit tests' ) option( 'fuzzer', type : 'boolean', - value : 'false', + value : false, description : 'enable unit tests' ) option( 'valgrind', type : 'boolean', - value : 'false', + value : false, description : 'enable running unit tests with valgrind' ) @@ -132,6 +140,6 @@ option( option( 'unstable-apis', type : 'boolean', - value : 'false', + value : false, description : 'enable unstable apis' ) diff --git a/server/render_common.c b/server/render_common.c index e51bb88c..688d1a0f 100644 --- a/server/render_common.c +++ b/server/render_common.c @@ -4,6 +4,9 @@ */ #include "render_common.h" +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER +#include "virgl_util.h" +#endif #include #include @@ -21,6 +24,10 @@ render_log(const char *fmt, ...) va_list va; va_start(va, fmt); +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER + virgl_prefixed_logv("server", VIRGL_LOG_LEVEL_INFO, fmt, va); +#else vsyslog(LOG_DEBUG, fmt, va); +#endif va_end(va); } diff --git a/server/render_state.c b/server/render_state.c index 715f85e6..bc7f8e16 100644 --- a/server/render_state.c +++ b/server/render_state.c @@ -93,6 +93,7 @@ render_state_lookup_context(uint32_t ctx_id) return ctx; } +#ifndef ENABLE_SAME_PROCESS_RENDER_SERVER static void render_state_cb_debug_logger(UNUSED enum virgl_log_level_flags log_level, const char *message, @@ -100,6 +101,7 @@ render_state_cb_debug_logger(UNUSED enum virgl_log_level_flags log_level, { render_log(message); } +#endif static void render_state_cb_retire_fence(uint32_t ctx_id, uint32_t ring_idx, uint64_t fence_id) @@ -112,7 +114,9 @@ render_state_cb_retire_fence(uint32_t ctx_id, uint32_t ring_idx, uint64_t fence_ } static const struct vkr_renderer_callbacks render_state_cbs = { +#ifndef ENABLE_SAME_PROCESS_RENDER_SERVER .debug_logger = render_state_cb_debug_logger, +#endif .retire_fence = render_state_cb_retire_fence, }; diff --git a/server/render_worker.c b/server/render_worker.c index b8df351d..3e1cb6ee 100644 --- a/server/render_worker.c +++ b/server/render_worker.c @@ -33,7 +33,7 @@ #include #include #ifdef ENABLE_RENDER_SERVER_WORKER_THREAD -#include +#include "c11/threads.h" #endif #include diff --git a/src/drm/amdgpu/amdgpu_renderer.c b/src/drm/amdgpu/amdgpu_renderer.c index e7f47c34..cf7f4f14 100644 --- a/src/drm/amdgpu/amdgpu_renderer.c +++ b/src/drm/amdgpu/amdgpu_renderer.c @@ -259,7 +259,7 @@ amdgpu_renderer_attach_resource(struct virgl_context *vctx, struct virgl_resourc obj->bo = import.buf_handle; amdgpu_bo_export(obj->bo, amdgpu_bo_handle_type_kms, &obj->base.handle); amdgpu_object_set_res_id(ctx, obj, res->res_id); - print(1, "imported dmabuf -> res_id=%u" PRIx64, res->res_id); + print(1, "imported dmabuf -> res_id=%u", res->res_id); } else { print(2, "Ignored res_id: %d (fd_type = %d)", res->res_id, fd_type); if (fd_type != VIRGL_RESOURCE_FD_INVALID) @@ -411,7 +411,7 @@ amdgpu_renderer_get_blob(struct virgl_context *vctx, uint32_t res_id, uint64_t b /* If GEM_NEW fails, we can end up here without a backing obj or if it's a dumb buffer. */ if (!obj) { - print(0, "No object with blob_id=%ld", blob_id); + print(0, "No object with blob_id=%" PRIu64, blob_id); return -ENOENT; } @@ -424,7 +424,7 @@ amdgpu_renderer_get_blob(struct virgl_context *vctx, uint32_t res_id, uint64_t b * to the same storage. */ if (obj->exported) { - print(0, "Already exported! blob_id:%ld", blob_id); + print(0, "Already exported! blob_id:%" PRIu64, blob_id); return -EINVAL; } @@ -436,7 +436,7 @@ amdgpu_renderer_get_blob(struct virgl_context *vctx, uint32_t res_id, uint64_t b ret = amdgpu_bo_export(obj->bo, amdgpu_bo_handle_type_dma_buf_fd, (uint32_t *)&fd); if (ret) { - print(0, "Export to fd failed for blob_id:%ld r=%d (%s)", blob_id, ret, strerror(errno)); + print(0, "Export to fd failed for blob_id:%" PRIu64 " r=%d (%s)", blob_id, ret, strerror(errno)); return ret; } @@ -462,6 +462,8 @@ amdgpu_renderer_get_blob(struct virgl_context *vctx, uint32_t res_id, uint64_t b return 0; } +#define MAX_SIZE (1U << 20) + static int amdgpu_ccmd_query_info(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) { @@ -469,9 +471,11 @@ amdgpu_ccmd_query_info(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) struct amdgpu_context *ctx = to_amdgpu_context(dctx); struct amdgpu_ccmd_query_info_rsp *rsp; unsigned rsp_len; - if (__builtin_add_overflow(sizeof(*rsp), req->info.return_size, &rsp_len)) { - print(1, "%s: Request size overflow: %zu + %" PRIu32 " > %u", - __FUNCTION__, sizeof(*rsp), req->info.return_size, UINT_MAX); + if (__builtin_add_overflow(sizeof(*rsp), req->info.return_size, &rsp_len) || + rsp_len > MAX_SIZE || req->info.return_size > MAX_SIZE) { + print(1, "%s: Request or response size too large: %zu + %u > %u or %" PRIu32 " > %u", + __FUNCTION__, sizeof(*rsp), req->info.return_size, MAX_SIZE, + req->info.return_size, MAX_SIZE); return -EINVAL; } @@ -482,6 +486,8 @@ amdgpu_ccmd_query_info(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) size_t return_size = req->info.return_size; void *value = calloc(return_size, 1); + if (!value) + return -ENOMEM; struct drm_amdgpu_info request; memcpy(&request, &req->info, sizeof(request)); request.return_pointer = (uintptr_t)value; @@ -510,12 +516,12 @@ amdgpu_ccmd_gem_new(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) if (req->r.__pad) { print(0, "Invalid value for struct %s_req::r::__pad: " - "0x%" PRIx32, __FUNCTION__, req->r.__pad); + "0x%x", __FUNCTION__, req->r.__pad); ret = -EINVAL; goto alloc_failed; } if (!drm_context_blob_id_valid(dctx, req->blob_id)) { - print(0, "Invalid blob_id %ld", req->blob_id); + print(0, "Invalid blob_id %" PRIu64, req->blob_id); ret = -EINVAL; goto alloc_failed; } @@ -553,7 +559,7 @@ amdgpu_ccmd_gem_new(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) drm_context_object_set_blob_id(dctx, &obj->base, req->blob_id); - print(2, "new object blob_id: %ld heap: %08x flags: %lx size: %ld", + print(2, "new object blob_id: %" PRIu64 " heap: %08x flags: %" PRIx64" size: %" PRIu64, req->blob_id, req->r.preferred_heap, req->r.flags, req->r.alloc_size); return 0; @@ -562,7 +568,7 @@ amdgpu_ccmd_gem_new(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) amdgpu_bo_free(bo_handle); alloc_failed: - print(2, "ERROR blob_id: %ld heap: %08x flags: %lx", + print(2, "ERROR blob_id: %" PRIu64 " heap: %08x flags: %" PRIx64, req->blob_id, req->r.preferred_heap, req->r.flags); if (ctx->shmem) ctx->shmem->async_error++; @@ -593,7 +599,10 @@ amdgpu_ccmd_bo_va_op(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) } else { obj = amdgpu_get_object_from_res_id(ctx, req->res_id, __FUNCTION__); if (!obj) { - print(0, "amdgpu_bo_va_op_raw failed: op: %d res_id: %d offset: 0x%lx size: 0x%lx va: %" PRIx64 " r=%d", + print(0, + "amdgpu_bo_va_op_raw failed: " + "op: %d res_id: %d offset: 0x%" PRIx64 " " + "size: 0x%" PRIx64 " va: %" PRIx64 " r=%d", req->op, obj->base.res_id, req->offset, req->vm_map_size, req->va, rsp->ret); /* This is ok. This means the guest closed the GEM already. */ @@ -609,11 +618,16 @@ amdgpu_ccmd_bo_va_op(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) if (ctx->shmem) ctx->shmem->async_error++; - print(0, "amdgpu_bo_va_op_raw failed: op: %d res_id: %d offset: 0x%lx size: 0x%lx va: %" PRIx64 " r=%d", + print(0, + "amdgpu_bo_va_op_raw failed: " + "op: %d res_id: %d offset: 0x%" PRIx64 " " + "size: 0x%" PRIx64 " va: %" PRIx64 " r=%d", req->op, req->res_id, req->offset, req->vm_map_size, req->va, rsp->ret); } else { - print(2, "va_op %d res_id: %u va: [0x%" PRIx64 ", 0x%" PRIx64 "] @offset 0x%" PRIx64, - req->op, req->res_id, req->va, req->va + req->vm_map_size - 1, req->offset); + print(2, + "va_op %d res_id: %u " + "va: [0x%" PRIx64 ", 0x%" PRIx64 "] @offset 0x%" PRIx64, + req->op, req->res_id, req->va, req->va + req->vm_map_size - 1, req->offset); } return 0; @@ -646,7 +660,7 @@ amdgpu_ccmd_set_metadata(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) metadata.size_metadata = req->size_metadata; if (req->size_metadata) { if (req->size_metadata > sizeof(metadata.umd_metadata)) { - print(0, "Metadata size is too large for target buffer: %" PRIu32 " > %zu", + print(0, "Metadata size is too large for target buffer: %u > %zu", req->size_metadata, sizeof(metadata.umd_metadata)); rsp->ret = -EINVAL; return -1; @@ -655,7 +669,7 @@ amdgpu_ccmd_set_metadata(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) offsetof(struct amdgpu_ccmd_set_metadata_req, umd_metadata)); if (requested_size > hdr->len) { - print(0, "Metadata size is too large for source buffer: %zu > %" PRIu32, + print(0, "Metadata size is too large for source buffer: %zu > %u", requested_size, hdr->len); rsp->ret = -EINVAL; return -1; @@ -736,7 +750,7 @@ amdgpu_ccmd_create_ctx(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) } if (req->flags & ~AMDGPU_CCMD_CREATE_CTX_DESTROY) { - print(0, "Invalid flags 0x%" PRIu32, req->flags); + print(0, "Invalid flags 0x%u", req->flags); rsp->hdr.ret = -EINVAL; return -1; } @@ -827,7 +841,7 @@ amdgpu_ccmd_cs_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) } /* Do not allocate arbitrarily large buffer. */ if (req->num_chunks > AMDGPU_CCMD_CS_SUBMIT_MAX_NUM_CHUNKS) { - print(1, "%s: Invalid num_chunks: %" PRIu32 " > %d", + print(1, "%s: Invalid num_chunks: %u > %d", __FUNCTION__, req->num_chunks, AMDGPU_CCMD_CS_SUBMIT_MAX_NUM_CHUNKS); rsp->ret = -EINVAL; return -1; @@ -842,7 +856,7 @@ amdgpu_ccmd_cs_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) chunks = malloc((req->num_chunks + 1 /* syncobj_in */ + 1 /* syncobj_out */) * sizeof(*chunks)); if (chunks == NULL) { - print(0, "Failed to allocate %" PRIu32 " chunks", req->num_chunks + 2); + print(0, "Failed to allocate %u chunks", req->num_chunks + 2); r = -EINVAL; goto end; } @@ -858,7 +872,7 @@ amdgpu_ccmd_cs_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) size_t descriptors_len = size_add(offsetof(struct amdgpu_ccmd_cs_submit_req, payload), size_mul(req->num_chunks, sizeof(struct desc))); if (descriptors_len > hdr->len) { - print(0, "Descriptors are out of bounds: %zu + %zu * %" PRIu32 " > %" PRIu32, + print(0, "Descriptors are out of bounds: %zu + %zu * %u > %u", offsetof(struct amdgpu_ccmd_cs_submit_req, payload), sizeof(struct desc), req->num_chunks, hdr->len); r = -EINVAL; @@ -875,7 +889,7 @@ amdgpu_ccmd_cs_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) chunks[num_chunks].chunk_id = chunk_id; /* Validate input. */ if (end > hdr->len) { - print(0, "Descriptors are out of bounds: %zu > %" PRIu32, end, hdr->len); + print(0, "Descriptors are out of bounds: %zu > %u", end, hdr->len); r = -EINVAL; goto end; } @@ -936,7 +950,7 @@ amdgpu_ccmd_cs_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) } in = input; if (in->offset % sizeof(uint64_t)) { - print(0, "Invalid chunk offset %" PRIu32 " (not multiple of 8)", in->offset); + print(0, "Invalid chunk offset %u (not multiple of 8)", in->offset); r = -EINVAL; goto end; } @@ -1043,7 +1057,7 @@ amdgpu_ccmd_cs_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) drmSyncobjDestroy(amdgpu_device_get_fd(ctx->dev), syncobj_out.handle); - print(3, "ctx: %d -> seqno={v=%d a=%ld} r=%d", req->ctx_id, hdr->seqno, seqno, r); + print(3, "ctx: %d -> seqno={v=%d a=%" PRIu64 "} r=%d", req->ctx_id, hdr->seqno, seqno, r); end: if (bo_list) @@ -1157,8 +1171,10 @@ amdgpu_renderer_submit_fence(struct virgl_context *vctx, uint32_t flags, struct amdgpu_context *ctx = to_amdgpu_context(dctx); /* timeline is ring_idx-1 (because ring_idx 0 is host CPU timeline) */ - if (ring_idx > AMDGPU_HW_IP_NUM) { - print(0, "invalid ring_idx: %" PRIu32, ring_idx); + if (ring_idx > ctx->timeline_count) { + print(0, "Invalid ring_idx value: %" PRIu32 + " (must be in [0, %" PRIu32 "] range)", + ring_idx, ctx->timeline_count); return -EINVAL; } /* ring_idx zero is used for the guest to synchronize with host CPU, @@ -1170,7 +1186,7 @@ amdgpu_renderer_submit_fence(struct virgl_context *vctx, uint32_t flags, return 0; } - print(3, "ring_idx: %d fence_id: %lu", ring_idx, fence_id); + print(3, "ring_idx: %d fence_id: %" PRIu64, ring_idx, fence_id); return drm_timeline_submit_fence(&ctx->timelines[ring_idx - 1], flags, fence_id); } diff --git a/src/drm/drm_context.c b/src/drm/drm_context.c index d76fec74..570deea2 100644 --- a/src/drm/drm_context.c +++ b/src/drm/drm_context.c @@ -52,13 +52,28 @@ drm_context_unmap_shmem_blob(struct drm_context *dctx) if (!dctx->shmem) return; - uint32_t blob_size = dctx->rsp_mem_sz + dctx->shmem->rsp_mem_offset; - - munmap(dctx->shmem, blob_size); + munmap(dctx->shmem, dctx->blob_size); dctx->shmem = NULL; dctx->rsp_mem = NULL; dctx->rsp_mem_sz = 0; + dctx->blob_size = 0; +} + +static bool +drm_check_shm_bounds(struct drm_context *dctx, const struct vdrm_ccmd_req *hdr, + size_t len) +{ + size_t rsp_mem_sz = dctx->rsp_mem_sz; + size_t off = hdr->rsp_off; + + if ((off > rsp_mem_sz) || (len > rsp_mem_sz - off)) { + drm_err("invalid shm offset: off=%zu, len=%zu (shmem_size=%zu)", + off, len, rsp_mem_sz); + return false; + } + + return true; } static int @@ -108,24 +123,36 @@ drm_context_submit_cmd_dispatch(struct drm_context *dctx, const struct vdrm_ccmd if (ret) { drm_err("%s: dispatch failed: %d (%s)", ccmd->name, ret, strerror(errno)); - return ret; + goto free_response_buffer; } /* Commands with no response, like SET_DEBUGINFO, could be sent before * the shmem buffer is allocated. */ if (!dctx->shmem) - return 0; + goto free_response_buffer; - /* If the response length from the guest is smaller than the - * expected size, ie. newer host and older guest, then a shadow - * copy is used, and we need to copy back to the actual rsp - * buffer. - */ - struct vdrm_ccmd_rsp *rsp = (struct vdrm_ccmd_rsp *)&dctx->rsp_mem[hdr->rsp_off]; if (dctx->current_rsp) { - uint32_t len = *(volatile uint32_t *)&rsp->len; - len = MIN2(len, dctx->current_rsp->len); + uint32_t len = dctx->current_rsp->len; + + /* To prevent TOCTOU attacks, a shadow buffer is always used. + * We need to copy back to the actual rsp buffer. Add a bounds + * check for defense in depth. + */ + if (!drm_check_shm_bounds(dctx, hdr, len)) { + assert(!"Failed bounds check when copying to response buffer"); + ret = -EFAULT; + goto free_response_buffer; + } + + struct vdrm_ccmd_rsp *rsp = (struct vdrm_ccmd_rsp *)&dctx->rsp_mem[hdr->rsp_off]; + uint32_t untrusted_len = *(volatile uint32_t *)&rsp->len; + + /* WARNING: MIN2() evaluates its arguments more than once! + * DO NOT inline the above volatile load into it! That would + * introduce a double fetch vulnerability. + */ + len = MIN2(len, untrusted_len); memcpy(rsp, dctx->current_rsp, len); rsp->len = len; free(dctx->current_rsp); @@ -135,6 +162,16 @@ drm_context_submit_cmd_dispatch(struct drm_context *dctx, const struct vdrm_ccmd p_atomic_xchg(&dctx->shmem->seqno, hdr->seqno); return 0; + +free_response_buffer: + /* Free the response buffer. This both prevents leaks + * and (more importantly) ensures that if a response + * is about to be copied to shared memory, its offset + * was validated by the *current* command's handler. + */ + free(dctx->current_rsp); + dctx->current_rsp = NULL; + return ret; } static int @@ -314,14 +351,8 @@ void * drm_context_rsp(struct drm_context *dctx, const struct vdrm_ccmd_req *hdr, size_t len) { - size_t rsp_mem_sz = dctx->rsp_mem_sz; - size_t off = hdr->rsp_off; - - if ((off > rsp_mem_sz) || (len > rsp_mem_sz - off)) { - drm_err("invalid shm offset: off=%zu, len=%zu (shmem_size=%zu)", - off, len, rsp_mem_sz); + if (!drm_check_shm_bounds(dctx, hdr, len)) return NULL; - } /* The shared buffer might be writable by the guest. To avoid TOCTOU, * data races, and other security problems, always allocate a shadow buffer. @@ -357,12 +388,12 @@ drm_context_get_shmem_blob(struct drm_context *dctx, return -EINVAL; } - if (dctx->shmem) { + if (dctx->shmem || dctx->blob_size) { drm_err("there can be only one!"); return -EINVAL; } - if ((blob_size < sizeof(*dctx->shmem)) || (blob_size > UINT32_MAX)) { + if ((blob_size < shmem_size) || (blob_size > UINT32_MAX)) { drm_err("invalid blob size 0x%" PRIx64, blob_size); return -EINVAL; } @@ -393,8 +424,9 @@ drm_context_get_shmem_blob(struct drm_context *dctx, dctx->shmem->rsp_mem_offset = shmem_size; uint8_t *ptr = (uint8_t *)dctx->shmem; - dctx->rsp_mem = &ptr[dctx->shmem->rsp_mem_offset]; - dctx->rsp_mem_sz = blob_size - dctx->shmem->rsp_mem_offset; + dctx->rsp_mem = ptr + shmem_size; + dctx->rsp_mem_sz = blob_size - shmem_size; + dctx->blob_size = blob_size; blob->u.fd = fd; blob->type = VIRGL_RESOURCE_FD_SHM; diff --git a/src/drm/drm_context.h b/src/drm/drm_context.h index 3c04b762..5c75553f 100644 --- a/src/drm/drm_context.h +++ b/src/drm/drm_context.h @@ -43,6 +43,7 @@ struct drm_context { struct vdrm_shmem *shmem; uint8_t *rsp_mem; uint32_t rsp_mem_sz; + uint32_t blob_size; struct vdrm_ccmd_rsp *current_rsp; diff --git a/src/drm/i915/i915_ccmd.c b/src/drm/i915/i915_ccmd.c index 7000984c..d79ab04d 100644 --- a/src/drm/i915/i915_ccmd.c +++ b/src/drm/i915/i915_ccmd.c @@ -511,12 +511,6 @@ i915_ccmd_gem_execbuffer2(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) struct drm_i915_gem_execbuffer2 exec = {0}; - /* - * Assume there is one actively used context at a time. - * - * If this ever changes, guest kernel VirtIO-GPU UAPI will need to be extended - * to support logical sub-contexts. VirtIO-GPU supports one context per DRM FD. - */ exec.rsvd1 = req->context_id; exec.buffers_ptr = (uintptr_t)buffers; exec.buffer_count = req->buffer_count; @@ -524,8 +518,25 @@ i915_ccmd_gem_execbuffer2(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) exec.batch_len = req->batch_len; exec.flags = req->flags; + if (!req->context_id || req->context_id > 8) { + drm_err("invalid context_id"); + free(payload); + return -EINVAL; + } + int ring_idx = 1 + (exec.flags & I915_EXEC_RING_MASK); + /* + * Android build of ANV driver uses 2 sub-contexts on same render ring + * for graphics and compute queues. In all other cases i915 driver has one + * sub-context per DRM context. First protocol version reserved 64 rings + * (fence contexts) per DRM context, i915 driver doesn't need that many rings. + * Split reserved 64 rings by 8 HW engines per sub-context, this makes each + * sub-context have own fence contexts needed for correct multi-queue syncing. + */ + if (hdr->cmd == I915_CCMD_GEM_EXECBUFFER2_V2) + ring_idx += (req->context_id - 1) * 8; + if (ring_idx >= (int)ARRAY_SIZE(ictx->timelines)) { free(payload); return -EINVAL; @@ -667,6 +678,7 @@ const struct drm_ccmd i915_ccmd_dispatch[] = { HANDLER(GEM_EXECBUFFER2, gem_execbuffer2), HANDLER(GEM_SET_MMAP_MODE, gem_set_mmap_mode), HANDLER(GEM_BUSY, gem_busy), + HANDLER(GEM_EXECBUFFER2_V2, gem_execbuffer2), }; const unsigned int i915_ccmd_dispatch_size = ARRAY_SIZE(i915_ccmd_dispatch); diff --git a/src/drm/i915/i915_proto.h b/src/drm/i915/i915_proto.h index 31ed50dd..a4bb7d4c 100644 --- a/src/drm/i915/i915_proto.h +++ b/src/drm/i915/i915_proto.h @@ -29,6 +29,7 @@ enum i915_ccmd { I915_CCMD_GEM_EXECBUFFER2, I915_CCMD_GEM_SET_MMAP_MODE, I915_CCMD_GEM_BUSY, + I915_CCMD_GEM_EXECBUFFER2_V2, }; #define I915_CCMD(_cmd, _len) (struct vdrm_ccmd_req){ \ diff --git a/src/drm/i915/i915_renderer.c b/src/drm/i915/i915_renderer.c index 0d25635d..52c496f3 100644 --- a/src/drm/i915/i915_renderer.c +++ b/src/drm/i915/i915_renderer.c @@ -30,7 +30,7 @@ i915_renderer_probe(int fd, struct virgl_renderer_capset_drm *capset) capset->u.intel.pci_device_id = drmdev->deviceinfo.pci->device_id; capset->u.intel.pci_revision_id = drmdev->deviceinfo.pci->revision_id; - capset->wire_format_version = 1; + capset->wire_format_version = 2; drm_dbg("wire_format_version: %u", capset->wire_format_version); drm_dbg("version_major: %u", capset->version_major); diff --git a/src/drm/msm/msm_renderer.c b/src/drm/msm/msm_renderer.c index 8a6e2d84..ba358c96 100644 --- a/src/drm/msm/msm_renderer.c +++ b/src/drm/msm/msm_renderer.c @@ -351,13 +351,13 @@ msm_renderer_attach_resource(struct virgl_context *vctx, struct virgl_resource * close(fd); if (size < 0) { drm_err("lseek failed: %" PRId64 " (%s)", size, strerror(errno)); - gem_close(fd, handle); + gem_close(dctx->fd, handle); return; } obj = msm_object_create(handle, 0, size); if (!obj) { - gem_close(fd, handle); + gem_close(dctx->fd, handle); return; } @@ -518,10 +518,15 @@ msm_ccmd_nop(UNUSED struct drm_context *dctx, UNUSED struct vdrm_ccmd_req *hdr) return 0; } +#define ENDOF(type, field) \ + (1 ? (offsetof(struct type, field) + sizeof(((struct type *)0)->field)) \ + /* to catch passing non-identifiers */ \ + : sizeof(struct { char _type_##type##0; char _field_##field##0; })) + static int msm_ccmd_ioctl_simple(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) { - const struct msm_ccmd_ioctl_simple_req *req = to_msm_ccmd_ioctl_simple_req(hdr); + struct msm_ccmd_ioctl_simple_req *req = to_msm_ccmd_ioctl_simple_req(hdr); unsigned payload_len = _IOC_SIZE(req->cmd); size_t req_len = size_add(sizeof(*req), payload_len); struct msm_context *mctx = to_msm_context(dctx); @@ -537,18 +542,54 @@ msm_ccmd_ioctl_simple(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) return -EINVAL; } + /* Only allow DRM ioctls: */ + if (_IOC_TYPE(req->cmd) != DRM_IOCTL_BASE) { + drm_err("wrong ioctl type: %u != %u", _IOC_TYPE(req->cmd), + DRM_IOCTL_BASE); + return -EINVAL; + } + /* Allow-list of supported ioctls: */ unsigned iocnr = _IOC_NR(req->cmd) - DRM_COMMAND_BASE; + unsigned direction = _IOC_READ|_IOC_WRITE; + size_t min_size; + switch (iocnr) { case DRM_MSM_GET_PARAM: + min_size = ENDOF(drm_msm_param, value); + break; case DRM_MSM_SUBMITQUEUE_NEW: + min_size = ENDOF(drm_msm_submitqueue, id); + break; case DRM_MSM_SUBMITQUEUE_CLOSE: + min_size = sizeof(uint32_t); + direction = _IOC_WRITE; break; default: drm_err("invalid ioctl: %08x (%u)", req->cmd, iocnr); return -EINVAL; } + if (payload_len < min_size) { + drm_err("ioctl %u needs min payload len %zu (got %u)", + iocnr, min_size, payload_len); + return -EINVAL; + } + + if (_IOC_DIR(req->cmd) != direction) { + drm_err("ioctl %u needs direction %u, got %u", + iocnr, direction, _IOC_DIR(req->cmd)); + return -EINVAL; + } + + if (iocnr == DRM_MSM_SUBMITQUEUE_NEW) { + struct drm_msm_submitqueue *args = (void *)req->payload; + if (args->prio >= nr_timelines) { + drm_err("invalid ring_idx: %" PRIu32, args->prio); + return -EINVAL; + } + } + struct msm_ccmd_ioctl_simple_rsp *rsp; size_t rsp_len = sizeof(*rsp); @@ -560,19 +601,13 @@ msm_ccmd_ioctl_simple(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) if (!rsp) return -ENOMEM; - /* Copy the payload because the kernel can write (if IOC_OUT bit - * is set) and to avoid casting away the const: - */ - char payload[payload_len]; - memcpy(payload, req->payload, payload_len); - - rsp->ret = drmIoctl(dctx->fd, req->cmd, payload); + rsp->ret = drmIoctl(dctx->fd, req->cmd, req->payload); if (req->cmd & IOC_OUT) - memcpy(rsp->payload, payload, payload_len); + memcpy(rsp->payload, req->payload, payload_len); if (iocnr == DRM_MSM_SUBMITQUEUE_NEW && !rsp->ret) { - struct drm_msm_submitqueue *args = (void *)payload; + struct drm_msm_submitqueue *args = (void *)req->payload; drm_dbg("submitqueue %u, prio %u", args->id, args->prio); @@ -822,7 +857,11 @@ msm_ccmd_gem_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) goto out; } - unsigned prio = (uintptr_t)entry->data; + uintptr_t prio = (uintptr_t)entry->data; + if (prio >= nr_timelines) { + drm_err("invalid priority %zu", (size_t)prio); + goto out; + } drm_timeline_set_last_fence_fd(&mctx->timelines[prio], args.fence_fd); } diff --git a/src/drm/panfrost/panfrost_ccmd.c b/src/drm/panfrost/panfrost_ccmd.c index a696810f..5936b4fb 100644 --- a/src/drm/panfrost/panfrost_ccmd.c +++ b/src/drm/panfrost/panfrost_ccmd.c @@ -20,10 +20,25 @@ panfrost_ccmd_submit(struct drm_context *dctx, struct vdrm_ccmd_req *hdr) struct panfrost_ccmd_submit_req *req = to_panfrost_ccmd_submit_req(hdr); struct panfrost_context *pan_ctx = to_panfrost_context(dctx); uint32_t *res = (uint32_t *) &req->payload; - uint32_t bo_handlers[req->res_id_count]; int ret, out_sync_fd, in_fence_fd; uint32_t in_sync = 0; + /* Avoid allocating too much stack memory. */ + if (req->res_id_count > 128) { + drm_err("Too many resource IDs: %" PRIu32, req->res_id_count); + return -EINVAL; + } + + /* Avoid reading past the end of the request. */ + size_t min_size = size_add(offsetof(typeof(*req), payload), + size_mul(sizeof(*req->payload), req->res_id_count)); + if (min_size > hdr->len) { + drm_err("res_id_count %" PRIu32 " requires %zu payload bytes, but only " + "received %" PRIu32, req->res_id_count, min_size, hdr->len); + return -EINVAL; + } + + uint32_t bo_handlers[req->res_id_count]; for (size_t i = 0; i < req->res_id_count; i++) { struct panfrost_object *pan_obj = panfrost_get_object_from_res_id(pan_ctx, res[i]); if (!pan_obj) { diff --git a/src/drm/panfrost/panfrost_proto.h b/src/drm/panfrost/panfrost_proto.h index 4a6e7558..d1ee622f 100644 --- a/src/drm/panfrost/panfrost_proto.h +++ b/src/drm/panfrost/panfrost_proto.h @@ -45,6 +45,7 @@ struct panfrost_ccmd_wait_bo_req { struct vdrm_ccmd_req hdr; uint32_t res_id; + uint32_t pad; int64_t timeout_ns; }; PANFROST_STATIC_ASSERT_SIZE(panfrost_ccmd_wait_bo_req) @@ -53,7 +54,7 @@ DEFINE_CAST(vdrm_ccmd_req, panfrost_ccmd_wait_bo_req) struct panfrost_ccmd_wait_bo_rsp { struct vdrm_ccmd_rsp hdr; - int ret; + int32_t ret; }; PANFROST_STATIC_ASSERT_SIZE(panfrost_ccmd_wait_bo_rsp) @@ -86,7 +87,7 @@ DEFINE_CAST(vdrm_ccmd_req, panfrost_ccmd_mmap_bo_req) struct panfrost_ccmd_mmap_bo_rsp { struct vdrm_ccmd_rsp hdr; - int ret; + int32_t ret; uint64_t offset; }; PANFROST_STATIC_ASSERT_SIZE(panfrost_ccmd_mmap_bo_rsp) @@ -106,7 +107,7 @@ DEFINE_CAST(vdrm_ccmd_req, panfrost_ccmd_get_param_req) struct panfrost_ccmd_get_param_rsp { struct vdrm_ccmd_rsp hdr; - int ret; + int32_t ret; uint64_t value; }; PANFROST_STATIC_ASSERT_SIZE(panfrost_ccmd_get_param_rsp) @@ -126,7 +127,7 @@ DEFINE_CAST(vdrm_ccmd_req, panfrost_ccmd_get_bo_offset_req) struct panfrost_ccmd_get_bo_offset_rsp { struct vdrm_ccmd_rsp hdr; - int ret; + int32_t ret; uint64_t offset; }; PANFROST_STATIC_ASSERT_SIZE(panfrost_ccmd_get_bo_offset_rsp) @@ -147,7 +148,7 @@ struct panfrost_ccmd_madvise_rsp { struct vdrm_ccmd_rsp hdr; uint32_t pad; - int ret; + int32_t ret; uint32_t retained; }; PANFROST_STATIC_ASSERT_SIZE(panfrost_ccmd_madvise_rsp) diff --git a/src/drm/panfrost/panfrost_renderer.c b/src/drm/panfrost/panfrost_renderer.c index 7ab3ad6e..fc37f34e 100644 --- a/src/drm/panfrost/panfrost_renderer.c +++ b/src/drm/panfrost/panfrost_renderer.c @@ -80,6 +80,7 @@ panfrost_renderer_create(int fd, UNUSED size_t debug_len, UNUSED const char *deb pan_ctx->base.base.destroy = panfrost_renderer_destroy; pan_ctx->base.base.attach_resource = panfrost_renderer_attach_resource; pan_ctx->base.base.export_opaque_handle = panfrost_renderer_export_opaque_handle; + pan_ctx->base.base.resource_map = panfrost_renderer_resource_map; pan_ctx->base.base.get_blob = panfrost_renderer_get_blob; pan_ctx->base.base.submit_fence = panfrost_renderer_submit_fence; pan_ctx->base.base.supports_fence_sharing = true; diff --git a/src/drm/panfrost/panfrost_resource.c b/src/drm/panfrost/panfrost_resource.c index 9ae14ceb..77e99cce 100644 --- a/src/drm/panfrost/panfrost_resource.c +++ b/src/drm/panfrost/panfrost_resource.c @@ -3,17 +3,46 @@ * SPDX-License-Identifier: MIT */ +#include #include +#include #include #include +#include #include "util/anon_file.h" -#include "panfrost_ccmd.h" #include "panfrost_object.h" #include "panfrost_resource.h" + +#include "panfrost_drm.h" + #include "drm_util.h" +void * +panfrost_renderer_resource_map(struct virgl_context *vctx, + struct virgl_resource *res, void *addr, + int32_t prot, int32_t flags) +{ + struct drm_context *dctx = to_drm_context(vctx); + struct panfrost_context *ctx = to_panfrost_context(dctx); + struct panfrost_object *obj = panfrost_get_object_from_res_id(ctx, res->res_id); + + drm_dbg("obj=%p, res_id=%u", (void *)obj, res->res_id); + + if (!obj) { + drm_err("invalid res_id %u", res->res_id); + return NULL; + } + struct drm_panfrost_mmap_bo mmap_info = { .handle = obj->base.handle }; + int ret = drmIoctl(dctx->fd, DRM_IOCTL_PANFROST_MMAP_BO, &mmap_info); + if (ret) { + drm_err("DRM_IOCTL_PANFROST_MMAP_BO failed: %d %s", errno, strerror(errno)); + return NULL; + } + + return mmap(addr, obj->base.size, prot, flags, dctx->fd, mmap_info.offset); +} void panfrost_renderer_attach_resource(struct virgl_context *vctx, struct virgl_resource *res) @@ -45,13 +74,13 @@ panfrost_renderer_attach_resource(struct virgl_context *vctx, struct virgl_resou close(fd); if (size < 0) { drm_err("lseek failed: %" PRId64 " (%s)", size, strerror(errno)); - drmCloseBufferHandle(fd, handle); + drmCloseBufferHandle(dctx->fd, handle); return; } struct panfrost_object *obj = panfrost_object_create(handle, size, 0, 0); if (!obj) { - drmCloseBufferHandle(fd, handle); + drmCloseBufferHandle(dctx->fd, handle); return; } diff --git a/src/drm/panfrost/panfrost_resource.h b/src/drm/panfrost/panfrost_resource.h index 5264f998..f34a0a1e 100644 --- a/src/drm/panfrost/panfrost_resource.h +++ b/src/drm/panfrost/panfrost_resource.h @@ -11,6 +11,11 @@ bool panfrost_res_id_unused(struct panfrost_context *pan_ctx, uint32_t res_id); +void * +panfrost_renderer_resource_map(struct virgl_context *vctx, + struct virgl_resource *res, void *addr, + int32_t prot, int32_t flags); + void panfrost_renderer_attach_resource(struct virgl_context *vctx, struct virgl_resource *res); diff --git a/src/gallium/auxiliary/util/u_format.yaml b/src/gallium/auxiliary/util/u_format.yaml index 7550aa22..059fd207 100644 --- a/src/gallium/auxiliary/util/u_format.yaml +++ b/src/gallium/auxiliary/util/u_format.yaml @@ -2286,6 +2286,14 @@ block: {width: 1, height: 1, depth: 1} channels: [] swizzles: [X, Y, Z, W] + +- name: X6Y10_X6U10X6V10_422_UNORM + alias: P210 + layout: planar2 + colorspace: YUV + block: {width: 1, height: 1, depth: 1} + channels: [] + swizzles: [X, Y, Z, W] - name: Y10Y10Y10X2_U10V10U10X2V10U10V10X2_420_UNORM alias: P030 layout: planar2 diff --git a/src/mesa/util/anon_file.c b/src/mesa/util/anon_file.c index 9963dd00..1c22514f 100644 --- a/src/mesa/util/anon_file.c +++ b/src/mesa/util/anon_file.c @@ -135,8 +135,11 @@ os_create_anonymous_file(off_t size, const char *debug_name) char shm_name[64]; snprintf(shm_name, sizeof(shm_name), "/%s-%d-%x-%x", tag, getpid(), nonce, i); - fd = shm_open(shm_name, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 0600); + /* macOS shm_open() rejects O_CLOEXEC with EINVAL; set close-on-exec + * explicitly afterwards instead. */ + fd = shm_open(shm_name, O_CREAT | O_EXCL | O_RDWR, 0600); if (fd >= 0) { + fcntl(fd, F_SETFD, FD_CLOEXEC); shm_unlink(shm_name); break; } diff --git a/src/meson.build b/src/meson.build index 83eb6173..f4a2272d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -60,6 +60,10 @@ vrend_winsys_glx_sources = [ 'vrend/vrend_winsys_glx.c', ] +vrend_venus_interop_sources = [ + 'vrend/vrend_venus_interop.c', +] + venus_sources = [ 'venus/vkr_acceleration_structure.c', 'venus/vkr_allocator.c', @@ -154,6 +158,18 @@ proxy_sources = [ 'proxy/proxy_socket.c', ] +if with_render_server == 'thread' + proxy_sources += [ + '../server/render_client.c', + '../server/render_common.c', + '../server/render_context.c', + '../server/render_server.c', + '../server/render_socket.c', + '../server/render_state.c', + '../server/render_worker.c', + ] +endif + video_sources = [ 'vrend/virgl_video.c', 'vrend/vrend_video.c', @@ -196,6 +212,10 @@ if have_glx virgl_depends += [glx_dep] endif +if with_venus and gbm_dep.found() + virgl_sources += vrend_venus_interop_sources +endif + if with_venus virgl_sources += venus_sources virgl_sources += venus_codegen @@ -230,7 +250,7 @@ if with_drm_i915 virgl_sources += drm_i915_sources endif -if with_render_server +if with_render_server != '' virgl_sources += proxy_sources endif diff --git a/src/proxy/proxy_renderer.c b/src/proxy/proxy_renderer.c index 59c2d200..b1232909 100644 --- a/src/proxy/proxy_renderer.c +++ b/src/proxy/proxy_renderer.c @@ -39,12 +39,12 @@ proxy_renderer_init(const struct proxy_renderer_cbs *cbs, uint32_t flags) void proxy_renderer_fini(void) { - if (proxy_renderer.server) - proxy_server_destroy(proxy_renderer.server); - if (proxy_renderer.client) proxy_client_destroy(proxy_renderer.client); + if (proxy_renderer.server) + proxy_server_destroy(proxy_renderer.server); + memset(&proxy_renderer, 0, sizeof(struct proxy_renderer)); } diff --git a/src/proxy/proxy_server.c b/src/proxy/proxy_server.c index c643f74d..0f24c365 100644 --- a/src/proxy/proxy_server.c +++ b/src/proxy/proxy_server.c @@ -11,6 +11,11 @@ #include "server/render_protocol.h" +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER +#include "server/render_context.h" +#include "server/render_server.h" +#endif + int proxy_server_connect(struct proxy_server *srv) { @@ -33,9 +38,14 @@ proxy_server_destroy(struct proxy_server *srv) if (srv->client_fd >= 0) close(srv->client_fd); +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER + thrd_join(srv->thread, NULL); +#endif + free(srv); } +#ifndef ENABLE_SAME_PROCESS_RENDER_SERVER static bool proxy_server_fork(struct proxy_server *srv) { @@ -95,6 +105,55 @@ proxy_server_init_fd(struct proxy_server *srv) return true; } +#else /* ENABLE_SAME_PROCESS_RENDER_SERVER */ + +static int +proxy_server_start_thread(void *args) +{ + int remote_fd = (int)(uintptr_t)args; + char fd_str[16]; + snprintf(fd_str, sizeof(fd_str), "%d", remote_fd); + char *argv[] = { + RENDER_SERVER_EXEC_PATH, + "--socket-fd", + fd_str, + NULL, + }; + struct render_context_args ctx_args; + + /* must reset the global getopt index */ + optind = 1; + + bool ok = render_server_main(ARRAY_SIZE(argv) - 1, argv, &ctx_args); + + return ok ? 0 : -1; +} + +static bool +proxy_server_init_thread(struct proxy_server *srv) +{ + int socket_fds[2]; + + if (!proxy_socket_pair(socket_fds)) + return false; + + const int client_fd = socket_fds[0]; + const int remote_fd = socket_fds[1]; + + bool ok = thrd_create(&srv->thread, proxy_server_start_thread, + (void *)(uintptr_t)remote_fd) == thrd_success; + + if (ok) { + srv->client_fd = client_fd; + } else { + close(client_fd); + close(remote_fd); + } + + return ok; +} +#endif /* ENABLE_SAME_PROCESS_RENDER_SERVER */ + struct proxy_server * proxy_server_create(void) { @@ -104,6 +163,12 @@ proxy_server_create(void) srv->pid = -1; +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER + if (!proxy_server_init_thread(srv)) { + free(srv); + return NULL; + } +#else if (!proxy_server_init_fd(srv)) { /* start the render server on demand when the client does not provide a * server fd @@ -113,6 +178,7 @@ proxy_server_create(void) return NULL; } } +#endif if (!proxy_socket_is_valid(srv->client_fd)) { proxy_log("invalid client fd type"); diff --git a/src/proxy/proxy_server.h b/src/proxy/proxy_server.h index 1b5ca02b..63b3a439 100644 --- a/src/proxy/proxy_server.h +++ b/src/proxy/proxy_server.h @@ -10,9 +10,16 @@ #include +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER +#include "c11/threads.h" +#endif + struct proxy_server { pid_t pid; int client_fd; +#ifdef ENABLE_SAME_PROCESS_RENDER_SERVER + thrd_t thread; +#endif }; struct proxy_server * diff --git a/src/venus/.clang-format b/src/venus/.clang-format index 74cb184c..90031f76 100644 --- a/src/venus/.clang-format +++ b/src/venus/.clang-format @@ -23,7 +23,7 @@ IncludeCategories: Priority: 0 - Regex: '^"(vkr|proxy|render)_' Priority: 3 - - Regex: '^"(virgl|vrend_|c11/|util/|os/|pipe/|venus-protocol/|server/)' + - Regex: '^"(virgl|vrend_|c11/|util/|os/|pipe/|vn_protocol|server/)' Priority: 2 - Regex: '.*' Priority: 1 diff --git a/src/venus/venus-protocol/vn_protocol_renderer.h b/src/venus/venus-protocol/vn_protocol_renderer.h deleted file mode 100644 index 3929b25f..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer.h +++ /dev/null @@ -1,51 +0,0 @@ -/* This file is generated by venus-protocol git-70991d4c. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_H -#define VN_PROTOCOL_RENDERER_H - -#include "vn_protocol_renderer_cs.h" -#include "vn_protocol_renderer_defines.h" -#include "vn_protocol_renderer_info.h" -#include "vn_protocol_renderer_types.h" -#include "vn_protocol_renderer_handles.h" -#include "vn_protocol_renderer_util.h" -#include "vn_protocol_renderer_dispatches.h" -#include "vn_protocol_renderer_structs.h" -#include "vn_protocol_renderer_transport.h" -#include "vn_protocol_renderer_instance.h" -#include "vn_protocol_renderer_device.h" -#include "vn_protocol_renderer_queue.h" -#include "vn_protocol_renderer_fence.h" -#include "vn_protocol_renderer_semaphore.h" -#include "vn_protocol_renderer_event.h" -#include "vn_protocol_renderer_device_memory.h" -#include "vn_protocol_renderer_image.h" -#include "vn_protocol_renderer_image_view.h" -#include "vn_protocol_renderer_sampler.h" -#include "vn_protocol_renderer_sampler_ycbcr_conversion.h" -#include "vn_protocol_renderer_buffer.h" -#include "vn_protocol_renderer_buffer_view.h" -#include "vn_protocol_renderer_descriptor_pool.h" -#include "vn_protocol_renderer_descriptor_set.h" -#include "vn_protocol_renderer_descriptor_set_layout.h" -#include "vn_protocol_renderer_descriptor_update_template.h" -#include "vn_protocol_renderer_render_pass.h" -#include "vn_protocol_renderer_framebuffer.h" -#include "vn_protocol_renderer_query_pool.h" -#include "vn_protocol_renderer_shader_module.h" -#include "vn_protocol_renderer_pipeline.h" -#include "vn_protocol_renderer_pipeline_layout.h" -#include "vn_protocol_renderer_pipeline_cache.h" -#include "vn_protocol_renderer_command_pool.h" -#include "vn_protocol_renderer_command_buffer.h" -#include "vn_protocol_renderer_private_data_slot.h" -#include "vn_protocol_renderer_host_copy.h" -#include "vn_protocol_renderer_acceleration_structure.h" -#include "vn_protocol_renderer_descriptor_heap.h" - -#endif /* VN_PROTOCOL_RENDERER_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_acceleration_structure.h b/src/venus/venus-protocol/vn_protocol_renderer_acceleration_structure.h deleted file mode 100644 index 6b2fa7b7..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_acceleration_structure.h +++ /dev/null @@ -1,784 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_ACCELERATION_STRUCTURE_H -#define VN_PROTOCOL_RENDERER_ACCELERATION_STRUCTURE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkCopyAccelerationStructureToMemoryKHR - * vkCopyMemoryToAccelerationStructureKHR - * vkBuildAccelerationStructuresKHR - */ - -/* struct VkAccelerationStructureVersionInfoKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureVersionInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureVersionInfoKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureVersionInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, 2*VK_UUID_SIZE); - val->pVersionData = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pVersionData), array_size); - if (!val->pVersionData) return; - vn_decode_uint8_t_array(dec, (uint8_t *)val->pVersionData, array_size); - } else { - vn_decode_array_size(dec, 2*VK_UUID_SIZE); - val->pVersionData = NULL; - } -} - -static inline void -vn_decode_VkAccelerationStructureVersionInfoKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureVersionInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureVersionInfoKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureVersionInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureVersionInfoKHR_handle_self(VkAccelerationStructureVersionInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pVersionData */ -} - -static inline void -vn_replace_VkAccelerationStructureVersionInfoKHR_handle(VkAccelerationStructureVersionInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR: - vn_replace_VkAccelerationStructureVersionInfoKHR_handle_self((VkAccelerationStructureVersionInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureCreateInfoKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureCreateInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureCreateInfoKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureCreateInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->createFlags); - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->size); - vn_decode_VkAccelerationStructureTypeKHR(dec, &val->type); - vn_decode_VkDeviceAddress(dec, &val->deviceAddress); -} - -static inline void -vn_decode_VkAccelerationStructureCreateInfoKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureCreateInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureCreateInfoKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureCreateInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureCreateInfoKHR_handle_self(VkAccelerationStructureCreateInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->createFlags */ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->offset */ - /* skip val->size */ - /* skip val->type */ - /* skip val->deviceAddress */ -} - -static inline void -vn_replace_VkAccelerationStructureCreateInfoKHR_handle(VkAccelerationStructureCreateInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR: - vn_replace_VkAccelerationStructureCreateInfoKHR_handle_self((VkAccelerationStructureCreateInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureDeviceAddressInfoKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureDeviceAddressInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureDeviceAddressInfoKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureDeviceAddressInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->accelerationStructure); -} - -static inline void -vn_decode_VkAccelerationStructureDeviceAddressInfoKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureDeviceAddressInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureDeviceAddressInfoKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureDeviceAddressInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureDeviceAddressInfoKHR_handle_self(VkAccelerationStructureDeviceAddressInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkAccelerationStructureKHR_handle(&val->accelerationStructure); -} - -static inline void -vn_replace_VkAccelerationStructureDeviceAddressInfoKHR_handle(VkAccelerationStructureDeviceAddressInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR: - vn_replace_VkAccelerationStructureDeviceAddressInfoKHR_handle_self((VkAccelerationStructureDeviceAddressInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureBuildSizesInfoKHR chain */ - -static inline void -vn_encode_VkAccelerationStructureBuildSizesInfoKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkAccelerationStructureBuildSizesInfoKHR_self(struct vn_cs_encoder *enc, const VkAccelerationStructureBuildSizesInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDeviceSize(enc, &val->accelerationStructureSize); - vn_encode_VkDeviceSize(enc, &val->updateScratchSize); - vn_encode_VkDeviceSize(enc, &val->buildScratchSize); -} - -static inline void -vn_encode_VkAccelerationStructureBuildSizesInfoKHR(struct vn_cs_encoder *enc, const VkAccelerationStructureBuildSizesInfoKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR }); - vn_encode_VkAccelerationStructureBuildSizesInfoKHR_pnext(enc, val->pNext); - vn_encode_VkAccelerationStructureBuildSizesInfoKHR_self(enc, val); -} - -static inline void * -vn_decode_VkAccelerationStructureBuildSizesInfoKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureBuildSizesInfoKHR_self_partial_temp(struct vn_cs_decoder *dec, VkAccelerationStructureBuildSizesInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->accelerationStructureSize */ - /* skip val->updateScratchSize */ - /* skip val->buildScratchSize */ -} - -static inline void -vn_decode_VkAccelerationStructureBuildSizesInfoKHR_partial_temp(struct vn_cs_decoder *dec, VkAccelerationStructureBuildSizesInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureBuildSizesInfoKHR_pnext_partial_temp(dec); - vn_decode_VkAccelerationStructureBuildSizesInfoKHR_self_partial_temp(dec, val); -} - -static inline void vn_decode_vkDestroyAccelerationStructureKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyAccelerationStructureKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkAccelerationStructureKHR_lookup(dec, &args->accelerationStructure); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyAccelerationStructureKHR_args_handle(struct vn_command_vkDestroyAccelerationStructureKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkAccelerationStructureKHR_handle(&args->accelerationStructure); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyAccelerationStructureKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyAccelerationStructureKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyAccelerationStructureKHR_EXT}); - - /* skip args->device */ - /* skip args->accelerationStructure */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkCopyAccelerationStructureKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCopyAccelerationStructureKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeferredOperationKHR_lookup(dec, &args->deferredOperation); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkCopyAccelerationStructureInfoKHR_temp(dec, (VkCopyAccelerationStructureInfoKHR *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCopyAccelerationStructureKHR_args_handle(struct vn_command_vkCopyAccelerationStructureKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeferredOperationKHR_handle(&args->deferredOperation); - if (args->pInfo) - vn_replace_VkCopyAccelerationStructureInfoKHR_handle((VkCopyAccelerationStructureInfoKHR *)args->pInfo); -} - -static inline void vn_encode_vkCopyAccelerationStructureKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCopyAccelerationStructureKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCopyAccelerationStructureKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->deferredOperation */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkWriteAccelerationStructuresPropertiesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkWriteAccelerationStructuresPropertiesKHR *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkWriteAccelerationStructuresPropertiesKHR_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->accelerationStructureCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->accelerationStructureCount); - args->pAccelerationStructures = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pAccelerationStructures), iter_count); - if (!args->pAccelerationStructures) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAccelerationStructureKHR_lookup(dec, &((VkAccelerationStructureKHR *)args->pAccelerationStructures)[i]); - } else { - vn_decode_array_size(dec, args->accelerationStructureCount); - args->pAccelerationStructures = NULL; - } - vn_decode_VkQueryType(dec, &args->queryType); - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } - vn_decode_size_t(dec, &args->stride); -} - -static inline void vn_replace_vkWriteAccelerationStructuresPropertiesKHR_args_handle(struct vn_command_vkWriteAccelerationStructuresPropertiesKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->accelerationStructureCount */ - if (args->pAccelerationStructures) { - for (uint32_t i = 0; i < args->accelerationStructureCount; i++) - vn_replace_VkAccelerationStructureKHR_handle(&((VkAccelerationStructureKHR *)args->pAccelerationStructures)[i]); - } - /* skip args->queryType */ - /* skip args->dataSize */ - /* skip args->pData */ - /* skip args->stride */ -} - -static inline void vn_encode_vkWriteAccelerationStructuresPropertiesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWriteAccelerationStructuresPropertiesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWriteAccelerationStructuresPropertiesKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->accelerationStructureCount */ - /* skip args->pAccelerationStructures */ - /* skip args->queryType */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } - /* skip args->stride */ -} - -static inline void vn_decode_vkGetDeviceAccelerationStructureCompatibilityKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceAccelerationStructureCompatibilityKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pVersionInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pVersionInfo)); - if (!args->pVersionInfo) return; - vn_decode_VkAccelerationStructureVersionInfoKHR_temp(dec, (VkAccelerationStructureVersionInfoKHR *)args->pVersionInfo); - } else { - args->pVersionInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pCompatibility = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCompatibility)); - if (!args->pCompatibility) return; - } else { - args->pCompatibility = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceAccelerationStructureCompatibilityKHR_args_handle(struct vn_command_vkGetDeviceAccelerationStructureCompatibilityKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pVersionInfo) - vn_replace_VkAccelerationStructureVersionInfoKHR_handle((VkAccelerationStructureVersionInfoKHR *)args->pVersionInfo); - /* skip args->pCompatibility */ -} - -static inline void vn_encode_vkGetDeviceAccelerationStructureCompatibilityKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceAccelerationStructureCompatibilityKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceAccelerationStructureCompatibilityKHR_EXT}); - - /* skip args->device */ - /* skip args->pVersionInfo */ - if (vn_encode_simple_pointer(enc, args->pCompatibility)) - vn_encode_VkAccelerationStructureCompatibilityKHR(enc, args->pCompatibility); -} - -static inline void vn_decode_vkCreateAccelerationStructureKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateAccelerationStructureKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkAccelerationStructureCreateInfoKHR_temp(dec, (VkAccelerationStructureCreateInfoKHR *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pAccelerationStructure = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pAccelerationStructure)); - if (!args->pAccelerationStructure) return; - vn_decode_VkAccelerationStructureKHR(dec, args->pAccelerationStructure); - } else { - args->pAccelerationStructure = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateAccelerationStructureKHR_args_handle(struct vn_command_vkCreateAccelerationStructureKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkAccelerationStructureCreateInfoKHR_handle((VkAccelerationStructureCreateInfoKHR *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pAccelerationStructure */ -} - -static inline void vn_encode_vkCreateAccelerationStructureKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateAccelerationStructureKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateAccelerationStructureKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pAccelerationStructure)) - vn_encode_VkAccelerationStructureKHR(enc, args->pAccelerationStructure); -} - -static inline void vn_decode_vkGetAccelerationStructureDeviceAddressKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetAccelerationStructureDeviceAddressKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkAccelerationStructureDeviceAddressInfoKHR_temp(dec, (VkAccelerationStructureDeviceAddressInfoKHR *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetAccelerationStructureDeviceAddressKHR_args_handle(struct vn_command_vkGetAccelerationStructureDeviceAddressKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkAccelerationStructureDeviceAddressInfoKHR_handle((VkAccelerationStructureDeviceAddressInfoKHR *)args->pInfo); -} - -static inline void vn_encode_vkGetAccelerationStructureDeviceAddressKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetAccelerationStructureDeviceAddressKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetAccelerationStructureDeviceAddressKHR_EXT}); - - vn_encode_VkDeviceAddress(enc, &args->ret); - /* skip args->device */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkGetAccelerationStructureBuildSizesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetAccelerationStructureBuildSizesKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkAccelerationStructureBuildTypeKHR(dec, &args->buildType); - if (vn_decode_simple_pointer(dec)) { - args->pBuildInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBuildInfo)); - if (!args->pBuildInfo) return; - vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_temp(dec, (VkAccelerationStructureBuildGeometryInfoKHR *)args->pBuildInfo); - } else { - args->pBuildInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, (args->pBuildInfo ? args->pBuildInfo->geometryCount : 0)); - args->pMaxPrimitiveCounts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pMaxPrimitiveCounts), array_size); - if (!args->pMaxPrimitiveCounts) return; - vn_decode_uint32_t_array(dec, (uint32_t *)args->pMaxPrimitiveCounts, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pMaxPrimitiveCounts = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pSizeInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSizeInfo)); - if (!args->pSizeInfo) return; - vn_decode_VkAccelerationStructureBuildSizesInfoKHR_partial_temp(dec, args->pSizeInfo); - } else { - args->pSizeInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetAccelerationStructureBuildSizesKHR_args_handle(struct vn_command_vkGetAccelerationStructureBuildSizesKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->buildType */ - if (args->pBuildInfo) - vn_replace_VkAccelerationStructureBuildGeometryInfoKHR_handle((VkAccelerationStructureBuildGeometryInfoKHR *)args->pBuildInfo); - /* skip args->pMaxPrimitiveCounts */ - /* skip args->pSizeInfo */ -} - -static inline void vn_encode_vkGetAccelerationStructureBuildSizesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetAccelerationStructureBuildSizesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetAccelerationStructureBuildSizesKHR_EXT}); - - /* skip args->device */ - /* skip args->buildType */ - /* skip args->pBuildInfo */ - /* skip args->pMaxPrimitiveCounts */ - if (vn_encode_simple_pointer(enc, args->pSizeInfo)) - vn_encode_VkAccelerationStructureBuildSizesInfoKHR(enc, args->pSizeInfo); -} - -static inline void vn_dispatch_vkDestroyAccelerationStructureKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyAccelerationStructureKHR args; - - if (!ctx->dispatch_vkDestroyAccelerationStructureKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyAccelerationStructureKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyAccelerationStructureKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyAccelerationStructureKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCopyAccelerationStructureKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCopyAccelerationStructureKHR args; - - if (!ctx->dispatch_vkCopyAccelerationStructureKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCopyAccelerationStructureKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCopyAccelerationStructureKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCopyAccelerationStructureKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCopyAccelerationStructureKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWriteAccelerationStructuresPropertiesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWriteAccelerationStructuresPropertiesKHR args; - - if (!ctx->dispatch_vkWriteAccelerationStructuresPropertiesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkWriteAccelerationStructuresPropertiesKHR_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWriteAccelerationStructuresPropertiesKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkWriteAccelerationStructuresPropertiesKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkWriteAccelerationStructuresPropertiesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceAccelerationStructureCompatibilityKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceAccelerationStructureCompatibilityKHR args; - - if (!ctx->dispatch_vkGetDeviceAccelerationStructureCompatibilityKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceAccelerationStructureCompatibilityKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceAccelerationStructureCompatibilityKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceAccelerationStructureCompatibilityKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateAccelerationStructureKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateAccelerationStructureKHR args; - - if (!ctx->dispatch_vkCreateAccelerationStructureKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateAccelerationStructureKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateAccelerationStructureKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateAccelerationStructureKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateAccelerationStructureKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetAccelerationStructureDeviceAddressKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetAccelerationStructureDeviceAddressKHR args; - - if (!ctx->dispatch_vkGetAccelerationStructureDeviceAddressKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetAccelerationStructureDeviceAddressKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetAccelerationStructureDeviceAddressKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetAccelerationStructureDeviceAddressKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetAccelerationStructureBuildSizesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetAccelerationStructureBuildSizesKHR args; - - if (!ctx->dispatch_vkGetAccelerationStructureBuildSizesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetAccelerationStructureBuildSizesKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetAccelerationStructureBuildSizesKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetAccelerationStructureBuildSizesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_ACCELERATION_STRUCTURE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_buffer.h b/src/venus/venus-protocol/vn_protocol_renderer_buffer.h deleted file mode 100644 index edbc9174..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_buffer.h +++ /dev/null @@ -1,1236 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_BUFFER_H -#define VN_PROTOCOL_RENDERER_BUFFER_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkExternalMemoryBufferCreateInfo chain */ - -static inline void * -vn_decode_VkExternalMemoryBufferCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalMemoryBufferCreateInfo_self_temp(struct vn_cs_decoder *dec, VkExternalMemoryBufferCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->handleTypes); -} - -static inline void -vn_decode_VkExternalMemoryBufferCreateInfo_temp(struct vn_cs_decoder *dec, VkExternalMemoryBufferCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalMemoryBufferCreateInfo_pnext_temp(dec); - vn_decode_VkExternalMemoryBufferCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkExternalMemoryBufferCreateInfo_handle_self(VkExternalMemoryBufferCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleTypes */ -} - -static inline void -vn_replace_VkExternalMemoryBufferCreateInfo_handle(VkExternalMemoryBufferCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: - vn_replace_VkExternalMemoryBufferCreateInfo_handle_self((VkExternalMemoryBufferCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferOpaqueCaptureAddressCreateInfo chain */ - -static inline void * -vn_decode_VkBufferOpaqueCaptureAddressCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferOpaqueCaptureAddressCreateInfo_self_temp(struct vn_cs_decoder *dec, VkBufferOpaqueCaptureAddressCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint64_t(dec, &val->opaqueCaptureAddress); -} - -static inline void -vn_decode_VkBufferOpaqueCaptureAddressCreateInfo_temp(struct vn_cs_decoder *dec, VkBufferOpaqueCaptureAddressCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferOpaqueCaptureAddressCreateInfo_pnext_temp(dec); - vn_decode_VkBufferOpaqueCaptureAddressCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferOpaqueCaptureAddressCreateInfo_handle_self(VkBufferOpaqueCaptureAddressCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->opaqueCaptureAddress */ -} - -static inline void -vn_replace_VkBufferOpaqueCaptureAddressCreateInfo_handle(VkBufferOpaqueCaptureAddressCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: - vn_replace_VkBufferOpaqueCaptureAddressCreateInfo_handle_self((VkBufferOpaqueCaptureAddressCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferDeviceAddressCreateInfoEXT chain */ - -static inline void * -vn_decode_VkBufferDeviceAddressCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferDeviceAddressCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkBufferDeviceAddressCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceAddress(dec, &val->deviceAddress); -} - -static inline void -vn_decode_VkBufferDeviceAddressCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkBufferDeviceAddressCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferDeviceAddressCreateInfoEXT_pnext_temp(dec); - vn_decode_VkBufferDeviceAddressCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferDeviceAddressCreateInfoEXT_handle_self(VkBufferDeviceAddressCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->deviceAddress */ -} - -static inline void -vn_replace_VkBufferDeviceAddressCreateInfoEXT_handle(VkBufferDeviceAddressCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT: - vn_replace_VkBufferDeviceAddressCreateInfoEXT_handle_self((VkBufferDeviceAddressCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferCreateInfo chain */ - -static inline void * -vn_decode_VkBufferCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBufferUsageFlags2CreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBufferUsageFlags2CreateInfo *)pnext)->pNext = vn_decode_VkBufferCreateInfo_pnext_temp(dec); - vn_decode_VkBufferUsageFlags2CreateInfo_self_temp(dec, (VkBufferUsageFlags2CreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalMemoryBufferCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkExternalMemoryBufferCreateInfo *)pnext)->pNext = vn_decode_VkBufferCreateInfo_pnext_temp(dec); - vn_decode_VkExternalMemoryBufferCreateInfo_self_temp(dec, (VkExternalMemoryBufferCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBufferOpaqueCaptureAddressCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBufferOpaqueCaptureAddressCreateInfo *)pnext)->pNext = vn_decode_VkBufferCreateInfo_pnext_temp(dec); - vn_decode_VkBufferOpaqueCaptureAddressCreateInfo_self_temp(dec, (VkBufferOpaqueCaptureAddressCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBufferDeviceAddressCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkBufferDeviceAddressCreateInfoEXT *)pnext)->pNext = vn_decode_VkBufferCreateInfo_pnext_temp(dec); - vn_decode_VkBufferDeviceAddressCreateInfoEXT_self_temp(dec, (VkBufferDeviceAddressCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBufferCreateInfo_self_temp(struct vn_cs_decoder *dec, VkBufferCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkDeviceSize(dec, &val->size); - vn_decode_VkFlags(dec, &val->usage); - vn_decode_VkSharingMode(dec, &val->sharingMode); - vn_decode_uint32_t(dec, &val->queueFamilyIndexCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->queueFamilyIndexCount); - val->pQueueFamilyIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pQueueFamilyIndices), array_size); - if (!val->pQueueFamilyIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pQueueFamilyIndices, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pQueueFamilyIndices = NULL; - } -} - -static inline void -vn_decode_VkBufferCreateInfo_temp(struct vn_cs_decoder *dec, VkBufferCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferCreateInfo_pnext_temp(dec); - vn_decode_VkBufferCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferCreateInfo_handle_self(VkBufferCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->size */ - /* skip val->usage */ - /* skip val->sharingMode */ - /* skip val->queueFamilyIndexCount */ - /* skip val->pQueueFamilyIndices */ -} - -static inline void -vn_replace_VkBufferCreateInfo_handle(VkBufferCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO: - vn_replace_VkBufferCreateInfo_handle_self((VkBufferCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - vn_replace_VkBufferUsageFlags2CreateInfo_handle_self((VkBufferUsageFlags2CreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: - vn_replace_VkExternalMemoryBufferCreateInfo_handle_self((VkExternalMemoryBufferCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: - vn_replace_VkBufferOpaqueCaptureAddressCreateInfo_handle_self((VkBufferOpaqueCaptureAddressCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT: - vn_replace_VkBufferDeviceAddressCreateInfoEXT_handle_self((VkBufferDeviceAddressCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindBufferMemoryDeviceGroupInfo chain */ - -static inline void * -vn_decode_VkBindBufferMemoryDeviceGroupInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBindBufferMemoryDeviceGroupInfo_self_temp(struct vn_cs_decoder *dec, VkBindBufferMemoryDeviceGroupInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->deviceIndexCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->deviceIndexCount); - val->pDeviceIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDeviceIndices), array_size); - if (!val->pDeviceIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pDeviceIndices, array_size); - } else { - vn_decode_array_size(dec, val->deviceIndexCount); - val->pDeviceIndices = NULL; - } -} - -static inline void -vn_decode_VkBindBufferMemoryDeviceGroupInfo_temp(struct vn_cs_decoder *dec, VkBindBufferMemoryDeviceGroupInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindBufferMemoryDeviceGroupInfo_pnext_temp(dec); - vn_decode_VkBindBufferMemoryDeviceGroupInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindBufferMemoryDeviceGroupInfo_handle_self(VkBindBufferMemoryDeviceGroupInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->deviceIndexCount */ - /* skip val->pDeviceIndices */ -} - -static inline void -vn_replace_VkBindBufferMemoryDeviceGroupInfo_handle(VkBindBufferMemoryDeviceGroupInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: - vn_replace_VkBindBufferMemoryDeviceGroupInfo_handle_self((VkBindBufferMemoryDeviceGroupInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindBufferMemoryInfo chain */ - -static inline void * -vn_decode_VkBindBufferMemoryInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBindBufferMemoryDeviceGroupInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBindBufferMemoryDeviceGroupInfo *)pnext)->pNext = vn_decode_VkBindBufferMemoryInfo_pnext_temp(dec); - vn_decode_VkBindBufferMemoryDeviceGroupInfo_self_temp(dec, (VkBindBufferMemoryDeviceGroupInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBindMemoryStatus)); - if (pnext) { - pnext->sType = stype; - ((VkBindMemoryStatus *)pnext)->pNext = vn_decode_VkBindBufferMemoryInfo_pnext_temp(dec); - vn_decode_VkBindMemoryStatus_self_temp(dec, (VkBindMemoryStatus *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBindBufferMemoryInfo_self_temp(struct vn_cs_decoder *dec, VkBindBufferMemoryInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); - vn_decode_VkDeviceSize(dec, &val->memoryOffset); -} - -static inline void -vn_decode_VkBindBufferMemoryInfo_temp(struct vn_cs_decoder *dec, VkBindBufferMemoryInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindBufferMemoryInfo_pnext_temp(dec); - vn_decode_VkBindBufferMemoryInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindBufferMemoryInfo_handle_self(VkBindBufferMemoryInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkBuffer_handle(&val->buffer); - vn_replace_VkDeviceMemory_handle(&val->memory); - /* skip val->memoryOffset */ -} - -static inline void -vn_replace_VkBindBufferMemoryInfo_handle(VkBindBufferMemoryInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO: - vn_replace_VkBindBufferMemoryInfo_handle_self((VkBindBufferMemoryInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: - vn_replace_VkBindBufferMemoryDeviceGroupInfo_handle_self((VkBindBufferMemoryDeviceGroupInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: - vn_replace_VkBindMemoryStatus_handle_self((VkBindMemoryStatus *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferMemoryRequirementsInfo2 chain */ - -static inline void * -vn_decode_VkBufferMemoryRequirementsInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferMemoryRequirementsInfo2_self_temp(struct vn_cs_decoder *dec, VkBufferMemoryRequirementsInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBuffer_lookup(dec, &val->buffer); -} - -static inline void -vn_decode_VkBufferMemoryRequirementsInfo2_temp(struct vn_cs_decoder *dec, VkBufferMemoryRequirementsInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferMemoryRequirementsInfo2_pnext_temp(dec); - vn_decode_VkBufferMemoryRequirementsInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferMemoryRequirementsInfo2_handle_self(VkBufferMemoryRequirementsInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkBuffer_handle(&val->buffer); -} - -static inline void -vn_replace_VkBufferMemoryRequirementsInfo2_handle(VkBufferMemoryRequirementsInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2: - vn_replace_VkBufferMemoryRequirementsInfo2_handle_self((VkBufferMemoryRequirementsInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceBufferMemoryRequirements chain */ - -static inline void * -vn_decode_VkDeviceBufferMemoryRequirements_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceBufferMemoryRequirements_self_temp(struct vn_cs_decoder *dec, VkDeviceBufferMemoryRequirements *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pCreateInfo)); - if (!val->pCreateInfo) return; - vn_decode_VkBufferCreateInfo_temp(dec, (VkBufferCreateInfo *)val->pCreateInfo); - } else { - val->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void -vn_decode_VkDeviceBufferMemoryRequirements_temp(struct vn_cs_decoder *dec, VkDeviceBufferMemoryRequirements *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceBufferMemoryRequirements_pnext_temp(dec); - vn_decode_VkDeviceBufferMemoryRequirements_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceBufferMemoryRequirements_handle_self(VkDeviceBufferMemoryRequirements *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pCreateInfo) - vn_replace_VkBufferCreateInfo_handle((VkBufferCreateInfo *)val->pCreateInfo); -} - -static inline void -vn_replace_VkDeviceBufferMemoryRequirements_handle(VkDeviceBufferMemoryRequirements *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS: - vn_replace_VkDeviceBufferMemoryRequirements_handle_self((VkDeviceBufferMemoryRequirements *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferDeviceAddressInfo chain */ - -static inline void * -vn_decode_VkBufferDeviceAddressInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferDeviceAddressInfo_self_temp(struct vn_cs_decoder *dec, VkBufferDeviceAddressInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBuffer_lookup(dec, &val->buffer); -} - -static inline void -vn_decode_VkBufferDeviceAddressInfo_temp(struct vn_cs_decoder *dec, VkBufferDeviceAddressInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferDeviceAddressInfo_pnext_temp(dec); - vn_decode_VkBufferDeviceAddressInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferDeviceAddressInfo_handle_self(VkBufferDeviceAddressInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkBuffer_handle(&val->buffer); -} - -static inline void -vn_replace_VkBufferDeviceAddressInfo_handle(VkBufferDeviceAddressInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO: - vn_replace_VkBufferDeviceAddressInfo_handle_self((VkBufferDeviceAddressInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkGetBufferMemoryRequirements_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetBufferMemoryRequirements *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - if (vn_decode_simple_pointer(dec)) { - args->pMemoryRequirements = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryRequirements)); - if (!args->pMemoryRequirements) return; - vn_decode_VkMemoryRequirements_partial_temp(dec, args->pMemoryRequirements); - } else { - args->pMemoryRequirements = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetBufferMemoryRequirements_args_handle(struct vn_command_vkGetBufferMemoryRequirements *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->pMemoryRequirements */ -} - -static inline void vn_encode_vkGetBufferMemoryRequirements_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetBufferMemoryRequirements *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetBufferMemoryRequirements_EXT}); - - /* skip args->device */ - /* skip args->buffer */ - if (vn_encode_simple_pointer(enc, args->pMemoryRequirements)) - vn_encode_VkMemoryRequirements(enc, args->pMemoryRequirements); -} - -static inline void vn_decode_vkBindBufferMemory_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkBindBufferMemory *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceMemory_lookup(dec, &args->memory); - vn_decode_VkDeviceSize(dec, &args->memoryOffset); -} - -static inline void vn_replace_vkBindBufferMemory_args_handle(struct vn_command_vkBindBufferMemory *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkBuffer_handle(&args->buffer); - vn_replace_VkDeviceMemory_handle(&args->memory); - /* skip args->memoryOffset */ -} - -static inline void vn_encode_vkBindBufferMemory_reply(struct vn_cs_encoder *enc, const struct vn_command_vkBindBufferMemory *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkBindBufferMemory_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->buffer */ - /* skip args->memory */ - /* skip args->memoryOffset */ -} - -static inline void vn_decode_vkCreateBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateBuffer *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkBufferCreateInfo_temp(dec, (VkBufferCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pBuffer = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBuffer)); - if (!args->pBuffer) return; - vn_decode_VkBuffer(dec, args->pBuffer); - } else { - args->pBuffer = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateBuffer_args_handle(struct vn_command_vkCreateBuffer *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkBufferCreateInfo_handle((VkBufferCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pBuffer */ -} - -static inline void vn_encode_vkCreateBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateBuffer_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pBuffer)) - vn_encode_VkBuffer(enc, args->pBuffer); -} - -static inline void vn_decode_vkDestroyBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyBuffer *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyBuffer_args_handle(struct vn_command_vkDestroyBuffer *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyBuffer_EXT}); - - /* skip args->device */ - /* skip args->buffer */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkBindBufferMemory2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkBindBufferMemory2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->bindInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bindInfoCount); - args->pBindInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBindInfos), iter_count); - if (!args->pBindInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBindBufferMemoryInfo_temp(dec, &((VkBindBufferMemoryInfo *)args->pBindInfos)[i]); - } else { - vn_decode_array_size(dec, args->bindInfoCount); - args->pBindInfos = NULL; - } -} - -static inline void vn_replace_vkBindBufferMemory2_args_handle(struct vn_command_vkBindBufferMemory2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->bindInfoCount */ - if (args->pBindInfos) { - for (uint32_t i = 0; i < args->bindInfoCount; i++) - vn_replace_VkBindBufferMemoryInfo_handle(&((VkBindBufferMemoryInfo *)args->pBindInfos)[i]); - } -} - -static inline void vn_encode_vkBindBufferMemory2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkBindBufferMemory2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkBindBufferMemory2_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->bindInfoCount */ - /* skip args->pBindInfos */ -} - -static inline void vn_decode_vkGetBufferMemoryRequirements2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetBufferMemoryRequirements2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkBufferMemoryRequirementsInfo2_temp(dec, (VkBufferMemoryRequirementsInfo2 *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pMemoryRequirements = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryRequirements)); - if (!args->pMemoryRequirements) return; - vn_decode_VkMemoryRequirements2_partial_temp(dec, args->pMemoryRequirements); - } else { - args->pMemoryRequirements = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetBufferMemoryRequirements2_args_handle(struct vn_command_vkGetBufferMemoryRequirements2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkBufferMemoryRequirementsInfo2_handle((VkBufferMemoryRequirementsInfo2 *)args->pInfo); - /* skip args->pMemoryRequirements */ -} - -static inline void vn_encode_vkGetBufferMemoryRequirements2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetBufferMemoryRequirements2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetBufferMemoryRequirements2_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pMemoryRequirements)) - vn_encode_VkMemoryRequirements2(enc, args->pMemoryRequirements); -} - -static inline void vn_decode_vkGetDeviceBufferMemoryRequirements_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceBufferMemoryRequirements *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkDeviceBufferMemoryRequirements_temp(dec, (VkDeviceBufferMemoryRequirements *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pMemoryRequirements = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryRequirements)); - if (!args->pMemoryRequirements) return; - vn_decode_VkMemoryRequirements2_partial_temp(dec, args->pMemoryRequirements); - } else { - args->pMemoryRequirements = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceBufferMemoryRequirements_args_handle(struct vn_command_vkGetDeviceBufferMemoryRequirements *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkDeviceBufferMemoryRequirements_handle((VkDeviceBufferMemoryRequirements *)args->pInfo); - /* skip args->pMemoryRequirements */ -} - -static inline void vn_encode_vkGetDeviceBufferMemoryRequirements_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceBufferMemoryRequirements *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceBufferMemoryRequirements_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pMemoryRequirements)) - vn_encode_VkMemoryRequirements2(enc, args->pMemoryRequirements); -} - -static inline void vn_decode_vkGetBufferOpaqueCaptureAddress_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetBufferOpaqueCaptureAddress *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkBufferDeviceAddressInfo_temp(dec, (VkBufferDeviceAddressInfo *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetBufferOpaqueCaptureAddress_args_handle(struct vn_command_vkGetBufferOpaqueCaptureAddress *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkBufferDeviceAddressInfo_handle((VkBufferDeviceAddressInfo *)args->pInfo); -} - -static inline void vn_encode_vkGetBufferOpaqueCaptureAddress_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetBufferOpaqueCaptureAddress *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetBufferOpaqueCaptureAddress_EXT}); - - vn_encode_uint64_t(enc, &args->ret); - /* skip args->device */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkGetBufferDeviceAddress_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetBufferDeviceAddress *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkBufferDeviceAddressInfo_temp(dec, (VkBufferDeviceAddressInfo *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetBufferDeviceAddress_args_handle(struct vn_command_vkGetBufferDeviceAddress *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkBufferDeviceAddressInfo_handle((VkBufferDeviceAddressInfo *)args->pInfo); -} - -static inline void vn_encode_vkGetBufferDeviceAddress_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetBufferDeviceAddress *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetBufferDeviceAddress_EXT}); - - vn_encode_VkDeviceAddress(enc, &args->ret); - /* skip args->device */ - /* skip args->pInfo */ -} - -static inline void vn_dispatch_vkGetBufferMemoryRequirements(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetBufferMemoryRequirements args; - - if (!ctx->dispatch_vkGetBufferMemoryRequirements) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetBufferMemoryRequirements_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetBufferMemoryRequirements(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetBufferMemoryRequirements_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkBindBufferMemory(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkBindBufferMemory args; - - if (!ctx->dispatch_vkBindBufferMemory) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkBindBufferMemory_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkBindBufferMemory(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkBindBufferMemory returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkBindBufferMemory_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateBuffer args; - - if (!ctx->dispatch_vkCreateBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateBuffer_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateBuffer(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateBuffer returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyBuffer args; - - if (!ctx->dispatch_vkDestroyBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyBuffer_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyBuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkBindBufferMemory2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkBindBufferMemory2 args; - - if (!ctx->dispatch_vkBindBufferMemory2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkBindBufferMemory2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkBindBufferMemory2(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkBindBufferMemory2 returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkBindBufferMemory2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetBufferMemoryRequirements2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetBufferMemoryRequirements2 args; - - if (!ctx->dispatch_vkGetBufferMemoryRequirements2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetBufferMemoryRequirements2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetBufferMemoryRequirements2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetBufferMemoryRequirements2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceBufferMemoryRequirements(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceBufferMemoryRequirements args; - - if (!ctx->dispatch_vkGetDeviceBufferMemoryRequirements) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceBufferMemoryRequirements_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceBufferMemoryRequirements(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceBufferMemoryRequirements_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetBufferOpaqueCaptureAddress(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetBufferOpaqueCaptureAddress args; - - if (!ctx->dispatch_vkGetBufferOpaqueCaptureAddress) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetBufferOpaqueCaptureAddress_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetBufferOpaqueCaptureAddress(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetBufferOpaqueCaptureAddress_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetBufferDeviceAddress(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetBufferDeviceAddress args; - - if (!ctx->dispatch_vkGetBufferDeviceAddress) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetBufferDeviceAddress_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetBufferDeviceAddress(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetBufferDeviceAddress_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_BUFFER_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_buffer_view.h b/src/venus/venus-protocol/vn_protocol_renderer_buffer_view.h deleted file mode 100644 index 752764da..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_buffer_view.h +++ /dev/null @@ -1,245 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_BUFFER_VIEW_H -#define VN_PROTOCOL_RENDERER_BUFFER_VIEW_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkBufferViewCreateInfo chain */ - -static inline void * -vn_decode_VkBufferViewCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBufferUsageFlags2CreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBufferUsageFlags2CreateInfo *)pnext)->pNext = vn_decode_VkBufferViewCreateInfo_pnext_temp(dec); - vn_decode_VkBufferUsageFlags2CreateInfo_self_temp(dec, (VkBufferUsageFlags2CreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBufferViewCreateInfo_self_temp(struct vn_cs_decoder *dec, VkBufferViewCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->range); -} - -static inline void -vn_decode_VkBufferViewCreateInfo_temp(struct vn_cs_decoder *dec, VkBufferViewCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferViewCreateInfo_pnext_temp(dec); - vn_decode_VkBufferViewCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferViewCreateInfo_handle_self(VkBufferViewCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->format */ - /* skip val->offset */ - /* skip val->range */ -} - -static inline void -vn_replace_VkBufferViewCreateInfo_handle(VkBufferViewCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO: - vn_replace_VkBufferViewCreateInfo_handle_self((VkBufferViewCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - vn_replace_VkBufferUsageFlags2CreateInfo_handle_self((VkBufferUsageFlags2CreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateBufferView_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateBufferView *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkBufferViewCreateInfo_temp(dec, (VkBufferViewCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pView = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pView)); - if (!args->pView) return; - vn_decode_VkBufferView(dec, args->pView); - } else { - args->pView = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateBufferView_args_handle(struct vn_command_vkCreateBufferView *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkBufferViewCreateInfo_handle((VkBufferViewCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pView */ -} - -static inline void vn_encode_vkCreateBufferView_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateBufferView *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateBufferView_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pView)) - vn_encode_VkBufferView(enc, args->pView); -} - -static inline void vn_decode_vkDestroyBufferView_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyBufferView *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkBufferView_lookup(dec, &args->bufferView); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyBufferView_args_handle(struct vn_command_vkDestroyBufferView *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkBufferView_handle(&args->bufferView); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyBufferView_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyBufferView *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyBufferView_EXT}); - - /* skip args->device */ - /* skip args->bufferView */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateBufferView(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateBufferView args; - - if (!ctx->dispatch_vkCreateBufferView) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateBufferView_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateBufferView(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateBufferView returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateBufferView_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyBufferView(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyBufferView args; - - if (!ctx->dispatch_vkDestroyBufferView) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyBufferView_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyBufferView(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyBufferView_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_BUFFER_VIEW_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_command_buffer.h b/src/venus/venus-protocol/vn_protocol_renderer_command_buffer.h deleted file mode 100644 index 5c42580d..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_command_buffer.h +++ /dev/null @@ -1,12549 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_COMMAND_BUFFER_H -#define VN_PROTOCOL_RENDERER_COMMAND_BUFFER_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkCmdPushDescriptorSetWithTemplate - * vkCmdPushDescriptorSetWithTemplate2 - */ - -/* struct VkCommandBufferAllocateInfo chain */ - -static inline void * -vn_decode_VkCommandBufferAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCommandBufferAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkCommandBufferAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkCommandPool_lookup(dec, &val->commandPool); - vn_decode_VkCommandBufferLevel(dec, &val->level); - vn_decode_uint32_t(dec, &val->commandBufferCount); -} - -static inline void -vn_decode_VkCommandBufferAllocateInfo_temp(struct vn_cs_decoder *dec, VkCommandBufferAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferAllocateInfo_pnext_temp(dec); - vn_decode_VkCommandBufferAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferAllocateInfo_handle_self(VkCommandBufferAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkCommandPool_handle(&val->commandPool); - /* skip val->level */ - /* skip val->commandBufferCount */ -} - -static inline void -vn_replace_VkCommandBufferAllocateInfo_handle(VkCommandBufferAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO: - vn_replace_VkCommandBufferAllocateInfo_handle_self((VkCommandBufferAllocateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCommandBufferInheritanceConditionalRenderingInfoEXT chain */ - -static inline void * -vn_decode_VkCommandBufferInheritanceConditionalRenderingInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCommandBufferInheritanceConditionalRenderingInfoEXT_self_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceConditionalRenderingInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->conditionalRenderingEnable); -} - -static inline void -vn_decode_VkCommandBufferInheritanceConditionalRenderingInfoEXT_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceConditionalRenderingInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferInheritanceConditionalRenderingInfoEXT_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceConditionalRenderingInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferInheritanceConditionalRenderingInfoEXT_handle_self(VkCommandBufferInheritanceConditionalRenderingInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->conditionalRenderingEnable */ -} - -static inline void -vn_replace_VkCommandBufferInheritanceConditionalRenderingInfoEXT_handle(VkCommandBufferInheritanceConditionalRenderingInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: - vn_replace_VkCommandBufferInheritanceConditionalRenderingInfoEXT_handle_self((VkCommandBufferInheritanceConditionalRenderingInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCommandBufferInheritanceRenderingInfo chain */ - -static inline void * -vn_decode_VkCommandBufferInheritanceRenderingInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCommandBufferInheritanceRenderingInfo_self_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceRenderingInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->viewMask); - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachmentFormats = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachmentFormats), array_size); - if (!val->pColorAttachmentFormats) return; - vn_decode_VkFormat_array(dec, (VkFormat *)val->pColorAttachmentFormats, array_size); - } else { - vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachmentFormats = NULL; - } - vn_decode_VkFormat(dec, &val->depthAttachmentFormat); - vn_decode_VkFormat(dec, &val->stencilAttachmentFormat); - vn_decode_VkSampleCountFlagBits(dec, &val->rasterizationSamples); -} - -static inline void -vn_decode_VkCommandBufferInheritanceRenderingInfo_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceRenderingInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferInheritanceRenderingInfo_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceRenderingInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferInheritanceRenderingInfo_handle_self(VkCommandBufferInheritanceRenderingInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->viewMask */ - /* skip val->colorAttachmentCount */ - /* skip val->pColorAttachmentFormats */ - /* skip val->depthAttachmentFormat */ - /* skip val->stencilAttachmentFormat */ - /* skip val->rasterizationSamples */ -} - -static inline void -vn_replace_VkCommandBufferInheritanceRenderingInfo_handle(VkCommandBufferInheritanceRenderingInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: - vn_replace_VkCommandBufferInheritanceRenderingInfo_handle_self((VkCommandBufferInheritanceRenderingInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindHeapInfoEXT chain */ - -static inline void * -vn_decode_VkBindHeapInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBindHeapInfoEXT_self_temp(struct vn_cs_decoder *dec, VkBindHeapInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceAddressRangeEXT_temp(dec, &val->heapRange); - vn_decode_VkDeviceSize(dec, &val->reservedRangeOffset); - vn_decode_VkDeviceSize(dec, &val->reservedRangeSize); -} - -static inline void -vn_decode_VkBindHeapInfoEXT_temp(struct vn_cs_decoder *dec, VkBindHeapInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_HEAP_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindHeapInfoEXT_pnext_temp(dec); - vn_decode_VkBindHeapInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindHeapInfoEXT_handle_self(VkBindHeapInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkDeviceAddressRangeEXT_handle(&val->heapRange); - /* skip val->reservedRangeOffset */ - /* skip val->reservedRangeSize */ -} - -static inline void -vn_replace_VkBindHeapInfoEXT_handle(VkBindHeapInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_HEAP_INFO_EXT: - vn_replace_VkBindHeapInfoEXT_handle_self((VkBindHeapInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCommandBufferInheritanceDescriptorHeapInfoEXT chain */ - -static inline void * -vn_decode_VkCommandBufferInheritanceDescriptorHeapInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCommandBufferInheritanceDescriptorHeapInfoEXT_self_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceDescriptorHeapInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pSamplerHeapBindInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pSamplerHeapBindInfo)); - if (!val->pSamplerHeapBindInfo) return; - vn_decode_VkBindHeapInfoEXT_temp(dec, (VkBindHeapInfoEXT *)val->pSamplerHeapBindInfo); - } else { - val->pSamplerHeapBindInfo = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pResourceHeapBindInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pResourceHeapBindInfo)); - if (!val->pResourceHeapBindInfo) return; - vn_decode_VkBindHeapInfoEXT_temp(dec, (VkBindHeapInfoEXT *)val->pResourceHeapBindInfo); - } else { - val->pResourceHeapBindInfo = NULL; - } -} - -static inline void -vn_decode_VkCommandBufferInheritanceDescriptorHeapInfoEXT_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceDescriptorHeapInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferInheritanceDescriptorHeapInfoEXT_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceDescriptorHeapInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferInheritanceDescriptorHeapInfoEXT_handle_self(VkCommandBufferInheritanceDescriptorHeapInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pSamplerHeapBindInfo) - vn_replace_VkBindHeapInfoEXT_handle((VkBindHeapInfoEXT *)val->pSamplerHeapBindInfo); - if (val->pResourceHeapBindInfo) - vn_replace_VkBindHeapInfoEXT_handle((VkBindHeapInfoEXT *)val->pResourceHeapBindInfo); -} - -static inline void -vn_replace_VkCommandBufferInheritanceDescriptorHeapInfoEXT_handle(VkCommandBufferInheritanceDescriptorHeapInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT: - vn_replace_VkCommandBufferInheritanceDescriptorHeapInfoEXT_handle_self((VkCommandBufferInheritanceDescriptorHeapInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCommandBufferInheritanceInfo chain */ - -static inline void * -vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkCommandBufferInheritanceConditionalRenderingInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkCommandBufferInheritanceConditionalRenderingInfoEXT *)pnext)->pNext = vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceConditionalRenderingInfoEXT_self_temp(dec, (VkCommandBufferInheritanceConditionalRenderingInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkCommandBufferInheritanceRenderingInfo)); - if (pnext) { - pnext->sType = stype; - ((VkCommandBufferInheritanceRenderingInfo *)pnext)->pNext = vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceRenderingInfo_self_temp(dec, (VkCommandBufferInheritanceRenderingInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderingAttachmentLocationInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderingAttachmentLocationInfo *)pnext)->pNext = vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(dec); - vn_decode_VkRenderingAttachmentLocationInfo_self_temp(dec, (VkRenderingAttachmentLocationInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderingInputAttachmentIndexInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderingInputAttachmentIndexInfo *)pnext)->pNext = vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(dec); - vn_decode_VkRenderingInputAttachmentIndexInfo_self_temp(dec, (VkRenderingInputAttachmentIndexInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkCommandBufferInheritanceDescriptorHeapInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkCommandBufferInheritanceDescriptorHeapInfoEXT *)pnext)->pNext = vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceDescriptorHeapInfoEXT_self_temp(dec, (VkCommandBufferInheritanceDescriptorHeapInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkCommandBufferInheritanceInfo_self_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkRenderPass_lookup(dec, &val->renderPass); - vn_decode_uint32_t(dec, &val->subpass); - vn_decode_VkFramebuffer_lookup(dec, &val->framebuffer); - vn_decode_VkBool32(dec, &val->occlusionQueryEnable); - vn_decode_VkFlags(dec, &val->queryFlags); - vn_decode_VkFlags(dec, &val->pipelineStatistics); -} - -static inline void -vn_decode_VkCommandBufferInheritanceInfo_temp(struct vn_cs_decoder *dec, VkCommandBufferInheritanceInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferInheritanceInfo_pnext_temp(dec); - vn_decode_VkCommandBufferInheritanceInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferInheritanceInfo_handle_self(VkCommandBufferInheritanceInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkRenderPass_handle(&val->renderPass); - /* skip val->subpass */ - vn_replace_VkFramebuffer_handle(&val->framebuffer); - /* skip val->occlusionQueryEnable */ - /* skip val->queryFlags */ - /* skip val->pipelineStatistics */ -} - -static inline void -vn_replace_VkCommandBufferInheritanceInfo_handle(VkCommandBufferInheritanceInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO: - vn_replace_VkCommandBufferInheritanceInfo_handle_self((VkCommandBufferInheritanceInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: - vn_replace_VkCommandBufferInheritanceConditionalRenderingInfoEXT_handle_self((VkCommandBufferInheritanceConditionalRenderingInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: - vn_replace_VkCommandBufferInheritanceRenderingInfo_handle_self((VkCommandBufferInheritanceRenderingInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO: - vn_replace_VkRenderingAttachmentLocationInfo_handle_self((VkRenderingAttachmentLocationInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO: - vn_replace_VkRenderingInputAttachmentIndexInfo_handle_self((VkRenderingInputAttachmentIndexInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT: - vn_replace_VkCommandBufferInheritanceDescriptorHeapInfoEXT_handle_self((VkCommandBufferInheritanceDescriptorHeapInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceGroupCommandBufferBeginInfo chain */ - -static inline void * -vn_decode_VkDeviceGroupCommandBufferBeginInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceGroupCommandBufferBeginInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceGroupCommandBufferBeginInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->deviceMask); -} - -static inline void -vn_decode_VkDeviceGroupCommandBufferBeginInfo_temp(struct vn_cs_decoder *dec, VkDeviceGroupCommandBufferBeginInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceGroupCommandBufferBeginInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupCommandBufferBeginInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceGroupCommandBufferBeginInfo_handle_self(VkDeviceGroupCommandBufferBeginInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->deviceMask */ -} - -static inline void -vn_replace_VkDeviceGroupCommandBufferBeginInfo_handle(VkDeviceGroupCommandBufferBeginInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: - vn_replace_VkDeviceGroupCommandBufferBeginInfo_handle_self((VkDeviceGroupCommandBufferBeginInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCommandBufferBeginInfo chain */ - -static inline void * -vn_decode_VkCommandBufferBeginInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceGroupCommandBufferBeginInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceGroupCommandBufferBeginInfo *)pnext)->pNext = vn_decode_VkCommandBufferBeginInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupCommandBufferBeginInfo_self_temp(dec, (VkDeviceGroupCommandBufferBeginInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkCommandBufferBeginInfo_self_temp(struct vn_cs_decoder *dec, VkCommandBufferBeginInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - if (vn_decode_simple_pointer(dec)) { - val->pInheritanceInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pInheritanceInfo)); - if (!val->pInheritanceInfo) return; - vn_decode_VkCommandBufferInheritanceInfo_temp(dec, (VkCommandBufferInheritanceInfo *)val->pInheritanceInfo); - } else { - val->pInheritanceInfo = NULL; - } -} - -static inline void -vn_decode_VkCommandBufferBeginInfo_temp(struct vn_cs_decoder *dec, VkCommandBufferBeginInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferBeginInfo_pnext_temp(dec); - vn_decode_VkCommandBufferBeginInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferBeginInfo_handle_self(VkCommandBufferBeginInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - if (val->pInheritanceInfo) - vn_replace_VkCommandBufferInheritanceInfo_handle((VkCommandBufferInheritanceInfo *)val->pInheritanceInfo); -} - -static inline void -vn_replace_VkCommandBufferBeginInfo_handle(VkCommandBufferBeginInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO: - vn_replace_VkCommandBufferBeginInfo_handle_self((VkCommandBufferBeginInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: - vn_replace_VkDeviceGroupCommandBufferBeginInfo_handle_self((VkDeviceGroupCommandBufferBeginInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMultiDrawInfoEXT */ - -static inline void -vn_decode_VkMultiDrawInfoEXT_temp(struct vn_cs_decoder *dec, VkMultiDrawInfoEXT *val) -{ - vn_decode_uint32_t(dec, &val->firstVertex); - vn_decode_uint32_t(dec, &val->vertexCount); -} - -static inline void -vn_replace_VkMultiDrawInfoEXT_handle(VkMultiDrawInfoEXT *val) -{ - /* skip val->firstVertex */ - /* skip val->vertexCount */ -} - -/* struct VkMultiDrawIndexedInfoEXT */ - -static inline void -vn_decode_VkMultiDrawIndexedInfoEXT_temp(struct vn_cs_decoder *dec, VkMultiDrawIndexedInfoEXT *val) -{ - vn_decode_uint32_t(dec, &val->firstIndex); - vn_decode_uint32_t(dec, &val->indexCount); - vn_decode_int32_t(dec, &val->vertexOffset); -} - -static inline void -vn_replace_VkMultiDrawIndexedInfoEXT_handle(VkMultiDrawIndexedInfoEXT *val) -{ - /* skip val->firstIndex */ - /* skip val->indexCount */ - /* skip val->vertexOffset */ -} - -/* struct VkBufferCopy */ - -static inline void -vn_decode_VkBufferCopy_temp(struct vn_cs_decoder *dec, VkBufferCopy *val) -{ - vn_decode_VkDeviceSize(dec, &val->srcOffset); - vn_decode_VkDeviceSize(dec, &val->dstOffset); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_replace_VkBufferCopy_handle(VkBufferCopy *val) -{ - /* skip val->srcOffset */ - /* skip val->dstOffset */ - /* skip val->size */ -} - -/* struct VkImageCopy */ - -static inline void -vn_decode_VkImageCopy_temp(struct vn_cs_decoder *dec, VkImageCopy *val) -{ - vn_decode_VkImageSubresourceLayers_temp(dec, &val->srcSubresource); - vn_decode_VkOffset3D_temp(dec, &val->srcOffset); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->dstSubresource); - vn_decode_VkOffset3D_temp(dec, &val->dstOffset); - vn_decode_VkExtent3D_temp(dec, &val->extent); -} - -static inline void -vn_replace_VkImageCopy_handle(VkImageCopy *val) -{ - vn_replace_VkImageSubresourceLayers_handle(&val->srcSubresource); - vn_replace_VkOffset3D_handle(&val->srcOffset); - vn_replace_VkImageSubresourceLayers_handle(&val->dstSubresource); - vn_replace_VkOffset3D_handle(&val->dstOffset); - vn_replace_VkExtent3D_handle(&val->extent); -} - -/* struct VkImageBlit */ - -static inline void -vn_decode_VkImageBlit_temp(struct vn_cs_decoder *dec, VkImageBlit *val) -{ - vn_decode_VkImageSubresourceLayers_temp(dec, &val->srcSubresource); - { - const uint32_t iter_count = vn_decode_array_size(dec, 2); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkOffset3D_temp(dec, &val->srcOffsets[i]); - } - vn_decode_VkImageSubresourceLayers_temp(dec, &val->dstSubresource); - { - const uint32_t iter_count = vn_decode_array_size(dec, 2); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkOffset3D_temp(dec, &val->dstOffsets[i]); - } -} - -static inline void -vn_replace_VkImageBlit_handle(VkImageBlit *val) -{ - vn_replace_VkImageSubresourceLayers_handle(&val->srcSubresource); - for (uint32_t i = 0; i < 2; i++) - vn_replace_VkOffset3D_handle(&val->srcOffsets[i]); - vn_replace_VkImageSubresourceLayers_handle(&val->dstSubresource); - for (uint32_t i = 0; i < 2; i++) - vn_replace_VkOffset3D_handle(&val->dstOffsets[i]); -} - -/* struct VkBufferImageCopy */ - -static inline void -vn_decode_VkBufferImageCopy_temp(struct vn_cs_decoder *dec, VkBufferImageCopy *val) -{ - vn_decode_VkDeviceSize(dec, &val->bufferOffset); - vn_decode_uint32_t(dec, &val->bufferRowLength); - vn_decode_uint32_t(dec, &val->bufferImageHeight); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->imageSubresource); - vn_decode_VkOffset3D_temp(dec, &val->imageOffset); - vn_decode_VkExtent3D_temp(dec, &val->imageExtent); -} - -static inline void -vn_replace_VkBufferImageCopy_handle(VkBufferImageCopy *val) -{ - /* skip val->bufferOffset */ - /* skip val->bufferRowLength */ - /* skip val->bufferImageHeight */ - vn_replace_VkImageSubresourceLayers_handle(&val->imageSubresource); - vn_replace_VkOffset3D_handle(&val->imageOffset); - vn_replace_VkExtent3D_handle(&val->imageExtent); -} - -/* struct VkClearDepthStencilValue */ - -static inline void -vn_decode_VkClearDepthStencilValue_temp(struct vn_cs_decoder *dec, VkClearDepthStencilValue *val) -{ - vn_decode_float(dec, &val->depth); - vn_decode_uint32_t(dec, &val->stencil); -} - -static inline void -vn_replace_VkClearDepthStencilValue_handle(VkClearDepthStencilValue *val) -{ - /* skip val->depth */ - /* skip val->stencil */ -} - -/* union VkClearValue */ - -static inline void -vn_decode_VkClearValue_temp(struct vn_cs_decoder *dec, VkClearValue *val) -{ - uint32_t tag; - vn_decode_uint32_t(dec, &tag); - switch (tag) { - case 0: - vn_decode_VkClearColorValue_temp(dec, &val->color); - break; - case 1: - vn_decode_VkClearDepthStencilValue_temp(dec, &val->depthStencil); - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -/* struct VkClearAttachment */ - -static inline void -vn_decode_VkClearAttachment_temp(struct vn_cs_decoder *dec, VkClearAttachment *val) -{ - vn_decode_VkFlags(dec, &val->aspectMask); - vn_decode_uint32_t(dec, &val->colorAttachment); - vn_decode_VkClearValue_temp(dec, &val->clearValue); -} - -static inline void -vn_replace_VkClearAttachment_handle(VkClearAttachment *val) -{ - /* skip val->aspectMask */ - /* skip val->colorAttachment */ - /* skip val->clearValue */ -} - -/* struct VkClearRect */ - -static inline void -vn_decode_VkClearRect_temp(struct vn_cs_decoder *dec, VkClearRect *val) -{ - vn_decode_VkRect2D_temp(dec, &val->rect); - vn_decode_uint32_t(dec, &val->baseArrayLayer); - vn_decode_uint32_t(dec, &val->layerCount); -} - -static inline void -vn_replace_VkClearRect_handle(VkClearRect *val) -{ - vn_replace_VkRect2D_handle(&val->rect); - /* skip val->baseArrayLayer */ - /* skip val->layerCount */ -} - -/* struct VkImageResolve */ - -static inline void -vn_decode_VkImageResolve_temp(struct vn_cs_decoder *dec, VkImageResolve *val) -{ - vn_decode_VkImageSubresourceLayers_temp(dec, &val->srcSubresource); - vn_decode_VkOffset3D_temp(dec, &val->srcOffset); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->dstSubresource); - vn_decode_VkOffset3D_temp(dec, &val->dstOffset); - vn_decode_VkExtent3D_temp(dec, &val->extent); -} - -static inline void -vn_replace_VkImageResolve_handle(VkImageResolve *val) -{ - vn_replace_VkImageSubresourceLayers_handle(&val->srcSubresource); - vn_replace_VkOffset3D_handle(&val->srcOffset); - vn_replace_VkImageSubresourceLayers_handle(&val->dstSubresource); - vn_replace_VkOffset3D_handle(&val->dstOffset); - vn_replace_VkExtent3D_handle(&val->extent); -} - -/* struct VkMemoryBarrier chain */ - -static inline void * -vn_decode_VkMemoryBarrier_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryBarrier_self_temp(struct vn_cs_decoder *dec, VkMemoryBarrier *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->srcAccessMask); - vn_decode_VkFlags(dec, &val->dstAccessMask); -} - -static inline void -vn_decode_VkMemoryBarrier_temp(struct vn_cs_decoder *dec, VkMemoryBarrier *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_BARRIER) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryBarrier_pnext_temp(dec); - vn_decode_VkMemoryBarrier_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryBarrier_handle_self(VkMemoryBarrier *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcAccessMask */ - /* skip val->dstAccessMask */ -} - -static inline void -vn_replace_VkMemoryBarrier_handle(VkMemoryBarrier *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_BARRIER: - vn_replace_VkMemoryBarrier_handle_self((VkMemoryBarrier *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkExternalMemoryAcquireUnmodifiedEXT chain */ - -static inline void * -vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_self_temp(struct vn_cs_decoder *dec, VkExternalMemoryAcquireUnmodifiedEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->acquireUnmodifiedMemory); -} - -static inline void -vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_temp(struct vn_cs_decoder *dec, VkExternalMemoryAcquireUnmodifiedEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_pnext_temp(dec); - vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle_self(VkExternalMemoryAcquireUnmodifiedEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->acquireUnmodifiedMemory */ -} - -static inline void -vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle(VkExternalMemoryAcquireUnmodifiedEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle_self((VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferMemoryBarrier chain */ - -static inline void * -vn_decode_VkBufferMemoryBarrier_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalMemoryAcquireUnmodifiedEXT)); - if (pnext) { - pnext->sType = stype; - ((VkExternalMemoryAcquireUnmodifiedEXT *)pnext)->pNext = vn_decode_VkBufferMemoryBarrier_pnext_temp(dec); - vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_self_temp(dec, (VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBufferMemoryBarrier_self_temp(struct vn_cs_decoder *dec, VkBufferMemoryBarrier *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->srcAccessMask); - vn_decode_VkFlags(dec, &val->dstAccessMask); - vn_decode_uint32_t(dec, &val->srcQueueFamilyIndex); - vn_decode_uint32_t(dec, &val->dstQueueFamilyIndex); - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_decode_VkBufferMemoryBarrier_temp(struct vn_cs_decoder *dec, VkBufferMemoryBarrier *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferMemoryBarrier_pnext_temp(dec); - vn_decode_VkBufferMemoryBarrier_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferMemoryBarrier_handle_self(VkBufferMemoryBarrier *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcAccessMask */ - /* skip val->dstAccessMask */ - /* skip val->srcQueueFamilyIndex */ - /* skip val->dstQueueFamilyIndex */ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->offset */ - /* skip val->size */ -} - -static inline void -vn_replace_VkBufferMemoryBarrier_handle(VkBufferMemoryBarrier *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER: - vn_replace_VkBufferMemoryBarrier_handle_self((VkBufferMemoryBarrier *)pnext); - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle_self((VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageMemoryBarrier chain */ - -static inline void * -vn_decode_VkImageMemoryBarrier_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSampleLocationsInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkSampleLocationsInfoEXT *)pnext)->pNext = vn_decode_VkImageMemoryBarrier_pnext_temp(dec); - vn_decode_VkSampleLocationsInfoEXT_self_temp(dec, (VkSampleLocationsInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalMemoryAcquireUnmodifiedEXT)); - if (pnext) { - pnext->sType = stype; - ((VkExternalMemoryAcquireUnmodifiedEXT *)pnext)->pNext = vn_decode_VkImageMemoryBarrier_pnext_temp(dec); - vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_self_temp(dec, (VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkImageMemoryBarrier_self_temp(struct vn_cs_decoder *dec, VkImageMemoryBarrier *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->srcAccessMask); - vn_decode_VkFlags(dec, &val->dstAccessMask); - vn_decode_VkImageLayout(dec, &val->oldLayout); - vn_decode_VkImageLayout(dec, &val->newLayout); - vn_decode_uint32_t(dec, &val->srcQueueFamilyIndex); - vn_decode_uint32_t(dec, &val->dstQueueFamilyIndex); - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_VkImageSubresourceRange_temp(dec, &val->subresourceRange); -} - -static inline void -vn_decode_VkImageMemoryBarrier_temp(struct vn_cs_decoder *dec, VkImageMemoryBarrier *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageMemoryBarrier_pnext_temp(dec); - vn_decode_VkImageMemoryBarrier_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageMemoryBarrier_handle_self(VkImageMemoryBarrier *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcAccessMask */ - /* skip val->dstAccessMask */ - /* skip val->oldLayout */ - /* skip val->newLayout */ - /* skip val->srcQueueFamilyIndex */ - /* skip val->dstQueueFamilyIndex */ - vn_replace_VkImage_handle(&val->image); - vn_replace_VkImageSubresourceRange_handle(&val->subresourceRange); -} - -static inline void -vn_replace_VkImageMemoryBarrier_handle(VkImageMemoryBarrier *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER: - vn_replace_VkImageMemoryBarrier_handle_self((VkImageMemoryBarrier *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: - vn_replace_VkSampleLocationsInfoEXT_handle_self((VkSampleLocationsInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle_self((VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkConditionalRenderingBeginInfoEXT chain */ - -static inline void * -vn_decode_VkConditionalRenderingBeginInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkConditionalRenderingBeginInfoEXT_self_temp(struct vn_cs_decoder *dec, VkConditionalRenderingBeginInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkConditionalRenderingBeginInfoEXT_temp(struct vn_cs_decoder *dec, VkConditionalRenderingBeginInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkConditionalRenderingBeginInfoEXT_pnext_temp(dec); - vn_decode_VkConditionalRenderingBeginInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkConditionalRenderingBeginInfoEXT_handle_self(VkConditionalRenderingBeginInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->offset */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkConditionalRenderingBeginInfoEXT_handle(VkConditionalRenderingBeginInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT: - vn_replace_VkConditionalRenderingBeginInfoEXT_handle_self((VkConditionalRenderingBeginInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceGroupRenderPassBeginInfo chain */ - -static inline void * -vn_decode_VkDeviceGroupRenderPassBeginInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceGroupRenderPassBeginInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceGroupRenderPassBeginInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->deviceMask); - vn_decode_uint32_t(dec, &val->deviceRenderAreaCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->deviceRenderAreaCount); - val->pDeviceRenderAreas = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDeviceRenderAreas), iter_count); - if (!val->pDeviceRenderAreas) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRect2D_temp(dec, &((VkRect2D *)val->pDeviceRenderAreas)[i]); - } else { - vn_decode_array_size(dec, val->deviceRenderAreaCount); - val->pDeviceRenderAreas = NULL; - } -} - -static inline void -vn_decode_VkDeviceGroupRenderPassBeginInfo_temp(struct vn_cs_decoder *dec, VkDeviceGroupRenderPassBeginInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceGroupRenderPassBeginInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupRenderPassBeginInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceGroupRenderPassBeginInfo_handle_self(VkDeviceGroupRenderPassBeginInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->deviceMask */ - /* skip val->deviceRenderAreaCount */ - if (val->pDeviceRenderAreas) { - for (uint32_t i = 0; i < val->deviceRenderAreaCount; i++) - vn_replace_VkRect2D_handle(&((VkRect2D *)val->pDeviceRenderAreas)[i]); - } -} - -static inline void -vn_replace_VkDeviceGroupRenderPassBeginInfo_handle(VkDeviceGroupRenderPassBeginInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: - vn_replace_VkDeviceGroupRenderPassBeginInfo_handle_self((VkDeviceGroupRenderPassBeginInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAttachmentSampleLocationsEXT */ - -static inline void -vn_decode_VkAttachmentSampleLocationsEXT_temp(struct vn_cs_decoder *dec, VkAttachmentSampleLocationsEXT *val) -{ - vn_decode_uint32_t(dec, &val->attachmentIndex); - vn_decode_VkSampleLocationsInfoEXT_temp(dec, &val->sampleLocationsInfo); -} - -static inline void -vn_replace_VkAttachmentSampleLocationsEXT_handle(VkAttachmentSampleLocationsEXT *val) -{ - /* skip val->attachmentIndex */ - vn_replace_VkSampleLocationsInfoEXT_handle(&val->sampleLocationsInfo); -} - -/* struct VkSubpassSampleLocationsEXT */ - -static inline void -vn_decode_VkSubpassSampleLocationsEXT_temp(struct vn_cs_decoder *dec, VkSubpassSampleLocationsEXT *val) -{ - vn_decode_uint32_t(dec, &val->subpassIndex); - vn_decode_VkSampleLocationsInfoEXT_temp(dec, &val->sampleLocationsInfo); -} - -static inline void -vn_replace_VkSubpassSampleLocationsEXT_handle(VkSubpassSampleLocationsEXT *val) -{ - /* skip val->subpassIndex */ - vn_replace_VkSampleLocationsInfoEXT_handle(&val->sampleLocationsInfo); -} - -/* struct VkRenderPassSampleLocationsBeginInfoEXT chain */ - -static inline void * -vn_decode_VkRenderPassSampleLocationsBeginInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderPassSampleLocationsBeginInfoEXT_self_temp(struct vn_cs_decoder *dec, VkRenderPassSampleLocationsBeginInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->attachmentInitialSampleLocationsCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentInitialSampleLocationsCount); - val->pAttachmentInitialSampleLocations = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachmentInitialSampleLocations), iter_count); - if (!val->pAttachmentInitialSampleLocations) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentSampleLocationsEXT_temp(dec, &((VkAttachmentSampleLocationsEXT *)val->pAttachmentInitialSampleLocations)[i]); - } else { - vn_decode_array_size(dec, val->attachmentInitialSampleLocationsCount); - val->pAttachmentInitialSampleLocations = NULL; - } - vn_decode_uint32_t(dec, &val->postSubpassSampleLocationsCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->postSubpassSampleLocationsCount); - val->pPostSubpassSampleLocations = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPostSubpassSampleLocations), iter_count); - if (!val->pPostSubpassSampleLocations) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubpassSampleLocationsEXT_temp(dec, &((VkSubpassSampleLocationsEXT *)val->pPostSubpassSampleLocations)[i]); - } else { - vn_decode_array_size(dec, val->postSubpassSampleLocationsCount); - val->pPostSubpassSampleLocations = NULL; - } -} - -static inline void -vn_decode_VkRenderPassSampleLocationsBeginInfoEXT_temp(struct vn_cs_decoder *dec, VkRenderPassSampleLocationsBeginInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassSampleLocationsBeginInfoEXT_pnext_temp(dec); - vn_decode_VkRenderPassSampleLocationsBeginInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassSampleLocationsBeginInfoEXT_handle_self(VkRenderPassSampleLocationsBeginInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachmentInitialSampleLocationsCount */ - if (val->pAttachmentInitialSampleLocations) { - for (uint32_t i = 0; i < val->attachmentInitialSampleLocationsCount; i++) - vn_replace_VkAttachmentSampleLocationsEXT_handle(&((VkAttachmentSampleLocationsEXT *)val->pAttachmentInitialSampleLocations)[i]); - } - /* skip val->postSubpassSampleLocationsCount */ - if (val->pPostSubpassSampleLocations) { - for (uint32_t i = 0; i < val->postSubpassSampleLocationsCount; i++) - vn_replace_VkSubpassSampleLocationsEXT_handle(&((VkSubpassSampleLocationsEXT *)val->pPostSubpassSampleLocations)[i]); - } -} - -static inline void -vn_replace_VkRenderPassSampleLocationsBeginInfoEXT_handle(VkRenderPassSampleLocationsBeginInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: - vn_replace_VkRenderPassSampleLocationsBeginInfoEXT_handle_self((VkRenderPassSampleLocationsBeginInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderPassAttachmentBeginInfo chain */ - -static inline void * -vn_decode_VkRenderPassAttachmentBeginInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderPassAttachmentBeginInfo_self_temp(struct vn_cs_decoder *dec, VkRenderPassAttachmentBeginInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachments), iter_count); - if (!val->pAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageView_lookup(dec, &((VkImageView *)val->pAttachments)[i]); - } else { - vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = NULL; - } -} - -static inline void -vn_decode_VkRenderPassAttachmentBeginInfo_temp(struct vn_cs_decoder *dec, VkRenderPassAttachmentBeginInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassAttachmentBeginInfo_pnext_temp(dec); - vn_decode_VkRenderPassAttachmentBeginInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassAttachmentBeginInfo_handle_self(VkRenderPassAttachmentBeginInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachmentCount */ - if (val->pAttachments) { - for (uint32_t i = 0; i < val->attachmentCount; i++) - vn_replace_VkImageView_handle(&((VkImageView *)val->pAttachments)[i]); - } -} - -static inline void -vn_replace_VkRenderPassAttachmentBeginInfo_handle(VkRenderPassAttachmentBeginInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: - vn_replace_VkRenderPassAttachmentBeginInfo_handle_self((VkRenderPassAttachmentBeginInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderPassBeginInfo chain */ - -static inline void * -vn_decode_VkRenderPassBeginInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceGroupRenderPassBeginInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceGroupRenderPassBeginInfo *)pnext)->pNext = vn_decode_VkRenderPassBeginInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupRenderPassBeginInfo_self_temp(dec, (VkDeviceGroupRenderPassBeginInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderPassSampleLocationsBeginInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkRenderPassSampleLocationsBeginInfoEXT *)pnext)->pNext = vn_decode_VkRenderPassBeginInfo_pnext_temp(dec); - vn_decode_VkRenderPassSampleLocationsBeginInfoEXT_self_temp(dec, (VkRenderPassSampleLocationsBeginInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderPassAttachmentBeginInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderPassAttachmentBeginInfo *)pnext)->pNext = vn_decode_VkRenderPassBeginInfo_pnext_temp(dec); - vn_decode_VkRenderPassAttachmentBeginInfo_self_temp(dec, (VkRenderPassAttachmentBeginInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkRenderPassBeginInfo_self_temp(struct vn_cs_decoder *dec, VkRenderPassBeginInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkRenderPass_lookup(dec, &val->renderPass); - vn_decode_VkFramebuffer_lookup(dec, &val->framebuffer); - vn_decode_VkRect2D_temp(dec, &val->renderArea); - vn_decode_uint32_t(dec, &val->clearValueCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->clearValueCount); - val->pClearValues = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pClearValues), iter_count); - if (!val->pClearValues) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkClearValue_temp(dec, &((VkClearValue *)val->pClearValues)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pClearValues = NULL; - } -} - -static inline void -vn_decode_VkRenderPassBeginInfo_temp(struct vn_cs_decoder *dec, VkRenderPassBeginInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassBeginInfo_pnext_temp(dec); - vn_decode_VkRenderPassBeginInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassBeginInfo_handle_self(VkRenderPassBeginInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkRenderPass_handle(&val->renderPass); - vn_replace_VkFramebuffer_handle(&val->framebuffer); - vn_replace_VkRect2D_handle(&val->renderArea); - /* skip val->clearValueCount */ - /* skip val->pClearValues */ -} - -static inline void -vn_replace_VkRenderPassBeginInfo_handle(VkRenderPassBeginInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO: - vn_replace_VkRenderPassBeginInfo_handle_self((VkRenderPassBeginInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: - vn_replace_VkDeviceGroupRenderPassBeginInfo_handle_self((VkDeviceGroupRenderPassBeginInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: - vn_replace_VkRenderPassSampleLocationsBeginInfoEXT_handle_self((VkRenderPassSampleLocationsBeginInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: - vn_replace_VkRenderPassAttachmentBeginInfo_handle_self((VkRenderPassAttachmentBeginInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubpassBeginInfo chain */ - -static inline void * -vn_decode_VkSubpassBeginInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSubpassBeginInfo_self_temp(struct vn_cs_decoder *dec, VkSubpassBeginInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSubpassContents(dec, &val->contents); -} - -static inline void -vn_decode_VkSubpassBeginInfo_temp(struct vn_cs_decoder *dec, VkSubpassBeginInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubpassBeginInfo_pnext_temp(dec); - vn_decode_VkSubpassBeginInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubpassBeginInfo_handle_self(VkSubpassBeginInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->contents */ -} - -static inline void -vn_replace_VkSubpassBeginInfo_handle(VkSubpassBeginInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO: - vn_replace_VkSubpassBeginInfo_handle_self((VkSubpassBeginInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubpassEndInfo chain */ - -static inline void * -vn_decode_VkSubpassEndInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSubpassEndInfo_self_temp(struct vn_cs_decoder *dec, VkSubpassEndInfo *val) -{ - /* skip val->{sType,pNext} */ -} - -static inline void -vn_decode_VkSubpassEndInfo_temp(struct vn_cs_decoder *dec, VkSubpassEndInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBPASS_END_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubpassEndInfo_pnext_temp(dec); - vn_decode_VkSubpassEndInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubpassEndInfo_handle_self(VkSubpassEndInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ -} - -static inline void -vn_replace_VkSubpassEndInfo_handle(VkSubpassEndInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBPASS_END_INFO: - vn_replace_VkSubpassEndInfo_handle_self((VkSubpassEndInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkStridedDeviceAddressRegionKHR */ - -static inline void -vn_decode_VkStridedDeviceAddressRegionKHR_temp(struct vn_cs_decoder *dec, VkStridedDeviceAddressRegionKHR *val) -{ - vn_decode_VkDeviceAddress(dec, &val->deviceAddress); - vn_decode_VkDeviceSize(dec, &val->stride); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_replace_VkStridedDeviceAddressRegionKHR_handle(VkStridedDeviceAddressRegionKHR *val) -{ - /* skip val->deviceAddress */ - /* skip val->stride */ - /* skip val->size */ -} - -/* struct VkColorBlendEquationEXT */ - -static inline void -vn_decode_VkColorBlendEquationEXT_temp(struct vn_cs_decoder *dec, VkColorBlendEquationEXT *val) -{ - vn_decode_VkBlendFactor(dec, &val->srcColorBlendFactor); - vn_decode_VkBlendFactor(dec, &val->dstColorBlendFactor); - vn_decode_VkBlendOp(dec, &val->colorBlendOp); - vn_decode_VkBlendFactor(dec, &val->srcAlphaBlendFactor); - vn_decode_VkBlendFactor(dec, &val->dstAlphaBlendFactor); - vn_decode_VkBlendOp(dec, &val->alphaBlendOp); -} - -static inline void -vn_replace_VkColorBlendEquationEXT_handle(VkColorBlendEquationEXT *val) -{ - /* skip val->srcColorBlendFactor */ - /* skip val->dstColorBlendFactor */ - /* skip val->colorBlendOp */ - /* skip val->srcAlphaBlendFactor */ - /* skip val->dstAlphaBlendFactor */ - /* skip val->alphaBlendOp */ -} - -/* struct VkColorBlendAdvancedEXT */ - -static inline void -vn_decode_VkColorBlendAdvancedEXT_temp(struct vn_cs_decoder *dec, VkColorBlendAdvancedEXT *val) -{ - vn_decode_VkBlendOp(dec, &val->advancedBlendOp); - vn_decode_VkBool32(dec, &val->srcPremultiplied); - vn_decode_VkBool32(dec, &val->dstPremultiplied); - vn_decode_VkBlendOverlapEXT(dec, &val->blendOverlap); - vn_decode_VkBool32(dec, &val->clampResults); -} - -static inline void -vn_replace_VkColorBlendAdvancedEXT_handle(VkColorBlendAdvancedEXT *val) -{ - /* skip val->advancedBlendOp */ - /* skip val->srcPremultiplied */ - /* skip val->dstPremultiplied */ - /* skip val->blendOverlap */ - /* skip val->clampResults */ -} - -/* struct VkBufferCopy2 chain */ - -static inline void * -vn_decode_VkBufferCopy2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferCopy2_self_temp(struct vn_cs_decoder *dec, VkBufferCopy2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceSize(dec, &val->srcOffset); - vn_decode_VkDeviceSize(dec, &val->dstOffset); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_decode_VkBufferCopy2_temp(struct vn_cs_decoder *dec, VkBufferCopy2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_COPY_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferCopy2_pnext_temp(dec); - vn_decode_VkBufferCopy2_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferCopy2_handle_self(VkBufferCopy2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcOffset */ - /* skip val->dstOffset */ - /* skip val->size */ -} - -static inline void -vn_replace_VkBufferCopy2_handle(VkBufferCopy2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_COPY_2: - vn_replace_VkBufferCopy2_handle_self((VkBufferCopy2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyBufferInfo2 chain */ - -static inline void * -vn_decode_VkCopyBufferInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyBufferInfo2_self_temp(struct vn_cs_decoder *dec, VkCopyBufferInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBuffer_lookup(dec, &val->srcBuffer); - vn_decode_VkBuffer_lookup(dec, &val->dstBuffer); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferCopy2_temp(dec, &((VkBufferCopy2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkCopyBufferInfo2_temp(struct vn_cs_decoder *dec, VkCopyBufferInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyBufferInfo2_pnext_temp(dec); - vn_decode_VkCopyBufferInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyBufferInfo2_handle_self(VkCopyBufferInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkBuffer_handle(&val->srcBuffer); - vn_replace_VkBuffer_handle(&val->dstBuffer); - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkBufferCopy2_handle(&((VkBufferCopy2 *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkCopyBufferInfo2_handle(VkCopyBufferInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2: - vn_replace_VkCopyBufferInfo2_handle_self((VkCopyBufferInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyImageInfo2 chain */ - -static inline void * -vn_decode_VkCopyImageInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyImageInfo2_self_temp(struct vn_cs_decoder *dec, VkCopyImageInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->srcImage); - vn_decode_VkImageLayout(dec, &val->srcImageLayout); - vn_decode_VkImage_lookup(dec, &val->dstImage); - vn_decode_VkImageLayout(dec, &val->dstImageLayout); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageCopy2_temp(dec, &((VkImageCopy2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkCopyImageInfo2_temp(struct vn_cs_decoder *dec, VkCopyImageInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyImageInfo2_pnext_temp(dec); - vn_decode_VkCopyImageInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyImageInfo2_handle_self(VkCopyImageInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->srcImage); - /* skip val->srcImageLayout */ - vn_replace_VkImage_handle(&val->dstImage); - /* skip val->dstImageLayout */ - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkImageCopy2_handle(&((VkImageCopy2 *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkCopyImageInfo2_handle(VkCopyImageInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2: - vn_replace_VkCopyImageInfo2_handle_self((VkCopyImageInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageBlit2 chain */ - -static inline void * -vn_decode_VkImageBlit2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageBlit2_self_temp(struct vn_cs_decoder *dec, VkImageBlit2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageSubresourceLayers_temp(dec, &val->srcSubresource); - { - const uint32_t iter_count = vn_decode_array_size(dec, 2); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkOffset3D_temp(dec, &val->srcOffsets[i]); - } - vn_decode_VkImageSubresourceLayers_temp(dec, &val->dstSubresource); - { - const uint32_t iter_count = vn_decode_array_size(dec, 2); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkOffset3D_temp(dec, &val->dstOffsets[i]); - } -} - -static inline void -vn_decode_VkImageBlit2_temp(struct vn_cs_decoder *dec, VkImageBlit2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_BLIT_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageBlit2_pnext_temp(dec); - vn_decode_VkImageBlit2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageBlit2_handle_self(VkImageBlit2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImageSubresourceLayers_handle(&val->srcSubresource); - for (uint32_t i = 0; i < 2; i++) - vn_replace_VkOffset3D_handle(&val->srcOffsets[i]); - vn_replace_VkImageSubresourceLayers_handle(&val->dstSubresource); - for (uint32_t i = 0; i < 2; i++) - vn_replace_VkOffset3D_handle(&val->dstOffsets[i]); -} - -static inline void -vn_replace_VkImageBlit2_handle(VkImageBlit2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_BLIT_2: - vn_replace_VkImageBlit2_handle_self((VkImageBlit2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBlitImageInfo2 chain */ - -static inline void * -vn_decode_VkBlitImageInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBlitImageInfo2_self_temp(struct vn_cs_decoder *dec, VkBlitImageInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->srcImage); - vn_decode_VkImageLayout(dec, &val->srcImageLayout); - vn_decode_VkImage_lookup(dec, &val->dstImage); - vn_decode_VkImageLayout(dec, &val->dstImageLayout); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageBlit2_temp(dec, &((VkImageBlit2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } - vn_decode_VkFilter(dec, &val->filter); -} - -static inline void -vn_decode_VkBlitImageInfo2_temp(struct vn_cs_decoder *dec, VkBlitImageInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBlitImageInfo2_pnext_temp(dec); - vn_decode_VkBlitImageInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkBlitImageInfo2_handle_self(VkBlitImageInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->srcImage); - /* skip val->srcImageLayout */ - vn_replace_VkImage_handle(&val->dstImage); - /* skip val->dstImageLayout */ - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkImageBlit2_handle(&((VkImageBlit2 *)val->pRegions)[i]); - } - /* skip val->filter */ -} - -static inline void -vn_replace_VkBlitImageInfo2_handle(VkBlitImageInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2: - vn_replace_VkBlitImageInfo2_handle_self((VkBlitImageInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferImageCopy2 chain */ - -static inline void * -vn_decode_VkBufferImageCopy2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferImageCopy2_self_temp(struct vn_cs_decoder *dec, VkBufferImageCopy2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceSize(dec, &val->bufferOffset); - vn_decode_uint32_t(dec, &val->bufferRowLength); - vn_decode_uint32_t(dec, &val->bufferImageHeight); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->imageSubresource); - vn_decode_VkOffset3D_temp(dec, &val->imageOffset); - vn_decode_VkExtent3D_temp(dec, &val->imageExtent); -} - -static inline void -vn_decode_VkBufferImageCopy2_temp(struct vn_cs_decoder *dec, VkBufferImageCopy2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferImageCopy2_pnext_temp(dec); - vn_decode_VkBufferImageCopy2_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferImageCopy2_handle_self(VkBufferImageCopy2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->bufferOffset */ - /* skip val->bufferRowLength */ - /* skip val->bufferImageHeight */ - vn_replace_VkImageSubresourceLayers_handle(&val->imageSubresource); - vn_replace_VkOffset3D_handle(&val->imageOffset); - vn_replace_VkExtent3D_handle(&val->imageExtent); -} - -static inline void -vn_replace_VkBufferImageCopy2_handle(VkBufferImageCopy2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2: - vn_replace_VkBufferImageCopy2_handle_self((VkBufferImageCopy2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyBufferToImageInfo2 chain */ - -static inline void * -vn_decode_VkCopyBufferToImageInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyBufferToImageInfo2_self_temp(struct vn_cs_decoder *dec, VkCopyBufferToImageInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBuffer_lookup(dec, &val->srcBuffer); - vn_decode_VkImage_lookup(dec, &val->dstImage); - vn_decode_VkImageLayout(dec, &val->dstImageLayout); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferImageCopy2_temp(dec, &((VkBufferImageCopy2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkCopyBufferToImageInfo2_temp(struct vn_cs_decoder *dec, VkCopyBufferToImageInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyBufferToImageInfo2_pnext_temp(dec); - vn_decode_VkCopyBufferToImageInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyBufferToImageInfo2_handle_self(VkCopyBufferToImageInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkBuffer_handle(&val->srcBuffer); - vn_replace_VkImage_handle(&val->dstImage); - /* skip val->dstImageLayout */ - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkBufferImageCopy2_handle(&((VkBufferImageCopy2 *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkCopyBufferToImageInfo2_handle(VkCopyBufferToImageInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2: - vn_replace_VkCopyBufferToImageInfo2_handle_self((VkCopyBufferToImageInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyImageToBufferInfo2 chain */ - -static inline void * -vn_decode_VkCopyImageToBufferInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyImageToBufferInfo2_self_temp(struct vn_cs_decoder *dec, VkCopyImageToBufferInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->srcImage); - vn_decode_VkImageLayout(dec, &val->srcImageLayout); - vn_decode_VkBuffer_lookup(dec, &val->dstBuffer); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferImageCopy2_temp(dec, &((VkBufferImageCopy2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkCopyImageToBufferInfo2_temp(struct vn_cs_decoder *dec, VkCopyImageToBufferInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyImageToBufferInfo2_pnext_temp(dec); - vn_decode_VkCopyImageToBufferInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyImageToBufferInfo2_handle_self(VkCopyImageToBufferInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->srcImage); - /* skip val->srcImageLayout */ - vn_replace_VkBuffer_handle(&val->dstBuffer); - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkBufferImageCopy2_handle(&((VkBufferImageCopy2 *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkCopyImageToBufferInfo2_handle(VkCopyImageToBufferInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2: - vn_replace_VkCopyImageToBufferInfo2_handle_self((VkCopyImageToBufferInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageResolve2 chain */ - -static inline void * -vn_decode_VkImageResolve2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageResolve2_self_temp(struct vn_cs_decoder *dec, VkImageResolve2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageSubresourceLayers_temp(dec, &val->srcSubresource); - vn_decode_VkOffset3D_temp(dec, &val->srcOffset); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->dstSubresource); - vn_decode_VkOffset3D_temp(dec, &val->dstOffset); - vn_decode_VkExtent3D_temp(dec, &val->extent); -} - -static inline void -vn_decode_VkImageResolve2_temp(struct vn_cs_decoder *dec, VkImageResolve2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageResolve2_pnext_temp(dec); - vn_decode_VkImageResolve2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageResolve2_handle_self(VkImageResolve2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImageSubresourceLayers_handle(&val->srcSubresource); - vn_replace_VkOffset3D_handle(&val->srcOffset); - vn_replace_VkImageSubresourceLayers_handle(&val->dstSubresource); - vn_replace_VkOffset3D_handle(&val->dstOffset); - vn_replace_VkExtent3D_handle(&val->extent); -} - -static inline void -vn_replace_VkImageResolve2_handle(VkImageResolve2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2: - vn_replace_VkImageResolve2_handle_self((VkImageResolve2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkResolveImageInfo2 chain */ - -static inline void * -vn_decode_VkResolveImageInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkResolveImageInfo2_self_temp(struct vn_cs_decoder *dec, VkResolveImageInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->srcImage); - vn_decode_VkImageLayout(dec, &val->srcImageLayout); - vn_decode_VkImage_lookup(dec, &val->dstImage); - vn_decode_VkImageLayout(dec, &val->dstImageLayout); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageResolve2_temp(dec, &((VkImageResolve2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkResolveImageInfo2_temp(struct vn_cs_decoder *dec, VkResolveImageInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkResolveImageInfo2_pnext_temp(dec); - vn_decode_VkResolveImageInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkResolveImageInfo2_handle_self(VkResolveImageInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->srcImage); - /* skip val->srcImageLayout */ - vn_replace_VkImage_handle(&val->dstImage); - /* skip val->dstImageLayout */ - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkImageResolve2_handle(&((VkImageResolve2 *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkResolveImageInfo2_handle(VkResolveImageInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2: - vn_replace_VkResolveImageInfo2_handle_self((VkResolveImageInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkVertexInputBindingDescription2EXT chain */ - -static inline void * -vn_decode_VkVertexInputBindingDescription2EXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkVertexInputBindingDescription2EXT_self_temp(struct vn_cs_decoder *dec, VkVertexInputBindingDescription2EXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->binding); - vn_decode_uint32_t(dec, &val->stride); - vn_decode_VkVertexInputRate(dec, &val->inputRate); - vn_decode_uint32_t(dec, &val->divisor); -} - -static inline void -vn_decode_VkVertexInputBindingDescription2EXT_temp(struct vn_cs_decoder *dec, VkVertexInputBindingDescription2EXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkVertexInputBindingDescription2EXT_pnext_temp(dec); - vn_decode_VkVertexInputBindingDescription2EXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkVertexInputBindingDescription2EXT_handle_self(VkVertexInputBindingDescription2EXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->binding */ - /* skip val->stride */ - /* skip val->inputRate */ - /* skip val->divisor */ -} - -static inline void -vn_replace_VkVertexInputBindingDescription2EXT_handle(VkVertexInputBindingDescription2EXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT: - vn_replace_VkVertexInputBindingDescription2EXT_handle_self((VkVertexInputBindingDescription2EXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkVertexInputAttributeDescription2EXT chain */ - -static inline void * -vn_decode_VkVertexInputAttributeDescription2EXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkVertexInputAttributeDescription2EXT_self_temp(struct vn_cs_decoder *dec, VkVertexInputAttributeDescription2EXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->location); - vn_decode_uint32_t(dec, &val->binding); - vn_decode_VkFormat(dec, &val->format); - vn_decode_uint32_t(dec, &val->offset); -} - -static inline void -vn_decode_VkVertexInputAttributeDescription2EXT_temp(struct vn_cs_decoder *dec, VkVertexInputAttributeDescription2EXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkVertexInputAttributeDescription2EXT_pnext_temp(dec); - vn_decode_VkVertexInputAttributeDescription2EXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkVertexInputAttributeDescription2EXT_handle_self(VkVertexInputAttributeDescription2EXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->location */ - /* skip val->binding */ - /* skip val->format */ - /* skip val->offset */ -} - -static inline void -vn_replace_VkVertexInputAttributeDescription2EXT_handle(VkVertexInputAttributeDescription2EXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT: - vn_replace_VkVertexInputAttributeDescription2EXT_handle_self((VkVertexInputAttributeDescription2EXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferMemoryBarrier2 chain */ - -static inline void * -vn_decode_VkBufferMemoryBarrier2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalMemoryAcquireUnmodifiedEXT)); - if (pnext) { - pnext->sType = stype; - ((VkExternalMemoryAcquireUnmodifiedEXT *)pnext)->pNext = vn_decode_VkBufferMemoryBarrier2_pnext_temp(dec); - vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_self_temp(dec, (VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBufferMemoryBarrier2_self_temp(struct vn_cs_decoder *dec, VkBufferMemoryBarrier2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags64(dec, &val->srcStageMask); - vn_decode_VkFlags64(dec, &val->srcAccessMask); - vn_decode_VkFlags64(dec, &val->dstStageMask); - vn_decode_VkFlags64(dec, &val->dstAccessMask); - vn_decode_uint32_t(dec, &val->srcQueueFamilyIndex); - vn_decode_uint32_t(dec, &val->dstQueueFamilyIndex); - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_decode_VkBufferMemoryBarrier2_temp(struct vn_cs_decoder *dec, VkBufferMemoryBarrier2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferMemoryBarrier2_pnext_temp(dec); - vn_decode_VkBufferMemoryBarrier2_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferMemoryBarrier2_handle_self(VkBufferMemoryBarrier2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcStageMask */ - /* skip val->srcAccessMask */ - /* skip val->dstStageMask */ - /* skip val->dstAccessMask */ - /* skip val->srcQueueFamilyIndex */ - /* skip val->dstQueueFamilyIndex */ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->offset */ - /* skip val->size */ -} - -static inline void -vn_replace_VkBufferMemoryBarrier2_handle(VkBufferMemoryBarrier2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2: - vn_replace_VkBufferMemoryBarrier2_handle_self((VkBufferMemoryBarrier2 *)pnext); - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle_self((VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageMemoryBarrier2 chain */ - -static inline void * -vn_decode_VkImageMemoryBarrier2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSampleLocationsInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkSampleLocationsInfoEXT *)pnext)->pNext = vn_decode_VkImageMemoryBarrier2_pnext_temp(dec); - vn_decode_VkSampleLocationsInfoEXT_self_temp(dec, (VkSampleLocationsInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalMemoryAcquireUnmodifiedEXT)); - if (pnext) { - pnext->sType = stype; - ((VkExternalMemoryAcquireUnmodifiedEXT *)pnext)->pNext = vn_decode_VkImageMemoryBarrier2_pnext_temp(dec); - vn_decode_VkExternalMemoryAcquireUnmodifiedEXT_self_temp(dec, (VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkImageMemoryBarrier2_self_temp(struct vn_cs_decoder *dec, VkImageMemoryBarrier2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags64(dec, &val->srcStageMask); - vn_decode_VkFlags64(dec, &val->srcAccessMask); - vn_decode_VkFlags64(dec, &val->dstStageMask); - vn_decode_VkFlags64(dec, &val->dstAccessMask); - vn_decode_VkImageLayout(dec, &val->oldLayout); - vn_decode_VkImageLayout(dec, &val->newLayout); - vn_decode_uint32_t(dec, &val->srcQueueFamilyIndex); - vn_decode_uint32_t(dec, &val->dstQueueFamilyIndex); - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_VkImageSubresourceRange_temp(dec, &val->subresourceRange); -} - -static inline void -vn_decode_VkImageMemoryBarrier2_temp(struct vn_cs_decoder *dec, VkImageMemoryBarrier2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageMemoryBarrier2_pnext_temp(dec); - vn_decode_VkImageMemoryBarrier2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageMemoryBarrier2_handle_self(VkImageMemoryBarrier2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcStageMask */ - /* skip val->srcAccessMask */ - /* skip val->dstStageMask */ - /* skip val->dstAccessMask */ - /* skip val->oldLayout */ - /* skip val->newLayout */ - /* skip val->srcQueueFamilyIndex */ - /* skip val->dstQueueFamilyIndex */ - vn_replace_VkImage_handle(&val->image); - vn_replace_VkImageSubresourceRange_handle(&val->subresourceRange); -} - -static inline void -vn_replace_VkImageMemoryBarrier2_handle(VkImageMemoryBarrier2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2: - vn_replace_VkImageMemoryBarrier2_handle_self((VkImageMemoryBarrier2 *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: - vn_replace_VkSampleLocationsInfoEXT_handle_self((VkSampleLocationsInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: - vn_replace_VkExternalMemoryAcquireUnmodifiedEXT_handle_self((VkExternalMemoryAcquireUnmodifiedEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDependencyInfo chain */ - -static inline void * -vn_decode_VkDependencyInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDependencyInfo_self_temp(struct vn_cs_decoder *dec, VkDependencyInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->dependencyFlags); - vn_decode_uint32_t(dec, &val->memoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->memoryBarrierCount); - val->pMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pMemoryBarriers), iter_count); - if (!val->pMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMemoryBarrier2_temp(dec, &((VkMemoryBarrier2 *)val->pMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, val->memoryBarrierCount); - val->pMemoryBarriers = NULL; - } - vn_decode_uint32_t(dec, &val->bufferMemoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bufferMemoryBarrierCount); - val->pBufferMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBufferMemoryBarriers), iter_count); - if (!val->pBufferMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferMemoryBarrier2_temp(dec, &((VkBufferMemoryBarrier2 *)val->pBufferMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, val->bufferMemoryBarrierCount); - val->pBufferMemoryBarriers = NULL; - } - vn_decode_uint32_t(dec, &val->imageMemoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->imageMemoryBarrierCount); - val->pImageMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pImageMemoryBarriers), iter_count); - if (!val->pImageMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageMemoryBarrier2_temp(dec, &((VkImageMemoryBarrier2 *)val->pImageMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, val->imageMemoryBarrierCount); - val->pImageMemoryBarriers = NULL; - } -} - -static inline void -vn_decode_VkDependencyInfo_temp(struct vn_cs_decoder *dec, VkDependencyInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEPENDENCY_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDependencyInfo_pnext_temp(dec); - vn_decode_VkDependencyInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDependencyInfo_handle_self(VkDependencyInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->dependencyFlags */ - /* skip val->memoryBarrierCount */ - if (val->pMemoryBarriers) { - for (uint32_t i = 0; i < val->memoryBarrierCount; i++) - vn_replace_VkMemoryBarrier2_handle(&((VkMemoryBarrier2 *)val->pMemoryBarriers)[i]); - } - /* skip val->bufferMemoryBarrierCount */ - if (val->pBufferMemoryBarriers) { - for (uint32_t i = 0; i < val->bufferMemoryBarrierCount; i++) - vn_replace_VkBufferMemoryBarrier2_handle(&((VkBufferMemoryBarrier2 *)val->pBufferMemoryBarriers)[i]); - } - /* skip val->imageMemoryBarrierCount */ - if (val->pImageMemoryBarriers) { - for (uint32_t i = 0; i < val->imageMemoryBarrierCount; i++) - vn_replace_VkImageMemoryBarrier2_handle(&((VkImageMemoryBarrier2 *)val->pImageMemoryBarriers)[i]); - } -} - -static inline void -vn_replace_VkDependencyInfo_handle(VkDependencyInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEPENDENCY_INFO: - vn_replace_VkDependencyInfo_handle_self((VkDependencyInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderingAttachmentInfo chain */ - -static inline void * -vn_decode_VkRenderingAttachmentInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderingAttachmentInfo_self_temp(struct vn_cs_decoder *dec, VkRenderingAttachmentInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageView_lookup(dec, &val->imageView); - vn_decode_VkImageLayout(dec, &val->imageLayout); - vn_decode_VkResolveModeFlagBits(dec, &val->resolveMode); - vn_decode_VkImageView_lookup(dec, &val->resolveImageView); - vn_decode_VkImageLayout(dec, &val->resolveImageLayout); - vn_decode_VkAttachmentLoadOp(dec, &val->loadOp); - vn_decode_VkAttachmentStoreOp(dec, &val->storeOp); - vn_decode_VkClearValue_temp(dec, &val->clearValue); -} - -static inline void -vn_decode_VkRenderingAttachmentInfo_temp(struct vn_cs_decoder *dec, VkRenderingAttachmentInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderingAttachmentInfo_pnext_temp(dec); - vn_decode_VkRenderingAttachmentInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderingAttachmentInfo_handle_self(VkRenderingAttachmentInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImageView_handle(&val->imageView); - /* skip val->imageLayout */ - /* skip val->resolveMode */ - vn_replace_VkImageView_handle(&val->resolveImageView); - /* skip val->resolveImageLayout */ - /* skip val->loadOp */ - /* skip val->storeOp */ - /* skip val->clearValue */ -} - -static inline void -vn_replace_VkRenderingAttachmentInfo_handle(VkRenderingAttachmentInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO: - vn_replace_VkRenderingAttachmentInfo_handle_self((VkRenderingAttachmentInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderingFragmentShadingRateAttachmentInfoKHR chain */ - -static inline void * -vn_decode_VkRenderingFragmentShadingRateAttachmentInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderingFragmentShadingRateAttachmentInfoKHR_self_temp(struct vn_cs_decoder *dec, VkRenderingFragmentShadingRateAttachmentInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageView_lookup(dec, &val->imageView); - vn_decode_VkImageLayout(dec, &val->imageLayout); - vn_decode_VkExtent2D_temp(dec, &val->shadingRateAttachmentTexelSize); -} - -static inline void -vn_decode_VkRenderingFragmentShadingRateAttachmentInfoKHR_temp(struct vn_cs_decoder *dec, VkRenderingFragmentShadingRateAttachmentInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderingFragmentShadingRateAttachmentInfoKHR_pnext_temp(dec); - vn_decode_VkRenderingFragmentShadingRateAttachmentInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderingFragmentShadingRateAttachmentInfoKHR_handle_self(VkRenderingFragmentShadingRateAttachmentInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImageView_handle(&val->imageView); - /* skip val->imageLayout */ - vn_replace_VkExtent2D_handle(&val->shadingRateAttachmentTexelSize); -} - -static inline void -vn_replace_VkRenderingFragmentShadingRateAttachmentInfoKHR_handle(VkRenderingFragmentShadingRateAttachmentInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: - vn_replace_VkRenderingFragmentShadingRateAttachmentInfoKHR_handle_self((VkRenderingFragmentShadingRateAttachmentInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderingInfo chain */ - -static inline void * -vn_decode_VkRenderingInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceGroupRenderPassBeginInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceGroupRenderPassBeginInfo *)pnext)->pNext = vn_decode_VkRenderingInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupRenderPassBeginInfo_self_temp(dec, (VkDeviceGroupRenderPassBeginInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMultisampledRenderToSingleSampledInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkMultisampledRenderToSingleSampledInfoEXT *)pnext)->pNext = vn_decode_VkRenderingInfo_pnext_temp(dec); - vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_self_temp(dec, (VkMultisampledRenderToSingleSampledInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderingFragmentShadingRateAttachmentInfoKHR)); - if (pnext) { - pnext->sType = stype; - ((VkRenderingFragmentShadingRateAttachmentInfoKHR *)pnext)->pNext = vn_decode_VkRenderingInfo_pnext_temp(dec); - vn_decode_VkRenderingFragmentShadingRateAttachmentInfoKHR_self_temp(dec, (VkRenderingFragmentShadingRateAttachmentInfoKHR *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkRenderingInfo_self_temp(struct vn_cs_decoder *dec, VkRenderingInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkRect2D_temp(dec, &val->renderArea); - vn_decode_uint32_t(dec, &val->layerCount); - vn_decode_uint32_t(dec, &val->viewMask); - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachments), iter_count); - if (!val->pColorAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRenderingAttachmentInfo_temp(dec, &((VkRenderingAttachmentInfo *)val->pColorAttachments)[i]); - } else { - vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachments = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDepthAttachment = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthAttachment)); - if (!val->pDepthAttachment) return; - vn_decode_VkRenderingAttachmentInfo_temp(dec, (VkRenderingAttachmentInfo *)val->pDepthAttachment); - } else { - val->pDepthAttachment = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pStencilAttachment = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pStencilAttachment)); - if (!val->pStencilAttachment) return; - vn_decode_VkRenderingAttachmentInfo_temp(dec, (VkRenderingAttachmentInfo *)val->pStencilAttachment); - } else { - val->pStencilAttachment = NULL; - } -} - -static inline void -vn_decode_VkRenderingInfo_temp(struct vn_cs_decoder *dec, VkRenderingInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDERING_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderingInfo_pnext_temp(dec); - vn_decode_VkRenderingInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderingInfo_handle_self(VkRenderingInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkRect2D_handle(&val->renderArea); - /* skip val->layerCount */ - /* skip val->viewMask */ - /* skip val->colorAttachmentCount */ - if (val->pColorAttachments) { - for (uint32_t i = 0; i < val->colorAttachmentCount; i++) - vn_replace_VkRenderingAttachmentInfo_handle(&((VkRenderingAttachmentInfo *)val->pColorAttachments)[i]); - } - if (val->pDepthAttachment) - vn_replace_VkRenderingAttachmentInfo_handle((VkRenderingAttachmentInfo *)val->pDepthAttachment); - if (val->pStencilAttachment) - vn_replace_VkRenderingAttachmentInfo_handle((VkRenderingAttachmentInfo *)val->pStencilAttachment); -} - -static inline void -vn_replace_VkRenderingInfo_handle(VkRenderingInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDERING_INFO: - vn_replace_VkRenderingInfo_handle_self((VkRenderingInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: - vn_replace_VkDeviceGroupRenderPassBeginInfo_handle_self((VkDeviceGroupRenderPassBeginInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: - vn_replace_VkMultisampledRenderToSingleSampledInfoEXT_handle_self((VkMultisampledRenderToSingleSampledInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: - vn_replace_VkRenderingFragmentShadingRateAttachmentInfoKHR_handle_self((VkRenderingFragmentShadingRateAttachmentInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDepthBiasInfoEXT chain */ - -static inline void * -vn_decode_VkDepthBiasInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDepthBiasRepresentationInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkDepthBiasRepresentationInfoEXT *)pnext)->pNext = vn_decode_VkDepthBiasInfoEXT_pnext_temp(dec); - vn_decode_VkDepthBiasRepresentationInfoEXT_self_temp(dec, (VkDepthBiasRepresentationInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDepthBiasInfoEXT_self_temp(struct vn_cs_decoder *dec, VkDepthBiasInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_float(dec, &val->depthBiasConstantFactor); - vn_decode_float(dec, &val->depthBiasClamp); - vn_decode_float(dec, &val->depthBiasSlopeFactor); -} - -static inline void -vn_decode_VkDepthBiasInfoEXT_temp(struct vn_cs_decoder *dec, VkDepthBiasInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDepthBiasInfoEXT_pnext_temp(dec); - vn_decode_VkDepthBiasInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkDepthBiasInfoEXT_handle_self(VkDepthBiasInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthBiasConstantFactor */ - /* skip val->depthBiasClamp */ - /* skip val->depthBiasSlopeFactor */ -} - -static inline void -vn_replace_VkDepthBiasInfoEXT_handle(VkDepthBiasInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT: - vn_replace_VkDepthBiasInfoEXT_handle_self((VkDepthBiasInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: - vn_replace_VkDepthBiasRepresentationInfoEXT_handle_self((VkDepthBiasRepresentationInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindDescriptorSetsInfo chain */ - -static inline void * -vn_decode_VkBindDescriptorSetsInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineLayoutCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineLayoutCreateInfo *)pnext)->pNext = vn_decode_VkBindDescriptorSetsInfo_pnext_temp(dec); - vn_decode_VkPipelineLayoutCreateInfo_self_temp(dec, (VkPipelineLayoutCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBindDescriptorSetsInfo_self_temp(struct vn_cs_decoder *dec, VkBindDescriptorSetsInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->stageFlags); - vn_decode_VkPipelineLayout_lookup(dec, &val->layout); - vn_decode_uint32_t(dec, &val->firstSet); - vn_decode_uint32_t(dec, &val->descriptorSetCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorSetCount); - val->pDescriptorSets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDescriptorSets), iter_count); - if (!val->pDescriptorSets) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSet_lookup(dec, &((VkDescriptorSet *)val->pDescriptorSets)[i]); - } else { - vn_decode_array_size(dec, val->descriptorSetCount); - val->pDescriptorSets = NULL; - } - vn_decode_uint32_t(dec, &val->dynamicOffsetCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->dynamicOffsetCount); - val->pDynamicOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDynamicOffsets), array_size); - if (!val->pDynamicOffsets) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pDynamicOffsets, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pDynamicOffsets = NULL; - } -} - -static inline void -vn_decode_VkBindDescriptorSetsInfo_temp(struct vn_cs_decoder *dec, VkBindDescriptorSetsInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindDescriptorSetsInfo_pnext_temp(dec); - vn_decode_VkBindDescriptorSetsInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindDescriptorSetsInfo_handle_self(VkBindDescriptorSetsInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->stageFlags */ - vn_replace_VkPipelineLayout_handle(&val->layout); - /* skip val->firstSet */ - /* skip val->descriptorSetCount */ - if (val->pDescriptorSets) { - for (uint32_t i = 0; i < val->descriptorSetCount; i++) - vn_replace_VkDescriptorSet_handle(&((VkDescriptorSet *)val->pDescriptorSets)[i]); - } - /* skip val->dynamicOffsetCount */ - /* skip val->pDynamicOffsets */ -} - -static inline void -vn_replace_VkBindDescriptorSetsInfo_handle(VkBindDescriptorSetsInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO: - vn_replace_VkBindDescriptorSetsInfo_handle_self((VkBindDescriptorSetsInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - vn_replace_VkPipelineLayoutCreateInfo_handle_self((VkPipelineLayoutCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPushConstantsInfo chain */ - -static inline void * -vn_decode_VkPushConstantsInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineLayoutCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineLayoutCreateInfo *)pnext)->pNext = vn_decode_VkPushConstantsInfo_pnext_temp(dec); - vn_decode_VkPipelineLayoutCreateInfo_self_temp(dec, (VkPipelineLayoutCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPushConstantsInfo_self_temp(struct vn_cs_decoder *dec, VkPushConstantsInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkPipelineLayout_lookup(dec, &val->layout); - vn_decode_VkFlags(dec, &val->stageFlags); - vn_decode_uint32_t(dec, &val->offset); - vn_decode_uint32_t(dec, &val->size); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->size); - val->pValues = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!val->pValues) return; - vn_decode_blob_array(dec, (void *)val->pValues, array_size); - } else { - vn_decode_array_size(dec, val->size); - val->pValues = NULL; - } -} - -static inline void -vn_decode_VkPushConstantsInfo_temp(struct vn_cs_decoder *dec, VkPushConstantsInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPushConstantsInfo_pnext_temp(dec); - vn_decode_VkPushConstantsInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPushConstantsInfo_handle_self(VkPushConstantsInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkPipelineLayout_handle(&val->layout); - /* skip val->stageFlags */ - /* skip val->offset */ - /* skip val->size */ - /* skip val->pValues */ -} - -static inline void -vn_replace_VkPushConstantsInfo_handle(VkPushConstantsInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO: - vn_replace_VkPushConstantsInfo_handle_self((VkPushConstantsInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - vn_replace_VkPipelineLayoutCreateInfo_handle_self((VkPipelineLayoutCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPushDescriptorSetInfo chain */ - -static inline void * -vn_decode_VkPushDescriptorSetInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineLayoutCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineLayoutCreateInfo *)pnext)->pNext = vn_decode_VkPushDescriptorSetInfo_pnext_temp(dec); - vn_decode_VkPipelineLayoutCreateInfo_self_temp(dec, (VkPipelineLayoutCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPushDescriptorSetInfo_self_temp(struct vn_cs_decoder *dec, VkPushDescriptorSetInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->stageFlags); - vn_decode_VkPipelineLayout_lookup(dec, &val->layout); - vn_decode_uint32_t(dec, &val->set); - vn_decode_uint32_t(dec, &val->descriptorWriteCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorWriteCount); - val->pDescriptorWrites = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDescriptorWrites), iter_count); - if (!val->pDescriptorWrites) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkWriteDescriptorSet_temp(dec, &((VkWriteDescriptorSet *)val->pDescriptorWrites)[i]); - } else { - vn_decode_array_size(dec, val->descriptorWriteCount); - val->pDescriptorWrites = NULL; - } -} - -static inline void -vn_decode_VkPushDescriptorSetInfo_temp(struct vn_cs_decoder *dec, VkPushDescriptorSetInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPushDescriptorSetInfo_pnext_temp(dec); - vn_decode_VkPushDescriptorSetInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPushDescriptorSetInfo_handle_self(VkPushDescriptorSetInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->stageFlags */ - vn_replace_VkPipelineLayout_handle(&val->layout); - /* skip val->set */ - /* skip val->descriptorWriteCount */ - if (val->pDescriptorWrites) { - for (uint32_t i = 0; i < val->descriptorWriteCount; i++) - vn_replace_VkWriteDescriptorSet_handle(&((VkWriteDescriptorSet *)val->pDescriptorWrites)[i]); - } -} - -static inline void -vn_replace_VkPushDescriptorSetInfo_handle(VkPushDescriptorSetInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO: - vn_replace_VkPushDescriptorSetInfo_handle_self((VkPushDescriptorSetInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - vn_replace_VkPipelineLayoutCreateInfo_handle_self((VkPipelineLayoutCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPushDataInfoEXT chain */ - -static inline void * -vn_decode_VkPushDataInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPushDataInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPushDataInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->offset); - vn_decode_VkHostAddressRangeConstEXT_temp(dec, &val->data); -} - -static inline void -vn_decode_VkPushDataInfoEXT_temp(struct vn_cs_decoder *dec, VkPushDataInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPushDataInfoEXT_pnext_temp(dec); - vn_decode_VkPushDataInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPushDataInfoEXT_handle_self(VkPushDataInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->offset */ - vn_replace_VkHostAddressRangeConstEXT_handle(&val->data); -} - -static inline void -vn_replace_VkPushDataInfoEXT_handle(VkPushDataInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT: - vn_replace_VkPushDataInfoEXT_handle_self((VkPushDataInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkAllocateCommandBuffers_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkAllocateCommandBuffers *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pAllocateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pAllocateInfo)); - if (!args->pAllocateInfo) return; - vn_decode_VkCommandBufferAllocateInfo_temp(dec, (VkCommandBufferAllocateInfo *)args->pAllocateInfo); - } else { - args->pAllocateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pAllocateInfo ? args->pAllocateInfo->commandBufferCount : 0)); - args->pCommandBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCommandBuffers), iter_count); - if (!args->pCommandBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandBuffer_temp(dec, &args->pCommandBuffers[i]); - } else { - vn_decode_array_size(dec, (args->pAllocateInfo ? args->pAllocateInfo->commandBufferCount : 0)); - args->pCommandBuffers = NULL; - } -} - -static inline void vn_replace_vkAllocateCommandBuffers_args_handle(struct vn_command_vkAllocateCommandBuffers *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pAllocateInfo) - vn_replace_VkCommandBufferAllocateInfo_handle((VkCommandBufferAllocateInfo *)args->pAllocateInfo); - /* skip args->pCommandBuffers */ -} - -static inline void vn_encode_vkAllocateCommandBuffers_reply(struct vn_cs_encoder *enc, const struct vn_command_vkAllocateCommandBuffers *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pAllocateInfo */ - if (args->pCommandBuffers) { - vn_encode_array_size(enc, (args->pAllocateInfo ? args->pAllocateInfo->commandBufferCount : 0)); - for (uint32_t i = 0; i < (args->pAllocateInfo ? args->pAllocateInfo->commandBufferCount : 0); i++) - vn_encode_VkCommandBuffer(enc, &args->pCommandBuffers[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkFreeCommandBuffers_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkFreeCommandBuffers *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkCommandPool_lookup(dec, &args->commandPool); - vn_decode_uint32_t(dec, &args->commandBufferCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->commandBufferCount); - args->pCommandBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCommandBuffers), iter_count); - if (!args->pCommandBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandBuffer_lookup(dec, &((VkCommandBuffer *)args->pCommandBuffers)[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pCommandBuffers = NULL; - } -} - -static inline void vn_replace_vkFreeCommandBuffers_args_handle(struct vn_command_vkFreeCommandBuffers *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkCommandPool_handle(&args->commandPool); - /* skip args->commandBufferCount */ - if (args->pCommandBuffers) { - for (uint32_t i = 0; i < args->commandBufferCount; i++) - vn_replace_VkCommandBuffer_handle(&((VkCommandBuffer *)args->pCommandBuffers)[i]); - } -} - -static inline void vn_encode_vkFreeCommandBuffers_reply(struct vn_cs_encoder *enc, const struct vn_command_vkFreeCommandBuffers *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT}); - - /* skip args->device */ - /* skip args->commandPool */ - /* skip args->commandBufferCount */ - /* skip args->pCommandBuffers */ -} - -static inline void vn_decode_vkBeginCommandBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkBeginCommandBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pBeginInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBeginInfo)); - if (!args->pBeginInfo) return; - vn_decode_VkCommandBufferBeginInfo_temp(dec, (VkCommandBufferBeginInfo *)args->pBeginInfo); - } else { - args->pBeginInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkBeginCommandBuffer_args_handle(struct vn_command_vkBeginCommandBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pBeginInfo) - vn_replace_VkCommandBufferBeginInfo_handle((VkCommandBufferBeginInfo *)args->pBeginInfo); -} - -static inline void vn_encode_vkBeginCommandBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkBeginCommandBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->commandBuffer */ - /* skip args->pBeginInfo */ -} - -static inline void vn_decode_vkEndCommandBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEndCommandBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); -} - -static inline void vn_replace_vkEndCommandBuffer_args_handle(struct vn_command_vkEndCommandBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); -} - -static inline void vn_encode_vkEndCommandBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEndCommandBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEndCommandBuffer_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->commandBuffer */ -} - -static inline void vn_decode_vkResetCommandBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetCommandBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkResetCommandBuffer_args_handle(struct vn_command_vkResetCommandBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->flags */ -} - -static inline void vn_encode_vkResetCommandBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetCommandBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetCommandBuffer_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->commandBuffer */ - /* skip args->flags */ -} - -static inline void vn_decode_vkCmdBindPipeline_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindPipeline *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPipelineBindPoint(dec, &args->pipelineBindPoint); - vn_decode_VkPipeline_lookup(dec, &args->pipeline); -} - -static inline void vn_replace_vkCmdBindPipeline_args_handle(struct vn_command_vkCmdBindPipeline *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->pipelineBindPoint */ - vn_replace_VkPipeline_handle(&args->pipeline); -} - -static inline void vn_encode_vkCmdBindPipeline_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindPipeline *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindPipeline_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pipelineBindPoint */ - /* skip args->pipeline */ -} - -static inline void vn_decode_vkCmdSetAttachmentFeedbackLoopEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetAttachmentFeedbackLoopEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->aspectMask); -} - -static inline void vn_replace_vkCmdSetAttachmentFeedbackLoopEnableEXT_args_handle(struct vn_command_vkCmdSetAttachmentFeedbackLoopEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->aspectMask */ -} - -static inline void vn_encode_vkCmdSetAttachmentFeedbackLoopEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetAttachmentFeedbackLoopEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetAttachmentFeedbackLoopEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->aspectMask */ -} - -static inline void vn_decode_vkCmdSetViewport_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetViewport *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstViewport); - vn_decode_uint32_t(dec, &args->viewportCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->viewportCount); - args->pViewports = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pViewports), iter_count); - if (!args->pViewports) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkViewport_temp(dec, &((VkViewport *)args->pViewports)[i]); - } else { - vn_decode_array_size(dec, args->viewportCount); - args->pViewports = NULL; - } -} - -static inline void vn_replace_vkCmdSetViewport_args_handle(struct vn_command_vkCmdSetViewport *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstViewport */ - /* skip args->viewportCount */ - if (args->pViewports) { - for (uint32_t i = 0; i < args->viewportCount; i++) - vn_replace_VkViewport_handle(&((VkViewport *)args->pViewports)[i]); - } -} - -static inline void vn_encode_vkCmdSetViewport_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetViewport *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetViewport_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstViewport */ - /* skip args->viewportCount */ - /* skip args->pViewports */ -} - -static inline void vn_decode_vkCmdSetScissor_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetScissor *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstScissor); - vn_decode_uint32_t(dec, &args->scissorCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->scissorCount); - args->pScissors = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pScissors), iter_count); - if (!args->pScissors) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRect2D_temp(dec, &((VkRect2D *)args->pScissors)[i]); - } else { - vn_decode_array_size(dec, args->scissorCount); - args->pScissors = NULL; - } -} - -static inline void vn_replace_vkCmdSetScissor_args_handle(struct vn_command_vkCmdSetScissor *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstScissor */ - /* skip args->scissorCount */ - if (args->pScissors) { - for (uint32_t i = 0; i < args->scissorCount; i++) - vn_replace_VkRect2D_handle(&((VkRect2D *)args->pScissors)[i]); - } -} - -static inline void vn_encode_vkCmdSetScissor_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetScissor *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetScissor_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstScissor */ - /* skip args->scissorCount */ - /* skip args->pScissors */ -} - -static inline void vn_decode_vkCmdSetLineWidth_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetLineWidth *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_float(dec, &args->lineWidth); -} - -static inline void vn_replace_vkCmdSetLineWidth_args_handle(struct vn_command_vkCmdSetLineWidth *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->lineWidth */ -} - -static inline void vn_encode_vkCmdSetLineWidth_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetLineWidth *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT}); - - /* skip args->commandBuffer */ - /* skip args->lineWidth */ -} - -static inline void vn_decode_vkCmdSetDepthBias_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthBias *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_float(dec, &args->depthBiasConstantFactor); - vn_decode_float(dec, &args->depthBiasClamp); - vn_decode_float(dec, &args->depthBiasSlopeFactor); -} - -static inline void vn_replace_vkCmdSetDepthBias_args_handle(struct vn_command_vkCmdSetDepthBias *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthBiasConstantFactor */ - /* skip args->depthBiasClamp */ - /* skip args->depthBiasSlopeFactor */ -} - -static inline void vn_encode_vkCmdSetDepthBias_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthBias *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthBiasConstantFactor */ - /* skip args->depthBiasClamp */ - /* skip args->depthBiasSlopeFactor */ -} - -static inline void vn_decode_vkCmdSetBlendConstants_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetBlendConstants *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - { - const size_t array_size = vn_decode_array_size(dec, 4); - vn_decode_float_array(dec, (float *)args->blendConstants, array_size); - } -} - -static inline void vn_replace_vkCmdSetBlendConstants_args_handle(struct vn_command_vkCmdSetBlendConstants *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->blendConstants */ -} - -static inline void vn_encode_vkCmdSetBlendConstants_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetBlendConstants *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT}); - - /* skip args->commandBuffer */ - /* skip args->blendConstants */ -} - -static inline void vn_decode_vkCmdSetDepthBounds_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthBounds *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_float(dec, &args->minDepthBounds); - vn_decode_float(dec, &args->maxDepthBounds); -} - -static inline void vn_replace_vkCmdSetDepthBounds_args_handle(struct vn_command_vkCmdSetDepthBounds *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->minDepthBounds */ - /* skip args->maxDepthBounds */ -} - -static inline void vn_encode_vkCmdSetDepthBounds_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthBounds *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT}); - - /* skip args->commandBuffer */ - /* skip args->minDepthBounds */ - /* skip args->maxDepthBounds */ -} - -static inline void vn_decode_vkCmdSetStencilCompareMask_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetStencilCompareMask *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->faceMask); - vn_decode_uint32_t(dec, &args->compareMask); -} - -static inline void vn_replace_vkCmdSetStencilCompareMask_args_handle(struct vn_command_vkCmdSetStencilCompareMask *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->faceMask */ - /* skip args->compareMask */ -} - -static inline void vn_encode_vkCmdSetStencilCompareMask_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetStencilCompareMask *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT}); - - /* skip args->commandBuffer */ - /* skip args->faceMask */ - /* skip args->compareMask */ -} - -static inline void vn_decode_vkCmdSetStencilWriteMask_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetStencilWriteMask *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->faceMask); - vn_decode_uint32_t(dec, &args->writeMask); -} - -static inline void vn_replace_vkCmdSetStencilWriteMask_args_handle(struct vn_command_vkCmdSetStencilWriteMask *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->faceMask */ - /* skip args->writeMask */ -} - -static inline void vn_encode_vkCmdSetStencilWriteMask_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetStencilWriteMask *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT}); - - /* skip args->commandBuffer */ - /* skip args->faceMask */ - /* skip args->writeMask */ -} - -static inline void vn_decode_vkCmdSetStencilReference_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetStencilReference *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->faceMask); - vn_decode_uint32_t(dec, &args->reference); -} - -static inline void vn_replace_vkCmdSetStencilReference_args_handle(struct vn_command_vkCmdSetStencilReference *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->faceMask */ - /* skip args->reference */ -} - -static inline void vn_encode_vkCmdSetStencilReference_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetStencilReference *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT}); - - /* skip args->commandBuffer */ - /* skip args->faceMask */ - /* skip args->reference */ -} - -static inline void vn_decode_vkCmdBindDescriptorSets_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindDescriptorSets *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPipelineBindPoint(dec, &args->pipelineBindPoint); - vn_decode_VkPipelineLayout_lookup(dec, &args->layout); - vn_decode_uint32_t(dec, &args->firstSet); - vn_decode_uint32_t(dec, &args->descriptorSetCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->descriptorSetCount); - args->pDescriptorSets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDescriptorSets), iter_count); - if (!args->pDescriptorSets) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSet_lookup(dec, &((VkDescriptorSet *)args->pDescriptorSets)[i]); - } else { - vn_decode_array_size(dec, args->descriptorSetCount); - args->pDescriptorSets = NULL; - } - vn_decode_uint32_t(dec, &args->dynamicOffsetCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->dynamicOffsetCount); - args->pDynamicOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDynamicOffsets), array_size); - if (!args->pDynamicOffsets) return; - vn_decode_uint32_t_array(dec, (uint32_t *)args->pDynamicOffsets, array_size); - } else { - vn_decode_array_size(dec, args->dynamicOffsetCount); - args->pDynamicOffsets = NULL; - } -} - -static inline void vn_replace_vkCmdBindDescriptorSets_args_handle(struct vn_command_vkCmdBindDescriptorSets *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->pipelineBindPoint */ - vn_replace_VkPipelineLayout_handle(&args->layout); - /* skip args->firstSet */ - /* skip args->descriptorSetCount */ - if (args->pDescriptorSets) { - for (uint32_t i = 0; i < args->descriptorSetCount; i++) - vn_replace_VkDescriptorSet_handle(&((VkDescriptorSet *)args->pDescriptorSets)[i]); - } - /* skip args->dynamicOffsetCount */ - /* skip args->pDynamicOffsets */ -} - -static inline void vn_encode_vkCmdBindDescriptorSets_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindDescriptorSets *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pipelineBindPoint */ - /* skip args->layout */ - /* skip args->firstSet */ - /* skip args->descriptorSetCount */ - /* skip args->pDescriptorSets */ - /* skip args->dynamicOffsetCount */ - /* skip args->pDynamicOffsets */ -} - -static inline void vn_decode_vkCmdBindIndexBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindIndexBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_VkIndexType(dec, &args->indexType); -} - -static inline void vn_replace_vkCmdBindIndexBuffer_args_handle(struct vn_command_vkCmdBindIndexBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - /* skip args->indexType */ -} - -static inline void vn_encode_vkCmdBindIndexBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindIndexBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->indexType */ -} - -static inline void vn_decode_vkCmdBindVertexBuffers_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindVertexBuffers *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstBinding); - vn_decode_uint32_t(dec, &args->bindingCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bindingCount); - args->pBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBuffers), iter_count); - if (!args->pBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBuffer_lookup(dec, &((VkBuffer *)args->pBuffers)[i]); - } else { - vn_decode_array_size(dec, args->bindingCount); - args->pBuffers = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->bindingCount); - args->pOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pOffsets), array_size); - if (!args->pOffsets) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pOffsets, array_size); - } else { - vn_decode_array_size(dec, args->bindingCount); - args->pOffsets = NULL; - } -} - -static inline void vn_replace_vkCmdBindVertexBuffers_args_handle(struct vn_command_vkCmdBindVertexBuffers *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstBinding */ - /* skip args->bindingCount */ - if (args->pBuffers) { - for (uint32_t i = 0; i < args->bindingCount; i++) - vn_replace_VkBuffer_handle(&((VkBuffer *)args->pBuffers)[i]); - } - /* skip args->pOffsets */ -} - -static inline void vn_encode_vkCmdBindVertexBuffers_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindVertexBuffers *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstBinding */ - /* skip args->bindingCount */ - /* skip args->pBuffers */ - /* skip args->pOffsets */ -} - -static inline void vn_decode_vkCmdDraw_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDraw *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->vertexCount); - vn_decode_uint32_t(dec, &args->instanceCount); - vn_decode_uint32_t(dec, &args->firstVertex); - vn_decode_uint32_t(dec, &args->firstInstance); -} - -static inline void vn_replace_vkCmdDraw_args_handle(struct vn_command_vkCmdDraw *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->vertexCount */ - /* skip args->instanceCount */ - /* skip args->firstVertex */ - /* skip args->firstInstance */ -} - -static inline void vn_encode_vkCmdDraw_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDraw *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDraw_EXT}); - - /* skip args->commandBuffer */ - /* skip args->vertexCount */ - /* skip args->instanceCount */ - /* skip args->firstVertex */ - /* skip args->firstInstance */ -} - -static inline void vn_decode_vkCmdDrawIndexed_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawIndexed *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->indexCount); - vn_decode_uint32_t(dec, &args->instanceCount); - vn_decode_uint32_t(dec, &args->firstIndex); - vn_decode_int32_t(dec, &args->vertexOffset); - vn_decode_uint32_t(dec, &args->firstInstance); -} - -static inline void vn_replace_vkCmdDrawIndexed_args_handle(struct vn_command_vkCmdDrawIndexed *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->indexCount */ - /* skip args->instanceCount */ - /* skip args->firstIndex */ - /* skip args->vertexOffset */ - /* skip args->firstInstance */ -} - -static inline void vn_encode_vkCmdDrawIndexed_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawIndexed *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT}); - - /* skip args->commandBuffer */ - /* skip args->indexCount */ - /* skip args->instanceCount */ - /* skip args->firstIndex */ - /* skip args->vertexOffset */ - /* skip args->firstInstance */ -} - -static inline void vn_decode_vkCmdDrawMultiEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawMultiEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->drawCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->drawCount); - args->pVertexInfo = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pVertexInfo), iter_count); - if (!args->pVertexInfo) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMultiDrawInfoEXT_temp(dec, &((VkMultiDrawInfoEXT *)args->pVertexInfo)[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pVertexInfo = NULL; - } - vn_decode_uint32_t(dec, &args->instanceCount); - vn_decode_uint32_t(dec, &args->firstInstance); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawMultiEXT_args_handle(struct vn_command_vkCmdDrawMultiEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->drawCount */ - if (args->pVertexInfo) { - for (uint32_t i = 0; i < args->drawCount; i++) - vn_replace_VkMultiDrawInfoEXT_handle(&((VkMultiDrawInfoEXT *)args->pVertexInfo)[i]); - } - /* skip args->instanceCount */ - /* skip args->firstInstance */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawMultiEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawMultiEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawMultiEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->drawCount */ - /* skip args->pVertexInfo */ - /* skip args->instanceCount */ - /* skip args->firstInstance */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdDrawMultiIndexedEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawMultiIndexedEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->drawCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->drawCount); - args->pIndexInfo = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pIndexInfo), iter_count); - if (!args->pIndexInfo) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMultiDrawIndexedInfoEXT_temp(dec, &((VkMultiDrawIndexedInfoEXT *)args->pIndexInfo)[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pIndexInfo = NULL; - } - vn_decode_uint32_t(dec, &args->instanceCount); - vn_decode_uint32_t(dec, &args->firstInstance); - vn_decode_uint32_t(dec, &args->stride); - if (vn_decode_simple_pointer(dec)) { - args->pVertexOffset = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pVertexOffset)); - if (!args->pVertexOffset) return; - vn_decode_int32_t(dec, (int32_t *)args->pVertexOffset); - } else { - args->pVertexOffset = NULL; - } -} - -static inline void vn_replace_vkCmdDrawMultiIndexedEXT_args_handle(struct vn_command_vkCmdDrawMultiIndexedEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->drawCount */ - if (args->pIndexInfo) { - for (uint32_t i = 0; i < args->drawCount; i++) - vn_replace_VkMultiDrawIndexedInfoEXT_handle(&((VkMultiDrawIndexedInfoEXT *)args->pIndexInfo)[i]); - } - /* skip args->instanceCount */ - /* skip args->firstInstance */ - /* skip args->stride */ - /* skip args->pVertexOffset */ -} - -static inline void vn_encode_vkCmdDrawMultiIndexedEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawMultiIndexedEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawMultiIndexedEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->drawCount */ - /* skip args->pIndexInfo */ - /* skip args->instanceCount */ - /* skip args->firstInstance */ - /* skip args->stride */ - /* skip args->pVertexOffset */ -} - -static inline void vn_decode_vkCmdDrawIndirect_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawIndirect *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_uint32_t(dec, &args->drawCount); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawIndirect_args_handle(struct vn_command_vkCmdDrawIndirect *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - /* skip args->drawCount */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawIndirect_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawIndirect *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->drawCount */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdDrawIndexedIndirect_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawIndexedIndirect *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_uint32_t(dec, &args->drawCount); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawIndexedIndirect_args_handle(struct vn_command_vkCmdDrawIndexedIndirect *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - /* skip args->drawCount */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawIndexedIndirect_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawIndexedIndirect *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->drawCount */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdDispatch_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDispatch *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->groupCountX); - vn_decode_uint32_t(dec, &args->groupCountY); - vn_decode_uint32_t(dec, &args->groupCountZ); -} - -static inline void vn_replace_vkCmdDispatch_args_handle(struct vn_command_vkCmdDispatch *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->groupCountX */ - /* skip args->groupCountY */ - /* skip args->groupCountZ */ -} - -static inline void vn_encode_vkCmdDispatch_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDispatch *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDispatch_EXT}); - - /* skip args->commandBuffer */ - /* skip args->groupCountX */ - /* skip args->groupCountY */ - /* skip args->groupCountZ */ -} - -static inline void vn_decode_vkCmdDispatchIndirect_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDispatchIndirect *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); -} - -static inline void vn_replace_vkCmdDispatchIndirect_args_handle(struct vn_command_vkCmdDispatchIndirect *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ -} - -static inline void vn_encode_vkCmdDispatchIndirect_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDispatchIndirect *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ -} - -static inline void vn_decode_vkCmdCopyBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->srcBuffer); - vn_decode_VkBuffer_lookup(dec, &args->dstBuffer); - vn_decode_uint32_t(dec, &args->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->regionCount); - args->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRegions), iter_count); - if (!args->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferCopy_temp(dec, &((VkBufferCopy *)args->pRegions)[i]); - } else { - vn_decode_array_size(dec, args->regionCount); - args->pRegions = NULL; - } -} - -static inline void vn_replace_vkCmdCopyBuffer_args_handle(struct vn_command_vkCmdCopyBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->srcBuffer); - vn_replace_VkBuffer_handle(&args->dstBuffer); - /* skip args->regionCount */ - if (args->pRegions) { - for (uint32_t i = 0; i < args->regionCount; i++) - vn_replace_VkBufferCopy_handle(&((VkBufferCopy *)args->pRegions)[i]); - } -} - -static inline void vn_encode_vkCmdCopyBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcBuffer */ - /* skip args->dstBuffer */ - /* skip args->regionCount */ - /* skip args->pRegions */ -} - -static inline void vn_decode_vkCmdCopyImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyImage *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkImage_lookup(dec, &args->srcImage); - vn_decode_VkImageLayout(dec, &args->srcImageLayout); - vn_decode_VkImage_lookup(dec, &args->dstImage); - vn_decode_VkImageLayout(dec, &args->dstImageLayout); - vn_decode_uint32_t(dec, &args->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->regionCount); - args->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRegions), iter_count); - if (!args->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageCopy_temp(dec, &((VkImageCopy *)args->pRegions)[i]); - } else { - vn_decode_array_size(dec, args->regionCount); - args->pRegions = NULL; - } -} - -static inline void vn_replace_vkCmdCopyImage_args_handle(struct vn_command_vkCmdCopyImage *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkImage_handle(&args->srcImage); - /* skip args->srcImageLayout */ - vn_replace_VkImage_handle(&args->dstImage); - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - if (args->pRegions) { - for (uint32_t i = 0; i < args->regionCount; i++) - vn_replace_VkImageCopy_handle(&((VkImageCopy *)args->pRegions)[i]); - } -} - -static inline void vn_encode_vkCmdCopyImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyImage_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcImage */ - /* skip args->srcImageLayout */ - /* skip args->dstImage */ - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - /* skip args->pRegions */ -} - -static inline void vn_decode_vkCmdBlitImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBlitImage *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkImage_lookup(dec, &args->srcImage); - vn_decode_VkImageLayout(dec, &args->srcImageLayout); - vn_decode_VkImage_lookup(dec, &args->dstImage); - vn_decode_VkImageLayout(dec, &args->dstImageLayout); - vn_decode_uint32_t(dec, &args->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->regionCount); - args->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRegions), iter_count); - if (!args->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageBlit_temp(dec, &((VkImageBlit *)args->pRegions)[i]); - } else { - vn_decode_array_size(dec, args->regionCount); - args->pRegions = NULL; - } - vn_decode_VkFilter(dec, &args->filter); -} - -static inline void vn_replace_vkCmdBlitImage_args_handle(struct vn_command_vkCmdBlitImage *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkImage_handle(&args->srcImage); - /* skip args->srcImageLayout */ - vn_replace_VkImage_handle(&args->dstImage); - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - if (args->pRegions) { - for (uint32_t i = 0; i < args->regionCount; i++) - vn_replace_VkImageBlit_handle(&((VkImageBlit *)args->pRegions)[i]); - } - /* skip args->filter */ -} - -static inline void vn_encode_vkCmdBlitImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBlitImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBlitImage_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcImage */ - /* skip args->srcImageLayout */ - /* skip args->dstImage */ - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - /* skip args->pRegions */ - /* skip args->filter */ -} - -static inline void vn_decode_vkCmdCopyBufferToImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyBufferToImage *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->srcBuffer); - vn_decode_VkImage_lookup(dec, &args->dstImage); - vn_decode_VkImageLayout(dec, &args->dstImageLayout); - vn_decode_uint32_t(dec, &args->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->regionCount); - args->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRegions), iter_count); - if (!args->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferImageCopy_temp(dec, &((VkBufferImageCopy *)args->pRegions)[i]); - } else { - vn_decode_array_size(dec, args->regionCount); - args->pRegions = NULL; - } -} - -static inline void vn_replace_vkCmdCopyBufferToImage_args_handle(struct vn_command_vkCmdCopyBufferToImage *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->srcBuffer); - vn_replace_VkImage_handle(&args->dstImage); - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - if (args->pRegions) { - for (uint32_t i = 0; i < args->regionCount; i++) - vn_replace_VkBufferImageCopy_handle(&((VkBufferImageCopy *)args->pRegions)[i]); - } -} - -static inline void vn_encode_vkCmdCopyBufferToImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyBufferToImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcBuffer */ - /* skip args->dstImage */ - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - /* skip args->pRegions */ -} - -static inline void vn_decode_vkCmdCopyImageToBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyImageToBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkImage_lookup(dec, &args->srcImage); - vn_decode_VkImageLayout(dec, &args->srcImageLayout); - vn_decode_VkBuffer_lookup(dec, &args->dstBuffer); - vn_decode_uint32_t(dec, &args->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->regionCount); - args->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRegions), iter_count); - if (!args->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferImageCopy_temp(dec, &((VkBufferImageCopy *)args->pRegions)[i]); - } else { - vn_decode_array_size(dec, args->regionCount); - args->pRegions = NULL; - } -} - -static inline void vn_replace_vkCmdCopyImageToBuffer_args_handle(struct vn_command_vkCmdCopyImageToBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkImage_handle(&args->srcImage); - /* skip args->srcImageLayout */ - vn_replace_VkBuffer_handle(&args->dstBuffer); - /* skip args->regionCount */ - if (args->pRegions) { - for (uint32_t i = 0; i < args->regionCount; i++) - vn_replace_VkBufferImageCopy_handle(&((VkBufferImageCopy *)args->pRegions)[i]); - } -} - -static inline void vn_encode_vkCmdCopyImageToBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyImageToBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcImage */ - /* skip args->srcImageLayout */ - /* skip args->dstBuffer */ - /* skip args->regionCount */ - /* skip args->pRegions */ -} - -static inline void vn_decode_vkCmdUpdateBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdUpdateBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->dstBuffer); - vn_decode_VkDeviceSize(dec, &args->dstOffset); - vn_decode_VkDeviceSize(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!args->pData) return; - vn_decode_blob_array(dec, (void *)args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } -} - -static inline void vn_replace_vkCmdUpdateBuffer_args_handle(struct vn_command_vkCmdUpdateBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->dstBuffer); - /* skip args->dstOffset */ - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkCmdUpdateBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdUpdateBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT}); - - /* skip args->commandBuffer */ - /* skip args->dstBuffer */ - /* skip args->dstOffset */ - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_decode_vkCmdFillBuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdFillBuffer *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->dstBuffer); - vn_decode_VkDeviceSize(dec, &args->dstOffset); - vn_decode_VkDeviceSize(dec, &args->size); - vn_decode_uint32_t(dec, &args->data); -} - -static inline void vn_replace_vkCmdFillBuffer_args_handle(struct vn_command_vkCmdFillBuffer *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->dstBuffer); - /* skip args->dstOffset */ - /* skip args->size */ - /* skip args->data */ -} - -static inline void vn_encode_vkCmdFillBuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdFillBuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdFillBuffer_EXT}); - - /* skip args->commandBuffer */ - /* skip args->dstBuffer */ - /* skip args->dstOffset */ - /* skip args->size */ - /* skip args->data */ -} - -static inline void vn_decode_vkCmdClearColorImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdClearColorImage *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkImage_lookup(dec, &args->image); - vn_decode_VkImageLayout(dec, &args->imageLayout); - if (vn_decode_simple_pointer(dec)) { - args->pColor = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pColor)); - if (!args->pColor) return; - vn_decode_VkClearColorValue_temp(dec, (VkClearColorValue *)args->pColor); - } else { - args->pColor = NULL; - } - vn_decode_uint32_t(dec, &args->rangeCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->rangeCount); - args->pRanges = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRanges), iter_count); - if (!args->pRanges) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageSubresourceRange_temp(dec, &((VkImageSubresourceRange *)args->pRanges)[i]); - } else { - vn_decode_array_size(dec, args->rangeCount); - args->pRanges = NULL; - } -} - -static inline void vn_replace_vkCmdClearColorImage_args_handle(struct vn_command_vkCmdClearColorImage *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkImage_handle(&args->image); - /* skip args->imageLayout */ - /* skip args->pColor */ - /* skip args->rangeCount */ - if (args->pRanges) { - for (uint32_t i = 0; i < args->rangeCount; i++) - vn_replace_VkImageSubresourceRange_handle(&((VkImageSubresourceRange *)args->pRanges)[i]); - } -} - -static inline void vn_encode_vkCmdClearColorImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdClearColorImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdClearColorImage_EXT}); - - /* skip args->commandBuffer */ - /* skip args->image */ - /* skip args->imageLayout */ - /* skip args->pColor */ - /* skip args->rangeCount */ - /* skip args->pRanges */ -} - -static inline void vn_decode_vkCmdClearDepthStencilImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdClearDepthStencilImage *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkImage_lookup(dec, &args->image); - vn_decode_VkImageLayout(dec, &args->imageLayout); - if (vn_decode_simple_pointer(dec)) { - args->pDepthStencil = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDepthStencil)); - if (!args->pDepthStencil) return; - vn_decode_VkClearDepthStencilValue_temp(dec, (VkClearDepthStencilValue *)args->pDepthStencil); - } else { - args->pDepthStencil = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_uint32_t(dec, &args->rangeCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->rangeCount); - args->pRanges = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRanges), iter_count); - if (!args->pRanges) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageSubresourceRange_temp(dec, &((VkImageSubresourceRange *)args->pRanges)[i]); - } else { - vn_decode_array_size(dec, args->rangeCount); - args->pRanges = NULL; - } -} - -static inline void vn_replace_vkCmdClearDepthStencilImage_args_handle(struct vn_command_vkCmdClearDepthStencilImage *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkImage_handle(&args->image); - /* skip args->imageLayout */ - if (args->pDepthStencil) - vn_replace_VkClearDepthStencilValue_handle((VkClearDepthStencilValue *)args->pDepthStencil); - /* skip args->rangeCount */ - if (args->pRanges) { - for (uint32_t i = 0; i < args->rangeCount; i++) - vn_replace_VkImageSubresourceRange_handle(&((VkImageSubresourceRange *)args->pRanges)[i]); - } -} - -static inline void vn_encode_vkCmdClearDepthStencilImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdClearDepthStencilImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT}); - - /* skip args->commandBuffer */ - /* skip args->image */ - /* skip args->imageLayout */ - /* skip args->pDepthStencil */ - /* skip args->rangeCount */ - /* skip args->pRanges */ -} - -static inline void vn_decode_vkCmdClearAttachments_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdClearAttachments *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->attachmentCount); - args->pAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pAttachments), iter_count); - if (!args->pAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkClearAttachment_temp(dec, &((VkClearAttachment *)args->pAttachments)[i]); - } else { - vn_decode_array_size(dec, args->attachmentCount); - args->pAttachments = NULL; - } - vn_decode_uint32_t(dec, &args->rectCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->rectCount); - args->pRects = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRects), iter_count); - if (!args->pRects) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkClearRect_temp(dec, &((VkClearRect *)args->pRects)[i]); - } else { - vn_decode_array_size(dec, args->rectCount); - args->pRects = NULL; - } -} - -static inline void vn_replace_vkCmdClearAttachments_args_handle(struct vn_command_vkCmdClearAttachments *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->attachmentCount */ - if (args->pAttachments) { - for (uint32_t i = 0; i < args->attachmentCount; i++) - vn_replace_VkClearAttachment_handle(&((VkClearAttachment *)args->pAttachments)[i]); - } - /* skip args->rectCount */ - if (args->pRects) { - for (uint32_t i = 0; i < args->rectCount; i++) - vn_replace_VkClearRect_handle(&((VkClearRect *)args->pRects)[i]); - } -} - -static inline void vn_encode_vkCmdClearAttachments_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdClearAttachments *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdClearAttachments_EXT}); - - /* skip args->commandBuffer */ - /* skip args->attachmentCount */ - /* skip args->pAttachments */ - /* skip args->rectCount */ - /* skip args->pRects */ -} - -static inline void vn_decode_vkCmdResolveImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdResolveImage *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkImage_lookup(dec, &args->srcImage); - vn_decode_VkImageLayout(dec, &args->srcImageLayout); - vn_decode_VkImage_lookup(dec, &args->dstImage); - vn_decode_VkImageLayout(dec, &args->dstImageLayout); - vn_decode_uint32_t(dec, &args->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->regionCount); - args->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pRegions), iter_count); - if (!args->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageResolve_temp(dec, &((VkImageResolve *)args->pRegions)[i]); - } else { - vn_decode_array_size(dec, args->regionCount); - args->pRegions = NULL; - } -} - -static inline void vn_replace_vkCmdResolveImage_args_handle(struct vn_command_vkCmdResolveImage *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkImage_handle(&args->srcImage); - /* skip args->srcImageLayout */ - vn_replace_VkImage_handle(&args->dstImage); - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - if (args->pRegions) { - for (uint32_t i = 0; i < args->regionCount; i++) - vn_replace_VkImageResolve_handle(&((VkImageResolve *)args->pRegions)[i]); - } -} - -static inline void vn_encode_vkCmdResolveImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdResolveImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdResolveImage_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcImage */ - /* skip args->srcImageLayout */ - /* skip args->dstImage */ - /* skip args->dstImageLayout */ - /* skip args->regionCount */ - /* skip args->pRegions */ -} - -static inline void vn_decode_vkCmdSetEvent_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetEvent *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkEvent_lookup(dec, &args->event); - vn_decode_VkFlags(dec, &args->stageMask); -} - -static inline void vn_replace_vkCmdSetEvent_args_handle(struct vn_command_vkCmdSetEvent *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkEvent_handle(&args->event); - /* skip args->stageMask */ -} - -static inline void vn_encode_vkCmdSetEvent_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetEvent *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetEvent_EXT}); - - /* skip args->commandBuffer */ - /* skip args->event */ - /* skip args->stageMask */ -} - -static inline void vn_decode_vkCmdResetEvent_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdResetEvent *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkEvent_lookup(dec, &args->event); - vn_decode_VkFlags(dec, &args->stageMask); -} - -static inline void vn_replace_vkCmdResetEvent_args_handle(struct vn_command_vkCmdResetEvent *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkEvent_handle(&args->event); - /* skip args->stageMask */ -} - -static inline void vn_encode_vkCmdResetEvent_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdResetEvent *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdResetEvent_EXT}); - - /* skip args->commandBuffer */ - /* skip args->event */ - /* skip args->stageMask */ -} - -static inline void vn_decode_vkCmdWaitEvents_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdWaitEvents *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->eventCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->eventCount); - args->pEvents = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pEvents), iter_count); - if (!args->pEvents) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkEvent_lookup(dec, &((VkEvent *)args->pEvents)[i]); - } else { - vn_decode_array_size(dec, args->eventCount); - args->pEvents = NULL; - } - vn_decode_VkFlags(dec, &args->srcStageMask); - vn_decode_VkFlags(dec, &args->dstStageMask); - vn_decode_uint32_t(dec, &args->memoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->memoryBarrierCount); - args->pMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pMemoryBarriers), iter_count); - if (!args->pMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMemoryBarrier_temp(dec, &((VkMemoryBarrier *)args->pMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, args->memoryBarrierCount); - args->pMemoryBarriers = NULL; - } - vn_decode_uint32_t(dec, &args->bufferMemoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bufferMemoryBarrierCount); - args->pBufferMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBufferMemoryBarriers), iter_count); - if (!args->pBufferMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferMemoryBarrier_temp(dec, &((VkBufferMemoryBarrier *)args->pBufferMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, args->bufferMemoryBarrierCount); - args->pBufferMemoryBarriers = NULL; - } - vn_decode_uint32_t(dec, &args->imageMemoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->imageMemoryBarrierCount); - args->pImageMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pImageMemoryBarriers), iter_count); - if (!args->pImageMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageMemoryBarrier_temp(dec, &((VkImageMemoryBarrier *)args->pImageMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, args->imageMemoryBarrierCount); - args->pImageMemoryBarriers = NULL; - } -} - -static inline void vn_replace_vkCmdWaitEvents_args_handle(struct vn_command_vkCmdWaitEvents *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->eventCount */ - if (args->pEvents) { - for (uint32_t i = 0; i < args->eventCount; i++) - vn_replace_VkEvent_handle(&((VkEvent *)args->pEvents)[i]); - } - /* skip args->srcStageMask */ - /* skip args->dstStageMask */ - /* skip args->memoryBarrierCount */ - if (args->pMemoryBarriers) { - for (uint32_t i = 0; i < args->memoryBarrierCount; i++) - vn_replace_VkMemoryBarrier_handle(&((VkMemoryBarrier *)args->pMemoryBarriers)[i]); - } - /* skip args->bufferMemoryBarrierCount */ - if (args->pBufferMemoryBarriers) { - for (uint32_t i = 0; i < args->bufferMemoryBarrierCount; i++) - vn_replace_VkBufferMemoryBarrier_handle(&((VkBufferMemoryBarrier *)args->pBufferMemoryBarriers)[i]); - } - /* skip args->imageMemoryBarrierCount */ - if (args->pImageMemoryBarriers) { - for (uint32_t i = 0; i < args->imageMemoryBarrierCount; i++) - vn_replace_VkImageMemoryBarrier_handle(&((VkImageMemoryBarrier *)args->pImageMemoryBarriers)[i]); - } -} - -static inline void vn_encode_vkCmdWaitEvents_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdWaitEvents *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdWaitEvents_EXT}); - - /* skip args->commandBuffer */ - /* skip args->eventCount */ - /* skip args->pEvents */ - /* skip args->srcStageMask */ - /* skip args->dstStageMask */ - /* skip args->memoryBarrierCount */ - /* skip args->pMemoryBarriers */ - /* skip args->bufferMemoryBarrierCount */ - /* skip args->pBufferMemoryBarriers */ - /* skip args->imageMemoryBarrierCount */ - /* skip args->pImageMemoryBarriers */ -} - -static inline void vn_decode_vkCmdPipelineBarrier_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPipelineBarrier *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->srcStageMask); - vn_decode_VkFlags(dec, &args->dstStageMask); - vn_decode_VkFlags(dec, &args->dependencyFlags); - vn_decode_uint32_t(dec, &args->memoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->memoryBarrierCount); - args->pMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pMemoryBarriers), iter_count); - if (!args->pMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMemoryBarrier_temp(dec, &((VkMemoryBarrier *)args->pMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, args->memoryBarrierCount); - args->pMemoryBarriers = NULL; - } - vn_decode_uint32_t(dec, &args->bufferMemoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bufferMemoryBarrierCount); - args->pBufferMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBufferMemoryBarriers), iter_count); - if (!args->pBufferMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferMemoryBarrier_temp(dec, &((VkBufferMemoryBarrier *)args->pBufferMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, args->bufferMemoryBarrierCount); - args->pBufferMemoryBarriers = NULL; - } - vn_decode_uint32_t(dec, &args->imageMemoryBarrierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->imageMemoryBarrierCount); - args->pImageMemoryBarriers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pImageMemoryBarriers), iter_count); - if (!args->pImageMemoryBarriers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageMemoryBarrier_temp(dec, &((VkImageMemoryBarrier *)args->pImageMemoryBarriers)[i]); - } else { - vn_decode_array_size(dec, args->imageMemoryBarrierCount); - args->pImageMemoryBarriers = NULL; - } -} - -static inline void vn_replace_vkCmdPipelineBarrier_args_handle(struct vn_command_vkCmdPipelineBarrier *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->srcStageMask */ - /* skip args->dstStageMask */ - /* skip args->dependencyFlags */ - /* skip args->memoryBarrierCount */ - if (args->pMemoryBarriers) { - for (uint32_t i = 0; i < args->memoryBarrierCount; i++) - vn_replace_VkMemoryBarrier_handle(&((VkMemoryBarrier *)args->pMemoryBarriers)[i]); - } - /* skip args->bufferMemoryBarrierCount */ - if (args->pBufferMemoryBarriers) { - for (uint32_t i = 0; i < args->bufferMemoryBarrierCount; i++) - vn_replace_VkBufferMemoryBarrier_handle(&((VkBufferMemoryBarrier *)args->pBufferMemoryBarriers)[i]); - } - /* skip args->imageMemoryBarrierCount */ - if (args->pImageMemoryBarriers) { - for (uint32_t i = 0; i < args->imageMemoryBarrierCount; i++) - vn_replace_VkImageMemoryBarrier_handle(&((VkImageMemoryBarrier *)args->pImageMemoryBarriers)[i]); - } -} - -static inline void vn_encode_vkCmdPipelineBarrier_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPipelineBarrier *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT}); - - /* skip args->commandBuffer */ - /* skip args->srcStageMask */ - /* skip args->dstStageMask */ - /* skip args->dependencyFlags */ - /* skip args->memoryBarrierCount */ - /* skip args->pMemoryBarriers */ - /* skip args->bufferMemoryBarrierCount */ - /* skip args->pBufferMemoryBarriers */ - /* skip args->imageMemoryBarrierCount */ - /* skip args->pImageMemoryBarriers */ -} - -static inline void vn_decode_vkCmdBeginQuery_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginQuery *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->query); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkCmdBeginQuery_args_handle(struct vn_command_vkCmdBeginQuery *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->query */ - /* skip args->flags */ -} - -static inline void vn_encode_vkCmdBeginQuery_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginQuery *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginQuery_EXT}); - - /* skip args->commandBuffer */ - /* skip args->queryPool */ - /* skip args->query */ - /* skip args->flags */ -} - -static inline void vn_decode_vkCmdEndQuery_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndQuery *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->query); -} - -static inline void vn_replace_vkCmdEndQuery_args_handle(struct vn_command_vkCmdEndQuery *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->query */ -} - -static inline void vn_encode_vkCmdEndQuery_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndQuery *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndQuery_EXT}); - - /* skip args->commandBuffer */ - /* skip args->queryPool */ - /* skip args->query */ -} - -static inline void vn_decode_vkCmdBeginConditionalRenderingEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginConditionalRenderingEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pConditionalRenderingBegin = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pConditionalRenderingBegin)); - if (!args->pConditionalRenderingBegin) return; - vn_decode_VkConditionalRenderingBeginInfoEXT_temp(dec, (VkConditionalRenderingBeginInfoEXT *)args->pConditionalRenderingBegin); - } else { - args->pConditionalRenderingBegin = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBeginConditionalRenderingEXT_args_handle(struct vn_command_vkCmdBeginConditionalRenderingEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pConditionalRenderingBegin) - vn_replace_VkConditionalRenderingBeginInfoEXT_handle((VkConditionalRenderingBeginInfoEXT *)args->pConditionalRenderingBegin); -} - -static inline void vn_encode_vkCmdBeginConditionalRenderingEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginConditionalRenderingEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginConditionalRenderingEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pConditionalRenderingBegin */ -} - -static inline void vn_decode_vkCmdEndConditionalRenderingEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndConditionalRenderingEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); -} - -static inline void vn_replace_vkCmdEndConditionalRenderingEXT_args_handle(struct vn_command_vkCmdEndConditionalRenderingEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); -} - -static inline void vn_encode_vkCmdEndConditionalRenderingEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndConditionalRenderingEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndConditionalRenderingEXT_EXT}); - - /* skip args->commandBuffer */ -} - -static inline void vn_decode_vkCmdResetQueryPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdResetQueryPool *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->firstQuery); - vn_decode_uint32_t(dec, &args->queryCount); -} - -static inline void vn_replace_vkCmdResetQueryPool_args_handle(struct vn_command_vkCmdResetQueryPool *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->firstQuery */ - /* skip args->queryCount */ -} - -static inline void vn_encode_vkCmdResetQueryPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdResetQueryPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT}); - - /* skip args->commandBuffer */ - /* skip args->queryPool */ - /* skip args->firstQuery */ - /* skip args->queryCount */ -} - -static inline void vn_decode_vkCmdWriteTimestamp_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdWriteTimestamp *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPipelineStageFlagBits(dec, &args->pipelineStage); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->query); -} - -static inline void vn_replace_vkCmdWriteTimestamp_args_handle(struct vn_command_vkCmdWriteTimestamp *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->pipelineStage */ - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->query */ -} - -static inline void vn_encode_vkCmdWriteTimestamp_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdWriteTimestamp *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pipelineStage */ - /* skip args->queryPool */ - /* skip args->query */ -} - -static inline void vn_decode_vkCmdCopyQueryPoolResults_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyQueryPoolResults *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->firstQuery); - vn_decode_uint32_t(dec, &args->queryCount); - vn_decode_VkBuffer_lookup(dec, &args->dstBuffer); - vn_decode_VkDeviceSize(dec, &args->dstOffset); - vn_decode_VkDeviceSize(dec, &args->stride); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkCmdCopyQueryPoolResults_args_handle(struct vn_command_vkCmdCopyQueryPoolResults *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->firstQuery */ - /* skip args->queryCount */ - vn_replace_VkBuffer_handle(&args->dstBuffer); - /* skip args->dstOffset */ - /* skip args->stride */ - /* skip args->flags */ -} - -static inline void vn_encode_vkCmdCopyQueryPoolResults_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyQueryPoolResults *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT}); - - /* skip args->commandBuffer */ - /* skip args->queryPool */ - /* skip args->firstQuery */ - /* skip args->queryCount */ - /* skip args->dstBuffer */ - /* skip args->dstOffset */ - /* skip args->stride */ - /* skip args->flags */ -} - -static inline void vn_decode_vkCmdPushConstants_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPushConstants *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPipelineLayout_lookup(dec, &args->layout); - vn_decode_VkFlags(dec, &args->stageFlags); - vn_decode_uint32_t(dec, &args->offset); - vn_decode_uint32_t(dec, &args->size); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->size); - args->pValues = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!args->pValues) return; - vn_decode_blob_array(dec, (void *)args->pValues, array_size); - } else { - vn_decode_array_size(dec, args->size); - args->pValues = NULL; - } -} - -static inline void vn_replace_vkCmdPushConstants_args_handle(struct vn_command_vkCmdPushConstants *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkPipelineLayout_handle(&args->layout); - /* skip args->stageFlags */ - /* skip args->offset */ - /* skip args->size */ - /* skip args->pValues */ -} - -static inline void vn_encode_vkCmdPushConstants_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPushConstants *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPushConstants_EXT}); - - /* skip args->commandBuffer */ - /* skip args->layout */ - /* skip args->stageFlags */ - /* skip args->offset */ - /* skip args->size */ - /* skip args->pValues */ -} - -static inline void vn_decode_vkCmdBeginRenderPass_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginRenderPass *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pRenderPassBegin = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRenderPassBegin)); - if (!args->pRenderPassBegin) return; - vn_decode_VkRenderPassBeginInfo_temp(dec, (VkRenderPassBeginInfo *)args->pRenderPassBegin); - } else { - args->pRenderPassBegin = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_VkSubpassContents(dec, &args->contents); -} - -static inline void vn_replace_vkCmdBeginRenderPass_args_handle(struct vn_command_vkCmdBeginRenderPass *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pRenderPassBegin) - vn_replace_VkRenderPassBeginInfo_handle((VkRenderPassBeginInfo *)args->pRenderPassBegin); - /* skip args->contents */ -} - -static inline void vn_encode_vkCmdBeginRenderPass_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginRenderPass *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pRenderPassBegin */ - /* skip args->contents */ -} - -static inline void vn_decode_vkCmdNextSubpass_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdNextSubpass *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkSubpassContents(dec, &args->contents); -} - -static inline void vn_replace_vkCmdNextSubpass_args_handle(struct vn_command_vkCmdNextSubpass *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->contents */ -} - -static inline void vn_encode_vkCmdNextSubpass_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdNextSubpass *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdNextSubpass_EXT}); - - /* skip args->commandBuffer */ - /* skip args->contents */ -} - -static inline void vn_decode_vkCmdEndRenderPass_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndRenderPass *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); -} - -static inline void vn_replace_vkCmdEndRenderPass_args_handle(struct vn_command_vkCmdEndRenderPass *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); -} - -static inline void vn_encode_vkCmdEndRenderPass_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndRenderPass *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT}); - - /* skip args->commandBuffer */ -} - -static inline void vn_decode_vkCmdExecuteCommands_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdExecuteCommands *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->commandBufferCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->commandBufferCount); - args->pCommandBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCommandBuffers), iter_count); - if (!args->pCommandBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandBuffer_lookup(dec, &((VkCommandBuffer *)args->pCommandBuffers)[i]); - } else { - vn_decode_array_size(dec, args->commandBufferCount); - args->pCommandBuffers = NULL; - } -} - -static inline void vn_replace_vkCmdExecuteCommands_args_handle(struct vn_command_vkCmdExecuteCommands *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->commandBufferCount */ - if (args->pCommandBuffers) { - for (uint32_t i = 0; i < args->commandBufferCount; i++) - vn_replace_VkCommandBuffer_handle(&((VkCommandBuffer *)args->pCommandBuffers)[i]); - } -} - -static inline void vn_encode_vkCmdExecuteCommands_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdExecuteCommands *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT}); - - /* skip args->commandBuffer */ - /* skip args->commandBufferCount */ - /* skip args->pCommandBuffers */ -} - -static inline void vn_decode_vkCmdPushDescriptorSet_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPushDescriptorSet *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPipelineBindPoint(dec, &args->pipelineBindPoint); - vn_decode_VkPipelineLayout_lookup(dec, &args->layout); - vn_decode_uint32_t(dec, &args->set); - vn_decode_uint32_t(dec, &args->descriptorWriteCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->descriptorWriteCount); - args->pDescriptorWrites = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDescriptorWrites), iter_count); - if (!args->pDescriptorWrites) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkWriteDescriptorSet_temp(dec, &((VkWriteDescriptorSet *)args->pDescriptorWrites)[i]); - } else { - vn_decode_array_size(dec, args->descriptorWriteCount); - args->pDescriptorWrites = NULL; - } -} - -static inline void vn_replace_vkCmdPushDescriptorSet_args_handle(struct vn_command_vkCmdPushDescriptorSet *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->pipelineBindPoint */ - vn_replace_VkPipelineLayout_handle(&args->layout); - /* skip args->set */ - /* skip args->descriptorWriteCount */ - if (args->pDescriptorWrites) { - for (uint32_t i = 0; i < args->descriptorWriteCount; i++) - vn_replace_VkWriteDescriptorSet_handle(&((VkWriteDescriptorSet *)args->pDescriptorWrites)[i]); - } -} - -static inline void vn_encode_vkCmdPushDescriptorSet_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPushDescriptorSet *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPushDescriptorSet_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pipelineBindPoint */ - /* skip args->layout */ - /* skip args->set */ - /* skip args->descriptorWriteCount */ - /* skip args->pDescriptorWrites */ -} - -static inline void vn_decode_vkCmdSetDeviceMask_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDeviceMask *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->deviceMask); -} - -static inline void vn_replace_vkCmdSetDeviceMask_args_handle(struct vn_command_vkCmdSetDeviceMask *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->deviceMask */ -} - -static inline void vn_encode_vkCmdSetDeviceMask_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDeviceMask *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT}); - - /* skip args->commandBuffer */ - /* skip args->deviceMask */ -} - -static inline void vn_decode_vkCmdDispatchBase_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDispatchBase *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->baseGroupX); - vn_decode_uint32_t(dec, &args->baseGroupY); - vn_decode_uint32_t(dec, &args->baseGroupZ); - vn_decode_uint32_t(dec, &args->groupCountX); - vn_decode_uint32_t(dec, &args->groupCountY); - vn_decode_uint32_t(dec, &args->groupCountZ); -} - -static inline void vn_replace_vkCmdDispatchBase_args_handle(struct vn_command_vkCmdDispatchBase *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->baseGroupX */ - /* skip args->baseGroupY */ - /* skip args->baseGroupZ */ - /* skip args->groupCountX */ - /* skip args->groupCountY */ - /* skip args->groupCountZ */ -} - -static inline void vn_encode_vkCmdDispatchBase_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDispatchBase *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDispatchBase_EXT}); - - /* skip args->commandBuffer */ - /* skip args->baseGroupX */ - /* skip args->baseGroupY */ - /* skip args->baseGroupZ */ - /* skip args->groupCountX */ - /* skip args->groupCountY */ - /* skip args->groupCountZ */ -} - -static inline void vn_decode_vkCmdSetSampleLocationsEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetSampleLocationsEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pSampleLocationsInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSampleLocationsInfo)); - if (!args->pSampleLocationsInfo) return; - vn_decode_VkSampleLocationsInfoEXT_temp(dec, (VkSampleLocationsInfoEXT *)args->pSampleLocationsInfo); - } else { - args->pSampleLocationsInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdSetSampleLocationsEXT_args_handle(struct vn_command_vkCmdSetSampleLocationsEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pSampleLocationsInfo) - vn_replace_VkSampleLocationsInfoEXT_handle((VkSampleLocationsInfoEXT *)args->pSampleLocationsInfo); -} - -static inline void vn_encode_vkCmdSetSampleLocationsEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetSampleLocationsEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetSampleLocationsEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pSampleLocationsInfo */ -} - -static inline void vn_decode_vkCmdBeginRenderPass2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginRenderPass2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pRenderPassBegin = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRenderPassBegin)); - if (!args->pRenderPassBegin) return; - vn_decode_VkRenderPassBeginInfo_temp(dec, (VkRenderPassBeginInfo *)args->pRenderPassBegin); - } else { - args->pRenderPassBegin = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pSubpassBeginInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSubpassBeginInfo)); - if (!args->pSubpassBeginInfo) return; - vn_decode_VkSubpassBeginInfo_temp(dec, (VkSubpassBeginInfo *)args->pSubpassBeginInfo); - } else { - args->pSubpassBeginInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBeginRenderPass2_args_handle(struct vn_command_vkCmdBeginRenderPass2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pRenderPassBegin) - vn_replace_VkRenderPassBeginInfo_handle((VkRenderPassBeginInfo *)args->pRenderPassBegin); - if (args->pSubpassBeginInfo) - vn_replace_VkSubpassBeginInfo_handle((VkSubpassBeginInfo *)args->pSubpassBeginInfo); -} - -static inline void vn_encode_vkCmdBeginRenderPass2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginRenderPass2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pRenderPassBegin */ - /* skip args->pSubpassBeginInfo */ -} - -static inline void vn_decode_vkCmdNextSubpass2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdNextSubpass2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pSubpassBeginInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSubpassBeginInfo)); - if (!args->pSubpassBeginInfo) return; - vn_decode_VkSubpassBeginInfo_temp(dec, (VkSubpassBeginInfo *)args->pSubpassBeginInfo); - } else { - args->pSubpassBeginInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pSubpassEndInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSubpassEndInfo)); - if (!args->pSubpassEndInfo) return; - vn_decode_VkSubpassEndInfo_temp(dec, (VkSubpassEndInfo *)args->pSubpassEndInfo); - } else { - args->pSubpassEndInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdNextSubpass2_args_handle(struct vn_command_vkCmdNextSubpass2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pSubpassBeginInfo) - vn_replace_VkSubpassBeginInfo_handle((VkSubpassBeginInfo *)args->pSubpassBeginInfo); - if (args->pSubpassEndInfo) - vn_replace_VkSubpassEndInfo_handle((VkSubpassEndInfo *)args->pSubpassEndInfo); -} - -static inline void vn_encode_vkCmdNextSubpass2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdNextSubpass2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pSubpassBeginInfo */ - /* skip args->pSubpassEndInfo */ -} - -static inline void vn_decode_vkCmdEndRenderPass2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndRenderPass2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pSubpassEndInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSubpassEndInfo)); - if (!args->pSubpassEndInfo) return; - vn_decode_VkSubpassEndInfo_temp(dec, (VkSubpassEndInfo *)args->pSubpassEndInfo); - } else { - args->pSubpassEndInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdEndRenderPass2_args_handle(struct vn_command_vkCmdEndRenderPass2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pSubpassEndInfo) - vn_replace_VkSubpassEndInfo_handle((VkSubpassEndInfo *)args->pSubpassEndInfo); -} - -static inline void vn_encode_vkCmdEndRenderPass2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndRenderPass2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pSubpassEndInfo */ -} - -static inline void vn_decode_vkCmdDrawIndirectCount_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawIndirectCount *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_VkBuffer_lookup(dec, &args->countBuffer); - vn_decode_VkDeviceSize(dec, &args->countBufferOffset); - vn_decode_uint32_t(dec, &args->maxDrawCount); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawIndirectCount_args_handle(struct vn_command_vkCmdDrawIndirectCount *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - vn_replace_VkBuffer_handle(&args->countBuffer); - /* skip args->countBufferOffset */ - /* skip args->maxDrawCount */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawIndirectCount_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawIndirectCount *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->countBuffer */ - /* skip args->countBufferOffset */ - /* skip args->maxDrawCount */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdDrawIndexedIndirectCount_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawIndexedIndirectCount *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_VkBuffer_lookup(dec, &args->countBuffer); - vn_decode_VkDeviceSize(dec, &args->countBufferOffset); - vn_decode_uint32_t(dec, &args->maxDrawCount); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawIndexedIndirectCount_args_handle(struct vn_command_vkCmdDrawIndexedIndirectCount *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - vn_replace_VkBuffer_handle(&args->countBuffer); - /* skip args->countBufferOffset */ - /* skip args->maxDrawCount */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawIndexedIndirectCount_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawIndexedIndirectCount *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->countBuffer */ - /* skip args->countBufferOffset */ - /* skip args->maxDrawCount */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdBindTransformFeedbackBuffersEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindTransformFeedbackBuffersEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstBinding); - vn_decode_uint32_t(dec, &args->bindingCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bindingCount); - args->pBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBuffers), iter_count); - if (!args->pBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBuffer_lookup(dec, &((VkBuffer *)args->pBuffers)[i]); - } else { - vn_decode_array_size(dec, args->bindingCount); - args->pBuffers = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->bindingCount); - args->pOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pOffsets), array_size); - if (!args->pOffsets) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pOffsets, array_size); - } else { - vn_decode_array_size(dec, args->bindingCount); - args->pOffsets = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->bindingCount); - args->pSizes = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSizes), array_size); - if (!args->pSizes) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pSizes, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pSizes = NULL; - } -} - -static inline void vn_replace_vkCmdBindTransformFeedbackBuffersEXT_args_handle(struct vn_command_vkCmdBindTransformFeedbackBuffersEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstBinding */ - /* skip args->bindingCount */ - if (args->pBuffers) { - for (uint32_t i = 0; i < args->bindingCount; i++) - vn_replace_VkBuffer_handle(&((VkBuffer *)args->pBuffers)[i]); - } - /* skip args->pOffsets */ - /* skip args->pSizes */ -} - -static inline void vn_encode_vkCmdBindTransformFeedbackBuffersEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindTransformFeedbackBuffersEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstBinding */ - /* skip args->bindingCount */ - /* skip args->pBuffers */ - /* skip args->pOffsets */ - /* skip args->pSizes */ -} - -static inline void vn_decode_vkCmdBeginTransformFeedbackEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginTransformFeedbackEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstCounterBuffer); - vn_decode_uint32_t(dec, &args->counterBufferCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->counterBufferCount); - args->pCounterBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCounterBuffers), iter_count); - if (!args->pCounterBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBuffer_lookup(dec, &((VkBuffer *)args->pCounterBuffers)[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pCounterBuffers = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->counterBufferCount); - args->pCounterBufferOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCounterBufferOffsets), array_size); - if (!args->pCounterBufferOffsets) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pCounterBufferOffsets, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pCounterBufferOffsets = NULL; - } -} - -static inline void vn_replace_vkCmdBeginTransformFeedbackEXT_args_handle(struct vn_command_vkCmdBeginTransformFeedbackEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstCounterBuffer */ - /* skip args->counterBufferCount */ - if (args->pCounterBuffers) { - for (uint32_t i = 0; i < args->counterBufferCount; i++) - vn_replace_VkBuffer_handle(&((VkBuffer *)args->pCounterBuffers)[i]); - } - /* skip args->pCounterBufferOffsets */ -} - -static inline void vn_encode_vkCmdBeginTransformFeedbackEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginTransformFeedbackEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstCounterBuffer */ - /* skip args->counterBufferCount */ - /* skip args->pCounterBuffers */ - /* skip args->pCounterBufferOffsets */ -} - -static inline void vn_decode_vkCmdEndTransformFeedbackEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndTransformFeedbackEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstCounterBuffer); - vn_decode_uint32_t(dec, &args->counterBufferCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->counterBufferCount); - args->pCounterBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCounterBuffers), iter_count); - if (!args->pCounterBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBuffer_lookup(dec, &((VkBuffer *)args->pCounterBuffers)[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pCounterBuffers = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->counterBufferCount); - args->pCounterBufferOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCounterBufferOffsets), array_size); - if (!args->pCounterBufferOffsets) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pCounterBufferOffsets, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pCounterBufferOffsets = NULL; - } -} - -static inline void vn_replace_vkCmdEndTransformFeedbackEXT_args_handle(struct vn_command_vkCmdEndTransformFeedbackEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstCounterBuffer */ - /* skip args->counterBufferCount */ - if (args->pCounterBuffers) { - for (uint32_t i = 0; i < args->counterBufferCount; i++) - vn_replace_VkBuffer_handle(&((VkBuffer *)args->pCounterBuffers)[i]); - } - /* skip args->pCounterBufferOffsets */ -} - -static inline void vn_encode_vkCmdEndTransformFeedbackEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndTransformFeedbackEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstCounterBuffer */ - /* skip args->counterBufferCount */ - /* skip args->pCounterBuffers */ - /* skip args->pCounterBufferOffsets */ -} - -static inline void vn_decode_vkCmdBeginQueryIndexedEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginQueryIndexedEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->query); - vn_decode_VkFlags(dec, &args->flags); - vn_decode_uint32_t(dec, &args->index); -} - -static inline void vn_replace_vkCmdBeginQueryIndexedEXT_args_handle(struct vn_command_vkCmdBeginQueryIndexedEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->query */ - /* skip args->flags */ - /* skip args->index */ -} - -static inline void vn_encode_vkCmdBeginQueryIndexedEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginQueryIndexedEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->queryPool */ - /* skip args->query */ - /* skip args->flags */ - /* skip args->index */ -} - -static inline void vn_decode_vkCmdEndQueryIndexedEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndQueryIndexedEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->query); - vn_decode_uint32_t(dec, &args->index); -} - -static inline void vn_replace_vkCmdEndQueryIndexedEXT_args_handle(struct vn_command_vkCmdEndQueryIndexedEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->query */ - /* skip args->index */ -} - -static inline void vn_encode_vkCmdEndQueryIndexedEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndQueryIndexedEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->queryPool */ - /* skip args->query */ - /* skip args->index */ -} - -static inline void vn_decode_vkCmdDrawIndirectByteCountEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawIndirectByteCountEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->instanceCount); - vn_decode_uint32_t(dec, &args->firstInstance); - vn_decode_VkBuffer_lookup(dec, &args->counterBuffer); - vn_decode_VkDeviceSize(dec, &args->counterBufferOffset); - vn_decode_uint32_t(dec, &args->counterOffset); - vn_decode_uint32_t(dec, &args->vertexStride); -} - -static inline void vn_replace_vkCmdDrawIndirectByteCountEXT_args_handle(struct vn_command_vkCmdDrawIndirectByteCountEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->instanceCount */ - /* skip args->firstInstance */ - vn_replace_VkBuffer_handle(&args->counterBuffer); - /* skip args->counterBufferOffset */ - /* skip args->counterOffset */ - /* skip args->vertexStride */ -} - -static inline void vn_encode_vkCmdDrawIndirectByteCountEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawIndirectByteCountEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->instanceCount */ - /* skip args->firstInstance */ - /* skip args->counterBuffer */ - /* skip args->counterBufferOffset */ - /* skip args->counterOffset */ - /* skip args->vertexStride */ -} - -static inline void vn_decode_vkCmdDrawMeshTasksEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawMeshTasksEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->groupCountX); - vn_decode_uint32_t(dec, &args->groupCountY); - vn_decode_uint32_t(dec, &args->groupCountZ); -} - -static inline void vn_replace_vkCmdDrawMeshTasksEXT_args_handle(struct vn_command_vkCmdDrawMeshTasksEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->groupCountX */ - /* skip args->groupCountY */ - /* skip args->groupCountZ */ -} - -static inline void vn_encode_vkCmdDrawMeshTasksEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawMeshTasksEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawMeshTasksEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->groupCountX */ - /* skip args->groupCountY */ - /* skip args->groupCountZ */ -} - -static inline void vn_decode_vkCmdDrawMeshTasksIndirectEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawMeshTasksIndirectEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_uint32_t(dec, &args->drawCount); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawMeshTasksIndirectEXT_args_handle(struct vn_command_vkCmdDrawMeshTasksIndirectEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - /* skip args->drawCount */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawMeshTasksIndirectEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawMeshTasksIndirectEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->drawCount */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdDrawMeshTasksIndirectCountEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdDrawMeshTasksIndirectCountEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_VkBuffer_lookup(dec, &args->countBuffer); - vn_decode_VkDeviceSize(dec, &args->countBufferOffset); - vn_decode_uint32_t(dec, &args->maxDrawCount); - vn_decode_uint32_t(dec, &args->stride); -} - -static inline void vn_replace_vkCmdDrawMeshTasksIndirectCountEXT_args_handle(struct vn_command_vkCmdDrawMeshTasksIndirectCountEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - vn_replace_VkBuffer_handle(&args->countBuffer); - /* skip args->countBufferOffset */ - /* skip args->maxDrawCount */ - /* skip args->stride */ -} - -static inline void vn_encode_vkCmdDrawMeshTasksIndirectCountEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdDrawMeshTasksIndirectCountEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectCountEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->countBuffer */ - /* skip args->countBufferOffset */ - /* skip args->maxDrawCount */ - /* skip args->stride */ -} - -static inline void vn_decode_vkCmdCopyAccelerationStructureKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyAccelerationStructureKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkCopyAccelerationStructureInfoKHR_temp(dec, (VkCopyAccelerationStructureInfoKHR *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyAccelerationStructureKHR_args_handle(struct vn_command_vkCmdCopyAccelerationStructureKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pInfo) - vn_replace_VkCopyAccelerationStructureInfoKHR_handle((VkCopyAccelerationStructureInfoKHR *)args->pInfo); -} - -static inline void vn_encode_vkCmdCopyAccelerationStructureKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyAccelerationStructureKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkCmdCopyAccelerationStructureToMemoryKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyAccelerationStructureToMemoryKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkCopyAccelerationStructureToMemoryInfoKHR_temp(dec, (VkCopyAccelerationStructureToMemoryInfoKHR *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyAccelerationStructureToMemoryKHR_args_handle(struct vn_command_vkCmdCopyAccelerationStructureToMemoryKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pInfo) - vn_replace_VkCopyAccelerationStructureToMemoryInfoKHR_handle((VkCopyAccelerationStructureToMemoryInfoKHR *)args->pInfo); -} - -static inline void vn_encode_vkCmdCopyAccelerationStructureToMemoryKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyAccelerationStructureToMemoryKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureToMemoryKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkCmdCopyMemoryToAccelerationStructureKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyMemoryToAccelerationStructureKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkCopyMemoryToAccelerationStructureInfoKHR_temp(dec, (VkCopyMemoryToAccelerationStructureInfoKHR *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyMemoryToAccelerationStructureKHR_args_handle(struct vn_command_vkCmdCopyMemoryToAccelerationStructureKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pInfo) - vn_replace_VkCopyMemoryToAccelerationStructureInfoKHR_handle((VkCopyMemoryToAccelerationStructureInfoKHR *)args->pInfo); -} - -static inline void vn_encode_vkCmdCopyMemoryToAccelerationStructureKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyMemoryToAccelerationStructureKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyMemoryToAccelerationStructureKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkCmdWriteAccelerationStructuresPropertiesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdWriteAccelerationStructuresPropertiesKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->accelerationStructureCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->accelerationStructureCount); - args->pAccelerationStructures = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pAccelerationStructures), iter_count); - if (!args->pAccelerationStructures) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAccelerationStructureKHR_lookup(dec, &((VkAccelerationStructureKHR *)args->pAccelerationStructures)[i]); - } else { - vn_decode_array_size(dec, args->accelerationStructureCount); - args->pAccelerationStructures = NULL; - } - vn_decode_VkQueryType(dec, &args->queryType); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->firstQuery); -} - -static inline void vn_replace_vkCmdWriteAccelerationStructuresPropertiesKHR_args_handle(struct vn_command_vkCmdWriteAccelerationStructuresPropertiesKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->accelerationStructureCount */ - if (args->pAccelerationStructures) { - for (uint32_t i = 0; i < args->accelerationStructureCount; i++) - vn_replace_VkAccelerationStructureKHR_handle(&((VkAccelerationStructureKHR *)args->pAccelerationStructures)[i]); - } - /* skip args->queryType */ - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->firstQuery */ -} - -static inline void vn_encode_vkCmdWriteAccelerationStructuresPropertiesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdWriteAccelerationStructuresPropertiesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdWriteAccelerationStructuresPropertiesKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->accelerationStructureCount */ - /* skip args->pAccelerationStructures */ - /* skip args->queryType */ - /* skip args->queryPool */ - /* skip args->firstQuery */ -} - -static inline void vn_decode_vkCmdTraceRaysKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdTraceRaysKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pRaygenShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRaygenShaderBindingTable)); - if (!args->pRaygenShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pRaygenShaderBindingTable); - } else { - args->pRaygenShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pMissShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMissShaderBindingTable)); - if (!args->pMissShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pMissShaderBindingTable); - } else { - args->pMissShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pHitShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pHitShaderBindingTable)); - if (!args->pHitShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pHitShaderBindingTable); - } else { - args->pHitShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pCallableShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCallableShaderBindingTable)); - if (!args->pCallableShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pCallableShaderBindingTable); - } else { - args->pCallableShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_uint32_t(dec, &args->width); - vn_decode_uint32_t(dec, &args->height); - vn_decode_uint32_t(dec, &args->depth); -} - -static inline void vn_replace_vkCmdTraceRaysKHR_args_handle(struct vn_command_vkCmdTraceRaysKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pRaygenShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pRaygenShaderBindingTable); - if (args->pMissShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pMissShaderBindingTable); - if (args->pHitShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pHitShaderBindingTable); - if (args->pCallableShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pCallableShaderBindingTable); - /* skip args->width */ - /* skip args->height */ - /* skip args->depth */ -} - -static inline void vn_encode_vkCmdTraceRaysKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdTraceRaysKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdTraceRaysKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pRaygenShaderBindingTable */ - /* skip args->pMissShaderBindingTable */ - /* skip args->pHitShaderBindingTable */ - /* skip args->pCallableShaderBindingTable */ - /* skip args->width */ - /* skip args->height */ - /* skip args->depth */ -} - -static inline void vn_decode_vkCmdTraceRaysIndirectKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdTraceRaysIndirectKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pRaygenShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRaygenShaderBindingTable)); - if (!args->pRaygenShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pRaygenShaderBindingTable); - } else { - args->pRaygenShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pMissShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMissShaderBindingTable)); - if (!args->pMissShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pMissShaderBindingTable); - } else { - args->pMissShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pHitShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pHitShaderBindingTable)); - if (!args->pHitShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pHitShaderBindingTable); - } else { - args->pHitShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pCallableShaderBindingTable = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCallableShaderBindingTable)); - if (!args->pCallableShaderBindingTable) return; - vn_decode_VkStridedDeviceAddressRegionKHR_temp(dec, (VkStridedDeviceAddressRegionKHR *)args->pCallableShaderBindingTable); - } else { - args->pCallableShaderBindingTable = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_VkDeviceAddress(dec, &args->indirectDeviceAddress); -} - -static inline void vn_replace_vkCmdTraceRaysIndirectKHR_args_handle(struct vn_command_vkCmdTraceRaysIndirectKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pRaygenShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pRaygenShaderBindingTable); - if (args->pMissShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pMissShaderBindingTable); - if (args->pHitShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pHitShaderBindingTable); - if (args->pCallableShaderBindingTable) - vn_replace_VkStridedDeviceAddressRegionKHR_handle((VkStridedDeviceAddressRegionKHR *)args->pCallableShaderBindingTable); - /* skip args->indirectDeviceAddress */ -} - -static inline void vn_encode_vkCmdTraceRaysIndirectKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdTraceRaysIndirectKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdTraceRaysIndirectKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pRaygenShaderBindingTable */ - /* skip args->pMissShaderBindingTable */ - /* skip args->pHitShaderBindingTable */ - /* skip args->pCallableShaderBindingTable */ - /* skip args->indirectDeviceAddress */ -} - -static inline void vn_decode_vkCmdTraceRaysIndirect2KHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdTraceRaysIndirect2KHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkDeviceAddress(dec, &args->indirectDeviceAddress); -} - -static inline void vn_replace_vkCmdTraceRaysIndirect2KHR_args_handle(struct vn_command_vkCmdTraceRaysIndirect2KHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->indirectDeviceAddress */ -} - -static inline void vn_encode_vkCmdTraceRaysIndirect2KHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdTraceRaysIndirect2KHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdTraceRaysIndirect2KHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->indirectDeviceAddress */ -} - -static inline void vn_decode_vkCmdSetRayTracingPipelineStackSizeKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetRayTracingPipelineStackSizeKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->pipelineStackSize); -} - -static inline void vn_replace_vkCmdSetRayTracingPipelineStackSizeKHR_args_handle(struct vn_command_vkCmdSetRayTracingPipelineStackSizeKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->pipelineStackSize */ -} - -static inline void vn_encode_vkCmdSetRayTracingPipelineStackSizeKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetRayTracingPipelineStackSizeKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetRayTracingPipelineStackSizeKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pipelineStackSize */ -} - -static inline void vn_decode_vkCmdSetLineStipple_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetLineStipple *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->lineStippleFactor); - vn_decode_uint16_t(dec, &args->lineStipplePattern); -} - -static inline void vn_replace_vkCmdSetLineStipple_args_handle(struct vn_command_vkCmdSetLineStipple *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->lineStippleFactor */ - /* skip args->lineStipplePattern */ -} - -static inline void vn_encode_vkCmdSetLineStipple_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetLineStipple *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetLineStipple_EXT}); - - /* skip args->commandBuffer */ - /* skip args->lineStippleFactor */ - /* skip args->lineStipplePattern */ -} - -static inline void vn_decode_vkCmdBuildAccelerationStructuresKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBuildAccelerationStructuresKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->infoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->infoCount); - args->pInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pInfos), iter_count); - if (!args->pInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_temp(dec, &((VkAccelerationStructureBuildGeometryInfoKHR *)args->pInfos)[i]); - } else { - vn_decode_array_size(dec, args->infoCount); - args->pInfos = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->infoCount); - args->ppBuildRangeInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->ppBuildRangeInfos), iter_count); - if (!args->ppBuildRangeInfos) return; - for (uint32_t i = 0; i < iter_count; i++) { - const uint32_t iter_count_j = vn_decode_array_size(dec, args->pInfos[i].geometryCount); - ((VkAccelerationStructureBuildRangeInfoKHR **)args->ppBuildRangeInfos)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->ppBuildRangeInfos[i]), iter_count_j); - if (!args->ppBuildRangeInfos[i]) return; - for (uint32_t j = 0; j < iter_count_j; j++) - vn_decode_VkAccelerationStructureBuildRangeInfoKHR_temp(dec, &((VkAccelerationStructureBuildRangeInfoKHR **)args->ppBuildRangeInfos)[i][j]); - } - } else { - vn_decode_array_size(dec, args->infoCount); - args->ppBuildRangeInfos = NULL; - } -} - -static inline void vn_replace_vkCmdBuildAccelerationStructuresKHR_args_handle(struct vn_command_vkCmdBuildAccelerationStructuresKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->infoCount */ - if (args->pInfos) { - for (uint32_t i = 0; i < args->infoCount; i++) - vn_replace_VkAccelerationStructureBuildGeometryInfoKHR_handle(&((VkAccelerationStructureBuildGeometryInfoKHR *)args->pInfos)[i]); - } - if (args->ppBuildRangeInfos) { - for (uint32_t i = 0; i < args->infoCount; i++) { - for (uint32_t j = 0; j < args->pInfos[i].geometryCount; j++) - vn_replace_VkAccelerationStructureBuildRangeInfoKHR_handle(&((VkAccelerationStructureBuildRangeInfoKHR **)args->ppBuildRangeInfos)[i][j]); - } - } -} - -static inline void vn_encode_vkCmdBuildAccelerationStructuresKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBuildAccelerationStructuresKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->infoCount */ - /* skip args->pInfos */ - /* skip args->ppBuildRangeInfos */ -} - -static inline void vn_decode_vkCmdBuildAccelerationStructuresIndirectKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBuildAccelerationStructuresIndirectKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->infoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->infoCount); - args->pInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pInfos), iter_count); - if (!args->pInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_temp(dec, &((VkAccelerationStructureBuildGeometryInfoKHR *)args->pInfos)[i]); - } else { - vn_decode_array_size(dec, args->infoCount); - args->pInfos = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->infoCount); - args->pIndirectDeviceAddresses = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pIndirectDeviceAddresses), array_size); - if (!args->pIndirectDeviceAddresses) return; - vn_decode_VkDeviceAddress_array(dec, (VkDeviceAddress *)args->pIndirectDeviceAddresses, array_size); - } else { - vn_decode_array_size(dec, args->infoCount); - args->pIndirectDeviceAddresses = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->infoCount); - args->pIndirectStrides = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pIndirectStrides), array_size); - if (!args->pIndirectStrides) return; - vn_decode_uint32_t_array(dec, (uint32_t *)args->pIndirectStrides, array_size); - } else { - vn_decode_array_size(dec, args->infoCount); - args->pIndirectStrides = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->infoCount); - args->ppMaxPrimitiveCounts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->ppMaxPrimitiveCounts), iter_count); - if (!args->ppMaxPrimitiveCounts) return; - for (uint32_t i = 0; i < iter_count; i++) { - const size_t array_size = vn_decode_array_size(dec, (args->pInfos ? args->pInfos[i].geometryCount : 0)); - ((uint32_t **)args->ppMaxPrimitiveCounts)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->ppMaxPrimitiveCounts[i]), array_size); - if (!args->ppMaxPrimitiveCounts[i]) return; - vn_decode_uint32_t_array(dec, ((uint32_t **)args->ppMaxPrimitiveCounts)[i], array_size); - } - } else { - vn_decode_array_size(dec, args->infoCount); - args->ppMaxPrimitiveCounts = NULL; - } -} - -static inline void vn_replace_vkCmdBuildAccelerationStructuresIndirectKHR_args_handle(struct vn_command_vkCmdBuildAccelerationStructuresIndirectKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->infoCount */ - if (args->pInfos) { - for (uint32_t i = 0; i < args->infoCount; i++) - vn_replace_VkAccelerationStructureBuildGeometryInfoKHR_handle(&((VkAccelerationStructureBuildGeometryInfoKHR *)args->pInfos)[i]); - } - /* skip args->pIndirectDeviceAddresses */ - /* skip args->pIndirectStrides */ - /* skip args->ppMaxPrimitiveCounts */ -} - -static inline void vn_encode_vkCmdBuildAccelerationStructuresIndirectKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBuildAccelerationStructuresIndirectKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresIndirectKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->infoCount */ - /* skip args->pInfos */ - /* skip args->pIndirectDeviceAddresses */ - /* skip args->pIndirectStrides */ - /* skip args->ppMaxPrimitiveCounts */ -} - -static inline void vn_decode_vkCmdSetCullMode_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetCullMode *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->cullMode); -} - -static inline void vn_replace_vkCmdSetCullMode_args_handle(struct vn_command_vkCmdSetCullMode *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->cullMode */ -} - -static inline void vn_encode_vkCmdSetCullMode_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetCullMode *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetCullMode_EXT}); - - /* skip args->commandBuffer */ - /* skip args->cullMode */ -} - -static inline void vn_decode_vkCmdSetFrontFace_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetFrontFace *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFrontFace(dec, &args->frontFace); -} - -static inline void vn_replace_vkCmdSetFrontFace_args_handle(struct vn_command_vkCmdSetFrontFace *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->frontFace */ -} - -static inline void vn_encode_vkCmdSetFrontFace_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetFrontFace *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetFrontFace_EXT}); - - /* skip args->commandBuffer */ - /* skip args->frontFace */ -} - -static inline void vn_decode_vkCmdSetPrimitiveTopology_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetPrimitiveTopology *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPrimitiveTopology(dec, &args->primitiveTopology); -} - -static inline void vn_replace_vkCmdSetPrimitiveTopology_args_handle(struct vn_command_vkCmdSetPrimitiveTopology *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->primitiveTopology */ -} - -static inline void vn_encode_vkCmdSetPrimitiveTopology_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetPrimitiveTopology *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetPrimitiveTopology_EXT}); - - /* skip args->commandBuffer */ - /* skip args->primitiveTopology */ -} - -static inline void vn_decode_vkCmdSetViewportWithCount_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetViewportWithCount *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->viewportCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->viewportCount); - args->pViewports = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pViewports), iter_count); - if (!args->pViewports) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkViewport_temp(dec, &((VkViewport *)args->pViewports)[i]); - } else { - vn_decode_array_size(dec, args->viewportCount); - args->pViewports = NULL; - } -} - -static inline void vn_replace_vkCmdSetViewportWithCount_args_handle(struct vn_command_vkCmdSetViewportWithCount *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->viewportCount */ - if (args->pViewports) { - for (uint32_t i = 0; i < args->viewportCount; i++) - vn_replace_VkViewport_handle(&((VkViewport *)args->pViewports)[i]); - } -} - -static inline void vn_encode_vkCmdSetViewportWithCount_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetViewportWithCount *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetViewportWithCount_EXT}); - - /* skip args->commandBuffer */ - /* skip args->viewportCount */ - /* skip args->pViewports */ -} - -static inline void vn_decode_vkCmdSetScissorWithCount_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetScissorWithCount *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->scissorCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->scissorCount); - args->pScissors = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pScissors), iter_count); - if (!args->pScissors) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRect2D_temp(dec, &((VkRect2D *)args->pScissors)[i]); - } else { - vn_decode_array_size(dec, args->scissorCount); - args->pScissors = NULL; - } -} - -static inline void vn_replace_vkCmdSetScissorWithCount_args_handle(struct vn_command_vkCmdSetScissorWithCount *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->scissorCount */ - if (args->pScissors) { - for (uint32_t i = 0; i < args->scissorCount; i++) - vn_replace_VkRect2D_handle(&((VkRect2D *)args->pScissors)[i]); - } -} - -static inline void vn_encode_vkCmdSetScissorWithCount_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetScissorWithCount *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetScissorWithCount_EXT}); - - /* skip args->commandBuffer */ - /* skip args->scissorCount */ - /* skip args->pScissors */ -} - -static inline void vn_decode_vkCmdBindIndexBuffer2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindIndexBuffer2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBuffer_lookup(dec, &args->buffer); - vn_decode_VkDeviceSize(dec, &args->offset); - vn_decode_VkDeviceSize(dec, &args->size); - vn_decode_VkIndexType(dec, &args->indexType); -} - -static inline void vn_replace_vkCmdBindIndexBuffer2_args_handle(struct vn_command_vkCmdBindIndexBuffer2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkBuffer_handle(&args->buffer); - /* skip args->offset */ - /* skip args->size */ - /* skip args->indexType */ -} - -static inline void vn_encode_vkCmdBindIndexBuffer2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindIndexBuffer2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindIndexBuffer2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->buffer */ - /* skip args->offset */ - /* skip args->size */ - /* skip args->indexType */ -} - -static inline void vn_decode_vkCmdBindVertexBuffers2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindVertexBuffers2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstBinding); - vn_decode_uint32_t(dec, &args->bindingCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bindingCount); - args->pBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBuffers), iter_count); - if (!args->pBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBuffer_lookup(dec, &((VkBuffer *)args->pBuffers)[i]); - } else { - vn_decode_array_size(dec, args->bindingCount); - args->pBuffers = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->bindingCount); - args->pOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pOffsets), array_size); - if (!args->pOffsets) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pOffsets, array_size); - } else { - vn_decode_array_size(dec, args->bindingCount); - args->pOffsets = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->bindingCount); - args->pSizes = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSizes), array_size); - if (!args->pSizes) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pSizes, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pSizes = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->bindingCount); - args->pStrides = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pStrides), array_size); - if (!args->pStrides) return; - vn_decode_VkDeviceSize_array(dec, (VkDeviceSize *)args->pStrides, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pStrides = NULL; - } -} - -static inline void vn_replace_vkCmdBindVertexBuffers2_args_handle(struct vn_command_vkCmdBindVertexBuffers2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstBinding */ - /* skip args->bindingCount */ - if (args->pBuffers) { - for (uint32_t i = 0; i < args->bindingCount; i++) - vn_replace_VkBuffer_handle(&((VkBuffer *)args->pBuffers)[i]); - } - /* skip args->pOffsets */ - /* skip args->pSizes */ - /* skip args->pStrides */ -} - -static inline void vn_encode_vkCmdBindVertexBuffers2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindVertexBuffers2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindVertexBuffers2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstBinding */ - /* skip args->bindingCount */ - /* skip args->pBuffers */ - /* skip args->pOffsets */ - /* skip args->pSizes */ - /* skip args->pStrides */ -} - -static inline void vn_decode_vkCmdSetDepthTestEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthTestEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->depthTestEnable); -} - -static inline void vn_replace_vkCmdSetDepthTestEnable_args_handle(struct vn_command_vkCmdSetDepthTestEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthTestEnable */ -} - -static inline void vn_encode_vkCmdSetDepthTestEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthTestEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthTestEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthTestEnable */ -} - -static inline void vn_decode_vkCmdSetDepthWriteEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthWriteEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->depthWriteEnable); -} - -static inline void vn_replace_vkCmdSetDepthWriteEnable_args_handle(struct vn_command_vkCmdSetDepthWriteEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthWriteEnable */ -} - -static inline void vn_encode_vkCmdSetDepthWriteEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthWriteEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthWriteEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthWriteEnable */ -} - -static inline void vn_decode_vkCmdSetDepthCompareOp_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthCompareOp *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkCompareOp(dec, &args->depthCompareOp); -} - -static inline void vn_replace_vkCmdSetDepthCompareOp_args_handle(struct vn_command_vkCmdSetDepthCompareOp *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthCompareOp */ -} - -static inline void vn_encode_vkCmdSetDepthCompareOp_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthCompareOp *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthCompareOp_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthCompareOp */ -} - -static inline void vn_decode_vkCmdSetDepthBoundsTestEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthBoundsTestEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->depthBoundsTestEnable); -} - -static inline void vn_replace_vkCmdSetDepthBoundsTestEnable_args_handle(struct vn_command_vkCmdSetDepthBoundsTestEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthBoundsTestEnable */ -} - -static inline void vn_encode_vkCmdSetDepthBoundsTestEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthBoundsTestEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthBoundsTestEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthBoundsTestEnable */ -} - -static inline void vn_decode_vkCmdSetStencilTestEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetStencilTestEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->stencilTestEnable); -} - -static inline void vn_replace_vkCmdSetStencilTestEnable_args_handle(struct vn_command_vkCmdSetStencilTestEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->stencilTestEnable */ -} - -static inline void vn_encode_vkCmdSetStencilTestEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetStencilTestEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetStencilTestEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->stencilTestEnable */ -} - -static inline void vn_decode_vkCmdSetStencilOp_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetStencilOp *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags(dec, &args->faceMask); - vn_decode_VkStencilOp(dec, &args->failOp); - vn_decode_VkStencilOp(dec, &args->passOp); - vn_decode_VkStencilOp(dec, &args->depthFailOp); - vn_decode_VkCompareOp(dec, &args->compareOp); -} - -static inline void vn_replace_vkCmdSetStencilOp_args_handle(struct vn_command_vkCmdSetStencilOp *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->faceMask */ - /* skip args->failOp */ - /* skip args->passOp */ - /* skip args->depthFailOp */ - /* skip args->compareOp */ -} - -static inline void vn_encode_vkCmdSetStencilOp_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetStencilOp *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetStencilOp_EXT}); - - /* skip args->commandBuffer */ - /* skip args->faceMask */ - /* skip args->failOp */ - /* skip args->passOp */ - /* skip args->depthFailOp */ - /* skip args->compareOp */ -} - -static inline void vn_decode_vkCmdSetPatchControlPointsEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetPatchControlPointsEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->patchControlPoints); -} - -static inline void vn_replace_vkCmdSetPatchControlPointsEXT_args_handle(struct vn_command_vkCmdSetPatchControlPointsEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->patchControlPoints */ -} - -static inline void vn_encode_vkCmdSetPatchControlPointsEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetPatchControlPointsEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetPatchControlPointsEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->patchControlPoints */ -} - -static inline void vn_decode_vkCmdSetRasterizerDiscardEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetRasterizerDiscardEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->rasterizerDiscardEnable); -} - -static inline void vn_replace_vkCmdSetRasterizerDiscardEnable_args_handle(struct vn_command_vkCmdSetRasterizerDiscardEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->rasterizerDiscardEnable */ -} - -static inline void vn_encode_vkCmdSetRasterizerDiscardEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetRasterizerDiscardEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetRasterizerDiscardEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->rasterizerDiscardEnable */ -} - -static inline void vn_decode_vkCmdSetDepthBiasEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthBiasEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->depthBiasEnable); -} - -static inline void vn_replace_vkCmdSetDepthBiasEnable_args_handle(struct vn_command_vkCmdSetDepthBiasEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthBiasEnable */ -} - -static inline void vn_encode_vkCmdSetDepthBiasEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthBiasEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthBiasEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthBiasEnable */ -} - -static inline void vn_decode_vkCmdSetLogicOpEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetLogicOpEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkLogicOp(dec, &args->logicOp); -} - -static inline void vn_replace_vkCmdSetLogicOpEXT_args_handle(struct vn_command_vkCmdSetLogicOpEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->logicOp */ -} - -static inline void vn_encode_vkCmdSetLogicOpEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetLogicOpEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetLogicOpEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->logicOp */ -} - -static inline void vn_decode_vkCmdSetPrimitiveRestartEnable_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetPrimitiveRestartEnable *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->primitiveRestartEnable); -} - -static inline void vn_replace_vkCmdSetPrimitiveRestartEnable_args_handle(struct vn_command_vkCmdSetPrimitiveRestartEnable *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->primitiveRestartEnable */ -} - -static inline void vn_encode_vkCmdSetPrimitiveRestartEnable_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetPrimitiveRestartEnable *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetPrimitiveRestartEnable_EXT}); - - /* skip args->commandBuffer */ - /* skip args->primitiveRestartEnable */ -} - -static inline void vn_decode_vkCmdSetTessellationDomainOriginEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetTessellationDomainOriginEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkTessellationDomainOrigin(dec, &args->domainOrigin); -} - -static inline void vn_replace_vkCmdSetTessellationDomainOriginEXT_args_handle(struct vn_command_vkCmdSetTessellationDomainOriginEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->domainOrigin */ -} - -static inline void vn_encode_vkCmdSetTessellationDomainOriginEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetTessellationDomainOriginEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetTessellationDomainOriginEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->domainOrigin */ -} - -static inline void vn_decode_vkCmdSetDepthClampEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthClampEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->depthClampEnable); -} - -static inline void vn_replace_vkCmdSetDepthClampEnableEXT_args_handle(struct vn_command_vkCmdSetDepthClampEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthClampEnable */ -} - -static inline void vn_encode_vkCmdSetDepthClampEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthClampEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthClampEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthClampEnable */ -} - -static inline void vn_decode_vkCmdSetPolygonModeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetPolygonModeEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkPolygonMode(dec, &args->polygonMode); -} - -static inline void vn_replace_vkCmdSetPolygonModeEXT_args_handle(struct vn_command_vkCmdSetPolygonModeEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->polygonMode */ -} - -static inline void vn_encode_vkCmdSetPolygonModeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetPolygonModeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetPolygonModeEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->polygonMode */ -} - -static inline void vn_decode_vkCmdSetRasterizationSamplesEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetRasterizationSamplesEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkSampleCountFlagBits(dec, &args->rasterizationSamples); -} - -static inline void vn_replace_vkCmdSetRasterizationSamplesEXT_args_handle(struct vn_command_vkCmdSetRasterizationSamplesEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->rasterizationSamples */ -} - -static inline void vn_encode_vkCmdSetRasterizationSamplesEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetRasterizationSamplesEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetRasterizationSamplesEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->rasterizationSamples */ -} - -static inline void vn_decode_vkCmdSetSampleMaskEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetSampleMaskEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkSampleCountFlagBits(dec, &args->samples); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, (args->samples + 31) / 32); - args->pSampleMask = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSampleMask), array_size); - if (!args->pSampleMask) return; - vn_decode_VkSampleMask_array(dec, (VkSampleMask *)args->pSampleMask, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pSampleMask = NULL; - } -} - -static inline void vn_replace_vkCmdSetSampleMaskEXT_args_handle(struct vn_command_vkCmdSetSampleMaskEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->samples */ - /* skip args->pSampleMask */ -} - -static inline void vn_encode_vkCmdSetSampleMaskEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetSampleMaskEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetSampleMaskEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->samples */ - /* skip args->pSampleMask */ -} - -static inline void vn_decode_vkCmdSetAlphaToCoverageEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetAlphaToCoverageEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->alphaToCoverageEnable); -} - -static inline void vn_replace_vkCmdSetAlphaToCoverageEnableEXT_args_handle(struct vn_command_vkCmdSetAlphaToCoverageEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->alphaToCoverageEnable */ -} - -static inline void vn_encode_vkCmdSetAlphaToCoverageEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetAlphaToCoverageEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetAlphaToCoverageEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->alphaToCoverageEnable */ -} - -static inline void vn_decode_vkCmdSetAlphaToOneEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetAlphaToOneEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->alphaToOneEnable); -} - -static inline void vn_replace_vkCmdSetAlphaToOneEnableEXT_args_handle(struct vn_command_vkCmdSetAlphaToOneEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->alphaToOneEnable */ -} - -static inline void vn_encode_vkCmdSetAlphaToOneEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetAlphaToOneEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetAlphaToOneEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->alphaToOneEnable */ -} - -static inline void vn_decode_vkCmdSetLogicOpEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetLogicOpEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->logicOpEnable); -} - -static inline void vn_replace_vkCmdSetLogicOpEnableEXT_args_handle(struct vn_command_vkCmdSetLogicOpEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->logicOpEnable */ -} - -static inline void vn_encode_vkCmdSetLogicOpEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetLogicOpEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetLogicOpEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->logicOpEnable */ -} - -static inline void vn_decode_vkCmdSetColorBlendEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetColorBlendEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstAttachment); - vn_decode_uint32_t(dec, &args->attachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->attachmentCount); - args->pColorBlendEnables = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pColorBlendEnables), array_size); - if (!args->pColorBlendEnables) return; - vn_decode_VkBool32_array(dec, (VkBool32 *)args->pColorBlendEnables, array_size); - } else { - vn_decode_array_size(dec, args->attachmentCount); - args->pColorBlendEnables = NULL; - } -} - -static inline void vn_replace_vkCmdSetColorBlendEnableEXT_args_handle(struct vn_command_vkCmdSetColorBlendEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - /* skip args->pColorBlendEnables */ -} - -static inline void vn_encode_vkCmdSetColorBlendEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetColorBlendEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetColorBlendEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - /* skip args->pColorBlendEnables */ -} - -static inline void vn_decode_vkCmdSetColorBlendEquationEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetColorBlendEquationEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstAttachment); - vn_decode_uint32_t(dec, &args->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->attachmentCount); - args->pColorBlendEquations = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pColorBlendEquations), iter_count); - if (!args->pColorBlendEquations) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkColorBlendEquationEXT_temp(dec, &((VkColorBlendEquationEXT *)args->pColorBlendEquations)[i]); - } else { - vn_decode_array_size(dec, args->attachmentCount); - args->pColorBlendEquations = NULL; - } -} - -static inline void vn_replace_vkCmdSetColorBlendEquationEXT_args_handle(struct vn_command_vkCmdSetColorBlendEquationEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - if (args->pColorBlendEquations) { - for (uint32_t i = 0; i < args->attachmentCount; i++) - vn_replace_VkColorBlendEquationEXT_handle(&((VkColorBlendEquationEXT *)args->pColorBlendEquations)[i]); - } -} - -static inline void vn_encode_vkCmdSetColorBlendEquationEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetColorBlendEquationEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetColorBlendEquationEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - /* skip args->pColorBlendEquations */ -} - -static inline void vn_decode_vkCmdSetColorWriteMaskEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetColorWriteMaskEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstAttachment); - vn_decode_uint32_t(dec, &args->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->attachmentCount); - args->pColorWriteMasks = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pColorWriteMasks), iter_count); - if (!args->pColorWriteMasks) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkFlags(dec, &((VkColorComponentFlags *)args->pColorWriteMasks)[i]); - } else { - vn_decode_array_size(dec, args->attachmentCount); - args->pColorWriteMasks = NULL; - } -} - -static inline void vn_replace_vkCmdSetColorWriteMaskEXT_args_handle(struct vn_command_vkCmdSetColorWriteMaskEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - /* skip args->pColorWriteMasks */ -} - -static inline void vn_encode_vkCmdSetColorWriteMaskEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetColorWriteMaskEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetColorWriteMaskEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - /* skip args->pColorWriteMasks */ -} - -static inline void vn_decode_vkCmdSetRasterizationStreamEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetRasterizationStreamEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->rasterizationStream); -} - -static inline void vn_replace_vkCmdSetRasterizationStreamEXT_args_handle(struct vn_command_vkCmdSetRasterizationStreamEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->rasterizationStream */ -} - -static inline void vn_encode_vkCmdSetRasterizationStreamEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetRasterizationStreamEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetRasterizationStreamEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->rasterizationStream */ -} - -static inline void vn_decode_vkCmdSetConservativeRasterizationModeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetConservativeRasterizationModeEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkConservativeRasterizationModeEXT(dec, &args->conservativeRasterizationMode); -} - -static inline void vn_replace_vkCmdSetConservativeRasterizationModeEXT_args_handle(struct vn_command_vkCmdSetConservativeRasterizationModeEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->conservativeRasterizationMode */ -} - -static inline void vn_encode_vkCmdSetConservativeRasterizationModeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetConservativeRasterizationModeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetConservativeRasterizationModeEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->conservativeRasterizationMode */ -} - -static inline void vn_decode_vkCmdSetExtraPrimitiveOverestimationSizeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetExtraPrimitiveOverestimationSizeEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_float(dec, &args->extraPrimitiveOverestimationSize); -} - -static inline void vn_replace_vkCmdSetExtraPrimitiveOverestimationSizeEXT_args_handle(struct vn_command_vkCmdSetExtraPrimitiveOverestimationSizeEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->extraPrimitiveOverestimationSize */ -} - -static inline void vn_encode_vkCmdSetExtraPrimitiveOverestimationSizeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetExtraPrimitiveOverestimationSizeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetExtraPrimitiveOverestimationSizeEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->extraPrimitiveOverestimationSize */ -} - -static inline void vn_decode_vkCmdSetDepthClipEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthClipEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->depthClipEnable); -} - -static inline void vn_replace_vkCmdSetDepthClipEnableEXT_args_handle(struct vn_command_vkCmdSetDepthClipEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthClipEnable */ -} - -static inline void vn_encode_vkCmdSetDepthClipEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthClipEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthClipEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthClipEnable */ -} - -static inline void vn_decode_vkCmdSetSampleLocationsEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetSampleLocationsEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->sampleLocationsEnable); -} - -static inline void vn_replace_vkCmdSetSampleLocationsEnableEXT_args_handle(struct vn_command_vkCmdSetSampleLocationsEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->sampleLocationsEnable */ -} - -static inline void vn_encode_vkCmdSetSampleLocationsEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetSampleLocationsEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetSampleLocationsEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->sampleLocationsEnable */ -} - -static inline void vn_decode_vkCmdSetColorBlendAdvancedEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetColorBlendAdvancedEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->firstAttachment); - vn_decode_uint32_t(dec, &args->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->attachmentCount); - args->pColorBlendAdvanced = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pColorBlendAdvanced), iter_count); - if (!args->pColorBlendAdvanced) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkColorBlendAdvancedEXT_temp(dec, &((VkColorBlendAdvancedEXT *)args->pColorBlendAdvanced)[i]); - } else { - vn_decode_array_size(dec, args->attachmentCount); - args->pColorBlendAdvanced = NULL; - } -} - -static inline void vn_replace_vkCmdSetColorBlendAdvancedEXT_args_handle(struct vn_command_vkCmdSetColorBlendAdvancedEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - if (args->pColorBlendAdvanced) { - for (uint32_t i = 0; i < args->attachmentCount; i++) - vn_replace_VkColorBlendAdvancedEXT_handle(&((VkColorBlendAdvancedEXT *)args->pColorBlendAdvanced)[i]); - } -} - -static inline void vn_encode_vkCmdSetColorBlendAdvancedEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetColorBlendAdvancedEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetColorBlendAdvancedEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->firstAttachment */ - /* skip args->attachmentCount */ - /* skip args->pColorBlendAdvanced */ -} - -static inline void vn_decode_vkCmdSetProvokingVertexModeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetProvokingVertexModeEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkProvokingVertexModeEXT(dec, &args->provokingVertexMode); -} - -static inline void vn_replace_vkCmdSetProvokingVertexModeEXT_args_handle(struct vn_command_vkCmdSetProvokingVertexModeEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->provokingVertexMode */ -} - -static inline void vn_encode_vkCmdSetProvokingVertexModeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetProvokingVertexModeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetProvokingVertexModeEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->provokingVertexMode */ -} - -static inline void vn_decode_vkCmdSetLineRasterizationModeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetLineRasterizationModeEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkLineRasterizationMode(dec, &args->lineRasterizationMode); -} - -static inline void vn_replace_vkCmdSetLineRasterizationModeEXT_args_handle(struct vn_command_vkCmdSetLineRasterizationModeEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->lineRasterizationMode */ -} - -static inline void vn_encode_vkCmdSetLineRasterizationModeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetLineRasterizationModeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetLineRasterizationModeEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->lineRasterizationMode */ -} - -static inline void vn_decode_vkCmdSetLineStippleEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetLineStippleEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->stippledLineEnable); -} - -static inline void vn_replace_vkCmdSetLineStippleEnableEXT_args_handle(struct vn_command_vkCmdSetLineStippleEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->stippledLineEnable */ -} - -static inline void vn_encode_vkCmdSetLineStippleEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetLineStippleEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetLineStippleEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->stippledLineEnable */ -} - -static inline void vn_decode_vkCmdSetDepthClipNegativeOneToOneEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthClipNegativeOneToOneEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkBool32(dec, &args->negativeOneToOne); -} - -static inline void vn_replace_vkCmdSetDepthClipNegativeOneToOneEXT_args_handle(struct vn_command_vkCmdSetDepthClipNegativeOneToOneEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->negativeOneToOne */ -} - -static inline void vn_encode_vkCmdSetDepthClipNegativeOneToOneEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthClipNegativeOneToOneEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthClipNegativeOneToOneEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->negativeOneToOne */ -} - -static inline void vn_decode_vkCmdCopyBuffer2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyBuffer2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pCopyBufferInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyBufferInfo)); - if (!args->pCopyBufferInfo) return; - vn_decode_VkCopyBufferInfo2_temp(dec, (VkCopyBufferInfo2 *)args->pCopyBufferInfo); - } else { - args->pCopyBufferInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyBuffer2_args_handle(struct vn_command_vkCmdCopyBuffer2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pCopyBufferInfo) - vn_replace_VkCopyBufferInfo2_handle((VkCopyBufferInfo2 *)args->pCopyBufferInfo); -} - -static inline void vn_encode_vkCmdCopyBuffer2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyBuffer2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyBuffer2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pCopyBufferInfo */ -} - -static inline void vn_decode_vkCmdCopyImage2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyImage2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pCopyImageInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyImageInfo)); - if (!args->pCopyImageInfo) return; - vn_decode_VkCopyImageInfo2_temp(dec, (VkCopyImageInfo2 *)args->pCopyImageInfo); - } else { - args->pCopyImageInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyImage2_args_handle(struct vn_command_vkCmdCopyImage2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pCopyImageInfo) - vn_replace_VkCopyImageInfo2_handle((VkCopyImageInfo2 *)args->pCopyImageInfo); -} - -static inline void vn_encode_vkCmdCopyImage2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyImage2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyImage2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pCopyImageInfo */ -} - -static inline void vn_decode_vkCmdBlitImage2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBlitImage2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pBlitImageInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBlitImageInfo)); - if (!args->pBlitImageInfo) return; - vn_decode_VkBlitImageInfo2_temp(dec, (VkBlitImageInfo2 *)args->pBlitImageInfo); - } else { - args->pBlitImageInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBlitImage2_args_handle(struct vn_command_vkCmdBlitImage2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pBlitImageInfo) - vn_replace_VkBlitImageInfo2_handle((VkBlitImageInfo2 *)args->pBlitImageInfo); -} - -static inline void vn_encode_vkCmdBlitImage2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBlitImage2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBlitImage2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pBlitImageInfo */ -} - -static inline void vn_decode_vkCmdCopyBufferToImage2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyBufferToImage2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pCopyBufferToImageInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyBufferToImageInfo)); - if (!args->pCopyBufferToImageInfo) return; - vn_decode_VkCopyBufferToImageInfo2_temp(dec, (VkCopyBufferToImageInfo2 *)args->pCopyBufferToImageInfo); - } else { - args->pCopyBufferToImageInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyBufferToImage2_args_handle(struct vn_command_vkCmdCopyBufferToImage2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pCopyBufferToImageInfo) - vn_replace_VkCopyBufferToImageInfo2_handle((VkCopyBufferToImageInfo2 *)args->pCopyBufferToImageInfo); -} - -static inline void vn_encode_vkCmdCopyBufferToImage2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyBufferToImage2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyBufferToImage2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pCopyBufferToImageInfo */ -} - -static inline void vn_decode_vkCmdCopyImageToBuffer2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdCopyImageToBuffer2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pCopyImageToBufferInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyImageToBufferInfo)); - if (!args->pCopyImageToBufferInfo) return; - vn_decode_VkCopyImageToBufferInfo2_temp(dec, (VkCopyImageToBufferInfo2 *)args->pCopyImageToBufferInfo); - } else { - args->pCopyImageToBufferInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdCopyImageToBuffer2_args_handle(struct vn_command_vkCmdCopyImageToBuffer2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pCopyImageToBufferInfo) - vn_replace_VkCopyImageToBufferInfo2_handle((VkCopyImageToBufferInfo2 *)args->pCopyImageToBufferInfo); -} - -static inline void vn_encode_vkCmdCopyImageToBuffer2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdCopyImageToBuffer2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdCopyImageToBuffer2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pCopyImageToBufferInfo */ -} - -static inline void vn_decode_vkCmdResolveImage2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdResolveImage2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pResolveImageInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pResolveImageInfo)); - if (!args->pResolveImageInfo) return; - vn_decode_VkResolveImageInfo2_temp(dec, (VkResolveImageInfo2 *)args->pResolveImageInfo); - } else { - args->pResolveImageInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdResolveImage2_args_handle(struct vn_command_vkCmdResolveImage2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pResolveImageInfo) - vn_replace_VkResolveImageInfo2_handle((VkResolveImageInfo2 *)args->pResolveImageInfo); -} - -static inline void vn_encode_vkCmdResolveImage2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdResolveImage2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdResolveImage2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pResolveImageInfo */ -} - -static inline void vn_decode_vkCmdSetFragmentShadingRateKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetFragmentShadingRateKHR *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pFragmentSize = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFragmentSize)); - if (!args->pFragmentSize) return; - vn_decode_VkExtent2D_temp(dec, (VkExtent2D *)args->pFragmentSize); - } else { - args->pFragmentSize = NULL; - vn_cs_decoder_set_fatal(dec); - } - { - const size_t array_size = vn_decode_array_size(dec, 2); - vn_decode_VkFragmentShadingRateCombinerOpKHR_array(dec, (VkFragmentShadingRateCombinerOpKHR *)args->combinerOps, array_size); - } -} - -static inline void vn_replace_vkCmdSetFragmentShadingRateKHR_args_handle(struct vn_command_vkCmdSetFragmentShadingRateKHR *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pFragmentSize) - vn_replace_VkExtent2D_handle((VkExtent2D *)args->pFragmentSize); - /* skip args->combinerOps */ -} - -static inline void vn_encode_vkCmdSetFragmentShadingRateKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetFragmentShadingRateKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetFragmentShadingRateKHR_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pFragmentSize */ - /* skip args->combinerOps */ -} - -static inline void vn_decode_vkCmdSetVertexInputEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetVertexInputEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->vertexBindingDescriptionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->vertexBindingDescriptionCount); - args->pVertexBindingDescriptions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pVertexBindingDescriptions), iter_count); - if (!args->pVertexBindingDescriptions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkVertexInputBindingDescription2EXT_temp(dec, &((VkVertexInputBindingDescription2EXT *)args->pVertexBindingDescriptions)[i]); - } else { - vn_decode_array_size(dec, args->vertexBindingDescriptionCount); - args->pVertexBindingDescriptions = NULL; - } - vn_decode_uint32_t(dec, &args->vertexAttributeDescriptionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->vertexAttributeDescriptionCount); - args->pVertexAttributeDescriptions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pVertexAttributeDescriptions), iter_count); - if (!args->pVertexAttributeDescriptions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkVertexInputAttributeDescription2EXT_temp(dec, &((VkVertexInputAttributeDescription2EXT *)args->pVertexAttributeDescriptions)[i]); - } else { - vn_decode_array_size(dec, args->vertexAttributeDescriptionCount); - args->pVertexAttributeDescriptions = NULL; - } -} - -static inline void vn_replace_vkCmdSetVertexInputEXT_args_handle(struct vn_command_vkCmdSetVertexInputEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->vertexBindingDescriptionCount */ - if (args->pVertexBindingDescriptions) { - for (uint32_t i = 0; i < args->vertexBindingDescriptionCount; i++) - vn_replace_VkVertexInputBindingDescription2EXT_handle(&((VkVertexInputBindingDescription2EXT *)args->pVertexBindingDescriptions)[i]); - } - /* skip args->vertexAttributeDescriptionCount */ - if (args->pVertexAttributeDescriptions) { - for (uint32_t i = 0; i < args->vertexAttributeDescriptionCount; i++) - vn_replace_VkVertexInputAttributeDescription2EXT_handle(&((VkVertexInputAttributeDescription2EXT *)args->pVertexAttributeDescriptions)[i]); - } -} - -static inline void vn_encode_vkCmdSetVertexInputEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetVertexInputEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->vertexBindingDescriptionCount */ - /* skip args->pVertexBindingDescriptions */ - /* skip args->vertexAttributeDescriptionCount */ - /* skip args->pVertexAttributeDescriptions */ -} - -static inline void vn_decode_vkCmdSetColorWriteEnableEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetColorWriteEnableEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->attachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->attachmentCount); - args->pColorWriteEnables = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pColorWriteEnables), array_size); - if (!args->pColorWriteEnables) return; - vn_decode_VkBool32_array(dec, (VkBool32 *)args->pColorWriteEnables, array_size); - } else { - vn_decode_array_size(dec, args->attachmentCount); - args->pColorWriteEnables = NULL; - } -} - -static inline void vn_replace_vkCmdSetColorWriteEnableEXT_args_handle(struct vn_command_vkCmdSetColorWriteEnableEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->attachmentCount */ - /* skip args->pColorWriteEnables */ -} - -static inline void vn_encode_vkCmdSetColorWriteEnableEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetColorWriteEnableEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetColorWriteEnableEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->attachmentCount */ - /* skip args->pColorWriteEnables */ -} - -static inline void vn_decode_vkCmdSetEvent2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetEvent2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkEvent_lookup(dec, &args->event); - if (vn_decode_simple_pointer(dec)) { - args->pDependencyInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDependencyInfo)); - if (!args->pDependencyInfo) return; - vn_decode_VkDependencyInfo_temp(dec, (VkDependencyInfo *)args->pDependencyInfo); - } else { - args->pDependencyInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdSetEvent2_args_handle(struct vn_command_vkCmdSetEvent2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkEvent_handle(&args->event); - if (args->pDependencyInfo) - vn_replace_VkDependencyInfo_handle((VkDependencyInfo *)args->pDependencyInfo); -} - -static inline void vn_encode_vkCmdSetEvent2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetEvent2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetEvent2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->event */ - /* skip args->pDependencyInfo */ -} - -static inline void vn_decode_vkCmdResetEvent2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdResetEvent2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkEvent_lookup(dec, &args->event); - vn_decode_VkFlags64(dec, &args->stageMask); -} - -static inline void vn_replace_vkCmdResetEvent2_args_handle(struct vn_command_vkCmdResetEvent2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - vn_replace_VkEvent_handle(&args->event); - /* skip args->stageMask */ -} - -static inline void vn_encode_vkCmdResetEvent2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdResetEvent2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdResetEvent2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->event */ - /* skip args->stageMask */ -} - -static inline void vn_decode_vkCmdWaitEvents2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdWaitEvents2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_uint32_t(dec, &args->eventCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->eventCount); - args->pEvents = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pEvents), iter_count); - if (!args->pEvents) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkEvent_lookup(dec, &((VkEvent *)args->pEvents)[i]); - } else { - vn_decode_array_size(dec, args->eventCount); - args->pEvents = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->eventCount); - args->pDependencyInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDependencyInfos), iter_count); - if (!args->pDependencyInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDependencyInfo_temp(dec, &((VkDependencyInfo *)args->pDependencyInfos)[i]); - } else { - vn_decode_array_size(dec, args->eventCount); - args->pDependencyInfos = NULL; - } -} - -static inline void vn_replace_vkCmdWaitEvents2_args_handle(struct vn_command_vkCmdWaitEvents2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->eventCount */ - if (args->pEvents) { - for (uint32_t i = 0; i < args->eventCount; i++) - vn_replace_VkEvent_handle(&((VkEvent *)args->pEvents)[i]); - } - if (args->pDependencyInfos) { - for (uint32_t i = 0; i < args->eventCount; i++) - vn_replace_VkDependencyInfo_handle(&((VkDependencyInfo *)args->pDependencyInfos)[i]); - } -} - -static inline void vn_encode_vkCmdWaitEvents2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdWaitEvents2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdWaitEvents2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->eventCount */ - /* skip args->pEvents */ - /* skip args->pDependencyInfos */ -} - -static inline void vn_decode_vkCmdPipelineBarrier2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPipelineBarrier2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pDependencyInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDependencyInfo)); - if (!args->pDependencyInfo) return; - vn_decode_VkDependencyInfo_temp(dec, (VkDependencyInfo *)args->pDependencyInfo); - } else { - args->pDependencyInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdPipelineBarrier2_args_handle(struct vn_command_vkCmdPipelineBarrier2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pDependencyInfo) - vn_replace_VkDependencyInfo_handle((VkDependencyInfo *)args->pDependencyInfo); -} - -static inline void vn_encode_vkCmdPipelineBarrier2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPipelineBarrier2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPipelineBarrier2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pDependencyInfo */ -} - -static inline void vn_decode_vkCmdWriteTimestamp2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdWriteTimestamp2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkFlags64(dec, &args->stage); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->query); -} - -static inline void vn_replace_vkCmdWriteTimestamp2_args_handle(struct vn_command_vkCmdWriteTimestamp2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->stage */ - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->query */ -} - -static inline void vn_encode_vkCmdWriteTimestamp2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdWriteTimestamp2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdWriteTimestamp2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->stage */ - /* skip args->queryPool */ - /* skip args->query */ -} - -static inline void vn_decode_vkCmdBeginRendering_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBeginRendering *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pRenderingInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRenderingInfo)); - if (!args->pRenderingInfo) return; - vn_decode_VkRenderingInfo_temp(dec, (VkRenderingInfo *)args->pRenderingInfo); - } else { - args->pRenderingInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBeginRendering_args_handle(struct vn_command_vkCmdBeginRendering *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pRenderingInfo) - vn_replace_VkRenderingInfo_handle((VkRenderingInfo *)args->pRenderingInfo); -} - -static inline void vn_encode_vkCmdBeginRendering_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBeginRendering *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBeginRendering_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pRenderingInfo */ -} - -static inline void vn_decode_vkCmdEndRendering_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdEndRendering *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); -} - -static inline void vn_replace_vkCmdEndRendering_args_handle(struct vn_command_vkCmdEndRendering *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); -} - -static inline void vn_encode_vkCmdEndRendering_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdEndRendering *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdEndRendering_EXT}); - - /* skip args->commandBuffer */ -} - -static inline void vn_decode_vkCmdSetDepthBias2EXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthBias2EXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pDepthBiasInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDepthBiasInfo)); - if (!args->pDepthBiasInfo) return; - vn_decode_VkDepthBiasInfoEXT_temp(dec, (VkDepthBiasInfoEXT *)args->pDepthBiasInfo); - } else { - args->pDepthBiasInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdSetDepthBias2EXT_args_handle(struct vn_command_vkCmdSetDepthBias2EXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pDepthBiasInfo) - vn_replace_VkDepthBiasInfoEXT_handle((VkDepthBiasInfoEXT *)args->pDepthBiasInfo); -} - -static inline void vn_encode_vkCmdSetDepthBias2EXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthBias2EXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthBias2EXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pDepthBiasInfo */ -} - -static inline void vn_decode_vkCmdBindDescriptorSets2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindDescriptorSets2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pBindDescriptorSetsInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBindDescriptorSetsInfo)); - if (!args->pBindDescriptorSetsInfo) return; - vn_decode_VkBindDescriptorSetsInfo_temp(dec, (VkBindDescriptorSetsInfo *)args->pBindDescriptorSetsInfo); - } else { - args->pBindDescriptorSetsInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBindDescriptorSets2_args_handle(struct vn_command_vkCmdBindDescriptorSets2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pBindDescriptorSetsInfo) - vn_replace_VkBindDescriptorSetsInfo_handle((VkBindDescriptorSetsInfo *)args->pBindDescriptorSetsInfo); -} - -static inline void vn_encode_vkCmdBindDescriptorSets2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindDescriptorSets2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindDescriptorSets2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pBindDescriptorSetsInfo */ -} - -static inline void vn_decode_vkCmdPushConstants2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPushConstants2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pPushConstantsInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPushConstantsInfo)); - if (!args->pPushConstantsInfo) return; - vn_decode_VkPushConstantsInfo_temp(dec, (VkPushConstantsInfo *)args->pPushConstantsInfo); - } else { - args->pPushConstantsInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdPushConstants2_args_handle(struct vn_command_vkCmdPushConstants2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pPushConstantsInfo) - vn_replace_VkPushConstantsInfo_handle((VkPushConstantsInfo *)args->pPushConstantsInfo); -} - -static inline void vn_encode_vkCmdPushConstants2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPushConstants2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPushConstants2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pPushConstantsInfo */ -} - -static inline void vn_decode_vkCmdPushDescriptorSet2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPushDescriptorSet2 *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pPushDescriptorSetInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPushDescriptorSetInfo)); - if (!args->pPushDescriptorSetInfo) return; - vn_decode_VkPushDescriptorSetInfo_temp(dec, (VkPushDescriptorSetInfo *)args->pPushDescriptorSetInfo); - } else { - args->pPushDescriptorSetInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdPushDescriptorSet2_args_handle(struct vn_command_vkCmdPushDescriptorSet2 *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pPushDescriptorSetInfo) - vn_replace_VkPushDescriptorSetInfo_handle((VkPushDescriptorSetInfo *)args->pPushDescriptorSetInfo); -} - -static inline void vn_encode_vkCmdPushDescriptorSet2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPushDescriptorSet2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPushDescriptorSet2_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pPushDescriptorSetInfo */ -} - -static inline void vn_decode_vkCmdSetRenderingAttachmentLocations_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetRenderingAttachmentLocations *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pLocationInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pLocationInfo)); - if (!args->pLocationInfo) return; - vn_decode_VkRenderingAttachmentLocationInfo_temp(dec, (VkRenderingAttachmentLocationInfo *)args->pLocationInfo); - } else { - args->pLocationInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdSetRenderingAttachmentLocations_args_handle(struct vn_command_vkCmdSetRenderingAttachmentLocations *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pLocationInfo) - vn_replace_VkRenderingAttachmentLocationInfo_handle((VkRenderingAttachmentLocationInfo *)args->pLocationInfo); -} - -static inline void vn_encode_vkCmdSetRenderingAttachmentLocations_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetRenderingAttachmentLocations *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetRenderingAttachmentLocations_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pLocationInfo */ -} - -static inline void vn_decode_vkCmdSetRenderingInputAttachmentIndices_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetRenderingInputAttachmentIndices *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pInputAttachmentIndexInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInputAttachmentIndexInfo)); - if (!args->pInputAttachmentIndexInfo) return; - vn_decode_VkRenderingInputAttachmentIndexInfo_temp(dec, (VkRenderingInputAttachmentIndexInfo *)args->pInputAttachmentIndexInfo); - } else { - args->pInputAttachmentIndexInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdSetRenderingInputAttachmentIndices_args_handle(struct vn_command_vkCmdSetRenderingInputAttachmentIndices *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pInputAttachmentIndexInfo) - vn_replace_VkRenderingInputAttachmentIndexInfo_handle((VkRenderingInputAttachmentIndexInfo *)args->pInputAttachmentIndexInfo); -} - -static inline void vn_encode_vkCmdSetRenderingInputAttachmentIndices_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetRenderingInputAttachmentIndices *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetRenderingInputAttachmentIndices_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pInputAttachmentIndexInfo */ -} - -static inline void vn_decode_vkCmdSetDepthClampRangeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdSetDepthClampRangeEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - vn_decode_VkDepthClampModeEXT(dec, &args->depthClampMode); - if (vn_decode_simple_pointer(dec)) { - args->pDepthClampRange = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDepthClampRange)); - if (!args->pDepthClampRange) return; - vn_decode_VkDepthClampRangeEXT_temp(dec, (VkDepthClampRangeEXT *)args->pDepthClampRange); - } else { - args->pDepthClampRange = NULL; - } -} - -static inline void vn_replace_vkCmdSetDepthClampRangeEXT_args_handle(struct vn_command_vkCmdSetDepthClampRangeEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - /* skip args->depthClampMode */ - if (args->pDepthClampRange) - vn_replace_VkDepthClampRangeEXT_handle((VkDepthClampRangeEXT *)args->pDepthClampRange); -} - -static inline void vn_encode_vkCmdSetDepthClampRangeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdSetDepthClampRangeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdSetDepthClampRangeEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->depthClampMode */ - /* skip args->pDepthClampRange */ -} - -static inline void vn_decode_vkCmdBindSamplerHeapEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindSamplerHeapEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pBindInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBindInfo)); - if (!args->pBindInfo) return; - vn_decode_VkBindHeapInfoEXT_temp(dec, (VkBindHeapInfoEXT *)args->pBindInfo); - } else { - args->pBindInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBindSamplerHeapEXT_args_handle(struct vn_command_vkCmdBindSamplerHeapEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pBindInfo) - vn_replace_VkBindHeapInfoEXT_handle((VkBindHeapInfoEXT *)args->pBindInfo); -} - -static inline void vn_encode_vkCmdBindSamplerHeapEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindSamplerHeapEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindSamplerHeapEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pBindInfo */ -} - -static inline void vn_decode_vkCmdBindResourceHeapEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdBindResourceHeapEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pBindInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBindInfo)); - if (!args->pBindInfo) return; - vn_decode_VkBindHeapInfoEXT_temp(dec, (VkBindHeapInfoEXT *)args->pBindInfo); - } else { - args->pBindInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdBindResourceHeapEXT_args_handle(struct vn_command_vkCmdBindResourceHeapEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pBindInfo) - vn_replace_VkBindHeapInfoEXT_handle((VkBindHeapInfoEXT *)args->pBindInfo); -} - -static inline void vn_encode_vkCmdBindResourceHeapEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdBindResourceHeapEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdBindResourceHeapEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pBindInfo */ -} - -static inline void vn_decode_vkCmdPushDataEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCmdPushDataEXT *args) -{ - vn_decode_VkCommandBuffer_lookup(dec, &args->commandBuffer); - if (vn_decode_simple_pointer(dec)) { - args->pPushDataInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPushDataInfo)); - if (!args->pPushDataInfo) return; - vn_decode_VkPushDataInfoEXT_temp(dec, (VkPushDataInfoEXT *)args->pPushDataInfo); - } else { - args->pPushDataInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCmdPushDataEXT_args_handle(struct vn_command_vkCmdPushDataEXT *args) -{ - vn_replace_VkCommandBuffer_handle(&args->commandBuffer); - if (args->pPushDataInfo) - vn_replace_VkPushDataInfoEXT_handle((VkPushDataInfoEXT *)args->pPushDataInfo); -} - -static inline void vn_encode_vkCmdPushDataEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCmdPushDataEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCmdPushDataEXT_EXT}); - - /* skip args->commandBuffer */ - /* skip args->pPushDataInfo */ -} - -static inline void vn_dispatch_vkAllocateCommandBuffers(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkAllocateCommandBuffers args; - - if (!ctx->dispatch_vkAllocateCommandBuffers) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkAllocateCommandBuffers_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkAllocateCommandBuffers(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkAllocateCommandBuffers returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkAllocateCommandBuffers_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkFreeCommandBuffers(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkFreeCommandBuffers args; - - if (!ctx->dispatch_vkFreeCommandBuffers) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkFreeCommandBuffers_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkFreeCommandBuffers(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkFreeCommandBuffers_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkBeginCommandBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkBeginCommandBuffer args; - - if (!ctx->dispatch_vkBeginCommandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkBeginCommandBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkBeginCommandBuffer(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkBeginCommandBuffer returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkBeginCommandBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEndCommandBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEndCommandBuffer args; - - if (!ctx->dispatch_vkEndCommandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEndCommandBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEndCommandBuffer(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEndCommandBuffer returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEndCommandBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetCommandBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetCommandBuffer args; - - if (!ctx->dispatch_vkResetCommandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetCommandBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetCommandBuffer(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkResetCommandBuffer returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetCommandBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindPipeline(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindPipeline args; - - if (!ctx->dispatch_vkCmdBindPipeline) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindPipeline_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindPipeline(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindPipeline_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetAttachmentFeedbackLoopEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetAttachmentFeedbackLoopEnableEXT args; - - if (!ctx->dispatch_vkCmdSetAttachmentFeedbackLoopEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetAttachmentFeedbackLoopEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetAttachmentFeedbackLoopEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetAttachmentFeedbackLoopEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetViewport(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetViewport args; - - if (!ctx->dispatch_vkCmdSetViewport) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetViewport_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetViewport(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetViewport_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetScissor(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetScissor args; - - if (!ctx->dispatch_vkCmdSetScissor) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetScissor_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetScissor(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetScissor_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetLineWidth(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetLineWidth args; - - if (!ctx->dispatch_vkCmdSetLineWidth) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetLineWidth_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetLineWidth(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetLineWidth_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthBias(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthBias args; - - if (!ctx->dispatch_vkCmdSetDepthBias) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthBias_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthBias(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthBias_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetBlendConstants(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetBlendConstants args; - - if (!ctx->dispatch_vkCmdSetBlendConstants) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetBlendConstants_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetBlendConstants(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetBlendConstants_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthBounds(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthBounds args; - - if (!ctx->dispatch_vkCmdSetDepthBounds) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthBounds_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthBounds(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthBounds_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetStencilCompareMask(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetStencilCompareMask args; - - if (!ctx->dispatch_vkCmdSetStencilCompareMask) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetStencilCompareMask_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetStencilCompareMask(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetStencilCompareMask_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetStencilWriteMask(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetStencilWriteMask args; - - if (!ctx->dispatch_vkCmdSetStencilWriteMask) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetStencilWriteMask_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetStencilWriteMask(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetStencilWriteMask_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetStencilReference(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetStencilReference args; - - if (!ctx->dispatch_vkCmdSetStencilReference) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetStencilReference_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetStencilReference(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetStencilReference_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindDescriptorSets(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindDescriptorSets args; - - if (!ctx->dispatch_vkCmdBindDescriptorSets) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindDescriptorSets_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindDescriptorSets(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindDescriptorSets_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindIndexBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindIndexBuffer args; - - if (!ctx->dispatch_vkCmdBindIndexBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindIndexBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindIndexBuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindIndexBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindVertexBuffers(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindVertexBuffers args; - - if (!ctx->dispatch_vkCmdBindVertexBuffers) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindVertexBuffers_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindVertexBuffers(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindVertexBuffers_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDraw(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDraw args; - - if (!ctx->dispatch_vkCmdDraw) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDraw_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDraw(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDraw_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawIndexed(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawIndexed args; - - if (!ctx->dispatch_vkCmdDrawIndexed) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawIndexed_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawIndexed(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawIndexed_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawMultiEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawMultiEXT args; - - if (!ctx->dispatch_vkCmdDrawMultiEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawMultiEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawMultiEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawMultiEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawMultiIndexedEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawMultiIndexedEXT args; - - if (!ctx->dispatch_vkCmdDrawMultiIndexedEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawMultiIndexedEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawMultiIndexedEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawMultiIndexedEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawIndirect(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawIndirect args; - - if (!ctx->dispatch_vkCmdDrawIndirect) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawIndirect_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawIndirect(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawIndirect_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawIndexedIndirect(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawIndexedIndirect args; - - if (!ctx->dispatch_vkCmdDrawIndexedIndirect) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawIndexedIndirect_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawIndexedIndirect(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawIndexedIndirect_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDispatch(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDispatch args; - - if (!ctx->dispatch_vkCmdDispatch) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDispatch_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDispatch(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDispatch_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDispatchIndirect(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDispatchIndirect args; - - if (!ctx->dispatch_vkCmdDispatchIndirect) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDispatchIndirect_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDispatchIndirect(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDispatchIndirect_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyBuffer args; - - if (!ctx->dispatch_vkCmdCopyBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyBuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyImage args; - - if (!ctx->dispatch_vkCmdCopyImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyImage_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBlitImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBlitImage args; - - if (!ctx->dispatch_vkCmdBlitImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBlitImage_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBlitImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBlitImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyBufferToImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyBufferToImage args; - - if (!ctx->dispatch_vkCmdCopyBufferToImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyBufferToImage_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyBufferToImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyBufferToImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyImageToBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyImageToBuffer args; - - if (!ctx->dispatch_vkCmdCopyImageToBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyImageToBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyImageToBuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyImageToBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdUpdateBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdUpdateBuffer args; - - if (!ctx->dispatch_vkCmdUpdateBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdUpdateBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdUpdateBuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdUpdateBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdFillBuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdFillBuffer args; - - if (!ctx->dispatch_vkCmdFillBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdFillBuffer_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdFillBuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdFillBuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdClearColorImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdClearColorImage args; - - if (!ctx->dispatch_vkCmdClearColorImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdClearColorImage_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdClearColorImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdClearColorImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdClearDepthStencilImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdClearDepthStencilImage args; - - if (!ctx->dispatch_vkCmdClearDepthStencilImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdClearDepthStencilImage_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdClearDepthStencilImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdClearDepthStencilImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdClearAttachments(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdClearAttachments args; - - if (!ctx->dispatch_vkCmdClearAttachments) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdClearAttachments_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdClearAttachments(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdClearAttachments_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdResolveImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdResolveImage args; - - if (!ctx->dispatch_vkCmdResolveImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdResolveImage_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdResolveImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdResolveImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetEvent(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetEvent args; - - if (!ctx->dispatch_vkCmdSetEvent) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetEvent_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetEvent(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetEvent_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdResetEvent(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdResetEvent args; - - if (!ctx->dispatch_vkCmdResetEvent) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdResetEvent_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdResetEvent(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdResetEvent_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdWaitEvents(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdWaitEvents args; - - if (!ctx->dispatch_vkCmdWaitEvents) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdWaitEvents_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdWaitEvents(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdWaitEvents_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPipelineBarrier(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPipelineBarrier args; - - if (!ctx->dispatch_vkCmdPipelineBarrier) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPipelineBarrier_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPipelineBarrier(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPipelineBarrier_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginQuery(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginQuery args; - - if (!ctx->dispatch_vkCmdBeginQuery) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginQuery_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginQuery(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginQuery_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndQuery(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndQuery args; - - if (!ctx->dispatch_vkCmdEndQuery) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndQuery_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndQuery(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndQuery_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginConditionalRenderingEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginConditionalRenderingEXT args; - - if (!ctx->dispatch_vkCmdBeginConditionalRenderingEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginConditionalRenderingEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginConditionalRenderingEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginConditionalRenderingEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndConditionalRenderingEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndConditionalRenderingEXT args; - - if (!ctx->dispatch_vkCmdEndConditionalRenderingEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndConditionalRenderingEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndConditionalRenderingEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndConditionalRenderingEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdResetQueryPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdResetQueryPool args; - - if (!ctx->dispatch_vkCmdResetQueryPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdResetQueryPool_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdResetQueryPool(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdResetQueryPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdWriteTimestamp(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdWriteTimestamp args; - - if (!ctx->dispatch_vkCmdWriteTimestamp) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdWriteTimestamp_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdWriteTimestamp(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdWriteTimestamp_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyQueryPoolResults(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyQueryPoolResults args; - - if (!ctx->dispatch_vkCmdCopyQueryPoolResults) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyQueryPoolResults_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyQueryPoolResults(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyQueryPoolResults_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPushConstants(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPushConstants args; - - if (!ctx->dispatch_vkCmdPushConstants) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPushConstants_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPushConstants(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPushConstants_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginRenderPass(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginRenderPass args; - - if (!ctx->dispatch_vkCmdBeginRenderPass) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginRenderPass_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginRenderPass(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginRenderPass_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdNextSubpass(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdNextSubpass args; - - if (!ctx->dispatch_vkCmdNextSubpass) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdNextSubpass_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdNextSubpass(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdNextSubpass_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndRenderPass(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndRenderPass args; - - if (!ctx->dispatch_vkCmdEndRenderPass) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndRenderPass_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndRenderPass(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndRenderPass_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdExecuteCommands(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdExecuteCommands args; - - if (!ctx->dispatch_vkCmdExecuteCommands) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdExecuteCommands_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdExecuteCommands(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdExecuteCommands_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPushDescriptorSet(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPushDescriptorSet args; - - if (!ctx->dispatch_vkCmdPushDescriptorSet) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPushDescriptorSet_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPushDescriptorSet(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPushDescriptorSet_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDeviceMask(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDeviceMask args; - - if (!ctx->dispatch_vkCmdSetDeviceMask) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDeviceMask_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDeviceMask(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDeviceMask_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDispatchBase(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDispatchBase args; - - if (!ctx->dispatch_vkCmdDispatchBase) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDispatchBase_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDispatchBase(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDispatchBase_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetSampleLocationsEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetSampleLocationsEXT args; - - if (!ctx->dispatch_vkCmdSetSampleLocationsEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetSampleLocationsEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetSampleLocationsEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetSampleLocationsEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginRenderPass2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginRenderPass2 args; - - if (!ctx->dispatch_vkCmdBeginRenderPass2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginRenderPass2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginRenderPass2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginRenderPass2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdNextSubpass2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdNextSubpass2 args; - - if (!ctx->dispatch_vkCmdNextSubpass2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdNextSubpass2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdNextSubpass2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdNextSubpass2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndRenderPass2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndRenderPass2 args; - - if (!ctx->dispatch_vkCmdEndRenderPass2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndRenderPass2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndRenderPass2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndRenderPass2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawIndirectCount(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawIndirectCount args; - - if (!ctx->dispatch_vkCmdDrawIndirectCount) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawIndirectCount_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawIndirectCount(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawIndirectCount_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawIndexedIndirectCount(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawIndexedIndirectCount args; - - if (!ctx->dispatch_vkCmdDrawIndexedIndirectCount) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawIndexedIndirectCount_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawIndexedIndirectCount(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawIndexedIndirectCount_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindTransformFeedbackBuffersEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindTransformFeedbackBuffersEXT args; - - if (!ctx->dispatch_vkCmdBindTransformFeedbackBuffersEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindTransformFeedbackBuffersEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindTransformFeedbackBuffersEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindTransformFeedbackBuffersEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginTransformFeedbackEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginTransformFeedbackEXT args; - - if (!ctx->dispatch_vkCmdBeginTransformFeedbackEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginTransformFeedbackEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginTransformFeedbackEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginTransformFeedbackEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndTransformFeedbackEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndTransformFeedbackEXT args; - - if (!ctx->dispatch_vkCmdEndTransformFeedbackEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndTransformFeedbackEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndTransformFeedbackEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndTransformFeedbackEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginQueryIndexedEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginQueryIndexedEXT args; - - if (!ctx->dispatch_vkCmdBeginQueryIndexedEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginQueryIndexedEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginQueryIndexedEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginQueryIndexedEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndQueryIndexedEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndQueryIndexedEXT args; - - if (!ctx->dispatch_vkCmdEndQueryIndexedEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndQueryIndexedEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndQueryIndexedEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndQueryIndexedEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawIndirectByteCountEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawIndirectByteCountEXT args; - - if (!ctx->dispatch_vkCmdDrawIndirectByteCountEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawIndirectByteCountEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawIndirectByteCountEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawIndirectByteCountEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawMeshTasksEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawMeshTasksEXT args; - - if (!ctx->dispatch_vkCmdDrawMeshTasksEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawMeshTasksEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawMeshTasksEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawMeshTasksEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawMeshTasksIndirectEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawMeshTasksIndirectEXT args; - - if (!ctx->dispatch_vkCmdDrawMeshTasksIndirectEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawMeshTasksIndirectEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawMeshTasksIndirectEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawMeshTasksIndirectEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdDrawMeshTasksIndirectCountEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdDrawMeshTasksIndirectCountEXT args; - - if (!ctx->dispatch_vkCmdDrawMeshTasksIndirectCountEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdDrawMeshTasksIndirectCountEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdDrawMeshTasksIndirectCountEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdDrawMeshTasksIndirectCountEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyAccelerationStructureKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyAccelerationStructureKHR args; - - if (!ctx->dispatch_vkCmdCopyAccelerationStructureKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyAccelerationStructureKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyAccelerationStructureKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyAccelerationStructureKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyAccelerationStructureToMemoryKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyAccelerationStructureToMemoryKHR args; - - if (!ctx->dispatch_vkCmdCopyAccelerationStructureToMemoryKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyAccelerationStructureToMemoryKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyAccelerationStructureToMemoryKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyAccelerationStructureToMemoryKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyMemoryToAccelerationStructureKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyMemoryToAccelerationStructureKHR args; - - if (!ctx->dispatch_vkCmdCopyMemoryToAccelerationStructureKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyMemoryToAccelerationStructureKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyMemoryToAccelerationStructureKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyMemoryToAccelerationStructureKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdWriteAccelerationStructuresPropertiesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdWriteAccelerationStructuresPropertiesKHR args; - - if (!ctx->dispatch_vkCmdWriteAccelerationStructuresPropertiesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdWriteAccelerationStructuresPropertiesKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdWriteAccelerationStructuresPropertiesKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdWriteAccelerationStructuresPropertiesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdTraceRaysKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdTraceRaysKHR args; - - if (!ctx->dispatch_vkCmdTraceRaysKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdTraceRaysKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdTraceRaysKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdTraceRaysKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdTraceRaysIndirectKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdTraceRaysIndirectKHR args; - - if (!ctx->dispatch_vkCmdTraceRaysIndirectKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdTraceRaysIndirectKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdTraceRaysIndirectKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdTraceRaysIndirectKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdTraceRaysIndirect2KHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdTraceRaysIndirect2KHR args; - - if (!ctx->dispatch_vkCmdTraceRaysIndirect2KHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdTraceRaysIndirect2KHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdTraceRaysIndirect2KHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdTraceRaysIndirect2KHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetRayTracingPipelineStackSizeKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetRayTracingPipelineStackSizeKHR args; - - if (!ctx->dispatch_vkCmdSetRayTracingPipelineStackSizeKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetRayTracingPipelineStackSizeKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetRayTracingPipelineStackSizeKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetRayTracingPipelineStackSizeKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetLineStipple(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetLineStipple args; - - if (!ctx->dispatch_vkCmdSetLineStipple) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetLineStipple_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetLineStipple(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetLineStipple_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBuildAccelerationStructuresKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBuildAccelerationStructuresKHR args; - - if (!ctx->dispatch_vkCmdBuildAccelerationStructuresKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBuildAccelerationStructuresKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBuildAccelerationStructuresKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBuildAccelerationStructuresKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBuildAccelerationStructuresIndirectKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBuildAccelerationStructuresIndirectKHR args; - - if (!ctx->dispatch_vkCmdBuildAccelerationStructuresIndirectKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBuildAccelerationStructuresIndirectKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBuildAccelerationStructuresIndirectKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBuildAccelerationStructuresIndirectKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetCullMode(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetCullMode args; - - if (!ctx->dispatch_vkCmdSetCullMode) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetCullMode_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetCullMode(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetCullMode_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetFrontFace(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetFrontFace args; - - if (!ctx->dispatch_vkCmdSetFrontFace) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetFrontFace_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetFrontFace(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetFrontFace_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetPrimitiveTopology(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetPrimitiveTopology args; - - if (!ctx->dispatch_vkCmdSetPrimitiveTopology) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetPrimitiveTopology_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetPrimitiveTopology(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetPrimitiveTopology_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetViewportWithCount(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetViewportWithCount args; - - if (!ctx->dispatch_vkCmdSetViewportWithCount) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetViewportWithCount_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetViewportWithCount(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetViewportWithCount_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetScissorWithCount(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetScissorWithCount args; - - if (!ctx->dispatch_vkCmdSetScissorWithCount) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetScissorWithCount_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetScissorWithCount(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetScissorWithCount_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindIndexBuffer2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindIndexBuffer2 args; - - if (!ctx->dispatch_vkCmdBindIndexBuffer2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindIndexBuffer2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindIndexBuffer2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindIndexBuffer2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindVertexBuffers2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindVertexBuffers2 args; - - if (!ctx->dispatch_vkCmdBindVertexBuffers2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindVertexBuffers2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindVertexBuffers2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindVertexBuffers2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthTestEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthTestEnable args; - - if (!ctx->dispatch_vkCmdSetDepthTestEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthTestEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthTestEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthTestEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthWriteEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthWriteEnable args; - - if (!ctx->dispatch_vkCmdSetDepthWriteEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthWriteEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthWriteEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthWriteEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthCompareOp(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthCompareOp args; - - if (!ctx->dispatch_vkCmdSetDepthCompareOp) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthCompareOp_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthCompareOp(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthCompareOp_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthBoundsTestEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthBoundsTestEnable args; - - if (!ctx->dispatch_vkCmdSetDepthBoundsTestEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthBoundsTestEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthBoundsTestEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthBoundsTestEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetStencilTestEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetStencilTestEnable args; - - if (!ctx->dispatch_vkCmdSetStencilTestEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetStencilTestEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetStencilTestEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetStencilTestEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetStencilOp(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetStencilOp args; - - if (!ctx->dispatch_vkCmdSetStencilOp) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetStencilOp_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetStencilOp(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetStencilOp_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetPatchControlPointsEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetPatchControlPointsEXT args; - - if (!ctx->dispatch_vkCmdSetPatchControlPointsEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetPatchControlPointsEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetPatchControlPointsEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetPatchControlPointsEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetRasterizerDiscardEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetRasterizerDiscardEnable args; - - if (!ctx->dispatch_vkCmdSetRasterizerDiscardEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetRasterizerDiscardEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetRasterizerDiscardEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetRasterizerDiscardEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthBiasEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthBiasEnable args; - - if (!ctx->dispatch_vkCmdSetDepthBiasEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthBiasEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthBiasEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthBiasEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetLogicOpEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetLogicOpEXT args; - - if (!ctx->dispatch_vkCmdSetLogicOpEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetLogicOpEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetLogicOpEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetLogicOpEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetPrimitiveRestartEnable(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetPrimitiveRestartEnable args; - - if (!ctx->dispatch_vkCmdSetPrimitiveRestartEnable) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetPrimitiveRestartEnable_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetPrimitiveRestartEnable(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetPrimitiveRestartEnable_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetTessellationDomainOriginEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetTessellationDomainOriginEXT args; - - if (!ctx->dispatch_vkCmdSetTessellationDomainOriginEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetTessellationDomainOriginEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetTessellationDomainOriginEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetTessellationDomainOriginEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthClampEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthClampEnableEXT args; - - if (!ctx->dispatch_vkCmdSetDepthClampEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthClampEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthClampEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthClampEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetPolygonModeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetPolygonModeEXT args; - - if (!ctx->dispatch_vkCmdSetPolygonModeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetPolygonModeEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetPolygonModeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetPolygonModeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetRasterizationSamplesEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetRasterizationSamplesEXT args; - - if (!ctx->dispatch_vkCmdSetRasterizationSamplesEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetRasterizationSamplesEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetRasterizationSamplesEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetRasterizationSamplesEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetSampleMaskEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetSampleMaskEXT args; - - if (!ctx->dispatch_vkCmdSetSampleMaskEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetSampleMaskEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetSampleMaskEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetSampleMaskEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetAlphaToCoverageEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetAlphaToCoverageEnableEXT args; - - if (!ctx->dispatch_vkCmdSetAlphaToCoverageEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetAlphaToCoverageEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetAlphaToCoverageEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetAlphaToCoverageEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetAlphaToOneEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetAlphaToOneEnableEXT args; - - if (!ctx->dispatch_vkCmdSetAlphaToOneEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetAlphaToOneEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetAlphaToOneEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetAlphaToOneEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetLogicOpEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetLogicOpEnableEXT args; - - if (!ctx->dispatch_vkCmdSetLogicOpEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetLogicOpEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetLogicOpEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetLogicOpEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetColorBlendEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetColorBlendEnableEXT args; - - if (!ctx->dispatch_vkCmdSetColorBlendEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetColorBlendEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetColorBlendEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetColorBlendEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetColorBlendEquationEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetColorBlendEquationEXT args; - - if (!ctx->dispatch_vkCmdSetColorBlendEquationEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetColorBlendEquationEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetColorBlendEquationEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetColorBlendEquationEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetColorWriteMaskEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetColorWriteMaskEXT args; - - if (!ctx->dispatch_vkCmdSetColorWriteMaskEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetColorWriteMaskEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetColorWriteMaskEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetColorWriteMaskEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetRasterizationStreamEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetRasterizationStreamEXT args; - - if (!ctx->dispatch_vkCmdSetRasterizationStreamEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetRasterizationStreamEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetRasterizationStreamEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetRasterizationStreamEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetConservativeRasterizationModeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetConservativeRasterizationModeEXT args; - - if (!ctx->dispatch_vkCmdSetConservativeRasterizationModeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetConservativeRasterizationModeEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetConservativeRasterizationModeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetConservativeRasterizationModeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetExtraPrimitiveOverestimationSizeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetExtraPrimitiveOverestimationSizeEXT args; - - if (!ctx->dispatch_vkCmdSetExtraPrimitiveOverestimationSizeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetExtraPrimitiveOverestimationSizeEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetExtraPrimitiveOverestimationSizeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetExtraPrimitiveOverestimationSizeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthClipEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthClipEnableEXT args; - - if (!ctx->dispatch_vkCmdSetDepthClipEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthClipEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthClipEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthClipEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetSampleLocationsEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetSampleLocationsEnableEXT args; - - if (!ctx->dispatch_vkCmdSetSampleLocationsEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetSampleLocationsEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetSampleLocationsEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetSampleLocationsEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetColorBlendAdvancedEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetColorBlendAdvancedEXT args; - - if (!ctx->dispatch_vkCmdSetColorBlendAdvancedEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetColorBlendAdvancedEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetColorBlendAdvancedEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetColorBlendAdvancedEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetProvokingVertexModeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetProvokingVertexModeEXT args; - - if (!ctx->dispatch_vkCmdSetProvokingVertexModeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetProvokingVertexModeEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetProvokingVertexModeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetProvokingVertexModeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetLineRasterizationModeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetLineRasterizationModeEXT args; - - if (!ctx->dispatch_vkCmdSetLineRasterizationModeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetLineRasterizationModeEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetLineRasterizationModeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetLineRasterizationModeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetLineStippleEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetLineStippleEnableEXT args; - - if (!ctx->dispatch_vkCmdSetLineStippleEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetLineStippleEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetLineStippleEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetLineStippleEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthClipNegativeOneToOneEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthClipNegativeOneToOneEXT args; - - if (!ctx->dispatch_vkCmdSetDepthClipNegativeOneToOneEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthClipNegativeOneToOneEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthClipNegativeOneToOneEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthClipNegativeOneToOneEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyBuffer2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyBuffer2 args; - - if (!ctx->dispatch_vkCmdCopyBuffer2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyBuffer2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyBuffer2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyBuffer2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyImage2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyImage2 args; - - if (!ctx->dispatch_vkCmdCopyImage2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyImage2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyImage2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyImage2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBlitImage2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBlitImage2 args; - - if (!ctx->dispatch_vkCmdBlitImage2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBlitImage2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBlitImage2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBlitImage2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyBufferToImage2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyBufferToImage2 args; - - if (!ctx->dispatch_vkCmdCopyBufferToImage2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyBufferToImage2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyBufferToImage2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyBufferToImage2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdCopyImageToBuffer2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdCopyImageToBuffer2 args; - - if (!ctx->dispatch_vkCmdCopyImageToBuffer2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdCopyImageToBuffer2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdCopyImageToBuffer2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdCopyImageToBuffer2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdResolveImage2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdResolveImage2 args; - - if (!ctx->dispatch_vkCmdResolveImage2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdResolveImage2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdResolveImage2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdResolveImage2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetFragmentShadingRateKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetFragmentShadingRateKHR args; - - if (!ctx->dispatch_vkCmdSetFragmentShadingRateKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetFragmentShadingRateKHR_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetFragmentShadingRateKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetFragmentShadingRateKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetVertexInputEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetVertexInputEXT args; - - if (!ctx->dispatch_vkCmdSetVertexInputEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetVertexInputEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetVertexInputEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetVertexInputEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetColorWriteEnableEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetColorWriteEnableEXT args; - - if (!ctx->dispatch_vkCmdSetColorWriteEnableEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetColorWriteEnableEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetColorWriteEnableEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetColorWriteEnableEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetEvent2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetEvent2 args; - - if (!ctx->dispatch_vkCmdSetEvent2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetEvent2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetEvent2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetEvent2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdResetEvent2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdResetEvent2 args; - - if (!ctx->dispatch_vkCmdResetEvent2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdResetEvent2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdResetEvent2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdResetEvent2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdWaitEvents2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdWaitEvents2 args; - - if (!ctx->dispatch_vkCmdWaitEvents2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdWaitEvents2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdWaitEvents2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdWaitEvents2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPipelineBarrier2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPipelineBarrier2 args; - - if (!ctx->dispatch_vkCmdPipelineBarrier2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPipelineBarrier2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPipelineBarrier2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPipelineBarrier2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdWriteTimestamp2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdWriteTimestamp2 args; - - if (!ctx->dispatch_vkCmdWriteTimestamp2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdWriteTimestamp2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdWriteTimestamp2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdWriteTimestamp2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBeginRendering(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBeginRendering args; - - if (!ctx->dispatch_vkCmdBeginRendering) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBeginRendering_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBeginRendering(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBeginRendering_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdEndRendering(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdEndRendering args; - - if (!ctx->dispatch_vkCmdEndRendering) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdEndRendering_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdEndRendering(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdEndRendering_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthBias2EXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthBias2EXT args; - - if (!ctx->dispatch_vkCmdSetDepthBias2EXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthBias2EXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthBias2EXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthBias2EXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindDescriptorSets2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindDescriptorSets2 args; - - if (!ctx->dispatch_vkCmdBindDescriptorSets2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindDescriptorSets2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindDescriptorSets2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindDescriptorSets2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPushConstants2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPushConstants2 args; - - if (!ctx->dispatch_vkCmdPushConstants2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPushConstants2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPushConstants2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPushConstants2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPushDescriptorSet2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPushDescriptorSet2 args; - - if (!ctx->dispatch_vkCmdPushDescriptorSet2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPushDescriptorSet2_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPushDescriptorSet2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPushDescriptorSet2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetRenderingAttachmentLocations(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetRenderingAttachmentLocations args; - - if (!ctx->dispatch_vkCmdSetRenderingAttachmentLocations) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetRenderingAttachmentLocations_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetRenderingAttachmentLocations(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetRenderingAttachmentLocations_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetRenderingInputAttachmentIndices(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetRenderingInputAttachmentIndices args; - - if (!ctx->dispatch_vkCmdSetRenderingInputAttachmentIndices) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetRenderingInputAttachmentIndices_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetRenderingInputAttachmentIndices(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetRenderingInputAttachmentIndices_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdSetDepthClampRangeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdSetDepthClampRangeEXT args; - - if (!ctx->dispatch_vkCmdSetDepthClampRangeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdSetDepthClampRangeEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdSetDepthClampRangeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdSetDepthClampRangeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindSamplerHeapEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindSamplerHeapEXT args; - - if (!ctx->dispatch_vkCmdBindSamplerHeapEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindSamplerHeapEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindSamplerHeapEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindSamplerHeapEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdBindResourceHeapEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdBindResourceHeapEXT args; - - if (!ctx->dispatch_vkCmdBindResourceHeapEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdBindResourceHeapEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdBindResourceHeapEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdBindResourceHeapEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCmdPushDataEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCmdPushDataEXT args; - - if (!ctx->dispatch_vkCmdPushDataEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCmdPushDataEXT_args_temp(ctx->decoder, &args); - if (!args.commandBuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCmdPushDataEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCmdPushDataEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_COMMAND_BUFFER_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_command_pool.h b/src/venus/venus-protocol/vn_protocol_renderer_command_pool.h deleted file mode 100644 index 9e243ceb..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_command_pool.h +++ /dev/null @@ -1,324 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_COMMAND_POOL_H -#define VN_PROTOCOL_RENDERER_COMMAND_POOL_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkCommandPoolCreateInfo chain */ - -static inline void * -vn_decode_VkCommandPoolCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCommandPoolCreateInfo_self_temp(struct vn_cs_decoder *dec, VkCommandPoolCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->queueFamilyIndex); -} - -static inline void -vn_decode_VkCommandPoolCreateInfo_temp(struct vn_cs_decoder *dec, VkCommandPoolCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandPoolCreateInfo_pnext_temp(dec); - vn_decode_VkCommandPoolCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandPoolCreateInfo_handle_self(VkCommandPoolCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->queueFamilyIndex */ -} - -static inline void -vn_replace_VkCommandPoolCreateInfo_handle(VkCommandPoolCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO: - vn_replace_VkCommandPoolCreateInfo_handle_self((VkCommandPoolCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateCommandPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateCommandPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkCommandPoolCreateInfo_temp(dec, (VkCommandPoolCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pCommandPool = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCommandPool)); - if (!args->pCommandPool) return; - vn_decode_VkCommandPool(dec, args->pCommandPool); - } else { - args->pCommandPool = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateCommandPool_args_handle(struct vn_command_vkCreateCommandPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkCommandPoolCreateInfo_handle((VkCommandPoolCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pCommandPool */ -} - -static inline void vn_encode_vkCreateCommandPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateCommandPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateCommandPool_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pCommandPool)) - vn_encode_VkCommandPool(enc, args->pCommandPool); -} - -static inline void vn_decode_vkDestroyCommandPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyCommandPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkCommandPool_lookup(dec, &args->commandPool); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyCommandPool_args_handle(struct vn_command_vkDestroyCommandPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkCommandPool_handle(&args->commandPool); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyCommandPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyCommandPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyCommandPool_EXT}); - - /* skip args->device */ - /* skip args->commandPool */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkResetCommandPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetCommandPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkCommandPool_lookup(dec, &args->commandPool); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkResetCommandPool_args_handle(struct vn_command_vkResetCommandPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkCommandPool_handle(&args->commandPool); - /* skip args->flags */ -} - -static inline void vn_encode_vkResetCommandPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetCommandPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetCommandPool_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->commandPool */ - /* skip args->flags */ -} - -static inline void vn_decode_vkTrimCommandPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkTrimCommandPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkCommandPool_lookup(dec, &args->commandPool); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkTrimCommandPool_args_handle(struct vn_command_vkTrimCommandPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkCommandPool_handle(&args->commandPool); - /* skip args->flags */ -} - -static inline void vn_encode_vkTrimCommandPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkTrimCommandPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkTrimCommandPool_EXT}); - - /* skip args->device */ - /* skip args->commandPool */ - /* skip args->flags */ -} - -static inline void vn_dispatch_vkCreateCommandPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateCommandPool args; - - if (!ctx->dispatch_vkCreateCommandPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateCommandPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateCommandPool(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateCommandPool returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateCommandPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyCommandPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyCommandPool args; - - if (!ctx->dispatch_vkDestroyCommandPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyCommandPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyCommandPool(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyCommandPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetCommandPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetCommandPool args; - - if (!ctx->dispatch_vkResetCommandPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetCommandPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetCommandPool(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkResetCommandPool returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetCommandPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkTrimCommandPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkTrimCommandPool args; - - if (!ctx->dispatch_vkTrimCommandPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkTrimCommandPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkTrimCommandPool(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkTrimCommandPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_COMMAND_POOL_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_cs.h b/src/venus/venus-protocol/vn_protocol_renderer_cs.h deleted file mode 100644 index e423c95a..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_cs.h +++ /dev/null @@ -1,178 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_CS_H -#define VN_PROTOCOL_RENDERER_CS_H - -#include - -/* - * These types/functions are expected - * - * struct vn_cs_encoder - * vn_cs_encoder_write - * - * struct vn_cs_decoder - * vn_cs_decoder_set_fatal - * vn_cs_decoder_get_fatal - * vn_cs_decoder_lookup_object - * vn_cs_decoder_reset_temp_pool - * vn_cs_decoder_alloc_temp - * vn_cs_decoder_read - * vn_cs_decoder_peek - * - * vn_object_id - * vn_cs_handle_indirect_id - * vn_cs_handle_load_id - * vn_cs_handle_store_id - * vn_cs_get_object_handle - */ -#include "vkr_cs.h" - -struct vn_cs_encoder; -struct vn_cs_decoder; - -typedef vkr_object_id vn_object_id; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-parameter" - -static inline bool -vn_cs_encoder_acquire(struct vn_cs_encoder *enc) -{ - struct vkr_cs_encoder *e = (struct vkr_cs_encoder *)enc; - return vkr_cs_encoder_acquire(e); -} - -static inline void -vn_cs_encoder_release(struct vn_cs_encoder *enc) -{ - struct vkr_cs_encoder *e = (struct vkr_cs_encoder *)enc; - vkr_cs_encoder_release(e); -} - -static inline void -vn_cs_encoder_write(struct vn_cs_encoder *enc, size_t size, const void *val, size_t val_size) -{ - struct vkr_cs_encoder *e = (struct vkr_cs_encoder *)enc; - vkr_cs_encoder_write(e, size, val, val_size); -} - -static inline void -vn_cs_decoder_set_fatal(const struct vn_cs_decoder *dec) -{ - const struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - vkr_cs_decoder_set_fatal(d); -} - -static inline bool -vn_cs_decoder_get_fatal(const struct vn_cs_decoder *dec) -{ - const struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - return vkr_cs_decoder_get_fatal(d); -} - -static inline void * -vn_cs_decoder_lookup_object(const struct vn_cs_decoder *dec, vn_object_id id, VkObjectType type) -{ - const struct vkr_cs_decoder *d = (const struct vkr_cs_decoder *)dec; - return vkr_cs_decoder_lookup_object(d, id, type); -} - -static inline void -vn_cs_decoder_reset_temp_pool(struct vn_cs_decoder *dec) -{ - struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - vkr_cs_decoder_reset_temp_pool(d); -} - -static inline void * -vn_cs_decoder_alloc_temp(struct vn_cs_decoder *dec, size_t size) -{ - struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - return vkr_cs_decoder_alloc_temp(d, size); -} - -static inline void * -vn_cs_decoder_get_blob_storage(struct vn_cs_decoder *dec, size_t size) -{ - struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - return vkr_cs_decoder_get_blob_storage(d, size); -} - -static inline void * -vn_cs_encoder_get_blob_storage(struct vn_cs_encoder *enc, size_t offset, size_t size) -{ - struct vkr_cs_encoder *e = (struct vkr_cs_encoder *)enc; - return vkr_cs_encoder_get_blob_storage(e, offset, size); -} - -static inline void * -vn_cs_decoder_alloc_temp_array(struct vn_cs_decoder *dec, size_t size, size_t count) -{ - struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - return vkr_cs_decoder_alloc_temp_array(d, size, count); -} - -static inline void -vn_cs_decoder_read(struct vn_cs_decoder *dec, size_t size, void *val, size_t val_size) -{ - struct vkr_cs_decoder *d = (struct vkr_cs_decoder *)dec; - vkr_cs_decoder_read(d, size, val, val_size); -} - -static inline void -vn_cs_decoder_peek(const struct vn_cs_decoder *dec, size_t size, void *val, size_t val_size) -{ - const struct vkr_cs_decoder *d = (const struct vkr_cs_decoder *)dec; - vkr_cs_decoder_peek(d, size, val, val_size); -} - -static inline bool -vn_cs_handle_indirect_id(VkObjectType type) -{ - return vkr_cs_handle_indirect_id(type); -} - -static inline vn_object_id -vn_cs_handle_load_id(const void **handle, VkObjectType type) -{ - return vkr_cs_handle_load_id(handle, type); -} - -static inline void -vn_cs_handle_store_id(void **handle, vn_object_id id, VkObjectType type) -{ - vkr_cs_handle_store_id(handle, id, type); -} - -static inline uint64_t -vn_cs_get_object_handle(const void **handle, VkObjectType type) -{ - const struct vkr_object *obj = *(const struct vkr_object **)handle; - return obj ? obj->handle.u64 : 0; -} - -static inline void -vn_encode(struct vn_cs_encoder *enc, size_t size, const void *data, size_t data_size) -{ - assert(size % 4 == 0); - /* no vn_cs_encoder_reserve; vn_cs_encoder_write must do size check */ - /* TODO check if the generated code is optimal */ - vn_cs_encoder_write(enc, size, data, data_size); -} - -static inline void -vn_decode(struct vn_cs_decoder *dec, size_t size, void *data, size_t data_size) -{ - assert(size % 4 == 0); - vn_cs_decoder_read(dec, size, data, data_size); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_CS_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_defines.h b/src/venus/venus-protocol/vn_protocol_renderer_defines.h deleted file mode 100644 index 82f71f92..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_defines.h +++ /dev/null @@ -1,3437 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DEFINES_H -#define VN_PROTOCOL_RENDERER_DEFINES_H - -#include -#include -#include -#include - -#include "vulkan.h" - -#include "vn_protocol_renderer_cs.h" - -/* VkStructureType */ -#define VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA ((VkStructureType)1000384000) -#define VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA ((VkStructureType)1000384001) -#define VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA ((VkStructureType)1000384002) -#define VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA ((VkStructureType)1000384003) -#define VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_RESOURCE_INFO_MESA ((VkStructureType)1000384004) -#define VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA ((VkStructureType)1000384005) -#define VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA ((VkStructureType)1000384006) -#define VK_STRUCTURE_TYPE_RING_PRIORITY_INFO_MESA ((VkStructureType)1000384007) -#define VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_MESA ((VkStructureType)1000384008) -#define VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_MESA ((VkStructureType)1000384009) -#define VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_MESA ((VkStructureType)1000384010) - -typedef enum VkCommandTypeEXT { - VK_COMMAND_TYPE_vkCreateInstance_EXT = 0, - VK_COMMAND_TYPE_vkDestroyInstance_EXT = 1, - VK_COMMAND_TYPE_vkEnumeratePhysicalDevices_EXT = 2, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures_EXT = 3, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties_EXT = 4, - VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties_EXT = 5, - VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties_EXT = 6, - VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties_EXT = 7, - VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties_EXT = 8, - VK_COMMAND_TYPE_vkGetInstanceProcAddr_EXT = 9, - VK_COMMAND_TYPE_vkGetDeviceProcAddr_EXT = 10, - VK_COMMAND_TYPE_vkCreateDevice_EXT = 11, - VK_COMMAND_TYPE_vkDestroyDevice_EXT = 12, - VK_COMMAND_TYPE_vkEnumerateInstanceExtensionProperties_EXT = 13, - VK_COMMAND_TYPE_vkEnumerateDeviceExtensionProperties_EXT = 14, - VK_COMMAND_TYPE_vkEnumerateInstanceLayerProperties_EXT = 15, - VK_COMMAND_TYPE_vkEnumerateDeviceLayerProperties_EXT = 16, - VK_COMMAND_TYPE_vkGetDeviceQueue_EXT = 17, - VK_COMMAND_TYPE_vkQueueSubmit_EXT = 18, - VK_COMMAND_TYPE_vkQueueWaitIdle_EXT = 19, - VK_COMMAND_TYPE_vkDeviceWaitIdle_EXT = 20, - VK_COMMAND_TYPE_vkAllocateMemory_EXT = 21, - VK_COMMAND_TYPE_vkFreeMemory_EXT = 22, - VK_COMMAND_TYPE_vkMapMemory_EXT = 23, - VK_COMMAND_TYPE_vkUnmapMemory_EXT = 24, - VK_COMMAND_TYPE_vkFlushMappedMemoryRanges_EXT = 25, - VK_COMMAND_TYPE_vkInvalidateMappedMemoryRanges_EXT = 26, - VK_COMMAND_TYPE_vkGetDeviceMemoryCommitment_EXT = 27, - VK_COMMAND_TYPE_vkBindBufferMemory_EXT = 28, - VK_COMMAND_TYPE_vkBindImageMemory_EXT = 29, - VK_COMMAND_TYPE_vkGetBufferMemoryRequirements_EXT = 30, - VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT = 31, - VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT = 32, - VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties_EXT = 33, - VK_COMMAND_TYPE_vkQueueBindSparse_EXT = 34, - VK_COMMAND_TYPE_vkCreateFence_EXT = 35, - VK_COMMAND_TYPE_vkDestroyFence_EXT = 36, - VK_COMMAND_TYPE_vkResetFences_EXT = 37, - VK_COMMAND_TYPE_vkGetFenceStatus_EXT = 38, - VK_COMMAND_TYPE_vkWaitForFences_EXT = 39, - VK_COMMAND_TYPE_vkCreateSemaphore_EXT = 40, - VK_COMMAND_TYPE_vkDestroySemaphore_EXT = 41, - VK_COMMAND_TYPE_vkCreateEvent_EXT = 42, - VK_COMMAND_TYPE_vkDestroyEvent_EXT = 43, - VK_COMMAND_TYPE_vkGetEventStatus_EXT = 44, - VK_COMMAND_TYPE_vkSetEvent_EXT = 45, - VK_COMMAND_TYPE_vkResetEvent_EXT = 46, - VK_COMMAND_TYPE_vkCreateQueryPool_EXT = 47, - VK_COMMAND_TYPE_vkDestroyQueryPool_EXT = 48, - VK_COMMAND_TYPE_vkGetQueryPoolResults_EXT = 49, - VK_COMMAND_TYPE_vkCreateBuffer_EXT = 50, - VK_COMMAND_TYPE_vkDestroyBuffer_EXT = 51, - VK_COMMAND_TYPE_vkCreateBufferView_EXT = 52, - VK_COMMAND_TYPE_vkDestroyBufferView_EXT = 53, - VK_COMMAND_TYPE_vkCreateImage_EXT = 54, - VK_COMMAND_TYPE_vkDestroyImage_EXT = 55, - VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT = 56, - VK_COMMAND_TYPE_vkCreateImageView_EXT = 57, - VK_COMMAND_TYPE_vkDestroyImageView_EXT = 58, - VK_COMMAND_TYPE_vkCreateShaderModule_EXT = 59, - VK_COMMAND_TYPE_vkDestroyShaderModule_EXT = 60, - VK_COMMAND_TYPE_vkCreatePipelineCache_EXT = 61, - VK_COMMAND_TYPE_vkDestroyPipelineCache_EXT = 62, - VK_COMMAND_TYPE_vkGetPipelineCacheData_EXT = 63, - VK_COMMAND_TYPE_vkMergePipelineCaches_EXT = 64, - VK_COMMAND_TYPE_vkCreateGraphicsPipelines_EXT = 65, - VK_COMMAND_TYPE_vkCreateComputePipelines_EXT = 66, - VK_COMMAND_TYPE_vkDestroyPipeline_EXT = 67, - VK_COMMAND_TYPE_vkCreatePipelineLayout_EXT = 68, - VK_COMMAND_TYPE_vkDestroyPipelineLayout_EXT = 69, - VK_COMMAND_TYPE_vkCreateSampler_EXT = 70, - VK_COMMAND_TYPE_vkDestroySampler_EXT = 71, - VK_COMMAND_TYPE_vkCreateDescriptorSetLayout_EXT = 72, - VK_COMMAND_TYPE_vkDestroyDescriptorSetLayout_EXT = 73, - VK_COMMAND_TYPE_vkCreateDescriptorPool_EXT = 74, - VK_COMMAND_TYPE_vkDestroyDescriptorPool_EXT = 75, - VK_COMMAND_TYPE_vkResetDescriptorPool_EXT = 76, - VK_COMMAND_TYPE_vkAllocateDescriptorSets_EXT = 77, - VK_COMMAND_TYPE_vkFreeDescriptorSets_EXT = 78, - VK_COMMAND_TYPE_vkUpdateDescriptorSets_EXT = 79, - VK_COMMAND_TYPE_vkCreateFramebuffer_EXT = 80, - VK_COMMAND_TYPE_vkDestroyFramebuffer_EXT = 81, - VK_COMMAND_TYPE_vkCreateRenderPass_EXT = 82, - VK_COMMAND_TYPE_vkDestroyRenderPass_EXT = 83, - VK_COMMAND_TYPE_vkGetRenderAreaGranularity_EXT = 84, - VK_COMMAND_TYPE_vkCreateCommandPool_EXT = 85, - VK_COMMAND_TYPE_vkDestroyCommandPool_EXT = 86, - VK_COMMAND_TYPE_vkResetCommandPool_EXT = 87, - VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT = 88, - VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT = 89, - VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT = 90, - VK_COMMAND_TYPE_vkEndCommandBuffer_EXT = 91, - VK_COMMAND_TYPE_vkResetCommandBuffer_EXT = 92, - VK_COMMAND_TYPE_vkCmdBindPipeline_EXT = 93, - VK_COMMAND_TYPE_vkCmdSetViewport_EXT = 94, - VK_COMMAND_TYPE_vkCmdSetScissor_EXT = 95, - VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT = 96, - VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT = 97, - VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT = 98, - VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT = 99, - VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT = 100, - VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT = 101, - VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT = 102, - VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT = 103, - VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT = 104, - VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT = 105, - VK_COMMAND_TYPE_vkCmdDraw_EXT = 106, - VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT = 107, - VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT = 108, - VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT = 109, - VK_COMMAND_TYPE_vkCmdDispatch_EXT = 110, - VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT = 111, - VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT = 112, - VK_COMMAND_TYPE_vkCmdCopyImage_EXT = 113, - VK_COMMAND_TYPE_vkCmdBlitImage_EXT = 114, - VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT = 115, - VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT = 116, - VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT = 117, - VK_COMMAND_TYPE_vkCmdFillBuffer_EXT = 118, - VK_COMMAND_TYPE_vkCmdClearColorImage_EXT = 119, - VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT = 120, - VK_COMMAND_TYPE_vkCmdClearAttachments_EXT = 121, - VK_COMMAND_TYPE_vkCmdResolveImage_EXT = 122, - VK_COMMAND_TYPE_vkCmdSetEvent_EXT = 123, - VK_COMMAND_TYPE_vkCmdResetEvent_EXT = 124, - VK_COMMAND_TYPE_vkCmdWaitEvents_EXT = 125, - VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT = 126, - VK_COMMAND_TYPE_vkCmdBeginQuery_EXT = 127, - VK_COMMAND_TYPE_vkCmdEndQuery_EXT = 128, - VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT = 129, - VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT = 130, - VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT = 131, - VK_COMMAND_TYPE_vkCmdPushConstants_EXT = 132, - VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT = 133, - VK_COMMAND_TYPE_vkCmdNextSubpass_EXT = 134, - VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT = 135, - VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT = 136, - VK_COMMAND_TYPE_vkEnumerateInstanceVersion_EXT = 137, - VK_COMMAND_TYPE_vkBindBufferMemory2_EXT = 138, - VK_COMMAND_TYPE_vkBindBufferMemory2KHR_EXT = 138, - VK_COMMAND_TYPE_vkBindImageMemory2_EXT = 139, - VK_COMMAND_TYPE_vkBindImageMemory2KHR_EXT = 139, - VK_COMMAND_TYPE_vkGetDeviceGroupPeerMemoryFeatures_EXT = 140, - VK_COMMAND_TYPE_vkGetDeviceGroupPeerMemoryFeaturesKHR_EXT = 140, - VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT = 141, - VK_COMMAND_TYPE_vkCmdSetDeviceMaskKHR_EXT = 141, - VK_COMMAND_TYPE_vkCmdDispatchBase_EXT = 142, - VK_COMMAND_TYPE_vkCmdDispatchBaseKHR_EXT = 142, - VK_COMMAND_TYPE_vkEnumeratePhysicalDeviceGroups_EXT = 143, - VK_COMMAND_TYPE_vkEnumeratePhysicalDeviceGroupsKHR_EXT = 143, - VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT = 144, - VK_COMMAND_TYPE_vkGetImageMemoryRequirements2KHR_EXT = 144, - VK_COMMAND_TYPE_vkGetBufferMemoryRequirements2_EXT = 145, - VK_COMMAND_TYPE_vkGetBufferMemoryRequirements2KHR_EXT = 145, - VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT = 146, - VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2KHR_EXT = 146, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures2_EXT = 147, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures2KHR_EXT = 147, - VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties2_EXT = 148, - VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties2KHR_EXT = 148, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties2_EXT = 149, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties2KHR_EXT = 149, - VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties2_EXT = 150, - VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties2KHR_EXT = 150, - VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties2_EXT = 151, - VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties2KHR_EXT = 151, - VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties2_EXT = 152, - VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties2KHR_EXT = 152, - VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties2_EXT = 153, - VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties2KHR_EXT = 153, - VK_COMMAND_TYPE_vkTrimCommandPool_EXT = 154, - VK_COMMAND_TYPE_vkTrimCommandPoolKHR_EXT = 154, - VK_COMMAND_TYPE_vkGetDeviceQueue2_EXT = 155, - VK_COMMAND_TYPE_vkCreateSamplerYcbcrConversion_EXT = 156, - VK_COMMAND_TYPE_vkCreateSamplerYcbcrConversionKHR_EXT = 156, - VK_COMMAND_TYPE_vkDestroySamplerYcbcrConversion_EXT = 157, - VK_COMMAND_TYPE_vkDestroySamplerYcbcrConversionKHR_EXT = 157, - VK_COMMAND_TYPE_vkCreateDescriptorUpdateTemplate_EXT = 158, - VK_COMMAND_TYPE_vkCreateDescriptorUpdateTemplateKHR_EXT = 158, - VK_COMMAND_TYPE_vkDestroyDescriptorUpdateTemplate_EXT = 159, - VK_COMMAND_TYPE_vkDestroyDescriptorUpdateTemplateKHR_EXT = 159, - VK_COMMAND_TYPE_vkUpdateDescriptorSetWithTemplate_EXT = 160, - VK_COMMAND_TYPE_vkUpdateDescriptorSetWithTemplateKHR_EXT = 160, - VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalBufferProperties_EXT = 161, - VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalBufferPropertiesKHR_EXT = 161, - VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalFenceProperties_EXT = 162, - VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalFencePropertiesKHR_EXT = 162, - VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalSemaphoreProperties_EXT = 163, - VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR_EXT = 163, - VK_COMMAND_TYPE_vkGetDescriptorSetLayoutSupport_EXT = 164, - VK_COMMAND_TYPE_vkGetDescriptorSetLayoutSupportKHR_EXT = 164, - VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT = 165, - VK_COMMAND_TYPE_vkCmdDrawIndirectCountKHR_EXT = 165, - VK_COMMAND_TYPE_vkCmdDrawIndirectCountAMD_EXT = 165, - VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT = 166, - VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCountKHR_EXT = 166, - VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCountAMD_EXT = 166, - VK_COMMAND_TYPE_vkCreateRenderPass2_EXT = 167, - VK_COMMAND_TYPE_vkCreateRenderPass2KHR_EXT = 167, - VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT = 168, - VK_COMMAND_TYPE_vkCmdBeginRenderPass2KHR_EXT = 168, - VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT = 169, - VK_COMMAND_TYPE_vkCmdNextSubpass2KHR_EXT = 169, - VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT = 170, - VK_COMMAND_TYPE_vkCmdEndRenderPass2KHR_EXT = 170, - VK_COMMAND_TYPE_vkResetQueryPool_EXT = 171, - VK_COMMAND_TYPE_vkResetQueryPoolEXT_EXT = 171, - VK_COMMAND_TYPE_vkGetSemaphoreCounterValue_EXT = 172, - VK_COMMAND_TYPE_vkGetSemaphoreCounterValueKHR_EXT = 172, - VK_COMMAND_TYPE_vkWaitSemaphores_EXT = 173, - VK_COMMAND_TYPE_vkWaitSemaphoresKHR_EXT = 173, - VK_COMMAND_TYPE_vkSignalSemaphore_EXT = 174, - VK_COMMAND_TYPE_vkSignalSemaphoreKHR_EXT = 174, - VK_COMMAND_TYPE_vkGetBufferDeviceAddress_EXT = 175, - VK_COMMAND_TYPE_vkGetBufferDeviceAddressKHR_EXT = 175, - VK_COMMAND_TYPE_vkGetBufferDeviceAddressEXT_EXT = 175, - VK_COMMAND_TYPE_vkGetBufferOpaqueCaptureAddress_EXT = 176, - VK_COMMAND_TYPE_vkGetBufferOpaqueCaptureAddressKHR_EXT = 176, - VK_COMMAND_TYPE_vkGetDeviceMemoryOpaqueCaptureAddress_EXT = 177, - VK_COMMAND_TYPE_vkGetDeviceMemoryOpaqueCaptureAddressKHR_EXT = 177, - VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT = 178, - VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT = 179, - VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT = 180, - VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT = 181, - VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT = 182, - VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT = 183, - VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT = 184, - VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT = 185, - VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT = 186, - VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT = 187, - VK_COMMAND_TYPE_vkCreateRingMESA_EXT = 188, - VK_COMMAND_TYPE_vkDestroyRingMESA_EXT = 189, - VK_COMMAND_TYPE_vkNotifyRingMESA_EXT = 190, - VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT = 191, - VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT = 192, - VK_COMMAND_TYPE_vkGetMemoryFdKHR_EXT = 193, - VK_COMMAND_TYPE_vkGetMemoryFdPropertiesKHR_EXT = 194, - VK_COMMAND_TYPE_vkGetPhysicalDeviceToolProperties_EXT = 196, - VK_COMMAND_TYPE_vkGetPhysicalDeviceToolPropertiesEXT_EXT = 196, - VK_COMMAND_TYPE_vkCreatePrivateDataSlot_EXT = 197, - VK_COMMAND_TYPE_vkCreatePrivateDataSlotEXT_EXT = 197, - VK_COMMAND_TYPE_vkDestroyPrivateDataSlot_EXT = 198, - VK_COMMAND_TYPE_vkDestroyPrivateDataSlotEXT_EXT = 198, - VK_COMMAND_TYPE_vkSetPrivateData_EXT = 199, - VK_COMMAND_TYPE_vkSetPrivateDataEXT_EXT = 199, - VK_COMMAND_TYPE_vkGetPrivateData_EXT = 200, - VK_COMMAND_TYPE_vkGetPrivateDataEXT_EXT = 200, - VK_COMMAND_TYPE_vkCmdSetEvent2_EXT = 201, - VK_COMMAND_TYPE_vkCmdSetEvent2KHR_EXT = 201, - VK_COMMAND_TYPE_vkCmdResetEvent2_EXT = 202, - VK_COMMAND_TYPE_vkCmdResetEvent2KHR_EXT = 202, - VK_COMMAND_TYPE_vkCmdWaitEvents2_EXT = 203, - VK_COMMAND_TYPE_vkCmdWaitEvents2KHR_EXT = 203, - VK_COMMAND_TYPE_vkCmdPipelineBarrier2_EXT = 204, - VK_COMMAND_TYPE_vkCmdPipelineBarrier2KHR_EXT = 204, - VK_COMMAND_TYPE_vkCmdWriteTimestamp2_EXT = 205, - VK_COMMAND_TYPE_vkCmdWriteTimestamp2KHR_EXT = 205, - VK_COMMAND_TYPE_vkQueueSubmit2_EXT = 206, - VK_COMMAND_TYPE_vkQueueSubmit2KHR_EXT = 206, - VK_COMMAND_TYPE_vkCmdCopyBuffer2_EXT = 207, - VK_COMMAND_TYPE_vkCmdCopyBuffer2KHR_EXT = 207, - VK_COMMAND_TYPE_vkCmdCopyImage2_EXT = 208, - VK_COMMAND_TYPE_vkCmdCopyImage2KHR_EXT = 208, - VK_COMMAND_TYPE_vkCmdCopyBufferToImage2_EXT = 209, - VK_COMMAND_TYPE_vkCmdCopyBufferToImage2KHR_EXT = 209, - VK_COMMAND_TYPE_vkCmdCopyImageToBuffer2_EXT = 210, - VK_COMMAND_TYPE_vkCmdCopyImageToBuffer2KHR_EXT = 210, - VK_COMMAND_TYPE_vkCmdBlitImage2_EXT = 211, - VK_COMMAND_TYPE_vkCmdBlitImage2KHR_EXT = 211, - VK_COMMAND_TYPE_vkCmdResolveImage2_EXT = 212, - VK_COMMAND_TYPE_vkCmdResolveImage2KHR_EXT = 212, - VK_COMMAND_TYPE_vkCmdBeginRendering_EXT = 213, - VK_COMMAND_TYPE_vkCmdBeginRenderingKHR_EXT = 213, - VK_COMMAND_TYPE_vkCmdEndRendering_EXT = 214, - VK_COMMAND_TYPE_vkCmdEndRenderingKHR_EXT = 214, - VK_COMMAND_TYPE_vkCmdSetCullMode_EXT = 215, - VK_COMMAND_TYPE_vkCmdSetCullModeEXT_EXT = 215, - VK_COMMAND_TYPE_vkCmdSetFrontFace_EXT = 216, - VK_COMMAND_TYPE_vkCmdSetFrontFaceEXT_EXT = 216, - VK_COMMAND_TYPE_vkCmdSetPrimitiveTopology_EXT = 217, - VK_COMMAND_TYPE_vkCmdSetPrimitiveTopologyEXT_EXT = 217, - VK_COMMAND_TYPE_vkCmdSetViewportWithCount_EXT = 218, - VK_COMMAND_TYPE_vkCmdSetViewportWithCountEXT_EXT = 218, - VK_COMMAND_TYPE_vkCmdSetScissorWithCount_EXT = 219, - VK_COMMAND_TYPE_vkCmdSetScissorWithCountEXT_EXT = 219, - VK_COMMAND_TYPE_vkCmdBindVertexBuffers2_EXT = 220, - VK_COMMAND_TYPE_vkCmdBindVertexBuffers2EXT_EXT = 220, - VK_COMMAND_TYPE_vkCmdSetDepthTestEnable_EXT = 221, - VK_COMMAND_TYPE_vkCmdSetDepthTestEnableEXT_EXT = 221, - VK_COMMAND_TYPE_vkCmdSetDepthWriteEnable_EXT = 222, - VK_COMMAND_TYPE_vkCmdSetDepthWriteEnableEXT_EXT = 222, - VK_COMMAND_TYPE_vkCmdSetDepthCompareOp_EXT = 223, - VK_COMMAND_TYPE_vkCmdSetDepthCompareOpEXT_EXT = 223, - VK_COMMAND_TYPE_vkCmdSetDepthBoundsTestEnable_EXT = 224, - VK_COMMAND_TYPE_vkCmdSetDepthBoundsTestEnableEXT_EXT = 224, - VK_COMMAND_TYPE_vkCmdSetStencilTestEnable_EXT = 225, - VK_COMMAND_TYPE_vkCmdSetStencilTestEnableEXT_EXT = 225, - VK_COMMAND_TYPE_vkCmdSetStencilOp_EXT = 226, - VK_COMMAND_TYPE_vkCmdSetStencilOpEXT_EXT = 226, - VK_COMMAND_TYPE_vkCmdSetRasterizerDiscardEnable_EXT = 227, - VK_COMMAND_TYPE_vkCmdSetRasterizerDiscardEnableEXT_EXT = 227, - VK_COMMAND_TYPE_vkCmdSetDepthBiasEnable_EXT = 228, - VK_COMMAND_TYPE_vkCmdSetDepthBiasEnableEXT_EXT = 228, - VK_COMMAND_TYPE_vkCmdSetPrimitiveRestartEnable_EXT = 229, - VK_COMMAND_TYPE_vkCmdSetPrimitiveRestartEnableEXT_EXT = 229, - VK_COMMAND_TYPE_vkGetDeviceBufferMemoryRequirements_EXT = 230, - VK_COMMAND_TYPE_vkGetDeviceBufferMemoryRequirementsKHR_EXT = 230, - VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT = 231, - VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirementsKHR_EXT = 231, - VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT = 232, - VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirementsKHR_EXT = 232, - VK_COMMAND_TYPE_vkCmdSetPatchControlPointsEXT_EXT = 233, - VK_COMMAND_TYPE_vkCmdSetLogicOpEXT_EXT = 234, - VK_COMMAND_TYPE_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_EXT = 235, - VK_COMMAND_TYPE_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT_EXT = 235, - VK_COMMAND_TYPE_vkGetCalibratedTimestampsKHR_EXT = 236, - VK_COMMAND_TYPE_vkGetCalibratedTimestampsEXT_EXT = 236, - VK_COMMAND_TYPE_vkCmdSetLineStipple_EXT = 237, - VK_COMMAND_TYPE_vkCmdSetLineStippleKHR_EXT = 237, - VK_COMMAND_TYPE_vkCmdSetLineStippleEXT_EXT = 237, - VK_COMMAND_TYPE_vkImportFenceFdKHR_EXT = 238, - VK_COMMAND_TYPE_vkGetFenceFdKHR_EXT = 239, - VK_COMMAND_TYPE_vkCmdBeginConditionalRenderingEXT_EXT = 240, - VK_COMMAND_TYPE_vkCmdEndConditionalRenderingEXT_EXT = 241, - VK_COMMAND_TYPE_vkImportSemaphoreFdKHR_EXT = 242, - VK_COMMAND_TYPE_vkGetSemaphoreFdKHR_EXT = 243, - VK_COMMAND_TYPE_vkResetFenceResourceMESA_EXT = 244, - VK_COMMAND_TYPE_vkWaitSemaphoreResourceMESA_EXT = 245, - VK_COMMAND_TYPE_vkImportSemaphoreResourceMESA_EXT = 246, - VK_COMMAND_TYPE_vkCmdDrawMultiEXT_EXT = 247, - VK_COMMAND_TYPE_vkCmdDrawMultiIndexedEXT_EXT = 248, - VK_COMMAND_TYPE_vkCmdPushDescriptorSet_EXT = 249, - VK_COMMAND_TYPE_vkCmdPushDescriptorSetKHR_EXT = 249, - VK_COMMAND_TYPE_vkCmdPushDescriptorSetWithTemplate_EXT = 250, - VK_COMMAND_TYPE_vkCmdPushDescriptorSetWithTemplateKHR_EXT = 250, - VK_COMMAND_TYPE_vkSubmitVirtqueueSeqnoMESA_EXT = 251, - VK_COMMAND_TYPE_vkWaitVirtqueueSeqnoMESA_EXT = 252, - VK_COMMAND_TYPE_vkWaitRingSeqnoMESA_EXT = 253, - VK_COMMAND_TYPE_vkCmdSetColorWriteEnableEXT_EXT = 254, - VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT = 255, - VK_COMMAND_TYPE_vkCmdSetTessellationDomainOriginEXT_EXT = 256, - VK_COMMAND_TYPE_vkCmdSetDepthClampEnableEXT_EXT = 257, - VK_COMMAND_TYPE_vkCmdSetPolygonModeEXT_EXT = 258, - VK_COMMAND_TYPE_vkCmdSetRasterizationSamplesEXT_EXT = 259, - VK_COMMAND_TYPE_vkCmdSetSampleMaskEXT_EXT = 260, - VK_COMMAND_TYPE_vkCmdSetAlphaToCoverageEnableEXT_EXT = 261, - VK_COMMAND_TYPE_vkCmdSetAlphaToOneEnableEXT_EXT = 262, - VK_COMMAND_TYPE_vkCmdSetLogicOpEnableEXT_EXT = 263, - VK_COMMAND_TYPE_vkCmdSetColorBlendEnableEXT_EXT = 264, - VK_COMMAND_TYPE_vkCmdSetColorBlendEquationEXT_EXT = 265, - VK_COMMAND_TYPE_vkCmdSetColorWriteMaskEXT_EXT = 266, - VK_COMMAND_TYPE_vkCmdSetRasterizationStreamEXT_EXT = 267, - VK_COMMAND_TYPE_vkCmdSetConservativeRasterizationModeEXT_EXT = 268, - VK_COMMAND_TYPE_vkCmdSetExtraPrimitiveOverestimationSizeEXT_EXT = 269, - VK_COMMAND_TYPE_vkCmdSetDepthClipEnableEXT_EXT = 270, - VK_COMMAND_TYPE_vkCmdSetSampleLocationsEnableEXT_EXT = 271, - VK_COMMAND_TYPE_vkCmdSetColorBlendAdvancedEXT_EXT = 272, - VK_COMMAND_TYPE_vkCmdSetProvokingVertexModeEXT_EXT = 273, - VK_COMMAND_TYPE_vkCmdSetLineRasterizationModeEXT_EXT = 274, - VK_COMMAND_TYPE_vkCmdSetLineStippleEnableEXT_EXT = 275, - VK_COMMAND_TYPE_vkCmdSetDepthClipNegativeOneToOneEXT_EXT = 276, - VK_COMMAND_TYPE_vkGetPhysicalDeviceFragmentShadingRatesKHR_EXT = 277, - VK_COMMAND_TYPE_vkCmdSetFragmentShadingRateKHR_EXT = 278, - VK_COMMAND_TYPE_vkCmdBindIndexBuffer2_EXT = 279, - VK_COMMAND_TYPE_vkCmdBindIndexBuffer2KHR_EXT = 279, - VK_COMMAND_TYPE_vkGetRenderingAreaGranularity_EXT = 280, - VK_COMMAND_TYPE_vkGetRenderingAreaGranularityKHR_EXT = 280, - VK_COMMAND_TYPE_vkGetDeviceImageSubresourceLayout_EXT = 281, - VK_COMMAND_TYPE_vkGetDeviceImageSubresourceLayoutKHR_EXT = 281, - VK_COMMAND_TYPE_vkGetImageSubresourceLayout2_EXT = 282, - VK_COMMAND_TYPE_vkGetImageSubresourceLayout2KHR_EXT = 282, - VK_COMMAND_TYPE_vkGetImageSubresourceLayout2EXT_EXT = 282, - VK_COMMAND_TYPE_vkCmdSetSampleLocationsEXT_EXT = 283, - VK_COMMAND_TYPE_vkGetPhysicalDeviceMultisamplePropertiesEXT_EXT = 284, - VK_COMMAND_TYPE_vkMapMemory2_EXT = 285, - VK_COMMAND_TYPE_vkMapMemory2KHR_EXT = 285, - VK_COMMAND_TYPE_vkUnmapMemory2_EXT = 286, - VK_COMMAND_TYPE_vkUnmapMemory2KHR_EXT = 286, - VK_COMMAND_TYPE_vkCmdSetRenderingAttachmentLocations_EXT = 287, - VK_COMMAND_TYPE_vkCmdSetRenderingAttachmentLocationsKHR_EXT = 287, - VK_COMMAND_TYPE_vkCmdSetRenderingInputAttachmentIndices_EXT = 288, - VK_COMMAND_TYPE_vkCmdSetRenderingInputAttachmentIndicesKHR_EXT = 288, - VK_COMMAND_TYPE_vkCmdBindDescriptorSets2_EXT = 289, - VK_COMMAND_TYPE_vkCmdBindDescriptorSets2KHR_EXT = 289, - VK_COMMAND_TYPE_vkCmdPushConstants2_EXT = 290, - VK_COMMAND_TYPE_vkCmdPushConstants2KHR_EXT = 290, - VK_COMMAND_TYPE_vkCmdPushDescriptorSet2_EXT = 291, - VK_COMMAND_TYPE_vkCmdPushDescriptorSet2KHR_EXT = 291, - VK_COMMAND_TYPE_vkCmdPushDescriptorSetWithTemplate2_EXT = 292, - VK_COMMAND_TYPE_vkCmdPushDescriptorSetWithTemplate2KHR_EXT = 292, - VK_COMMAND_TYPE_vkCopyMemoryToImage_EXT = 293, - VK_COMMAND_TYPE_vkCopyMemoryToImageEXT_EXT = 293, - VK_COMMAND_TYPE_vkCopyImageToMemory_EXT = 294, - VK_COMMAND_TYPE_vkCopyImageToMemoryEXT_EXT = 294, - VK_COMMAND_TYPE_vkCopyImageToImage_EXT = 295, - VK_COMMAND_TYPE_vkCopyImageToImageEXT_EXT = 295, - VK_COMMAND_TYPE_vkTransitionImageLayout_EXT = 296, - VK_COMMAND_TYPE_vkTransitionImageLayoutEXT_EXT = 296, - VK_COMMAND_TYPE_vkCopyImageToMemoryMESA_EXT = 297, - VK_COMMAND_TYPE_vkCopyMemoryToImageMESA_EXT = 298, - VK_COMMAND_TYPE_vkCreateDeferredOperationKHR_EXT = 299, - VK_COMMAND_TYPE_vkDestroyDeferredOperationKHR_EXT = 300, - VK_COMMAND_TYPE_vkGetDeferredOperationMaxConcurrencyKHR_EXT = 301, - VK_COMMAND_TYPE_vkGetDeferredOperationResultKHR_EXT = 302, - VK_COMMAND_TYPE_vkDeferredOperationJoinKHR_EXT = 303, - VK_COMMAND_TYPE_vkCreateAccelerationStructureKHR_EXT = 304, - VK_COMMAND_TYPE_vkDestroyAccelerationStructureKHR_EXT = 305, - VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresKHR_EXT = 306, - VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresIndirectKHR_EXT = 307, - VK_COMMAND_TYPE_vkBuildAccelerationStructuresKHR_EXT = 308, - VK_COMMAND_TYPE_vkCopyAccelerationStructureKHR_EXT = 309, - VK_COMMAND_TYPE_vkCopyAccelerationStructureToMemoryKHR_EXT = 310, - VK_COMMAND_TYPE_vkCopyMemoryToAccelerationStructureKHR_EXT = 311, - VK_COMMAND_TYPE_vkWriteAccelerationStructuresPropertiesKHR_EXT = 312, - VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureKHR_EXT = 313, - VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureToMemoryKHR_EXT = 314, - VK_COMMAND_TYPE_vkCmdCopyMemoryToAccelerationStructureKHR_EXT = 315, - VK_COMMAND_TYPE_vkGetAccelerationStructureDeviceAddressKHR_EXT = 316, - VK_COMMAND_TYPE_vkCmdWriteAccelerationStructuresPropertiesKHR_EXT = 317, - VK_COMMAND_TYPE_vkGetDeviceAccelerationStructureCompatibilityKHR_EXT = 318, - VK_COMMAND_TYPE_vkGetAccelerationStructureBuildSizesKHR_EXT = 319, - VK_COMMAND_TYPE_vkCmdTraceRaysKHR_EXT = 320, - VK_COMMAND_TYPE_vkCreateRayTracingPipelinesKHR_EXT = 321, - VK_COMMAND_TYPE_vkGetRayTracingShaderGroupHandlesKHR_EXT = 322, - VK_COMMAND_TYPE_vkGetRayTracingShaderGroupHandlesNV_EXT = 322, - VK_COMMAND_TYPE_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_EXT = 323, - VK_COMMAND_TYPE_vkCmdTraceRaysIndirectKHR_EXT = 324, - VK_COMMAND_TYPE_vkGetRayTracingShaderGroupStackSizeKHR_EXT = 325, - VK_COMMAND_TYPE_vkCmdSetRayTracingPipelineStackSizeKHR_EXT = 326, - VK_COMMAND_TYPE_vkCmdTraceRaysIndirect2KHR_EXT = 327, - VK_COMMAND_TYPE_vkCmdSetDepthBias2EXT_EXT = 328, - VK_COMMAND_TYPE_vkCmdSetAttachmentFeedbackLoopEnableEXT_EXT = 329, - VK_COMMAND_TYPE_vkCmdSetDepthClampRangeEXT_EXT = 330, - VK_COMMAND_TYPE_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_EXT = 331, - VK_COMMAND_TYPE_vkCmdDrawMeshTasksEXT_EXT = 332, - VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectEXT_EXT = 333, - VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectCountEXT_EXT = 334, - VK_COMMAND_TYPE_vkWriteSamplerDescriptorMESA_EXT = 335, - VK_COMMAND_TYPE_vkWriteResourceDescriptorMESA_EXT = 336, - VK_COMMAND_TYPE_vkWriteSamplerDescriptorsEXT_EXT = 337, - VK_COMMAND_TYPE_vkWriteResourceDescriptorsEXT_EXT = 338, - VK_COMMAND_TYPE_vkCmdBindSamplerHeapEXT_EXT = 339, - VK_COMMAND_TYPE_vkCmdBindResourceHeapEXT_EXT = 340, - VK_COMMAND_TYPE_vkCmdPushDataEXT_EXT = 341, - VK_COMMAND_TYPE_vkGetImageOpaqueCaptureDataEXT_EXT = 342, - VK_COMMAND_TYPE_vkGetPhysicalDeviceDescriptorSizeEXT_EXT = 343, - VK_COMMAND_TYPE_vkRegisterCustomBorderColorEXT_EXT = 344, - VK_COMMAND_TYPE_vkUnregisterCustomBorderColorEXT_EXT = 345, -} VkCommandTypeEXT; - -typedef enum VkCommandFlagBitsEXT { - VK_COMMAND_GENERATE_REPLY_BIT_EXT = 0x00000001, -} VkCommandFlagBitsEXT; - -typedef enum VkRingStatusFlagBitsMESA { - VK_RING_STATUS_NONE_MESA = 0, - VK_RING_STATUS_IDLE_BIT_MESA = 0x00000001, - VK_RING_STATUS_FATAL_BIT_MESA = 0x00000002, - VK_RING_STATUS_ALIVE_BIT_MESA = 0x00000004, -} VkRingStatusFlagBitsMESA; - -typedef VkFlags VkCommandFlagsEXT; - -typedef VkFlags VkCommandStreamExecutionFlagsMESA; - -typedef VkFlags VkRingCreateFlagsMESA; - -typedef VkFlags VkRingNotifyFlagsMESA; - -typedef VkFlags VkRingStatusFlagsMESA; - -typedef struct VkCommandStreamDescriptionMESA { - uint32_t resourceId; - size_t offset; - size_t size; -} VkCommandStreamDescriptionMESA; - -typedef struct VkCommandStreamDependencyMESA { - uint32_t srcCommandStream; - uint32_t dstCommandStream; -} VkCommandStreamDependencyMESA; - -typedef struct VkRingCreateInfoMESA { - VkStructureType sType; - const void* pNext; - VkRingCreateFlagsMESA flags; - uint32_t resourceId; - size_t offset; - size_t size; - uint64_t idleTimeout; - size_t headOffset; - size_t tailOffset; - size_t statusOffset; - size_t bufferOffset; - size_t bufferSize; - size_t extraOffset; - size_t extraSize; -} VkRingCreateInfoMESA; - -typedef struct VkRingMonitorInfoMESA { - VkStructureType sType; - const void* pNext; - uint32_t maxReportingPeriodMicroseconds; -} VkRingMonitorInfoMESA; - -typedef struct VkMemoryResourcePropertiesMESA { - VkStructureType sType; - void* pNext; - uint32_t memoryTypeBits; -} VkMemoryResourcePropertiesMESA; - -typedef struct VkImportMemoryResourceInfoMESA { - VkStructureType sType; - const void* pNext; - uint32_t resourceId; -} VkImportMemoryResourceInfoMESA; - -typedef struct VkMemoryResourceAllocationSizePropertiesMESA { - VkStructureType sType; - void* pNext; - uint64_t allocationSize; -} VkMemoryResourceAllocationSizePropertiesMESA; - -typedef struct VkImportSemaphoreResourceInfoMESA { - VkStructureType sType; - const void* pNext; - VkSemaphore semaphore; - uint32_t resourceId; -} VkImportSemaphoreResourceInfoMESA; - -typedef struct VkDeviceQueueTimelineInfoMESA { - VkStructureType sType; - const void* pNext; - uint32_t ringIdx; -} VkDeviceQueueTimelineInfoMESA; - -typedef struct VkRingPriorityInfoMESA { - VkStructureType sType; - const void* pNext; - int32_t priority; -} VkRingPriorityInfoMESA; - -typedef struct VkCopyImageToMemoryInfoMESA { - VkStructureType sType; - const void* pNext; - VkHostImageCopyFlags flags; - VkImage srcImage; - VkImageLayout srcImageLayout; - uint32_t memoryRowLength; - uint32_t memoryImageHeight; - VkImageSubresourceLayers imageSubresource; - VkOffset3D imageOffset; - VkExtent3D imageExtent; -} VkCopyImageToMemoryInfoMESA; - -typedef struct VkMemoryToImageCopyMESA { - VkStructureType sType; - const void* pNext; - size_t dataSize; - const void* pData; - uint32_t memoryRowLength; - uint32_t memoryImageHeight; - VkImageSubresourceLayers imageSubresource; - VkOffset3D imageOffset; - VkExtent3D imageExtent; -} VkMemoryToImageCopyMESA; - -typedef struct VkCopyMemoryToImageInfoMESA { - VkStructureType sType; - const void* pNext; - VkHostImageCopyFlags flags; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkMemoryToImageCopyMESA* pRegions; -} VkCopyMemoryToImageInfoMESA; - -struct vn_command_vkCreateInstance { - const VkInstanceCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkInstance* pInstance; - - VkResult ret; -}; - -struct vn_command_vkDestroyInstance { - VkInstance instance; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkEnumeratePhysicalDevices { - VkInstance instance; - uint32_t* pPhysicalDeviceCount; - VkPhysicalDevice* pPhysicalDevices; - - VkResult ret; -}; - -struct vn_command_vkGetDeviceProcAddr { - VkDevice device; - const char* pName; - - PFN_vkVoidFunction ret; -}; - -struct vn_command_vkGetInstanceProcAddr { - VkInstance instance; - const char* pName; - - PFN_vkVoidFunction ret; -}; - -struct vn_command_vkGetPhysicalDeviceProperties { - VkPhysicalDevice physicalDevice; - VkPhysicalDeviceProperties* pProperties; -}; - -struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties { - VkPhysicalDevice physicalDevice; - uint32_t* pQueueFamilyPropertyCount; - VkQueueFamilyProperties* pQueueFamilyProperties; -}; - -struct vn_command_vkGetPhysicalDeviceMemoryProperties { - VkPhysicalDevice physicalDevice; - VkPhysicalDeviceMemoryProperties* pMemoryProperties; -}; - -struct vn_command_vkGetPhysicalDeviceFeatures { - VkPhysicalDevice physicalDevice; - VkPhysicalDeviceFeatures* pFeatures; -}; - -struct vn_command_vkGetPhysicalDeviceFormatProperties { - VkPhysicalDevice physicalDevice; - VkFormat format; - VkFormatProperties* pFormatProperties; -}; - -struct vn_command_vkGetPhysicalDeviceImageFormatProperties { - VkPhysicalDevice physicalDevice; - VkFormat format; - VkImageType type; - VkImageTiling tiling; - VkImageUsageFlags usage; - VkImageCreateFlags flags; - VkImageFormatProperties* pImageFormatProperties; - - VkResult ret; -}; - -struct vn_command_vkCreateDevice { - VkPhysicalDevice physicalDevice; - const VkDeviceCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkDevice* pDevice; - - VkResult ret; -}; - -struct vn_command_vkDestroyDevice { - VkDevice device; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkEnumerateInstanceVersion { - uint32_t* pApiVersion; - - VkResult ret; -}; - -struct vn_command_vkEnumerateInstanceLayerProperties { - uint32_t* pPropertyCount; - VkLayerProperties* pProperties; - - VkResult ret; -}; - -struct vn_command_vkEnumerateInstanceExtensionProperties { - const char* pLayerName; - uint32_t* pPropertyCount; - VkExtensionProperties* pProperties; - - VkResult ret; -}; - -struct vn_command_vkEnumerateDeviceLayerProperties { - VkPhysicalDevice physicalDevice; - uint32_t* pPropertyCount; - VkLayerProperties* pProperties; - - VkResult ret; -}; - -struct vn_command_vkEnumerateDeviceExtensionProperties { - VkPhysicalDevice physicalDevice; - const char* pLayerName; - uint32_t* pPropertyCount; - VkExtensionProperties* pProperties; - - VkResult ret; -}; - -struct vn_command_vkGetDeviceQueue { - VkDevice device; - uint32_t queueFamilyIndex; - uint32_t queueIndex; - VkQueue* pQueue; -}; - -struct vn_command_vkQueueSubmit { - VkQueue queue; - uint32_t submitCount; - const VkSubmitInfo* pSubmits; - VkFence fence; - - VkResult ret; -}; - -struct vn_command_vkQueueWaitIdle { - VkQueue queue; - - VkResult ret; -}; - -struct vn_command_vkDeviceWaitIdle { - VkDevice device; - - VkResult ret; -}; - -struct vn_command_vkAllocateMemory { - VkDevice device; - const VkMemoryAllocateInfo* pAllocateInfo; - const VkAllocationCallbacks* pAllocator; - VkDeviceMemory* pMemory; - - VkResult ret; -}; - -struct vn_command_vkFreeMemory { - VkDevice device; - VkDeviceMemory memory; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkMapMemory { - VkDevice device; - VkDeviceMemory memory; - VkDeviceSize offset; - VkDeviceSize size; - VkMemoryMapFlags flags; - void** ppData; - - VkResult ret; -}; - -struct vn_command_vkUnmapMemory { - VkDevice device; - VkDeviceMemory memory; -}; - -struct vn_command_vkFlushMappedMemoryRanges { - VkDevice device; - uint32_t memoryRangeCount; - const VkMappedMemoryRange* pMemoryRanges; - - VkResult ret; -}; - -struct vn_command_vkInvalidateMappedMemoryRanges { - VkDevice device; - uint32_t memoryRangeCount; - const VkMappedMemoryRange* pMemoryRanges; - - VkResult ret; -}; - -struct vn_command_vkGetDeviceMemoryCommitment { - VkDevice device; - VkDeviceMemory memory; - VkDeviceSize* pCommittedMemoryInBytes; -}; - -struct vn_command_vkGetBufferMemoryRequirements { - VkDevice device; - VkBuffer buffer; - VkMemoryRequirements* pMemoryRequirements; -}; - -struct vn_command_vkBindBufferMemory { - VkDevice device; - VkBuffer buffer; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - - VkResult ret; -}; - -struct vn_command_vkGetImageMemoryRequirements { - VkDevice device; - VkImage image; - VkMemoryRequirements* pMemoryRequirements; -}; - -struct vn_command_vkBindImageMemory { - VkDevice device; - VkImage image; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - - VkResult ret; -}; - -struct vn_command_vkGetImageSparseMemoryRequirements { - VkDevice device; - VkImage image; - uint32_t* pSparseMemoryRequirementCount; - VkSparseImageMemoryRequirements* pSparseMemoryRequirements; -}; - -struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties { - VkPhysicalDevice physicalDevice; - VkFormat format; - VkImageType type; - VkSampleCountFlagBits samples; - VkImageUsageFlags usage; - VkImageTiling tiling; - uint32_t* pPropertyCount; - VkSparseImageFormatProperties* pProperties; -}; - -struct vn_command_vkQueueBindSparse { - VkQueue queue; - uint32_t bindInfoCount; - const VkBindSparseInfo* pBindInfo; - VkFence fence; - - VkResult ret; -}; - -struct vn_command_vkCreateFence { - VkDevice device; - const VkFenceCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkFence* pFence; - - VkResult ret; -}; - -struct vn_command_vkDestroyFence { - VkDevice device; - VkFence fence; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkResetFences { - VkDevice device; - uint32_t fenceCount; - const VkFence* pFences; - - VkResult ret; -}; - -struct vn_command_vkGetFenceStatus { - VkDevice device; - VkFence fence; - - VkResult ret; -}; - -struct vn_command_vkWaitForFences { - VkDevice device; - uint32_t fenceCount; - const VkFence* pFences; - VkBool32 waitAll; - uint64_t timeout; - - VkResult ret; -}; - -struct vn_command_vkCreateSemaphore { - VkDevice device; - const VkSemaphoreCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkSemaphore* pSemaphore; - - VkResult ret; -}; - -struct vn_command_vkDestroySemaphore { - VkDevice device; - VkSemaphore semaphore; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateEvent { - VkDevice device; - const VkEventCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkEvent* pEvent; - - VkResult ret; -}; - -struct vn_command_vkDestroyEvent { - VkDevice device; - VkEvent event; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetEventStatus { - VkDevice device; - VkEvent event; - - VkResult ret; -}; - -struct vn_command_vkSetEvent { - VkDevice device; - VkEvent event; - - VkResult ret; -}; - -struct vn_command_vkResetEvent { - VkDevice device; - VkEvent event; - - VkResult ret; -}; - -struct vn_command_vkCreateQueryPool { - VkDevice device; - const VkQueryPoolCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkQueryPool* pQueryPool; - - VkResult ret; -}; - -struct vn_command_vkDestroyQueryPool { - VkDevice device; - VkQueryPool queryPool; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetQueryPoolResults { - VkDevice device; - VkQueryPool queryPool; - uint32_t firstQuery; - uint32_t queryCount; - size_t dataSize; - void* pData; - VkDeviceSize stride; - VkQueryResultFlags flags; - - VkResult ret; -}; - -struct vn_command_vkResetQueryPool { - VkDevice device; - VkQueryPool queryPool; - uint32_t firstQuery; - uint32_t queryCount; -}; - -struct vn_command_vkCreateBuffer { - VkDevice device; - const VkBufferCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkBuffer* pBuffer; - - VkResult ret; -}; - -struct vn_command_vkDestroyBuffer { - VkDevice device; - VkBuffer buffer; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateBufferView { - VkDevice device; - const VkBufferViewCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkBufferView* pView; - - VkResult ret; -}; - -struct vn_command_vkDestroyBufferView { - VkDevice device; - VkBufferView bufferView; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateImage { - VkDevice device; - const VkImageCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkImage* pImage; - - VkResult ret; -}; - -struct vn_command_vkDestroyImage { - VkDevice device; - VkImage image; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetImageSubresourceLayout { - VkDevice device; - VkImage image; - const VkImageSubresource* pSubresource; - VkSubresourceLayout* pLayout; -}; - -struct vn_command_vkCreateImageView { - VkDevice device; - const VkImageViewCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkImageView* pView; - - VkResult ret; -}; - -struct vn_command_vkDestroyImageView { - VkDevice device; - VkImageView imageView; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateShaderModule { - VkDevice device; - const VkShaderModuleCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkShaderModule* pShaderModule; - - VkResult ret; -}; - -struct vn_command_vkDestroyShaderModule { - VkDevice device; - VkShaderModule shaderModule; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreatePipelineCache { - VkDevice device; - const VkPipelineCacheCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkPipelineCache* pPipelineCache; - - VkResult ret; -}; - -struct vn_command_vkDestroyPipelineCache { - VkDevice device; - VkPipelineCache pipelineCache; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetPipelineCacheData { - VkDevice device; - VkPipelineCache pipelineCache; - size_t* pDataSize; - void* pData; - - VkResult ret; -}; - -struct vn_command_vkMergePipelineCaches { - VkDevice device; - VkPipelineCache dstCache; - uint32_t srcCacheCount; - const VkPipelineCache* pSrcCaches; - - VkResult ret; -}; - -struct vn_command_vkCreateGraphicsPipelines { - VkDevice device; - VkPipelineCache pipelineCache; - uint32_t createInfoCount; - const VkGraphicsPipelineCreateInfo* pCreateInfos; - const VkAllocationCallbacks* pAllocator; - VkPipeline* pPipelines; - - VkResult ret; -}; - -struct vn_command_vkCreateComputePipelines { - VkDevice device; - VkPipelineCache pipelineCache; - uint32_t createInfoCount; - const VkComputePipelineCreateInfo* pCreateInfos; - const VkAllocationCallbacks* pAllocator; - VkPipeline* pPipelines; - - VkResult ret; -}; - -struct vn_command_vkDestroyPipeline { - VkDevice device; - VkPipeline pipeline; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreatePipelineLayout { - VkDevice device; - const VkPipelineLayoutCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkPipelineLayout* pPipelineLayout; - - VkResult ret; -}; - -struct vn_command_vkDestroyPipelineLayout { - VkDevice device; - VkPipelineLayout pipelineLayout; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateSampler { - VkDevice device; - const VkSamplerCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkSampler* pSampler; - - VkResult ret; -}; - -struct vn_command_vkDestroySampler { - VkDevice device; - VkSampler sampler; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateDescriptorSetLayout { - VkDevice device; - const VkDescriptorSetLayoutCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkDescriptorSetLayout* pSetLayout; - - VkResult ret; -}; - -struct vn_command_vkDestroyDescriptorSetLayout { - VkDevice device; - VkDescriptorSetLayout descriptorSetLayout; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateDescriptorPool { - VkDevice device; - const VkDescriptorPoolCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkDescriptorPool* pDescriptorPool; - - VkResult ret; -}; - -struct vn_command_vkDestroyDescriptorPool { - VkDevice device; - VkDescriptorPool descriptorPool; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkResetDescriptorPool { - VkDevice device; - VkDescriptorPool descriptorPool; - VkDescriptorPoolResetFlags flags; - - VkResult ret; -}; - -struct vn_command_vkAllocateDescriptorSets { - VkDevice device; - const VkDescriptorSetAllocateInfo* pAllocateInfo; - VkDescriptorSet* pDescriptorSets; - - VkResult ret; -}; - -struct vn_command_vkFreeDescriptorSets { - VkDevice device; - VkDescriptorPool descriptorPool; - uint32_t descriptorSetCount; - const VkDescriptorSet* pDescriptorSets; - - VkResult ret; -}; - -struct vn_command_vkUpdateDescriptorSets { - VkDevice device; - uint32_t descriptorWriteCount; - const VkWriteDescriptorSet* pDescriptorWrites; - uint32_t descriptorCopyCount; - const VkCopyDescriptorSet* pDescriptorCopies; -}; - -struct vn_command_vkCreateFramebuffer { - VkDevice device; - const VkFramebufferCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkFramebuffer* pFramebuffer; - - VkResult ret; -}; - -struct vn_command_vkDestroyFramebuffer { - VkDevice device; - VkFramebuffer framebuffer; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCreateRenderPass { - VkDevice device; - const VkRenderPassCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkRenderPass* pRenderPass; - - VkResult ret; -}; - -struct vn_command_vkDestroyRenderPass { - VkDevice device; - VkRenderPass renderPass; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetRenderAreaGranularity { - VkDevice device; - VkRenderPass renderPass; - VkExtent2D* pGranularity; -}; - -struct vn_command_vkGetRenderingAreaGranularity { - VkDevice device; - const VkRenderingAreaInfo* pRenderingAreaInfo; - VkExtent2D* pGranularity; -}; - -struct vn_command_vkCreateCommandPool { - VkDevice device; - const VkCommandPoolCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkCommandPool* pCommandPool; - - VkResult ret; -}; - -struct vn_command_vkDestroyCommandPool { - VkDevice device; - VkCommandPool commandPool; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkResetCommandPool { - VkDevice device; - VkCommandPool commandPool; - VkCommandPoolResetFlags flags; - - VkResult ret; -}; - -struct vn_command_vkAllocateCommandBuffers { - VkDevice device; - const VkCommandBufferAllocateInfo* pAllocateInfo; - VkCommandBuffer* pCommandBuffers; - - VkResult ret; -}; - -struct vn_command_vkFreeCommandBuffers { - VkDevice device; - VkCommandPool commandPool; - uint32_t commandBufferCount; - const VkCommandBuffer* pCommandBuffers; -}; - -struct vn_command_vkBeginCommandBuffer { - VkCommandBuffer commandBuffer; - const VkCommandBufferBeginInfo* pBeginInfo; - - VkResult ret; -}; - -struct vn_command_vkEndCommandBuffer { - VkCommandBuffer commandBuffer; - - VkResult ret; -}; - -struct vn_command_vkResetCommandBuffer { - VkCommandBuffer commandBuffer; - VkCommandBufferResetFlags flags; - - VkResult ret; -}; - -struct vn_command_vkCmdBindPipeline { - VkCommandBuffer commandBuffer; - VkPipelineBindPoint pipelineBindPoint; - VkPipeline pipeline; -}; - -struct vn_command_vkCmdSetAttachmentFeedbackLoopEnableEXT { - VkCommandBuffer commandBuffer; - VkImageAspectFlags aspectMask; -}; - -struct vn_command_vkCmdSetViewport { - VkCommandBuffer commandBuffer; - uint32_t firstViewport; - uint32_t viewportCount; - const VkViewport* pViewports; -}; - -struct vn_command_vkCmdSetScissor { - VkCommandBuffer commandBuffer; - uint32_t firstScissor; - uint32_t scissorCount; - const VkRect2D* pScissors; -}; - -struct vn_command_vkCmdSetLineWidth { - VkCommandBuffer commandBuffer; - float lineWidth; -}; - -struct vn_command_vkCmdSetDepthBias { - VkCommandBuffer commandBuffer; - float depthBiasConstantFactor; - float depthBiasClamp; - float depthBiasSlopeFactor; -}; - -struct vn_command_vkCmdSetBlendConstants { - VkCommandBuffer commandBuffer; - const float blendConstants[4]; -}; - -struct vn_command_vkCmdSetDepthBounds { - VkCommandBuffer commandBuffer; - float minDepthBounds; - float maxDepthBounds; -}; - -struct vn_command_vkCmdSetStencilCompareMask { - VkCommandBuffer commandBuffer; - VkStencilFaceFlags faceMask; - uint32_t compareMask; -}; - -struct vn_command_vkCmdSetStencilWriteMask { - VkCommandBuffer commandBuffer; - VkStencilFaceFlags faceMask; - uint32_t writeMask; -}; - -struct vn_command_vkCmdSetStencilReference { - VkCommandBuffer commandBuffer; - VkStencilFaceFlags faceMask; - uint32_t reference; -}; - -struct vn_command_vkCmdBindDescriptorSets { - VkCommandBuffer commandBuffer; - VkPipelineBindPoint pipelineBindPoint; - VkPipelineLayout layout; - uint32_t firstSet; - uint32_t descriptorSetCount; - const VkDescriptorSet* pDescriptorSets; - uint32_t dynamicOffsetCount; - const uint32_t* pDynamicOffsets; -}; - -struct vn_command_vkCmdBindIndexBuffer { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - VkIndexType indexType; -}; - -struct vn_command_vkCmdBindVertexBuffers { - VkCommandBuffer commandBuffer; - uint32_t firstBinding; - uint32_t bindingCount; - const VkBuffer* pBuffers; - const VkDeviceSize* pOffsets; -}; - -struct vn_command_vkCmdDraw { - VkCommandBuffer commandBuffer; - uint32_t vertexCount; - uint32_t instanceCount; - uint32_t firstVertex; - uint32_t firstInstance; -}; - -struct vn_command_vkCmdDrawIndexed { - VkCommandBuffer commandBuffer; - uint32_t indexCount; - uint32_t instanceCount; - uint32_t firstIndex; - int32_t vertexOffset; - uint32_t firstInstance; -}; - -struct vn_command_vkCmdDrawMultiEXT { - VkCommandBuffer commandBuffer; - uint32_t drawCount; - const VkMultiDrawInfoEXT* pVertexInfo; - uint32_t instanceCount; - uint32_t firstInstance; - uint32_t stride; -}; - -struct vn_command_vkCmdDrawMultiIndexedEXT { - VkCommandBuffer commandBuffer; - uint32_t drawCount; - const VkMultiDrawIndexedInfoEXT* pIndexInfo; - uint32_t instanceCount; - uint32_t firstInstance; - uint32_t stride; - const int32_t* pVertexOffset; -}; - -struct vn_command_vkCmdDrawIndirect { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - uint32_t drawCount; - uint32_t stride; -}; - -struct vn_command_vkCmdDrawIndexedIndirect { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - uint32_t drawCount; - uint32_t stride; -}; - -struct vn_command_vkCmdDispatch { - VkCommandBuffer commandBuffer; - uint32_t groupCountX; - uint32_t groupCountY; - uint32_t groupCountZ; -}; - -struct vn_command_vkCmdDispatchIndirect { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; -}; - -struct vn_command_vkCmdCopyBuffer { - VkCommandBuffer commandBuffer; - VkBuffer srcBuffer; - VkBuffer dstBuffer; - uint32_t regionCount; - const VkBufferCopy* pRegions; -}; - -struct vn_command_vkCmdCopyImage { - VkCommandBuffer commandBuffer; - VkImage srcImage; - VkImageLayout srcImageLayout; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkImageCopy* pRegions; -}; - -struct vn_command_vkCmdBlitImage { - VkCommandBuffer commandBuffer; - VkImage srcImage; - VkImageLayout srcImageLayout; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkImageBlit* pRegions; - VkFilter filter; -}; - -struct vn_command_vkCmdCopyBufferToImage { - VkCommandBuffer commandBuffer; - VkBuffer srcBuffer; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkBufferImageCopy* pRegions; -}; - -struct vn_command_vkCmdCopyImageToBuffer { - VkCommandBuffer commandBuffer; - VkImage srcImage; - VkImageLayout srcImageLayout; - VkBuffer dstBuffer; - uint32_t regionCount; - const VkBufferImageCopy* pRegions; -}; - -struct vn_command_vkCmdUpdateBuffer { - VkCommandBuffer commandBuffer; - VkBuffer dstBuffer; - VkDeviceSize dstOffset; - VkDeviceSize dataSize; - const void* pData; -}; - -struct vn_command_vkCmdFillBuffer { - VkCommandBuffer commandBuffer; - VkBuffer dstBuffer; - VkDeviceSize dstOffset; - VkDeviceSize size; - uint32_t data; -}; - -struct vn_command_vkCmdClearColorImage { - VkCommandBuffer commandBuffer; - VkImage image; - VkImageLayout imageLayout; - const VkClearColorValue* pColor; - uint32_t rangeCount; - const VkImageSubresourceRange* pRanges; -}; - -struct vn_command_vkCmdClearDepthStencilImage { - VkCommandBuffer commandBuffer; - VkImage image; - VkImageLayout imageLayout; - const VkClearDepthStencilValue* pDepthStencil; - uint32_t rangeCount; - const VkImageSubresourceRange* pRanges; -}; - -struct vn_command_vkCmdClearAttachments { - VkCommandBuffer commandBuffer; - uint32_t attachmentCount; - const VkClearAttachment* pAttachments; - uint32_t rectCount; - const VkClearRect* pRects; -}; - -struct vn_command_vkCmdResolveImage { - VkCommandBuffer commandBuffer; - VkImage srcImage; - VkImageLayout srcImageLayout; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkImageResolve* pRegions; -}; - -struct vn_command_vkCmdSetEvent { - VkCommandBuffer commandBuffer; - VkEvent event; - VkPipelineStageFlags stageMask; -}; - -struct vn_command_vkCmdResetEvent { - VkCommandBuffer commandBuffer; - VkEvent event; - VkPipelineStageFlags stageMask; -}; - -struct vn_command_vkCmdWaitEvents { - VkCommandBuffer commandBuffer; - uint32_t eventCount; - const VkEvent* pEvents; - VkPipelineStageFlags srcStageMask; - VkPipelineStageFlags dstStageMask; - uint32_t memoryBarrierCount; - const VkMemoryBarrier* pMemoryBarriers; - uint32_t bufferMemoryBarrierCount; - const VkBufferMemoryBarrier* pBufferMemoryBarriers; - uint32_t imageMemoryBarrierCount; - const VkImageMemoryBarrier* pImageMemoryBarriers; -}; - -struct vn_command_vkCmdPipelineBarrier { - VkCommandBuffer commandBuffer; - VkPipelineStageFlags srcStageMask; - VkPipelineStageFlags dstStageMask; - VkDependencyFlags dependencyFlags; - uint32_t memoryBarrierCount; - const VkMemoryBarrier* pMemoryBarriers; - uint32_t bufferMemoryBarrierCount; - const VkBufferMemoryBarrier* pBufferMemoryBarriers; - uint32_t imageMemoryBarrierCount; - const VkImageMemoryBarrier* pImageMemoryBarriers; -}; - -struct vn_command_vkCmdBeginQuery { - VkCommandBuffer commandBuffer; - VkQueryPool queryPool; - uint32_t query; - VkQueryControlFlags flags; -}; - -struct vn_command_vkCmdEndQuery { - VkCommandBuffer commandBuffer; - VkQueryPool queryPool; - uint32_t query; -}; - -struct vn_command_vkCmdBeginConditionalRenderingEXT { - VkCommandBuffer commandBuffer; - const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin; -}; - -struct vn_command_vkCmdEndConditionalRenderingEXT { - VkCommandBuffer commandBuffer; -}; - -struct vn_command_vkCmdResetQueryPool { - VkCommandBuffer commandBuffer; - VkQueryPool queryPool; - uint32_t firstQuery; - uint32_t queryCount; -}; - -struct vn_command_vkCmdWriteTimestamp { - VkCommandBuffer commandBuffer; - VkPipelineStageFlagBits pipelineStage; - VkQueryPool queryPool; - uint32_t query; -}; - -struct vn_command_vkCmdCopyQueryPoolResults { - VkCommandBuffer commandBuffer; - VkQueryPool queryPool; - uint32_t firstQuery; - uint32_t queryCount; - VkBuffer dstBuffer; - VkDeviceSize dstOffset; - VkDeviceSize stride; - VkQueryResultFlags flags; -}; - -struct vn_command_vkCmdPushConstants { - VkCommandBuffer commandBuffer; - VkPipelineLayout layout; - VkShaderStageFlags stageFlags; - uint32_t offset; - uint32_t size; - const void* pValues; -}; - -struct vn_command_vkCmdBeginRenderPass { - VkCommandBuffer commandBuffer; - const VkRenderPassBeginInfo* pRenderPassBegin; - VkSubpassContents contents; -}; - -struct vn_command_vkCmdNextSubpass { - VkCommandBuffer commandBuffer; - VkSubpassContents contents; -}; - -struct vn_command_vkCmdEndRenderPass { - VkCommandBuffer commandBuffer; -}; - -struct vn_command_vkCmdExecuteCommands { - VkCommandBuffer commandBuffer; - uint32_t commandBufferCount; - const VkCommandBuffer* pCommandBuffers; -}; - -struct vn_command_vkGetPhysicalDeviceFeatures2 { - VkPhysicalDevice physicalDevice; - VkPhysicalDeviceFeatures2* pFeatures; -}; - -struct vn_command_vkGetPhysicalDeviceProperties2 { - VkPhysicalDevice physicalDevice; - VkPhysicalDeviceProperties2* pProperties; -}; - -struct vn_command_vkGetPhysicalDeviceFormatProperties2 { - VkPhysicalDevice physicalDevice; - VkFormat format; - VkFormatProperties2* pFormatProperties; -}; - -struct vn_command_vkGetPhysicalDeviceImageFormatProperties2 { - VkPhysicalDevice physicalDevice; - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo; - VkImageFormatProperties2* pImageFormatProperties; - - VkResult ret; -}; - -struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties2 { - VkPhysicalDevice physicalDevice; - uint32_t* pQueueFamilyPropertyCount; - VkQueueFamilyProperties2* pQueueFamilyProperties; -}; - -struct vn_command_vkGetPhysicalDeviceMemoryProperties2 { - VkPhysicalDevice physicalDevice; - VkPhysicalDeviceMemoryProperties2* pMemoryProperties; -}; - -struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties2 { - VkPhysicalDevice physicalDevice; - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo; - uint32_t* pPropertyCount; - VkSparseImageFormatProperties2* pProperties; -}; - -struct vn_command_vkCmdPushDescriptorSet { - VkCommandBuffer commandBuffer; - VkPipelineBindPoint pipelineBindPoint; - VkPipelineLayout layout; - uint32_t set; - uint32_t descriptorWriteCount; - const VkWriteDescriptorSet* pDescriptorWrites; -}; - -struct vn_command_vkTrimCommandPool { - VkDevice device; - VkCommandPool commandPool; - VkCommandPoolTrimFlags flags; -}; - -struct vn_command_vkGetPhysicalDeviceExternalBufferProperties { - VkPhysicalDevice physicalDevice; - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo; - VkExternalBufferProperties* pExternalBufferProperties; -}; - -struct vn_command_vkGetMemoryFdKHR { - VkDevice device; - const VkMemoryGetFdInfoKHR* pGetFdInfo; - int* pFd; - - VkResult ret; -}; - -struct vn_command_vkGetMemoryFdPropertiesKHR { - VkDevice device; - VkExternalMemoryHandleTypeFlagBits handleType; - int fd; - VkMemoryFdPropertiesKHR* pMemoryFdProperties; - - VkResult ret; -}; - -struct vn_command_vkGetPhysicalDeviceExternalSemaphoreProperties { - VkPhysicalDevice physicalDevice; - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo; - VkExternalSemaphoreProperties* pExternalSemaphoreProperties; -}; - -struct vn_command_vkGetSemaphoreFdKHR { - VkDevice device; - const VkSemaphoreGetFdInfoKHR* pGetFdInfo; - int* pFd; - - VkResult ret; -}; - -struct vn_command_vkImportSemaphoreFdKHR { - VkDevice device; - const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo; - - VkResult ret; -}; - -struct vn_command_vkGetPhysicalDeviceExternalFenceProperties { - VkPhysicalDevice physicalDevice; - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo; - VkExternalFenceProperties* pExternalFenceProperties; -}; - -struct vn_command_vkGetFenceFdKHR { - VkDevice device; - const VkFenceGetFdInfoKHR* pGetFdInfo; - int* pFd; - - VkResult ret; -}; - -struct vn_command_vkImportFenceFdKHR { - VkDevice device; - const VkImportFenceFdInfoKHR* pImportFenceFdInfo; - - VkResult ret; -}; - -struct vn_command_vkEnumeratePhysicalDeviceGroups { - VkInstance instance; - uint32_t* pPhysicalDeviceGroupCount; - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties; - - VkResult ret; -}; - -struct vn_command_vkGetDeviceGroupPeerMemoryFeatures { - VkDevice device; - uint32_t heapIndex; - uint32_t localDeviceIndex; - uint32_t remoteDeviceIndex; - VkPeerMemoryFeatureFlags* pPeerMemoryFeatures; -}; - -struct vn_command_vkBindBufferMemory2 { - VkDevice device; - uint32_t bindInfoCount; - const VkBindBufferMemoryInfo* pBindInfos; - - VkResult ret; -}; - -struct vn_command_vkBindImageMemory2 { - VkDevice device; - uint32_t bindInfoCount; - const VkBindImageMemoryInfo* pBindInfos; - - VkResult ret; -}; - -struct vn_command_vkCmdSetDeviceMask { - VkCommandBuffer commandBuffer; - uint32_t deviceMask; -}; - -struct vn_command_vkCmdDispatchBase { - VkCommandBuffer commandBuffer; - uint32_t baseGroupX; - uint32_t baseGroupY; - uint32_t baseGroupZ; - uint32_t groupCountX; - uint32_t groupCountY; - uint32_t groupCountZ; -}; - -struct vn_command_vkCreateDescriptorUpdateTemplate { - VkDevice device; - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate; - - VkResult ret; -}; - -struct vn_command_vkDestroyDescriptorUpdateTemplate { - VkDevice device; - VkDescriptorUpdateTemplate descriptorUpdateTemplate; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkUpdateDescriptorSetWithTemplate { - VkDevice device; - VkDescriptorSet descriptorSet; - VkDescriptorUpdateTemplate descriptorUpdateTemplate; - const void* pData; -}; - -struct vn_command_vkCmdPushDescriptorSetWithTemplate { - VkCommandBuffer commandBuffer; - VkDescriptorUpdateTemplate descriptorUpdateTemplate; - VkPipelineLayout layout; - uint32_t set; - const void* pData; -}; - -struct vn_command_vkCmdSetSampleLocationsEXT { - VkCommandBuffer commandBuffer; - const VkSampleLocationsInfoEXT* pSampleLocationsInfo; -}; - -struct vn_command_vkGetPhysicalDeviceMultisamplePropertiesEXT { - VkPhysicalDevice physicalDevice; - VkSampleCountFlagBits samples; - VkMultisamplePropertiesEXT* pMultisampleProperties; -}; - -struct vn_command_vkGetBufferMemoryRequirements2 { - VkDevice device; - const VkBufferMemoryRequirementsInfo2* pInfo; - VkMemoryRequirements2* pMemoryRequirements; -}; - -struct vn_command_vkGetImageMemoryRequirements2 { - VkDevice device; - const VkImageMemoryRequirementsInfo2* pInfo; - VkMemoryRequirements2* pMemoryRequirements; -}; - -struct vn_command_vkGetImageSparseMemoryRequirements2 { - VkDevice device; - const VkImageSparseMemoryRequirementsInfo2* pInfo; - uint32_t* pSparseMemoryRequirementCount; - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements; -}; - -struct vn_command_vkGetDeviceBufferMemoryRequirements { - VkDevice device; - const VkDeviceBufferMemoryRequirements* pInfo; - VkMemoryRequirements2* pMemoryRequirements; -}; - -struct vn_command_vkGetDeviceImageMemoryRequirements { - VkDevice device; - const VkDeviceImageMemoryRequirements* pInfo; - VkMemoryRequirements2* pMemoryRequirements; -}; - -struct vn_command_vkGetDeviceImageSparseMemoryRequirements { - VkDevice device; - const VkDeviceImageMemoryRequirements* pInfo; - uint32_t* pSparseMemoryRequirementCount; - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements; -}; - -struct vn_command_vkCreateSamplerYcbcrConversion { - VkDevice device; - const VkSamplerYcbcrConversionCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkSamplerYcbcrConversion* pYcbcrConversion; - - VkResult ret; -}; - -struct vn_command_vkDestroySamplerYcbcrConversion { - VkDevice device; - VkSamplerYcbcrConversion ycbcrConversion; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetDeviceQueue2 { - VkDevice device; - const VkDeviceQueueInfo2* pQueueInfo; - VkQueue* pQueue; -}; - -struct vn_command_vkGetDescriptorSetLayoutSupport { - VkDevice device; - const VkDescriptorSetLayoutCreateInfo* pCreateInfo; - VkDescriptorSetLayoutSupport* pSupport; -}; - -struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR { - VkPhysicalDevice physicalDevice; - uint32_t* pTimeDomainCount; - VkTimeDomainKHR* pTimeDomains; - - VkResult ret; -}; - -struct vn_command_vkGetCalibratedTimestampsKHR { - VkDevice device; - uint32_t timestampCount; - const VkCalibratedTimestampInfoKHR* pTimestampInfos; - uint64_t* pTimestamps; - uint64_t* pMaxDeviation; - - VkResult ret; -}; - -struct vn_command_vkCreateRenderPass2 { - VkDevice device; - const VkRenderPassCreateInfo2* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkRenderPass* pRenderPass; - - VkResult ret; -}; - -struct vn_command_vkCmdBeginRenderPass2 { - VkCommandBuffer commandBuffer; - const VkRenderPassBeginInfo* pRenderPassBegin; - const VkSubpassBeginInfo* pSubpassBeginInfo; -}; - -struct vn_command_vkCmdNextSubpass2 { - VkCommandBuffer commandBuffer; - const VkSubpassBeginInfo* pSubpassBeginInfo; - const VkSubpassEndInfo* pSubpassEndInfo; -}; - -struct vn_command_vkCmdEndRenderPass2 { - VkCommandBuffer commandBuffer; - const VkSubpassEndInfo* pSubpassEndInfo; -}; - -struct vn_command_vkGetSemaphoreCounterValue { - VkDevice device; - VkSemaphore semaphore; - uint64_t* pValue; - - VkResult ret; -}; - -struct vn_command_vkWaitSemaphores { - VkDevice device; - const VkSemaphoreWaitInfo* pWaitInfo; - uint64_t timeout; - - VkResult ret; -}; - -struct vn_command_vkSignalSemaphore { - VkDevice device; - const VkSemaphoreSignalInfo* pSignalInfo; - - VkResult ret; -}; - -struct vn_command_vkCmdDrawIndirectCount { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - VkBuffer countBuffer; - VkDeviceSize countBufferOffset; - uint32_t maxDrawCount; - uint32_t stride; -}; - -struct vn_command_vkCmdDrawIndexedIndirectCount { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - VkBuffer countBuffer; - VkDeviceSize countBufferOffset; - uint32_t maxDrawCount; - uint32_t stride; -}; - -struct vn_command_vkCmdBindTransformFeedbackBuffersEXT { - VkCommandBuffer commandBuffer; - uint32_t firstBinding; - uint32_t bindingCount; - const VkBuffer* pBuffers; - const VkDeviceSize* pOffsets; - const VkDeviceSize* pSizes; -}; - -struct vn_command_vkCmdBeginTransformFeedbackEXT { - VkCommandBuffer commandBuffer; - uint32_t firstCounterBuffer; - uint32_t counterBufferCount; - const VkBuffer* pCounterBuffers; - const VkDeviceSize* pCounterBufferOffsets; -}; - -struct vn_command_vkCmdEndTransformFeedbackEXT { - VkCommandBuffer commandBuffer; - uint32_t firstCounterBuffer; - uint32_t counterBufferCount; - const VkBuffer* pCounterBuffers; - const VkDeviceSize* pCounterBufferOffsets; -}; - -struct vn_command_vkCmdBeginQueryIndexedEXT { - VkCommandBuffer commandBuffer; - VkQueryPool queryPool; - uint32_t query; - VkQueryControlFlags flags; - uint32_t index; -}; - -struct vn_command_vkCmdEndQueryIndexedEXT { - VkCommandBuffer commandBuffer; - VkQueryPool queryPool; - uint32_t query; - uint32_t index; -}; - -struct vn_command_vkCmdDrawIndirectByteCountEXT { - VkCommandBuffer commandBuffer; - uint32_t instanceCount; - uint32_t firstInstance; - VkBuffer counterBuffer; - VkDeviceSize counterBufferOffset; - uint32_t counterOffset; - uint32_t vertexStride; -}; - -struct vn_command_vkCmdDrawMeshTasksEXT { - VkCommandBuffer commandBuffer; - uint32_t groupCountX; - uint32_t groupCountY; - uint32_t groupCountZ; -}; - -struct vn_command_vkCmdDrawMeshTasksIndirectEXT { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - uint32_t drawCount; - uint32_t stride; -}; - -struct vn_command_vkCmdDrawMeshTasksIndirectCountEXT { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - VkBuffer countBuffer; - VkDeviceSize countBufferOffset; - uint32_t maxDrawCount; - uint32_t stride; -}; - -struct vn_command_vkDestroyAccelerationStructureKHR { - VkDevice device; - VkAccelerationStructureKHR accelerationStructure; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkCmdCopyAccelerationStructureKHR { - VkCommandBuffer commandBuffer; - const VkCopyAccelerationStructureInfoKHR* pInfo; -}; - -struct vn_command_vkCopyAccelerationStructureKHR { - VkDevice device; - VkDeferredOperationKHR deferredOperation; - const VkCopyAccelerationStructureInfoKHR* pInfo; - - VkResult ret; -}; - -struct vn_command_vkCmdCopyAccelerationStructureToMemoryKHR { - VkCommandBuffer commandBuffer; - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo; -}; - -struct vn_command_vkCopyAccelerationStructureToMemoryKHR { - VkDevice device; - VkDeferredOperationKHR deferredOperation; - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo; - - VkResult ret; -}; - -struct vn_command_vkCmdCopyMemoryToAccelerationStructureKHR { - VkCommandBuffer commandBuffer; - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo; -}; - -struct vn_command_vkCopyMemoryToAccelerationStructureKHR { - VkDevice device; - VkDeferredOperationKHR deferredOperation; - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo; - - VkResult ret; -}; - -struct vn_command_vkCmdWriteAccelerationStructuresPropertiesKHR { - VkCommandBuffer commandBuffer; - uint32_t accelerationStructureCount; - const VkAccelerationStructureKHR* pAccelerationStructures; - VkQueryType queryType; - VkQueryPool queryPool; - uint32_t firstQuery; -}; - -struct vn_command_vkWriteAccelerationStructuresPropertiesKHR { - VkDevice device; - uint32_t accelerationStructureCount; - const VkAccelerationStructureKHR* pAccelerationStructures; - VkQueryType queryType; - size_t dataSize; - void* pData; - size_t stride; - - VkResult ret; -}; - -struct vn_command_vkCmdTraceRaysKHR { - VkCommandBuffer commandBuffer; - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable; - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable; - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable; - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable; - uint32_t width; - uint32_t height; - uint32_t depth; -}; - -struct vn_command_vkGetRayTracingShaderGroupHandlesKHR { - VkDevice device; - VkPipeline pipeline; - uint32_t firstGroup; - uint32_t groupCount; - size_t dataSize; - void* pData; - - VkResult ret; -}; - -struct vn_command_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR { - VkDevice device; - VkPipeline pipeline; - uint32_t firstGroup; - uint32_t groupCount; - size_t dataSize; - void* pData; - - VkResult ret; -}; - -struct vn_command_vkCreateRayTracingPipelinesKHR { - VkDevice device; - VkDeferredOperationKHR deferredOperation; - VkPipelineCache pipelineCache; - uint32_t createInfoCount; - const VkRayTracingPipelineCreateInfoKHR* pCreateInfos; - const VkAllocationCallbacks* pAllocator; - VkPipeline* pPipelines; - - VkResult ret; -}; - -struct vn_command_vkCmdTraceRaysIndirectKHR { - VkCommandBuffer commandBuffer; - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable; - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable; - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable; - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable; - VkDeviceAddress indirectDeviceAddress; -}; - -struct vn_command_vkCmdTraceRaysIndirect2KHR { - VkCommandBuffer commandBuffer; - VkDeviceAddress indirectDeviceAddress; -}; - -struct vn_command_vkGetDeviceAccelerationStructureCompatibilityKHR { - VkDevice device; - const VkAccelerationStructureVersionInfoKHR* pVersionInfo; - VkAccelerationStructureCompatibilityKHR* pCompatibility; -}; - -struct vn_command_vkGetRayTracingShaderGroupStackSizeKHR { - VkDevice device; - VkPipeline pipeline; - uint32_t group; - VkShaderGroupShaderKHR groupShader; - - VkDeviceSize ret; -}; - -struct vn_command_vkCmdSetRayTracingPipelineStackSizeKHR { - VkCommandBuffer commandBuffer; - uint32_t pipelineStackSize; -}; - -struct vn_command_vkGetImageDrmFormatModifierPropertiesEXT { - VkDevice device; - VkImage image; - VkImageDrmFormatModifierPropertiesEXT* pProperties; - - VkResult ret; -}; - -struct vn_command_vkGetBufferOpaqueCaptureAddress { - VkDevice device; - const VkBufferDeviceAddressInfo* pInfo; - - uint64_t ret; -}; - -struct vn_command_vkGetBufferDeviceAddress { - VkDevice device; - const VkBufferDeviceAddressInfo* pInfo; - - VkDeviceAddress ret; -}; - -struct vn_command_vkGetDeviceMemoryOpaqueCaptureAddress { - VkDevice device; - const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo; - - uint64_t ret; -}; - -struct vn_command_vkCmdSetLineStipple { - VkCommandBuffer commandBuffer; - uint32_t lineStippleFactor; - uint16_t lineStipplePattern; -}; - -struct vn_command_vkGetPhysicalDeviceToolProperties { - VkPhysicalDevice physicalDevice; - uint32_t* pToolCount; - VkPhysicalDeviceToolProperties* pToolProperties; - - VkResult ret; -}; - -struct vn_command_vkCreateAccelerationStructureKHR { - VkDevice device; - const VkAccelerationStructureCreateInfoKHR* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkAccelerationStructureKHR* pAccelerationStructure; - - VkResult ret; -}; - -struct vn_command_vkCmdBuildAccelerationStructuresKHR { - VkCommandBuffer commandBuffer; - uint32_t infoCount; - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos; - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos; -}; - -struct vn_command_vkCmdBuildAccelerationStructuresIndirectKHR { - VkCommandBuffer commandBuffer; - uint32_t infoCount; - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos; - const VkDeviceAddress* pIndirectDeviceAddresses; - const uint32_t* pIndirectStrides; - const uint32_t* const* ppMaxPrimitiveCounts; -}; - -struct vn_command_vkBuildAccelerationStructuresKHR { - VkDevice device; - VkDeferredOperationKHR deferredOperation; - uint32_t infoCount; - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos; - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos; - - VkResult ret; -}; - -struct vn_command_vkGetAccelerationStructureDeviceAddressKHR { - VkDevice device; - const VkAccelerationStructureDeviceAddressInfoKHR* pInfo; - - VkDeviceAddress ret; -}; - -struct vn_command_vkCreateDeferredOperationKHR { - VkDevice device; - const VkAllocationCallbacks* pAllocator; - VkDeferredOperationKHR* pDeferredOperation; - - VkResult ret; -}; - -struct vn_command_vkDestroyDeferredOperationKHR { - VkDevice device; - VkDeferredOperationKHR operation; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkGetDeferredOperationMaxConcurrencyKHR { - VkDevice device; - VkDeferredOperationKHR operation; - - uint32_t ret; -}; - -struct vn_command_vkGetDeferredOperationResultKHR { - VkDevice device; - VkDeferredOperationKHR operation; - - VkResult ret; -}; - -struct vn_command_vkDeferredOperationJoinKHR { - VkDevice device; - VkDeferredOperationKHR operation; - - VkResult ret; -}; - -struct vn_command_vkCmdSetCullMode { - VkCommandBuffer commandBuffer; - VkCullModeFlags cullMode; -}; - -struct vn_command_vkCmdSetFrontFace { - VkCommandBuffer commandBuffer; - VkFrontFace frontFace; -}; - -struct vn_command_vkCmdSetPrimitiveTopology { - VkCommandBuffer commandBuffer; - VkPrimitiveTopology primitiveTopology; -}; - -struct vn_command_vkCmdSetViewportWithCount { - VkCommandBuffer commandBuffer; - uint32_t viewportCount; - const VkViewport* pViewports; -}; - -struct vn_command_vkCmdSetScissorWithCount { - VkCommandBuffer commandBuffer; - uint32_t scissorCount; - const VkRect2D* pScissors; -}; - -struct vn_command_vkCmdBindIndexBuffer2 { - VkCommandBuffer commandBuffer; - VkBuffer buffer; - VkDeviceSize offset; - VkDeviceSize size; - VkIndexType indexType; -}; - -struct vn_command_vkCmdBindVertexBuffers2 { - VkCommandBuffer commandBuffer; - uint32_t firstBinding; - uint32_t bindingCount; - const VkBuffer* pBuffers; - const VkDeviceSize* pOffsets; - const VkDeviceSize* pSizes; - const VkDeviceSize* pStrides; -}; - -struct vn_command_vkCmdSetDepthTestEnable { - VkCommandBuffer commandBuffer; - VkBool32 depthTestEnable; -}; - -struct vn_command_vkCmdSetDepthWriteEnable { - VkCommandBuffer commandBuffer; - VkBool32 depthWriteEnable; -}; - -struct vn_command_vkCmdSetDepthCompareOp { - VkCommandBuffer commandBuffer; - VkCompareOp depthCompareOp; -}; - -struct vn_command_vkCmdSetDepthBoundsTestEnable { - VkCommandBuffer commandBuffer; - VkBool32 depthBoundsTestEnable; -}; - -struct vn_command_vkCmdSetStencilTestEnable { - VkCommandBuffer commandBuffer; - VkBool32 stencilTestEnable; -}; - -struct vn_command_vkCmdSetStencilOp { - VkCommandBuffer commandBuffer; - VkStencilFaceFlags faceMask; - VkStencilOp failOp; - VkStencilOp passOp; - VkStencilOp depthFailOp; - VkCompareOp compareOp; -}; - -struct vn_command_vkCmdSetPatchControlPointsEXT { - VkCommandBuffer commandBuffer; - uint32_t patchControlPoints; -}; - -struct vn_command_vkCmdSetRasterizerDiscardEnable { - VkCommandBuffer commandBuffer; - VkBool32 rasterizerDiscardEnable; -}; - -struct vn_command_vkCmdSetDepthBiasEnable { - VkCommandBuffer commandBuffer; - VkBool32 depthBiasEnable; -}; - -struct vn_command_vkCmdSetLogicOpEXT { - VkCommandBuffer commandBuffer; - VkLogicOp logicOp; -}; - -struct vn_command_vkCmdSetPrimitiveRestartEnable { - VkCommandBuffer commandBuffer; - VkBool32 primitiveRestartEnable; -}; - -struct vn_command_vkCmdSetTessellationDomainOriginEXT { - VkCommandBuffer commandBuffer; - VkTessellationDomainOrigin domainOrigin; -}; - -struct vn_command_vkCmdSetDepthClampEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 depthClampEnable; -}; - -struct vn_command_vkCmdSetPolygonModeEXT { - VkCommandBuffer commandBuffer; - VkPolygonMode polygonMode; -}; - -struct vn_command_vkCmdSetRasterizationSamplesEXT { - VkCommandBuffer commandBuffer; - VkSampleCountFlagBits rasterizationSamples; -}; - -struct vn_command_vkCmdSetSampleMaskEXT { - VkCommandBuffer commandBuffer; - VkSampleCountFlagBits samples; - const VkSampleMask* pSampleMask; -}; - -struct vn_command_vkCmdSetAlphaToCoverageEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 alphaToCoverageEnable; -}; - -struct vn_command_vkCmdSetAlphaToOneEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 alphaToOneEnable; -}; - -struct vn_command_vkCmdSetLogicOpEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 logicOpEnable; -}; - -struct vn_command_vkCmdSetColorBlendEnableEXT { - VkCommandBuffer commandBuffer; - uint32_t firstAttachment; - uint32_t attachmentCount; - const VkBool32* pColorBlendEnables; -}; - -struct vn_command_vkCmdSetColorBlendEquationEXT { - VkCommandBuffer commandBuffer; - uint32_t firstAttachment; - uint32_t attachmentCount; - const VkColorBlendEquationEXT* pColorBlendEquations; -}; - -struct vn_command_vkCmdSetColorWriteMaskEXT { - VkCommandBuffer commandBuffer; - uint32_t firstAttachment; - uint32_t attachmentCount; - const VkColorComponentFlags* pColorWriteMasks; -}; - -struct vn_command_vkCmdSetRasterizationStreamEXT { - VkCommandBuffer commandBuffer; - uint32_t rasterizationStream; -}; - -struct vn_command_vkCmdSetConservativeRasterizationModeEXT { - VkCommandBuffer commandBuffer; - VkConservativeRasterizationModeEXT conservativeRasterizationMode; -}; - -struct vn_command_vkCmdSetExtraPrimitiveOverestimationSizeEXT { - VkCommandBuffer commandBuffer; - float extraPrimitiveOverestimationSize; -}; - -struct vn_command_vkCmdSetDepthClipEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 depthClipEnable; -}; - -struct vn_command_vkCmdSetSampleLocationsEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 sampleLocationsEnable; -}; - -struct vn_command_vkCmdSetColorBlendAdvancedEXT { - VkCommandBuffer commandBuffer; - uint32_t firstAttachment; - uint32_t attachmentCount; - const VkColorBlendAdvancedEXT* pColorBlendAdvanced; -}; - -struct vn_command_vkCmdSetProvokingVertexModeEXT { - VkCommandBuffer commandBuffer; - VkProvokingVertexModeEXT provokingVertexMode; -}; - -struct vn_command_vkCmdSetLineRasterizationModeEXT { - VkCommandBuffer commandBuffer; - VkLineRasterizationMode lineRasterizationMode; -}; - -struct vn_command_vkCmdSetLineStippleEnableEXT { - VkCommandBuffer commandBuffer; - VkBool32 stippledLineEnable; -}; - -struct vn_command_vkCmdSetDepthClipNegativeOneToOneEXT { - VkCommandBuffer commandBuffer; - VkBool32 negativeOneToOne; -}; - -struct vn_command_vkCreatePrivateDataSlot { - VkDevice device; - const VkPrivateDataSlotCreateInfo* pCreateInfo; - const VkAllocationCallbacks* pAllocator; - VkPrivateDataSlot* pPrivateDataSlot; - - VkResult ret; -}; - -struct vn_command_vkDestroyPrivateDataSlot { - VkDevice device; - VkPrivateDataSlot privateDataSlot; - const VkAllocationCallbacks* pAllocator; -}; - -struct vn_command_vkSetPrivateData { - VkDevice device; - VkObjectType objectType; - uint64_t objectHandle; - VkPrivateDataSlot privateDataSlot; - uint64_t data; - - VkResult ret; -}; - -struct vn_command_vkGetPrivateData { - VkDevice device; - VkObjectType objectType; - uint64_t objectHandle; - VkPrivateDataSlot privateDataSlot; - uint64_t* pData; -}; - -struct vn_command_vkCmdCopyBuffer2 { - VkCommandBuffer commandBuffer; - const VkCopyBufferInfo2* pCopyBufferInfo; -}; - -struct vn_command_vkCmdCopyImage2 { - VkCommandBuffer commandBuffer; - const VkCopyImageInfo2* pCopyImageInfo; -}; - -struct vn_command_vkCmdBlitImage2 { - VkCommandBuffer commandBuffer; - const VkBlitImageInfo2* pBlitImageInfo; -}; - -struct vn_command_vkCmdCopyBufferToImage2 { - VkCommandBuffer commandBuffer; - const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo; -}; - -struct vn_command_vkCmdCopyImageToBuffer2 { - VkCommandBuffer commandBuffer; - const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo; -}; - -struct vn_command_vkCmdResolveImage2 { - VkCommandBuffer commandBuffer; - const VkResolveImageInfo2* pResolveImageInfo; -}; - -struct vn_command_vkCmdSetFragmentShadingRateKHR { - VkCommandBuffer commandBuffer; - const VkExtent2D* pFragmentSize; - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]; -}; - -struct vn_command_vkGetPhysicalDeviceFragmentShadingRatesKHR { - VkPhysicalDevice physicalDevice; - uint32_t* pFragmentShadingRateCount; - VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates; - - VkResult ret; -}; - -struct vn_command_vkGetAccelerationStructureBuildSizesKHR { - VkDevice device; - VkAccelerationStructureBuildTypeKHR buildType; - const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo; - const uint32_t* pMaxPrimitiveCounts; - VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo; -}; - -struct vn_command_vkCmdSetVertexInputEXT { - VkCommandBuffer commandBuffer; - uint32_t vertexBindingDescriptionCount; - const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions; - uint32_t vertexAttributeDescriptionCount; - const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions; -}; - -struct vn_command_vkCmdSetColorWriteEnableEXT { - VkCommandBuffer commandBuffer; - uint32_t attachmentCount; - const VkBool32* pColorWriteEnables; -}; - -struct vn_command_vkCmdSetEvent2 { - VkCommandBuffer commandBuffer; - VkEvent event; - const VkDependencyInfo* pDependencyInfo; -}; - -struct vn_command_vkCmdResetEvent2 { - VkCommandBuffer commandBuffer; - VkEvent event; - VkPipelineStageFlags2 stageMask; -}; - -struct vn_command_vkCmdWaitEvents2 { - VkCommandBuffer commandBuffer; - uint32_t eventCount; - const VkEvent* pEvents; - const VkDependencyInfo* pDependencyInfos; -}; - -struct vn_command_vkCmdPipelineBarrier2 { - VkCommandBuffer commandBuffer; - const VkDependencyInfo* pDependencyInfo; -}; - -struct vn_command_vkQueueSubmit2 { - VkQueue queue; - uint32_t submitCount; - const VkSubmitInfo2* pSubmits; - VkFence fence; - - VkResult ret; -}; - -struct vn_command_vkCmdWriteTimestamp2 { - VkCommandBuffer commandBuffer; - VkPipelineStageFlags2 stage; - VkQueryPool queryPool; - uint32_t query; -}; - -struct vn_command_vkCopyMemoryToImage { - VkDevice device; - const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo; - - VkResult ret; -}; - -struct vn_command_vkCopyImageToMemory { - VkDevice device; - const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo; - - VkResult ret; -}; - -struct vn_command_vkCopyImageToImage { - VkDevice device; - const VkCopyImageToImageInfo* pCopyImageToImageInfo; - - VkResult ret; -}; - -struct vn_command_vkTransitionImageLayout { - VkDevice device; - uint32_t transitionCount; - const VkHostImageLayoutTransitionInfo* pTransitions; - - VkResult ret; -}; - -struct vn_command_vkCmdBeginRendering { - VkCommandBuffer commandBuffer; - const VkRenderingInfo* pRenderingInfo; -}; - -struct vn_command_vkCmdEndRendering { - VkCommandBuffer commandBuffer; -}; - -struct vn_command_vkGetImageSubresourceLayout2 { - VkDevice device; - VkImage image; - const VkImageSubresource2* pSubresource; - VkSubresourceLayout2* pLayout; -}; - -struct vn_command_vkCmdSetDepthBias2EXT { - VkCommandBuffer commandBuffer; - const VkDepthBiasInfoEXT* pDepthBiasInfo; -}; - -struct vn_command_vkGetDeviceImageSubresourceLayout { - VkDevice device; - const VkDeviceImageSubresourceInfo* pInfo; - VkSubresourceLayout2* pLayout; -}; - -struct vn_command_vkMapMemory2 { - VkDevice device; - const VkMemoryMapInfo* pMemoryMapInfo; - void** ppData; - - VkResult ret; -}; - -struct vn_command_vkUnmapMemory2 { - VkDevice device; - const VkMemoryUnmapInfo* pMemoryUnmapInfo; - - VkResult ret; -}; - -struct vn_command_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR { - VkPhysicalDevice physicalDevice; - uint32_t* pPropertyCount; - VkCooperativeMatrixPropertiesKHR* pProperties; - - VkResult ret; -}; - -struct vn_command_vkCmdBindDescriptorSets2 { - VkCommandBuffer commandBuffer; - const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo; -}; - -struct vn_command_vkCmdPushConstants2 { - VkCommandBuffer commandBuffer; - const VkPushConstantsInfo* pPushConstantsInfo; -}; - -struct vn_command_vkCmdPushDescriptorSet2 { - VkCommandBuffer commandBuffer; - const VkPushDescriptorSetInfo* pPushDescriptorSetInfo; -}; - -struct vn_command_vkCmdPushDescriptorSetWithTemplate2 { - VkCommandBuffer commandBuffer; - const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo; -}; - -struct vn_command_vkCmdSetRenderingAttachmentLocations { - VkCommandBuffer commandBuffer; - const VkRenderingAttachmentLocationInfo* pLocationInfo; -}; - -struct vn_command_vkCmdSetRenderingInputAttachmentIndices { - VkCommandBuffer commandBuffer; - const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo; -}; - -struct vn_command_vkCmdSetDepthClampRangeEXT { - VkCommandBuffer commandBuffer; - VkDepthClampModeEXT depthClampMode; - const VkDepthClampRangeEXT* pDepthClampRange; -}; - -struct vn_command_vkWriteSamplerDescriptorsEXT { - VkDevice device; - uint32_t samplerCount; - const VkSamplerCreateInfo* pSamplers; - const VkHostAddressRangeEXT* pDescriptors; - - VkResult ret; -}; - -struct vn_command_vkWriteResourceDescriptorsEXT { - VkDevice device; - uint32_t resourceCount; - const VkResourceDescriptorInfoEXT* pResources; - const VkHostAddressRangeEXT* pDescriptors; - - VkResult ret; -}; - -struct vn_command_vkCmdBindSamplerHeapEXT { - VkCommandBuffer commandBuffer; - const VkBindHeapInfoEXT* pBindInfo; -}; - -struct vn_command_vkCmdBindResourceHeapEXT { - VkCommandBuffer commandBuffer; - const VkBindHeapInfoEXT* pBindInfo; -}; - -struct vn_command_vkCmdPushDataEXT { - VkCommandBuffer commandBuffer; - const VkPushDataInfoEXT* pPushDataInfo; -}; - -struct vn_command_vkRegisterCustomBorderColorEXT { - VkDevice device; - const VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor; - VkBool32 requestIndex; - uint32_t* pIndex; - - VkResult ret; -}; - -struct vn_command_vkUnregisterCustomBorderColorEXT { - VkDevice device; - uint32_t index; -}; - -struct vn_command_vkGetImageOpaqueCaptureDataEXT { - VkDevice device; - uint32_t imageCount; - const VkImage* pImages; - VkHostAddressRangeEXT* pDatas; - - VkResult ret; -}; - -struct vn_command_vkGetPhysicalDeviceDescriptorSizeEXT { - VkPhysicalDevice physicalDevice; - VkDescriptorType descriptorType; - - VkDeviceSize ret; -}; - -struct vn_command_vkSetReplyCommandStreamMESA { - const VkCommandStreamDescriptionMESA* pStream; -}; - -struct vn_command_vkSeekReplyCommandStreamMESA { - size_t position; -}; - -struct vn_command_vkExecuteCommandStreamsMESA { - uint32_t streamCount; - const VkCommandStreamDescriptionMESA* pStreams; - const size_t* pReplyPositions; - uint32_t dependencyCount; - const VkCommandStreamDependencyMESA* pDependencies; - VkCommandStreamExecutionFlagsMESA flags; -}; - -struct vn_command_vkCreateRingMESA { - uint64_t ring; - const VkRingCreateInfoMESA* pCreateInfo; -}; - -struct vn_command_vkDestroyRingMESA { - uint64_t ring; -}; - -struct vn_command_vkNotifyRingMESA { - uint64_t ring; - uint32_t seqno; - VkRingNotifyFlagsMESA flags; -}; - -struct vn_command_vkWriteRingExtraMESA { - uint64_t ring; - size_t offset; - uint32_t value; -}; - -struct vn_command_vkGetMemoryResourcePropertiesMESA { - VkDevice device; - uint32_t resourceId; - VkMemoryResourcePropertiesMESA* pMemoryResourceProperties; - - VkResult ret; -}; - -struct vn_command_vkResetFenceResourceMESA { - VkDevice device; - VkFence fence; -}; - -struct vn_command_vkWaitSemaphoreResourceMESA { - VkDevice device; - VkSemaphore semaphore; -}; - -struct vn_command_vkImportSemaphoreResourceMESA { - VkDevice device; - const VkImportSemaphoreResourceInfoMESA* pImportSemaphoreResourceInfo; -}; - -struct vn_command_vkSubmitVirtqueueSeqnoMESA { - uint64_t ring; - uint64_t seqno; -}; - -struct vn_command_vkWaitVirtqueueSeqnoMESA { - uint64_t seqno; -}; - -struct vn_command_vkWaitRingSeqnoMESA { - uint64_t ring; - uint64_t seqno; -}; - -struct vn_command_vkCopyImageToMemoryMESA { - VkDevice device; - const VkCopyImageToMemoryInfoMESA* pCopyImageToMemoryInfo; - size_t dataSize; - void* pData; - - VkResult ret; -}; - -struct vn_command_vkCopyMemoryToImageMESA { - VkDevice device; - const VkCopyMemoryToImageInfoMESA* pCopyMemoryToImageInfo; - - VkResult ret; -}; - -struct vn_command_vkWriteSamplerDescriptorMESA { - VkDevice device; - const VkSamplerCreateInfo* pSampler; - size_t dataSize; - void* pData; - - VkResult ret; -}; - -struct vn_command_vkWriteResourceDescriptorMESA { - VkDevice device; - const VkResourceDescriptorInfoEXT* pResource; - size_t dataSize; - void* pData; - - VkResult ret; -}; - -struct vn_dispatch_context { - void *data; - void (*debug_log)(struct vn_dispatch_context *ctx, const char *msg); - - struct vn_cs_encoder *encoder; - struct vn_cs_decoder *decoder; - - void (*dispatch_vkCreateInstance)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateInstance *args); - void (*dispatch_vkDestroyInstance)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyInstance *args); - void (*dispatch_vkEnumeratePhysicalDevices)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumeratePhysicalDevices *args); - void (*dispatch_vkGetDeviceProcAddr)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceProcAddr *args); - void (*dispatch_vkGetInstanceProcAddr)(struct vn_dispatch_context *ctx, struct vn_command_vkGetInstanceProcAddr *args); - void (*dispatch_vkGetPhysicalDeviceProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceProperties *args); - void (*dispatch_vkGetPhysicalDeviceQueueFamilyProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties *args); - void (*dispatch_vkGetPhysicalDeviceMemoryProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceMemoryProperties *args); - void (*dispatch_vkGetPhysicalDeviceFeatures)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceFeatures *args); - void (*dispatch_vkGetPhysicalDeviceFormatProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceFormatProperties *args); - void (*dispatch_vkGetPhysicalDeviceImageFormatProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceImageFormatProperties *args); - void (*dispatch_vkCreateDevice)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateDevice *args); - void (*dispatch_vkDestroyDevice)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyDevice *args); - void (*dispatch_vkEnumerateInstanceVersion)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumerateInstanceVersion *args); - void (*dispatch_vkEnumerateInstanceLayerProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumerateInstanceLayerProperties *args); - void (*dispatch_vkEnumerateInstanceExtensionProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumerateInstanceExtensionProperties *args); - void (*dispatch_vkEnumerateDeviceLayerProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumerateDeviceLayerProperties *args); - void (*dispatch_vkEnumerateDeviceExtensionProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumerateDeviceExtensionProperties *args); - void (*dispatch_vkGetDeviceQueue)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceQueue *args); - void (*dispatch_vkQueueSubmit)(struct vn_dispatch_context *ctx, struct vn_command_vkQueueSubmit *args); - void (*dispatch_vkQueueWaitIdle)(struct vn_dispatch_context *ctx, struct vn_command_vkQueueWaitIdle *args); - void (*dispatch_vkDeviceWaitIdle)(struct vn_dispatch_context *ctx, struct vn_command_vkDeviceWaitIdle *args); - void (*dispatch_vkAllocateMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkAllocateMemory *args); - void (*dispatch_vkFreeMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkFreeMemory *args); - void (*dispatch_vkMapMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkMapMemory *args); - void (*dispatch_vkUnmapMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkUnmapMemory *args); - void (*dispatch_vkFlushMappedMemoryRanges)(struct vn_dispatch_context *ctx, struct vn_command_vkFlushMappedMemoryRanges *args); - void (*dispatch_vkInvalidateMappedMemoryRanges)(struct vn_dispatch_context *ctx, struct vn_command_vkInvalidateMappedMemoryRanges *args); - void (*dispatch_vkGetDeviceMemoryCommitment)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceMemoryCommitment *args); - void (*dispatch_vkGetBufferMemoryRequirements)(struct vn_dispatch_context *ctx, struct vn_command_vkGetBufferMemoryRequirements *args); - void (*dispatch_vkBindBufferMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkBindBufferMemory *args); - void (*dispatch_vkGetImageMemoryRequirements)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageMemoryRequirements *args); - void (*dispatch_vkBindImageMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkBindImageMemory *args); - void (*dispatch_vkGetImageSparseMemoryRequirements)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageSparseMemoryRequirements *args); - void (*dispatch_vkGetPhysicalDeviceSparseImageFormatProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties *args); - void (*dispatch_vkQueueBindSparse)(struct vn_dispatch_context *ctx, struct vn_command_vkQueueBindSparse *args); - void (*dispatch_vkCreateFence)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateFence *args); - void (*dispatch_vkDestroyFence)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyFence *args); - void (*dispatch_vkResetFences)(struct vn_dispatch_context *ctx, struct vn_command_vkResetFences *args); - void (*dispatch_vkGetFenceStatus)(struct vn_dispatch_context *ctx, struct vn_command_vkGetFenceStatus *args); - void (*dispatch_vkWaitForFences)(struct vn_dispatch_context *ctx, struct vn_command_vkWaitForFences *args); - void (*dispatch_vkCreateSemaphore)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateSemaphore *args); - void (*dispatch_vkDestroySemaphore)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroySemaphore *args); - void (*dispatch_vkCreateEvent)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateEvent *args); - void (*dispatch_vkDestroyEvent)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyEvent *args); - void (*dispatch_vkGetEventStatus)(struct vn_dispatch_context *ctx, struct vn_command_vkGetEventStatus *args); - void (*dispatch_vkSetEvent)(struct vn_dispatch_context *ctx, struct vn_command_vkSetEvent *args); - void (*dispatch_vkResetEvent)(struct vn_dispatch_context *ctx, struct vn_command_vkResetEvent *args); - void (*dispatch_vkCreateQueryPool)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateQueryPool *args); - void (*dispatch_vkDestroyQueryPool)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyQueryPool *args); - void (*dispatch_vkGetQueryPoolResults)(struct vn_dispatch_context *ctx, struct vn_command_vkGetQueryPoolResults *args); - void (*dispatch_vkResetQueryPool)(struct vn_dispatch_context *ctx, struct vn_command_vkResetQueryPool *args); - void (*dispatch_vkCreateBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateBuffer *args); - void (*dispatch_vkDestroyBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyBuffer *args); - void (*dispatch_vkCreateBufferView)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateBufferView *args); - void (*dispatch_vkDestroyBufferView)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyBufferView *args); - void (*dispatch_vkCreateImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateImage *args); - void (*dispatch_vkDestroyImage)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyImage *args); - void (*dispatch_vkGetImageSubresourceLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageSubresourceLayout *args); - void (*dispatch_vkCreateImageView)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateImageView *args); - void (*dispatch_vkDestroyImageView)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyImageView *args); - void (*dispatch_vkCreateShaderModule)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateShaderModule *args); - void (*dispatch_vkDestroyShaderModule)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyShaderModule *args); - void (*dispatch_vkCreatePipelineCache)(struct vn_dispatch_context *ctx, struct vn_command_vkCreatePipelineCache *args); - void (*dispatch_vkDestroyPipelineCache)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyPipelineCache *args); - void (*dispatch_vkGetPipelineCacheData)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPipelineCacheData *args); - void (*dispatch_vkMergePipelineCaches)(struct vn_dispatch_context *ctx, struct vn_command_vkMergePipelineCaches *args); - void (*dispatch_vkCreateGraphicsPipelines)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateGraphicsPipelines *args); - void (*dispatch_vkCreateComputePipelines)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateComputePipelines *args); - void (*dispatch_vkDestroyPipeline)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyPipeline *args); - void (*dispatch_vkCreatePipelineLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkCreatePipelineLayout *args); - void (*dispatch_vkDestroyPipelineLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyPipelineLayout *args); - void (*dispatch_vkCreateSampler)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateSampler *args); - void (*dispatch_vkDestroySampler)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroySampler *args); - void (*dispatch_vkCreateDescriptorSetLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateDescriptorSetLayout *args); - void (*dispatch_vkDestroyDescriptorSetLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyDescriptorSetLayout *args); - void (*dispatch_vkCreateDescriptorPool)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateDescriptorPool *args); - void (*dispatch_vkDestroyDescriptorPool)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyDescriptorPool *args); - void (*dispatch_vkResetDescriptorPool)(struct vn_dispatch_context *ctx, struct vn_command_vkResetDescriptorPool *args); - void (*dispatch_vkAllocateDescriptorSets)(struct vn_dispatch_context *ctx, struct vn_command_vkAllocateDescriptorSets *args); - void (*dispatch_vkFreeDescriptorSets)(struct vn_dispatch_context *ctx, struct vn_command_vkFreeDescriptorSets *args); - void (*dispatch_vkUpdateDescriptorSets)(struct vn_dispatch_context *ctx, struct vn_command_vkUpdateDescriptorSets *args); - void (*dispatch_vkCreateFramebuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateFramebuffer *args); - void (*dispatch_vkDestroyFramebuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyFramebuffer *args); - void (*dispatch_vkCreateRenderPass)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateRenderPass *args); - void (*dispatch_vkDestroyRenderPass)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyRenderPass *args); - void (*dispatch_vkGetRenderAreaGranularity)(struct vn_dispatch_context *ctx, struct vn_command_vkGetRenderAreaGranularity *args); - void (*dispatch_vkGetRenderingAreaGranularity)(struct vn_dispatch_context *ctx, struct vn_command_vkGetRenderingAreaGranularity *args); - void (*dispatch_vkCreateCommandPool)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateCommandPool *args); - void (*dispatch_vkDestroyCommandPool)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyCommandPool *args); - void (*dispatch_vkResetCommandPool)(struct vn_dispatch_context *ctx, struct vn_command_vkResetCommandPool *args); - void (*dispatch_vkAllocateCommandBuffers)(struct vn_dispatch_context *ctx, struct vn_command_vkAllocateCommandBuffers *args); - void (*dispatch_vkFreeCommandBuffers)(struct vn_dispatch_context *ctx, struct vn_command_vkFreeCommandBuffers *args); - void (*dispatch_vkBeginCommandBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkBeginCommandBuffer *args); - void (*dispatch_vkEndCommandBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkEndCommandBuffer *args); - void (*dispatch_vkResetCommandBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkResetCommandBuffer *args); - void (*dispatch_vkCmdBindPipeline)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindPipeline *args); - void (*dispatch_vkCmdSetAttachmentFeedbackLoopEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetAttachmentFeedbackLoopEnableEXT *args); - void (*dispatch_vkCmdSetViewport)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetViewport *args); - void (*dispatch_vkCmdSetScissor)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetScissor *args); - void (*dispatch_vkCmdSetLineWidth)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetLineWidth *args); - void (*dispatch_vkCmdSetDepthBias)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthBias *args); - void (*dispatch_vkCmdSetBlendConstants)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetBlendConstants *args); - void (*dispatch_vkCmdSetDepthBounds)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthBounds *args); - void (*dispatch_vkCmdSetStencilCompareMask)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetStencilCompareMask *args); - void (*dispatch_vkCmdSetStencilWriteMask)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetStencilWriteMask *args); - void (*dispatch_vkCmdSetStencilReference)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetStencilReference *args); - void (*dispatch_vkCmdBindDescriptorSets)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindDescriptorSets *args); - void (*dispatch_vkCmdBindIndexBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindIndexBuffer *args); - void (*dispatch_vkCmdBindVertexBuffers)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindVertexBuffers *args); - void (*dispatch_vkCmdDraw)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDraw *args); - void (*dispatch_vkCmdDrawIndexed)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawIndexed *args); - void (*dispatch_vkCmdDrawMultiEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawMultiEXT *args); - void (*dispatch_vkCmdDrawMultiIndexedEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawMultiIndexedEXT *args); - void (*dispatch_vkCmdDrawIndirect)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawIndirect *args); - void (*dispatch_vkCmdDrawIndexedIndirect)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawIndexedIndirect *args); - void (*dispatch_vkCmdDispatch)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDispatch *args); - void (*dispatch_vkCmdDispatchIndirect)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDispatchIndirect *args); - void (*dispatch_vkCmdCopyBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyBuffer *args); - void (*dispatch_vkCmdCopyImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyImage *args); - void (*dispatch_vkCmdBlitImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBlitImage *args); - void (*dispatch_vkCmdCopyBufferToImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyBufferToImage *args); - void (*dispatch_vkCmdCopyImageToBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyImageToBuffer *args); - void (*dispatch_vkCmdUpdateBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdUpdateBuffer *args); - void (*dispatch_vkCmdFillBuffer)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdFillBuffer *args); - void (*dispatch_vkCmdClearColorImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdClearColorImage *args); - void (*dispatch_vkCmdClearDepthStencilImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdClearDepthStencilImage *args); - void (*dispatch_vkCmdClearAttachments)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdClearAttachments *args); - void (*dispatch_vkCmdResolveImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdResolveImage *args); - void (*dispatch_vkCmdSetEvent)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetEvent *args); - void (*dispatch_vkCmdResetEvent)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdResetEvent *args); - void (*dispatch_vkCmdWaitEvents)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdWaitEvents *args); - void (*dispatch_vkCmdPipelineBarrier)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPipelineBarrier *args); - void (*dispatch_vkCmdBeginQuery)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginQuery *args); - void (*dispatch_vkCmdEndQuery)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndQuery *args); - void (*dispatch_vkCmdBeginConditionalRenderingEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginConditionalRenderingEXT *args); - void (*dispatch_vkCmdEndConditionalRenderingEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndConditionalRenderingEXT *args); - void (*dispatch_vkCmdResetQueryPool)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdResetQueryPool *args); - void (*dispatch_vkCmdWriteTimestamp)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdWriteTimestamp *args); - void (*dispatch_vkCmdCopyQueryPoolResults)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyQueryPoolResults *args); - void (*dispatch_vkCmdPushConstants)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushConstants *args); - void (*dispatch_vkCmdBeginRenderPass)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginRenderPass *args); - void (*dispatch_vkCmdNextSubpass)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdNextSubpass *args); - void (*dispatch_vkCmdEndRenderPass)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndRenderPass *args); - void (*dispatch_vkCmdExecuteCommands)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdExecuteCommands *args); - void (*dispatch_vkGetPhysicalDeviceFeatures2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceFeatures2 *args); - void (*dispatch_vkGetPhysicalDeviceProperties2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceProperties2 *args); - void (*dispatch_vkGetPhysicalDeviceFormatProperties2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceFormatProperties2 *args); - void (*dispatch_vkGetPhysicalDeviceImageFormatProperties2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceImageFormatProperties2 *args); - void (*dispatch_vkGetPhysicalDeviceQueueFamilyProperties2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties2 *args); - void (*dispatch_vkGetPhysicalDeviceMemoryProperties2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceMemoryProperties2 *args); - void (*dispatch_vkGetPhysicalDeviceSparseImageFormatProperties2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties2 *args); - void (*dispatch_vkCmdPushDescriptorSet)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushDescriptorSet *args); - void (*dispatch_vkTrimCommandPool)(struct vn_dispatch_context *ctx, struct vn_command_vkTrimCommandPool *args); - void (*dispatch_vkGetPhysicalDeviceExternalBufferProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceExternalBufferProperties *args); - void (*dispatch_vkGetMemoryFdKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetMemoryFdKHR *args); - void (*dispatch_vkGetMemoryFdPropertiesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetMemoryFdPropertiesKHR *args); - void (*dispatch_vkGetPhysicalDeviceExternalSemaphoreProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceExternalSemaphoreProperties *args); - void (*dispatch_vkGetSemaphoreFdKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetSemaphoreFdKHR *args); - void (*dispatch_vkImportSemaphoreFdKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkImportSemaphoreFdKHR *args); - void (*dispatch_vkGetPhysicalDeviceExternalFenceProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceExternalFenceProperties *args); - void (*dispatch_vkGetFenceFdKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetFenceFdKHR *args); - void (*dispatch_vkImportFenceFdKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkImportFenceFdKHR *args); - void (*dispatch_vkEnumeratePhysicalDeviceGroups)(struct vn_dispatch_context *ctx, struct vn_command_vkEnumeratePhysicalDeviceGroups *args); - void (*dispatch_vkGetDeviceGroupPeerMemoryFeatures)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceGroupPeerMemoryFeatures *args); - void (*dispatch_vkBindBufferMemory2)(struct vn_dispatch_context *ctx, struct vn_command_vkBindBufferMemory2 *args); - void (*dispatch_vkBindImageMemory2)(struct vn_dispatch_context *ctx, struct vn_command_vkBindImageMemory2 *args); - void (*dispatch_vkCmdSetDeviceMask)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDeviceMask *args); - void (*dispatch_vkCmdDispatchBase)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDispatchBase *args); - void (*dispatch_vkCreateDescriptorUpdateTemplate)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateDescriptorUpdateTemplate *args); - void (*dispatch_vkDestroyDescriptorUpdateTemplate)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyDescriptorUpdateTemplate *args); - void (*dispatch_vkUpdateDescriptorSetWithTemplate)(struct vn_dispatch_context *ctx, struct vn_command_vkUpdateDescriptorSetWithTemplate *args); - void (*dispatch_vkCmdPushDescriptorSetWithTemplate)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushDescriptorSetWithTemplate *args); - void (*dispatch_vkCmdSetSampleLocationsEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetSampleLocationsEXT *args); - void (*dispatch_vkGetPhysicalDeviceMultisamplePropertiesEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceMultisamplePropertiesEXT *args); - void (*dispatch_vkGetBufferMemoryRequirements2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetBufferMemoryRequirements2 *args); - void (*dispatch_vkGetImageMemoryRequirements2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageMemoryRequirements2 *args); - void (*dispatch_vkGetImageSparseMemoryRequirements2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageSparseMemoryRequirements2 *args); - void (*dispatch_vkGetDeviceBufferMemoryRequirements)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceBufferMemoryRequirements *args); - void (*dispatch_vkGetDeviceImageMemoryRequirements)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceImageMemoryRequirements *args); - void (*dispatch_vkGetDeviceImageSparseMemoryRequirements)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceImageSparseMemoryRequirements *args); - void (*dispatch_vkCreateSamplerYcbcrConversion)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateSamplerYcbcrConversion *args); - void (*dispatch_vkDestroySamplerYcbcrConversion)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroySamplerYcbcrConversion *args); - void (*dispatch_vkGetDeviceQueue2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceQueue2 *args); - void (*dispatch_vkGetDescriptorSetLayoutSupport)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDescriptorSetLayoutSupport *args); - void (*dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR *args); - void (*dispatch_vkGetCalibratedTimestampsKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetCalibratedTimestampsKHR *args); - void (*dispatch_vkCreateRenderPass2)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateRenderPass2 *args); - void (*dispatch_vkCmdBeginRenderPass2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginRenderPass2 *args); - void (*dispatch_vkCmdNextSubpass2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdNextSubpass2 *args); - void (*dispatch_vkCmdEndRenderPass2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndRenderPass2 *args); - void (*dispatch_vkGetSemaphoreCounterValue)(struct vn_dispatch_context *ctx, struct vn_command_vkGetSemaphoreCounterValue *args); - void (*dispatch_vkWaitSemaphores)(struct vn_dispatch_context *ctx, struct vn_command_vkWaitSemaphores *args); - void (*dispatch_vkSignalSemaphore)(struct vn_dispatch_context *ctx, struct vn_command_vkSignalSemaphore *args); - void (*dispatch_vkCmdDrawIndirectCount)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawIndirectCount *args); - void (*dispatch_vkCmdDrawIndexedIndirectCount)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawIndexedIndirectCount *args); - void (*dispatch_vkCmdBindTransformFeedbackBuffersEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindTransformFeedbackBuffersEXT *args); - void (*dispatch_vkCmdBeginTransformFeedbackEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginTransformFeedbackEXT *args); - void (*dispatch_vkCmdEndTransformFeedbackEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndTransformFeedbackEXT *args); - void (*dispatch_vkCmdBeginQueryIndexedEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginQueryIndexedEXT *args); - void (*dispatch_vkCmdEndQueryIndexedEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndQueryIndexedEXT *args); - void (*dispatch_vkCmdDrawIndirectByteCountEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawIndirectByteCountEXT *args); - void (*dispatch_vkCmdDrawMeshTasksEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawMeshTasksEXT *args); - void (*dispatch_vkCmdDrawMeshTasksIndirectEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawMeshTasksIndirectEXT *args); - void (*dispatch_vkCmdDrawMeshTasksIndirectCountEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdDrawMeshTasksIndirectCountEXT *args); - void (*dispatch_vkDestroyAccelerationStructureKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyAccelerationStructureKHR *args); - void (*dispatch_vkCmdCopyAccelerationStructureKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyAccelerationStructureKHR *args); - void (*dispatch_vkCopyAccelerationStructureKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyAccelerationStructureKHR *args); - void (*dispatch_vkCmdCopyAccelerationStructureToMemoryKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyAccelerationStructureToMemoryKHR *args); - void (*dispatch_vkCopyAccelerationStructureToMemoryKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyAccelerationStructureToMemoryKHR *args); - void (*dispatch_vkCmdCopyMemoryToAccelerationStructureKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyMemoryToAccelerationStructureKHR *args); - void (*dispatch_vkCopyMemoryToAccelerationStructureKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyMemoryToAccelerationStructureKHR *args); - void (*dispatch_vkCmdWriteAccelerationStructuresPropertiesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdWriteAccelerationStructuresPropertiesKHR *args); - void (*dispatch_vkWriteAccelerationStructuresPropertiesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkWriteAccelerationStructuresPropertiesKHR *args); - void (*dispatch_vkCmdTraceRaysKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdTraceRaysKHR *args); - void (*dispatch_vkGetRayTracingShaderGroupHandlesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetRayTracingShaderGroupHandlesKHR *args); - void (*dispatch_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR *args); - void (*dispatch_vkCreateRayTracingPipelinesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateRayTracingPipelinesKHR *args); - void (*dispatch_vkCmdTraceRaysIndirectKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdTraceRaysIndirectKHR *args); - void (*dispatch_vkCmdTraceRaysIndirect2KHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdTraceRaysIndirect2KHR *args); - void (*dispatch_vkGetDeviceAccelerationStructureCompatibilityKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceAccelerationStructureCompatibilityKHR *args); - void (*dispatch_vkGetRayTracingShaderGroupStackSizeKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetRayTracingShaderGroupStackSizeKHR *args); - void (*dispatch_vkCmdSetRayTracingPipelineStackSizeKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetRayTracingPipelineStackSizeKHR *args); - void (*dispatch_vkGetImageDrmFormatModifierPropertiesEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageDrmFormatModifierPropertiesEXT *args); - void (*dispatch_vkGetBufferOpaqueCaptureAddress)(struct vn_dispatch_context *ctx, struct vn_command_vkGetBufferOpaqueCaptureAddress *args); - void (*dispatch_vkGetBufferDeviceAddress)(struct vn_dispatch_context *ctx, struct vn_command_vkGetBufferDeviceAddress *args); - void (*dispatch_vkGetDeviceMemoryOpaqueCaptureAddress)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceMemoryOpaqueCaptureAddress *args); - void (*dispatch_vkCmdSetLineStipple)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetLineStipple *args); - void (*dispatch_vkGetPhysicalDeviceToolProperties)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceToolProperties *args); - void (*dispatch_vkCreateAccelerationStructureKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateAccelerationStructureKHR *args); - void (*dispatch_vkCmdBuildAccelerationStructuresKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBuildAccelerationStructuresKHR *args); - void (*dispatch_vkCmdBuildAccelerationStructuresIndirectKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBuildAccelerationStructuresIndirectKHR *args); - void (*dispatch_vkBuildAccelerationStructuresKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkBuildAccelerationStructuresKHR *args); - void (*dispatch_vkGetAccelerationStructureDeviceAddressKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetAccelerationStructureDeviceAddressKHR *args); - void (*dispatch_vkCreateDeferredOperationKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateDeferredOperationKHR *args); - void (*dispatch_vkDestroyDeferredOperationKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyDeferredOperationKHR *args); - void (*dispatch_vkGetDeferredOperationMaxConcurrencyKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeferredOperationMaxConcurrencyKHR *args); - void (*dispatch_vkGetDeferredOperationResultKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeferredOperationResultKHR *args); - void (*dispatch_vkDeferredOperationJoinKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkDeferredOperationJoinKHR *args); - void (*dispatch_vkCmdSetCullMode)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetCullMode *args); - void (*dispatch_vkCmdSetFrontFace)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetFrontFace *args); - void (*dispatch_vkCmdSetPrimitiveTopology)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetPrimitiveTopology *args); - void (*dispatch_vkCmdSetViewportWithCount)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetViewportWithCount *args); - void (*dispatch_vkCmdSetScissorWithCount)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetScissorWithCount *args); - void (*dispatch_vkCmdBindIndexBuffer2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindIndexBuffer2 *args); - void (*dispatch_vkCmdBindVertexBuffers2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindVertexBuffers2 *args); - void (*dispatch_vkCmdSetDepthTestEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthTestEnable *args); - void (*dispatch_vkCmdSetDepthWriteEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthWriteEnable *args); - void (*dispatch_vkCmdSetDepthCompareOp)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthCompareOp *args); - void (*dispatch_vkCmdSetDepthBoundsTestEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthBoundsTestEnable *args); - void (*dispatch_vkCmdSetStencilTestEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetStencilTestEnable *args); - void (*dispatch_vkCmdSetStencilOp)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetStencilOp *args); - void (*dispatch_vkCmdSetPatchControlPointsEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetPatchControlPointsEXT *args); - void (*dispatch_vkCmdSetRasterizerDiscardEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetRasterizerDiscardEnable *args); - void (*dispatch_vkCmdSetDepthBiasEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthBiasEnable *args); - void (*dispatch_vkCmdSetLogicOpEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetLogicOpEXT *args); - void (*dispatch_vkCmdSetPrimitiveRestartEnable)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetPrimitiveRestartEnable *args); - void (*dispatch_vkCmdSetTessellationDomainOriginEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetTessellationDomainOriginEXT *args); - void (*dispatch_vkCmdSetDepthClampEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthClampEnableEXT *args); - void (*dispatch_vkCmdSetPolygonModeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetPolygonModeEXT *args); - void (*dispatch_vkCmdSetRasterizationSamplesEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetRasterizationSamplesEXT *args); - void (*dispatch_vkCmdSetSampleMaskEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetSampleMaskEXT *args); - void (*dispatch_vkCmdSetAlphaToCoverageEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetAlphaToCoverageEnableEXT *args); - void (*dispatch_vkCmdSetAlphaToOneEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetAlphaToOneEnableEXT *args); - void (*dispatch_vkCmdSetLogicOpEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetLogicOpEnableEXT *args); - void (*dispatch_vkCmdSetColorBlendEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetColorBlendEnableEXT *args); - void (*dispatch_vkCmdSetColorBlendEquationEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetColorBlendEquationEXT *args); - void (*dispatch_vkCmdSetColorWriteMaskEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetColorWriteMaskEXT *args); - void (*dispatch_vkCmdSetRasterizationStreamEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetRasterizationStreamEXT *args); - void (*dispatch_vkCmdSetConservativeRasterizationModeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetConservativeRasterizationModeEXT *args); - void (*dispatch_vkCmdSetExtraPrimitiveOverestimationSizeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetExtraPrimitiveOverestimationSizeEXT *args); - void (*dispatch_vkCmdSetDepthClipEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthClipEnableEXT *args); - void (*dispatch_vkCmdSetSampleLocationsEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetSampleLocationsEnableEXT *args); - void (*dispatch_vkCmdSetColorBlendAdvancedEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetColorBlendAdvancedEXT *args); - void (*dispatch_vkCmdSetProvokingVertexModeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetProvokingVertexModeEXT *args); - void (*dispatch_vkCmdSetLineRasterizationModeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetLineRasterizationModeEXT *args); - void (*dispatch_vkCmdSetLineStippleEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetLineStippleEnableEXT *args); - void (*dispatch_vkCmdSetDepthClipNegativeOneToOneEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthClipNegativeOneToOneEXT *args); - void (*dispatch_vkCreatePrivateDataSlot)(struct vn_dispatch_context *ctx, struct vn_command_vkCreatePrivateDataSlot *args); - void (*dispatch_vkDestroyPrivateDataSlot)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyPrivateDataSlot *args); - void (*dispatch_vkSetPrivateData)(struct vn_dispatch_context *ctx, struct vn_command_vkSetPrivateData *args); - void (*dispatch_vkGetPrivateData)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPrivateData *args); - void (*dispatch_vkCmdCopyBuffer2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyBuffer2 *args); - void (*dispatch_vkCmdCopyImage2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyImage2 *args); - void (*dispatch_vkCmdBlitImage2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBlitImage2 *args); - void (*dispatch_vkCmdCopyBufferToImage2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyBufferToImage2 *args); - void (*dispatch_vkCmdCopyImageToBuffer2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdCopyImageToBuffer2 *args); - void (*dispatch_vkCmdResolveImage2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdResolveImage2 *args); - void (*dispatch_vkCmdSetFragmentShadingRateKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetFragmentShadingRateKHR *args); - void (*dispatch_vkGetPhysicalDeviceFragmentShadingRatesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceFragmentShadingRatesKHR *args); - void (*dispatch_vkGetAccelerationStructureBuildSizesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetAccelerationStructureBuildSizesKHR *args); - void (*dispatch_vkCmdSetVertexInputEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetVertexInputEXT *args); - void (*dispatch_vkCmdSetColorWriteEnableEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetColorWriteEnableEXT *args); - void (*dispatch_vkCmdSetEvent2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetEvent2 *args); - void (*dispatch_vkCmdResetEvent2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdResetEvent2 *args); - void (*dispatch_vkCmdWaitEvents2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdWaitEvents2 *args); - void (*dispatch_vkCmdPipelineBarrier2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPipelineBarrier2 *args); - void (*dispatch_vkQueueSubmit2)(struct vn_dispatch_context *ctx, struct vn_command_vkQueueSubmit2 *args); - void (*dispatch_vkCmdWriteTimestamp2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdWriteTimestamp2 *args); - void (*dispatch_vkCopyMemoryToImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyMemoryToImage *args); - void (*dispatch_vkCopyImageToMemory)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyImageToMemory *args); - void (*dispatch_vkCopyImageToImage)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyImageToImage *args); - void (*dispatch_vkTransitionImageLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkTransitionImageLayout *args); - void (*dispatch_vkCmdBeginRendering)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBeginRendering *args); - void (*dispatch_vkCmdEndRendering)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdEndRendering *args); - void (*dispatch_vkGetImageSubresourceLayout2)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageSubresourceLayout2 *args); - void (*dispatch_vkCmdSetDepthBias2EXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthBias2EXT *args); - void (*dispatch_vkGetDeviceImageSubresourceLayout)(struct vn_dispatch_context *ctx, struct vn_command_vkGetDeviceImageSubresourceLayout *args); - void (*dispatch_vkMapMemory2)(struct vn_dispatch_context *ctx, struct vn_command_vkMapMemory2 *args); - void (*dispatch_vkUnmapMemory2)(struct vn_dispatch_context *ctx, struct vn_command_vkUnmapMemory2 *args); - void (*dispatch_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR *args); - void (*dispatch_vkCmdBindDescriptorSets2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindDescriptorSets2 *args); - void (*dispatch_vkCmdPushConstants2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushConstants2 *args); - void (*dispatch_vkCmdPushDescriptorSet2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushDescriptorSet2 *args); - void (*dispatch_vkCmdPushDescriptorSetWithTemplate2)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushDescriptorSetWithTemplate2 *args); - void (*dispatch_vkCmdSetRenderingAttachmentLocations)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetRenderingAttachmentLocations *args); - void (*dispatch_vkCmdSetRenderingInputAttachmentIndices)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetRenderingInputAttachmentIndices *args); - void (*dispatch_vkCmdSetDepthClampRangeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdSetDepthClampRangeEXT *args); - void (*dispatch_vkWriteSamplerDescriptorsEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkWriteSamplerDescriptorsEXT *args); - void (*dispatch_vkWriteResourceDescriptorsEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkWriteResourceDescriptorsEXT *args); - void (*dispatch_vkCmdBindSamplerHeapEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindSamplerHeapEXT *args); - void (*dispatch_vkCmdBindResourceHeapEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdBindResourceHeapEXT *args); - void (*dispatch_vkCmdPushDataEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkCmdPushDataEXT *args); - void (*dispatch_vkRegisterCustomBorderColorEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkRegisterCustomBorderColorEXT *args); - void (*dispatch_vkUnregisterCustomBorderColorEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkUnregisterCustomBorderColorEXT *args); - void (*dispatch_vkGetImageOpaqueCaptureDataEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkGetImageOpaqueCaptureDataEXT *args); - void (*dispatch_vkGetPhysicalDeviceDescriptorSizeEXT)(struct vn_dispatch_context *ctx, struct vn_command_vkGetPhysicalDeviceDescriptorSizeEXT *args); - void (*dispatch_vkSetReplyCommandStreamMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkSetReplyCommandStreamMESA *args); - void (*dispatch_vkSeekReplyCommandStreamMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkSeekReplyCommandStreamMESA *args); - void (*dispatch_vkExecuteCommandStreamsMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkExecuteCommandStreamsMESA *args); - void (*dispatch_vkCreateRingMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkCreateRingMESA *args); - void (*dispatch_vkDestroyRingMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkDestroyRingMESA *args); - void (*dispatch_vkNotifyRingMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkNotifyRingMESA *args); - void (*dispatch_vkWriteRingExtraMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkWriteRingExtraMESA *args); - void (*dispatch_vkGetMemoryResourcePropertiesMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkGetMemoryResourcePropertiesMESA *args); - void (*dispatch_vkResetFenceResourceMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkResetFenceResourceMESA *args); - void (*dispatch_vkWaitSemaphoreResourceMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkWaitSemaphoreResourceMESA *args); - void (*dispatch_vkImportSemaphoreResourceMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkImportSemaphoreResourceMESA *args); - void (*dispatch_vkSubmitVirtqueueSeqnoMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkSubmitVirtqueueSeqnoMESA *args); - void (*dispatch_vkWaitVirtqueueSeqnoMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkWaitVirtqueueSeqnoMESA *args); - void (*dispatch_vkWaitRingSeqnoMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkWaitRingSeqnoMESA *args); - void (*dispatch_vkCopyImageToMemoryMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyImageToMemoryMESA *args); - void (*dispatch_vkCopyMemoryToImageMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkCopyMemoryToImageMESA *args); - void (*dispatch_vkWriteSamplerDescriptorMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkWriteSamplerDescriptorMESA *args); - void (*dispatch_vkWriteResourceDescriptorMESA)(struct vn_dispatch_context *ctx, struct vn_command_vkWriteResourceDescriptorMESA *args); -}; - -static inline void vn_dispatch_debug_log(struct vn_dispatch_context *ctx, const char *format, ...) -{ - char msg[256]; - va_list va; - - if (!ctx->debug_log) - return; - - va_start(va, format); - vsnprintf(msg, sizeof(msg), format, va); - ctx->debug_log(ctx, msg); - va_end(va); -} - -static inline bool vn_dispatch_should_log_result(VkResult result) -{ - switch (result) { - case VK_ERROR_FORMAT_NOT_SUPPORTED: - case VK_ERROR_FRAGMENTED_POOL: - case VK_ERROR_OUT_OF_POOL_MEMORY: - /* do not log errors that apps normally handle properly */ - return false; - default: - /* log all other errors */ - return result < VK_SUCCESS; - } -} - -#endif /* VN_PROTOCOL_RENDERER_DEFINES_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_heap.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_heap.h deleted file mode 100644 index 1ebf5d6a..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_heap.h +++ /dev/null @@ -1,883 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DESCRIPTOR_HEAP_H -#define VN_PROTOCOL_RENDERER_DESCRIPTOR_HEAP_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkWriteSamplerDescriptorsEXT - * vkWriteResourceDescriptorsEXT - */ - -/* struct VkHostAddressRangeEXT */ - -static inline void -vn_encode_VkHostAddressRangeEXT(struct vn_cs_encoder *enc, const VkHostAddressRangeEXT *val) -{ - vn_encode_size_t(enc, &val->size); - if (val->address) { - vn_encode_array_size(enc, val->size); - vn_encode_blob_array(enc, val->address, val->size); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void -vn_decode_VkHostAddressRangeEXT_temp(struct vn_cs_decoder *dec, VkHostAddressRangeEXT *val) -{ - vn_decode_size_t(dec, &val->size); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->size); - val->address = vn_cs_decoder_alloc_temp(dec, array_size); - if (!val->address) return; - vn_decode_blob_array(dec, val->address, array_size); - } else { - vn_decode_array_size(dec, val->size); - val->address = NULL; - } -} - -static inline void -vn_decode_VkHostAddressRangeEXT_partial_temp(struct vn_cs_decoder *dec, VkHostAddressRangeEXT *val) -{ - vn_decode_size_t(dec, &val->size); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->size); - val->address = vn_cs_decoder_alloc_temp(dec, array_size); - if (!val->address) return; - } else { - vn_decode_array_size(dec, val->size); - val->address = NULL; - } -} - -static inline void -vn_replace_VkHostAddressRangeEXT_handle(VkHostAddressRangeEXT *val) -{ - /* skip val->size */ - /* skip val->address */ -} - -/* struct VkImageDescriptorInfoEXT chain */ - -static inline void * -vn_decode_VkImageDescriptorInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageDescriptorInfoEXT_self_temp(struct vn_cs_decoder *dec, VkImageDescriptorInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pView = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pView)); - if (!val->pView) return; - vn_decode_VkImageViewCreateInfo_temp(dec, (VkImageViewCreateInfo *)val->pView); - } else { - val->pView = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_VkImageLayout(dec, &val->layout); -} - -static inline void -vn_decode_VkImageDescriptorInfoEXT_temp(struct vn_cs_decoder *dec, VkImageDescriptorInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_DESCRIPTOR_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageDescriptorInfoEXT_pnext_temp(dec); - vn_decode_VkImageDescriptorInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageDescriptorInfoEXT_handle_self(VkImageDescriptorInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pView) - vn_replace_VkImageViewCreateInfo_handle((VkImageViewCreateInfo *)val->pView); - /* skip val->layout */ -} - -static inline void -vn_replace_VkImageDescriptorInfoEXT_handle(VkImageDescriptorInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_DESCRIPTOR_INFO_EXT: - vn_replace_VkImageDescriptorInfoEXT_handle_self((VkImageDescriptorInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkTexelBufferDescriptorInfoEXT chain */ - -static inline void * -vn_decode_VkTexelBufferDescriptorInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkTexelBufferDescriptorInfoEXT_self_temp(struct vn_cs_decoder *dec, VkTexelBufferDescriptorInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkDeviceAddressRangeEXT_temp(dec, &val->addressRange); -} - -static inline void -vn_decode_VkTexelBufferDescriptorInfoEXT_temp(struct vn_cs_decoder *dec, VkTexelBufferDescriptorInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_TEXEL_BUFFER_DESCRIPTOR_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkTexelBufferDescriptorInfoEXT_pnext_temp(dec); - vn_decode_VkTexelBufferDescriptorInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkTexelBufferDescriptorInfoEXT_handle_self(VkTexelBufferDescriptorInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->format */ - vn_replace_VkDeviceAddressRangeEXT_handle(&val->addressRange); -} - -static inline void -vn_replace_VkTexelBufferDescriptorInfoEXT_handle(VkTexelBufferDescriptorInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_TEXEL_BUFFER_DESCRIPTOR_INFO_EXT: - vn_replace_VkTexelBufferDescriptorInfoEXT_handle_self((VkTexelBufferDescriptorInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkTensorViewCreateInfoARM chain */ - -static inline void * -vn_decode_VkTensorViewCreateInfoARM_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkTensorViewCreateInfoARM_self_temp(struct vn_cs_decoder *dec, VkTensorViewCreateInfoARM *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags64(dec, &val->flags); - vn_decode_VkTensorARM_lookup(dec, &val->tensor); - vn_decode_VkFormat(dec, &val->format); -} - -static inline void -vn_decode_VkTensorViewCreateInfoARM_temp(struct vn_cs_decoder *dec, VkTensorViewCreateInfoARM *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_TENSOR_VIEW_CREATE_INFO_ARM) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkTensorViewCreateInfoARM_pnext_temp(dec); - vn_decode_VkTensorViewCreateInfoARM_self_temp(dec, val); -} - -static inline void -vn_replace_VkTensorViewCreateInfoARM_handle_self(VkTensorViewCreateInfoARM *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkTensorARM_handle(&val->tensor); - /* skip val->format */ -} - -static inline void -vn_replace_VkTensorViewCreateInfoARM_handle(VkTensorViewCreateInfoARM *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_TENSOR_VIEW_CREATE_INFO_ARM: - vn_replace_VkTensorViewCreateInfoARM_handle_self((VkTensorViewCreateInfoARM *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* union VkResourceDescriptorDataEXT */ - -static inline void -vn_decode_VkResourceDescriptorDataEXT_temp(struct vn_cs_decoder *dec, VkResourceDescriptorDataEXT *val) -{ - VkDescriptorType tag; - vn_decode_VkDescriptorType(dec, &tag); - switch (tag) { - case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: - if (vn_decode_simple_pointer(dec)) { - val->pImage = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pImage)); - if (!val->pImage) return; - vn_decode_VkImageDescriptorInfoEXT_temp(dec, (VkImageDescriptorInfoEXT *)val->pImage); - } else { - val->pImage = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: - if (vn_decode_simple_pointer(dec)) { - val->pImage = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pImage)); - if (!val->pImage) return; - vn_decode_VkImageDescriptorInfoEXT_temp(dec, (VkImageDescriptorInfoEXT *)val->pImage); - } else { - val->pImage = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: - if (vn_decode_simple_pointer(dec)) { - val->pImage = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pImage)); - if (!val->pImage) return; - vn_decode_VkImageDescriptorInfoEXT_temp(dec, (VkImageDescriptorInfoEXT *)val->pImage); - } else { - val->pImage = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM: - if (vn_decode_simple_pointer(dec)) { - val->pImage = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pImage)); - if (!val->pImage) return; - vn_decode_VkImageDescriptorInfoEXT_temp(dec, (VkImageDescriptorInfoEXT *)val->pImage); - } else { - val->pImage = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM: - if (vn_decode_simple_pointer(dec)) { - val->pImage = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pImage)); - if (!val->pImage) return; - vn_decode_VkImageDescriptorInfoEXT_temp(dec, (VkImageDescriptorInfoEXT *)val->pImage); - } else { - val->pImage = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: - if (vn_decode_simple_pointer(dec)) { - val->pTexelBuffer = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pTexelBuffer)); - if (!val->pTexelBuffer) return; - vn_decode_VkTexelBufferDescriptorInfoEXT_temp(dec, (VkTexelBufferDescriptorInfoEXT *)val->pTexelBuffer); - } else { - val->pTexelBuffer = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: - if (vn_decode_simple_pointer(dec)) { - val->pTexelBuffer = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pTexelBuffer)); - if (!val->pTexelBuffer) return; - vn_decode_VkTexelBufferDescriptorInfoEXT_temp(dec, (VkTexelBufferDescriptorInfoEXT *)val->pTexelBuffer); - } else { - val->pTexelBuffer = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR: - if (vn_decode_simple_pointer(dec)) { - val->pAddressRange = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pAddressRange)); - if (!val->pAddressRange) return; - vn_decode_VkDeviceAddressRangeEXT_temp(dec, (VkDeviceAddressRangeEXT *)val->pAddressRange); - } else { - val->pAddressRange = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: - if (vn_decode_simple_pointer(dec)) { - val->pAddressRange = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pAddressRange)); - if (!val->pAddressRange) return; - vn_decode_VkDeviceAddressRangeEXT_temp(dec, (VkDeviceAddressRangeEXT *)val->pAddressRange); - } else { - val->pAddressRange = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: - if (vn_decode_simple_pointer(dec)) { - val->pAddressRange = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pAddressRange)); - if (!val->pAddressRange) return; - vn_decode_VkDeviceAddressRangeEXT_temp(dec, (VkDeviceAddressRangeEXT *)val->pAddressRange); - } else { - val->pAddressRange = NULL; - } - break; - case VK_DESCRIPTOR_TYPE_TENSOR_ARM: - if (vn_decode_simple_pointer(dec)) { - val->pTensorARM = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pTensorARM)); - if (!val->pTensorARM) return; - vn_decode_VkTensorViewCreateInfoARM_temp(dec, (VkTensorViewCreateInfoARM *)val->pTensorARM); - } else { - val->pTensorARM = NULL; - } - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -static inline void -vn_replace_VkResourceDescriptorDataEXT_handle(VkResourceDescriptorDataEXT *val, VkDescriptorType tag) -{ - switch (tag) { - case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: - if (val->pImage) - vn_replace_VkImageDescriptorInfoEXT_handle((VkImageDescriptorInfoEXT *)val->pImage); - break; - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: - if (val->pImage) - vn_replace_VkImageDescriptorInfoEXT_handle((VkImageDescriptorInfoEXT *)val->pImage); - break; - case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: - if (val->pImage) - vn_replace_VkImageDescriptorInfoEXT_handle((VkImageDescriptorInfoEXT *)val->pImage); - break; - case VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM: - if (val->pImage) - vn_replace_VkImageDescriptorInfoEXT_handle((VkImageDescriptorInfoEXT *)val->pImage); - break; - case VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM: - if (val->pImage) - vn_replace_VkImageDescriptorInfoEXT_handle((VkImageDescriptorInfoEXT *)val->pImage); - break; - case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: - if (val->pTexelBuffer) - vn_replace_VkTexelBufferDescriptorInfoEXT_handle((VkTexelBufferDescriptorInfoEXT *)val->pTexelBuffer); - break; - case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: - if (val->pTexelBuffer) - vn_replace_VkTexelBufferDescriptorInfoEXT_handle((VkTexelBufferDescriptorInfoEXT *)val->pTexelBuffer); - break; - case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR: - if (val->pAddressRange) - vn_replace_VkDeviceAddressRangeEXT_handle((VkDeviceAddressRangeEXT *)val->pAddressRange); - break; - case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: - if (val->pAddressRange) - vn_replace_VkDeviceAddressRangeEXT_handle((VkDeviceAddressRangeEXT *)val->pAddressRange); - break; - case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: - if (val->pAddressRange) - vn_replace_VkDeviceAddressRangeEXT_handle((VkDeviceAddressRangeEXT *)val->pAddressRange); - break; - case VK_DESCRIPTOR_TYPE_TENSOR_ARM: - if (val->pTensorARM) - vn_replace_VkTensorViewCreateInfoARM_handle((VkTensorViewCreateInfoARM *)val->pTensorARM); - break; - default: - assert(false); - break; - } -} - -/* struct VkResourceDescriptorInfoEXT chain */ - -static inline void * -vn_decode_VkResourceDescriptorInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkResourceDescriptorInfoEXT_self_temp(struct vn_cs_decoder *dec, VkResourceDescriptorInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDescriptorType(dec, &val->type); - vn_decode_VkResourceDescriptorDataEXT_temp(dec, &val->data); -} - -static inline void -vn_decode_VkResourceDescriptorInfoEXT_temp(struct vn_cs_decoder *dec, VkResourceDescriptorInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RESOURCE_DESCRIPTOR_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkResourceDescriptorInfoEXT_pnext_temp(dec); - vn_decode_VkResourceDescriptorInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkResourceDescriptorInfoEXT_handle_self(VkResourceDescriptorInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->type */ - vn_replace_VkResourceDescriptorDataEXT_handle(&val->data, val->type); -} - -static inline void -vn_replace_VkResourceDescriptorInfoEXT_handle(VkResourceDescriptorInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RESOURCE_DESCRIPTOR_INFO_EXT: - vn_replace_VkResourceDescriptorInfoEXT_handle_self((VkResourceDescriptorInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkRegisterCustomBorderColorEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkRegisterCustomBorderColorEXT *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pBorderColor = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pBorderColor)); - if (!args->pBorderColor) return; - vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_temp(dec, (VkSamplerCustomBorderColorCreateInfoEXT *)args->pBorderColor); - } else { - args->pBorderColor = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_VkBool32(dec, &args->requestIndex); - if (vn_decode_simple_pointer(dec)) { - args->pIndex = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pIndex)); - if (!args->pIndex) return; - vn_decode_uint32_t(dec, args->pIndex); - } else { - args->pIndex = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkRegisterCustomBorderColorEXT_args_handle(struct vn_command_vkRegisterCustomBorderColorEXT *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pBorderColor) - vn_replace_VkSamplerCustomBorderColorCreateInfoEXT_handle((VkSamplerCustomBorderColorCreateInfoEXT *)args->pBorderColor); - /* skip args->requestIndex */ - /* skip args->pIndex */ -} - -static inline void vn_encode_vkRegisterCustomBorderColorEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkRegisterCustomBorderColorEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkRegisterCustomBorderColorEXT_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pBorderColor */ - /* skip args->requestIndex */ - if (vn_encode_simple_pointer(enc, args->pIndex)) - vn_encode_uint32_t(enc, args->pIndex); -} - -static inline void vn_decode_vkUnregisterCustomBorderColorEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkUnregisterCustomBorderColorEXT *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->index); -} - -static inline void vn_replace_vkUnregisterCustomBorderColorEXT_args_handle(struct vn_command_vkUnregisterCustomBorderColorEXT *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->index */ -} - -static inline void vn_encode_vkUnregisterCustomBorderColorEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkUnregisterCustomBorderColorEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkUnregisterCustomBorderColorEXT_EXT}); - - /* skip args->device */ - /* skip args->index */ -} - -static inline void vn_decode_vkGetImageOpaqueCaptureDataEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageOpaqueCaptureDataEXT *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->imageCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->imageCount); - args->pImages = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pImages), iter_count); - if (!args->pImages) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImage_lookup(dec, &((VkImage *)args->pImages)[i]); - } else { - vn_decode_array_size(dec, args->imageCount); - args->pImages = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->imageCount); - args->pDatas = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDatas), iter_count); - if (!args->pDatas) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkHostAddressRangeEXT_partial_temp(dec, &args->pDatas[i]); - } else { - vn_decode_array_size(dec, args->imageCount); - args->pDatas = NULL; - } -} - -static inline void vn_replace_vkGetImageOpaqueCaptureDataEXT_args_handle(struct vn_command_vkGetImageOpaqueCaptureDataEXT *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->imageCount */ - if (args->pImages) { - for (uint32_t i = 0; i < args->imageCount; i++) - vn_replace_VkImage_handle(&((VkImage *)args->pImages)[i]); - } - /* skip args->pDatas */ -} - -static inline void vn_encode_vkGetImageOpaqueCaptureDataEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageOpaqueCaptureDataEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageOpaqueCaptureDataEXT_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->imageCount */ - /* skip args->pImages */ - if (args->pDatas) { - vn_encode_array_size(enc, args->imageCount); - for (uint32_t i = 0; i < args->imageCount; i++) - vn_encode_VkHostAddressRangeEXT(enc, &args->pDatas[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkWriteSamplerDescriptorMESA_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkWriteSamplerDescriptorMESA *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkWriteSamplerDescriptorMESA_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSampler)); - if (!args->pSampler) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)args->pSampler); - } else { - args->pSampler = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } -} - -static inline void vn_replace_vkWriteSamplerDescriptorMESA_args_handle(struct vn_command_vkWriteSamplerDescriptorMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pSampler) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)args->pSampler); - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkWriteSamplerDescriptorMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWriteSamplerDescriptorMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWriteSamplerDescriptorMESA_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pSampler */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkWriteResourceDescriptorMESA_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkWriteResourceDescriptorMESA *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkWriteResourceDescriptorMESA_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pResource = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pResource)); - if (!args->pResource) return; - vn_decode_VkResourceDescriptorInfoEXT_temp(dec, (VkResourceDescriptorInfoEXT *)args->pResource); - } else { - args->pResource = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } -} - -static inline void vn_replace_vkWriteResourceDescriptorMESA_args_handle(struct vn_command_vkWriteResourceDescriptorMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pResource) - vn_replace_VkResourceDescriptorInfoEXT_handle((VkResourceDescriptorInfoEXT *)args->pResource); - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkWriteResourceDescriptorMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWriteResourceDescriptorMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWriteResourceDescriptorMESA_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pResource */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_dispatch_vkRegisterCustomBorderColorEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkRegisterCustomBorderColorEXT args; - - if (!ctx->dispatch_vkRegisterCustomBorderColorEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkRegisterCustomBorderColorEXT_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkRegisterCustomBorderColorEXT(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkRegisterCustomBorderColorEXT returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkRegisterCustomBorderColorEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkUnregisterCustomBorderColorEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkUnregisterCustomBorderColorEXT args; - - if (!ctx->dispatch_vkUnregisterCustomBorderColorEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkUnregisterCustomBorderColorEXT_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkUnregisterCustomBorderColorEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkUnregisterCustomBorderColorEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageOpaqueCaptureDataEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageOpaqueCaptureDataEXT args; - - if (!ctx->dispatch_vkGetImageOpaqueCaptureDataEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageOpaqueCaptureDataEXT_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageOpaqueCaptureDataEXT(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetImageOpaqueCaptureDataEXT returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageOpaqueCaptureDataEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWriteSamplerDescriptorMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWriteSamplerDescriptorMESA args; - - if (!ctx->dispatch_vkWriteSamplerDescriptorMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkWriteSamplerDescriptorMESA_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWriteSamplerDescriptorMESA(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkWriteSamplerDescriptorMESA returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkWriteSamplerDescriptorMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWriteResourceDescriptorMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWriteResourceDescriptorMESA args; - - if (!ctx->dispatch_vkWriteResourceDescriptorMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkWriteResourceDescriptorMESA_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWriteResourceDescriptorMESA(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkWriteResourceDescriptorMESA returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkWriteResourceDescriptorMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DESCRIPTOR_HEAP_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h deleted file mode 100644 index 640ee0c1..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h +++ /dev/null @@ -1,396 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DESCRIPTOR_POOL_H -#define VN_PROTOCOL_RENDERER_DESCRIPTOR_POOL_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkDescriptorPoolSize */ - -static inline void -vn_decode_VkDescriptorPoolSize_temp(struct vn_cs_decoder *dec, VkDescriptorPoolSize *val) -{ - vn_decode_VkDescriptorType(dec, &val->type); - vn_decode_uint32_t(dec, &val->descriptorCount); -} - -static inline void -vn_replace_VkDescriptorPoolSize_handle(VkDescriptorPoolSize *val) -{ - /* skip val->type */ - /* skip val->descriptorCount */ -} - -/* struct VkDescriptorPoolInlineUniformBlockCreateInfo chain */ - -static inline void * -vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorPoolInlineUniformBlockCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->maxInlineUniformBlockBindings); -} - -static inline void -vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorPoolInlineUniformBlockCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorPoolInlineUniformBlockCreateInfo_handle_self(VkDescriptorPoolInlineUniformBlockCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maxInlineUniformBlockBindings */ -} - -static inline void -vn_replace_VkDescriptorPoolInlineUniformBlockCreateInfo_handle(VkDescriptorPoolInlineUniformBlockCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: - vn_replace_VkDescriptorPoolInlineUniformBlockCreateInfo_handle_self((VkDescriptorPoolInlineUniformBlockCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDescriptorPoolCreateInfo chain */ - -static inline void * -vn_decode_VkDescriptorPoolCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDescriptorPoolInlineUniformBlockCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDescriptorPoolInlineUniformBlockCreateInfo *)pnext)->pNext = vn_decode_VkDescriptorPoolCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_self_temp(dec, (VkDescriptorPoolInlineUniformBlockCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMutableDescriptorTypeCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkMutableDescriptorTypeCreateInfoEXT *)pnext)->pNext = vn_decode_VkDescriptorPoolCreateInfo_pnext_temp(dec); - vn_decode_VkMutableDescriptorTypeCreateInfoEXT_self_temp(dec, (VkMutableDescriptorTypeCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDescriptorPoolCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorPoolCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->maxSets); - vn_decode_uint32_t(dec, &val->poolSizeCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->poolSizeCount); - val->pPoolSizes = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPoolSizes), iter_count); - if (!val->pPoolSizes) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorPoolSize_temp(dec, &((VkDescriptorPoolSize *)val->pPoolSizes)[i]); - } else { - vn_decode_array_size(dec, val->poolSizeCount); - val->pPoolSizes = NULL; - } -} - -static inline void -vn_decode_VkDescriptorPoolCreateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorPoolCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorPoolCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorPoolCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorPoolCreateInfo_handle_self(VkDescriptorPoolCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->maxSets */ - /* skip val->poolSizeCount */ - if (val->pPoolSizes) { - for (uint32_t i = 0; i < val->poolSizeCount; i++) - vn_replace_VkDescriptorPoolSize_handle(&((VkDescriptorPoolSize *)val->pPoolSizes)[i]); - } -} - -static inline void -vn_replace_VkDescriptorPoolCreateInfo_handle(VkDescriptorPoolCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO: - vn_replace_VkDescriptorPoolCreateInfo_handle_self((VkDescriptorPoolCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: - vn_replace_VkDescriptorPoolInlineUniformBlockCreateInfo_handle_self((VkDescriptorPoolInlineUniformBlockCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: - vn_replace_VkMutableDescriptorTypeCreateInfoEXT_handle_self((VkMutableDescriptorTypeCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateDescriptorPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateDescriptorPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkDescriptorPoolCreateInfo_temp(dec, (VkDescriptorPoolCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pDescriptorPool = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDescriptorPool)); - if (!args->pDescriptorPool) return; - vn_decode_VkDescriptorPool(dec, args->pDescriptorPool); - } else { - args->pDescriptorPool = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateDescriptorPool_args_handle(struct vn_command_vkCreateDescriptorPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkDescriptorPoolCreateInfo_handle((VkDescriptorPoolCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pDescriptorPool */ -} - -static inline void vn_encode_vkCreateDescriptorPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateDescriptorPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateDescriptorPool_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pDescriptorPool)) - vn_encode_VkDescriptorPool(enc, args->pDescriptorPool); -} - -static inline void vn_decode_vkDestroyDescriptorPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyDescriptorPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDescriptorPool_lookup(dec, &args->descriptorPool); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyDescriptorPool_args_handle(struct vn_command_vkDestroyDescriptorPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDescriptorPool_handle(&args->descriptorPool); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyDescriptorPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyDescriptorPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyDescriptorPool_EXT}); - - /* skip args->device */ - /* skip args->descriptorPool */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkResetDescriptorPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetDescriptorPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDescriptorPool_lookup(dec, &args->descriptorPool); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkResetDescriptorPool_args_handle(struct vn_command_vkResetDescriptorPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDescriptorPool_handle(&args->descriptorPool); - /* skip args->flags */ -} - -static inline void vn_encode_vkResetDescriptorPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetDescriptorPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetDescriptorPool_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->descriptorPool */ - /* skip args->flags */ -} - -static inline void vn_dispatch_vkCreateDescriptorPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateDescriptorPool args; - - if (!ctx->dispatch_vkCreateDescriptorPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateDescriptorPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateDescriptorPool(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateDescriptorPool returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateDescriptorPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyDescriptorPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyDescriptorPool args; - - if (!ctx->dispatch_vkDestroyDescriptorPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyDescriptorPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyDescriptorPool(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyDescriptorPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetDescriptorPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetDescriptorPool args; - - if (!ctx->dispatch_vkResetDescriptorPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetDescriptorPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetDescriptorPool(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkResetDescriptorPool returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetDescriptorPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DESCRIPTOR_POOL_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set.h deleted file mode 100644 index c699130d..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set.h +++ /dev/null @@ -1,493 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DESCRIPTOR_SET_H -#define VN_PROTOCOL_RENDERER_DESCRIPTOR_SET_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkUpdateDescriptorSetWithTemplate - */ - -/* struct VkDescriptorSetVariableDescriptorCountAllocateInfo chain */ - -static inline void * -vn_decode_VkDescriptorSetVariableDescriptorCountAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDescriptorSetVariableDescriptorCountAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorSetVariableDescriptorCountAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->descriptorSetCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->descriptorSetCount); - val->pDescriptorCounts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDescriptorCounts), array_size); - if (!val->pDescriptorCounts) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pDescriptorCounts, array_size); - } else { - vn_decode_array_size(dec, val->descriptorSetCount); - val->pDescriptorCounts = NULL; - } -} - -static inline void -vn_decode_VkDescriptorSetVariableDescriptorCountAllocateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorSetVariableDescriptorCountAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetVariableDescriptorCountAllocateInfo_pnext_temp(dec); - vn_decode_VkDescriptorSetVariableDescriptorCountAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorSetVariableDescriptorCountAllocateInfo_handle_self(VkDescriptorSetVariableDescriptorCountAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->descriptorSetCount */ - /* skip val->pDescriptorCounts */ -} - -static inline void -vn_replace_VkDescriptorSetVariableDescriptorCountAllocateInfo_handle(VkDescriptorSetVariableDescriptorCountAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: - vn_replace_VkDescriptorSetVariableDescriptorCountAllocateInfo_handle_self((VkDescriptorSetVariableDescriptorCountAllocateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDescriptorSetAllocateInfo chain */ - -static inline void * -vn_decode_VkDescriptorSetAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDescriptorSetVariableDescriptorCountAllocateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDescriptorSetVariableDescriptorCountAllocateInfo *)pnext)->pNext = vn_decode_VkDescriptorSetAllocateInfo_pnext_temp(dec); - vn_decode_VkDescriptorSetVariableDescriptorCountAllocateInfo_self_temp(dec, (VkDescriptorSetVariableDescriptorCountAllocateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDescriptorSetAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorSetAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDescriptorPool_lookup(dec, &val->descriptorPool); - vn_decode_uint32_t(dec, &val->descriptorSetCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorSetCount); - val->pSetLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSetLayouts), iter_count); - if (!val->pSetLayouts) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSetLayout_lookup(dec, &((VkDescriptorSetLayout *)val->pSetLayouts)[i]); - } else { - vn_decode_array_size(dec, val->descriptorSetCount); - val->pSetLayouts = NULL; - } -} - -static inline void -vn_decode_VkDescriptorSetAllocateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorSetAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetAllocateInfo_pnext_temp(dec); - vn_decode_VkDescriptorSetAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorSetAllocateInfo_handle_self(VkDescriptorSetAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkDescriptorPool_handle(&val->descriptorPool); - /* skip val->descriptorSetCount */ - if (val->pSetLayouts) { - for (uint32_t i = 0; i < val->descriptorSetCount; i++) - vn_replace_VkDescriptorSetLayout_handle(&((VkDescriptorSetLayout *)val->pSetLayouts)[i]); - } -} - -static inline void -vn_replace_VkDescriptorSetAllocateInfo_handle(VkDescriptorSetAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: - vn_replace_VkDescriptorSetAllocateInfo_handle_self((VkDescriptorSetAllocateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: - vn_replace_VkDescriptorSetVariableDescriptorCountAllocateInfo_handle_self((VkDescriptorSetVariableDescriptorCountAllocateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyDescriptorSet chain */ - -static inline void * -vn_decode_VkCopyDescriptorSet_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyDescriptorSet_self_temp(struct vn_cs_decoder *dec, VkCopyDescriptorSet *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDescriptorSet_lookup(dec, &val->srcSet); - vn_decode_uint32_t(dec, &val->srcBinding); - vn_decode_uint32_t(dec, &val->srcArrayElement); - vn_decode_VkDescriptorSet_lookup(dec, &val->dstSet); - vn_decode_uint32_t(dec, &val->dstBinding); - vn_decode_uint32_t(dec, &val->dstArrayElement); - vn_decode_uint32_t(dec, &val->descriptorCount); -} - -static inline void -vn_decode_VkCopyDescriptorSet_temp(struct vn_cs_decoder *dec, VkCopyDescriptorSet *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyDescriptorSet_pnext_temp(dec); - vn_decode_VkCopyDescriptorSet_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyDescriptorSet_handle_self(VkCopyDescriptorSet *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkDescriptorSet_handle(&val->srcSet); - /* skip val->srcBinding */ - /* skip val->srcArrayElement */ - vn_replace_VkDescriptorSet_handle(&val->dstSet); - /* skip val->dstBinding */ - /* skip val->dstArrayElement */ - /* skip val->descriptorCount */ -} - -static inline void -vn_replace_VkCopyDescriptorSet_handle(VkCopyDescriptorSet *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET: - vn_replace_VkCopyDescriptorSet_handle_self((VkCopyDescriptorSet *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkAllocateDescriptorSets_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkAllocateDescriptorSets *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pAllocateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pAllocateInfo)); - if (!args->pAllocateInfo) return; - vn_decode_VkDescriptorSetAllocateInfo_temp(dec, (VkDescriptorSetAllocateInfo *)args->pAllocateInfo); - } else { - args->pAllocateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pAllocateInfo ? args->pAllocateInfo->descriptorSetCount : 0)); - args->pDescriptorSets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDescriptorSets), iter_count); - if (!args->pDescriptorSets) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSet(dec, &args->pDescriptorSets[i]); - } else { - vn_decode_array_size(dec, (args->pAllocateInfo ? args->pAllocateInfo->descriptorSetCount : 0)); - args->pDescriptorSets = NULL; - } -} - -static inline void vn_replace_vkAllocateDescriptorSets_args_handle(struct vn_command_vkAllocateDescriptorSets *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pAllocateInfo) - vn_replace_VkDescriptorSetAllocateInfo_handle((VkDescriptorSetAllocateInfo *)args->pAllocateInfo); - /* skip args->pDescriptorSets */ -} - -static inline void vn_encode_vkAllocateDescriptorSets_reply(struct vn_cs_encoder *enc, const struct vn_command_vkAllocateDescriptorSets *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkAllocateDescriptorSets_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pAllocateInfo */ - if (args->pDescriptorSets) { - vn_encode_array_size(enc, (args->pAllocateInfo ? args->pAllocateInfo->descriptorSetCount : 0)); - for (uint32_t i = 0; i < (args->pAllocateInfo ? args->pAllocateInfo->descriptorSetCount : 0); i++) - vn_encode_VkDescriptorSet(enc, &args->pDescriptorSets[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkFreeDescriptorSets_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkFreeDescriptorSets *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDescriptorPool_lookup(dec, &args->descriptorPool); - vn_decode_uint32_t(dec, &args->descriptorSetCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->descriptorSetCount); - args->pDescriptorSets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDescriptorSets), iter_count); - if (!args->pDescriptorSets) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSet_lookup(dec, &((VkDescriptorSet *)args->pDescriptorSets)[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pDescriptorSets = NULL; - } -} - -static inline void vn_replace_vkFreeDescriptorSets_args_handle(struct vn_command_vkFreeDescriptorSets *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDescriptorPool_handle(&args->descriptorPool); - /* skip args->descriptorSetCount */ - if (args->pDescriptorSets) { - for (uint32_t i = 0; i < args->descriptorSetCount; i++) - vn_replace_VkDescriptorSet_handle(&((VkDescriptorSet *)args->pDescriptorSets)[i]); - } -} - -static inline void vn_encode_vkFreeDescriptorSets_reply(struct vn_cs_encoder *enc, const struct vn_command_vkFreeDescriptorSets *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkFreeDescriptorSets_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->descriptorPool */ - /* skip args->descriptorSetCount */ - /* skip args->pDescriptorSets */ -} - -static inline void vn_decode_vkUpdateDescriptorSets_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkUpdateDescriptorSets *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->descriptorWriteCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->descriptorWriteCount); - args->pDescriptorWrites = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDescriptorWrites), iter_count); - if (!args->pDescriptorWrites) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkWriteDescriptorSet_temp(dec, &((VkWriteDescriptorSet *)args->pDescriptorWrites)[i]); - } else { - vn_decode_array_size(dec, args->descriptorWriteCount); - args->pDescriptorWrites = NULL; - } - vn_decode_uint32_t(dec, &args->descriptorCopyCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->descriptorCopyCount); - args->pDescriptorCopies = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDescriptorCopies), iter_count); - if (!args->pDescriptorCopies) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCopyDescriptorSet_temp(dec, &((VkCopyDescriptorSet *)args->pDescriptorCopies)[i]); - } else { - vn_decode_array_size(dec, args->descriptorCopyCount); - args->pDescriptorCopies = NULL; - } -} - -static inline void vn_replace_vkUpdateDescriptorSets_args_handle(struct vn_command_vkUpdateDescriptorSets *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->descriptorWriteCount */ - if (args->pDescriptorWrites) { - for (uint32_t i = 0; i < args->descriptorWriteCount; i++) - vn_replace_VkWriteDescriptorSet_handle(&((VkWriteDescriptorSet *)args->pDescriptorWrites)[i]); - } - /* skip args->descriptorCopyCount */ - if (args->pDescriptorCopies) { - for (uint32_t i = 0; i < args->descriptorCopyCount; i++) - vn_replace_VkCopyDescriptorSet_handle(&((VkCopyDescriptorSet *)args->pDescriptorCopies)[i]); - } -} - -static inline void vn_encode_vkUpdateDescriptorSets_reply(struct vn_cs_encoder *enc, const struct vn_command_vkUpdateDescriptorSets *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkUpdateDescriptorSets_EXT}); - - /* skip args->device */ - /* skip args->descriptorWriteCount */ - /* skip args->pDescriptorWrites */ - /* skip args->descriptorCopyCount */ - /* skip args->pDescriptorCopies */ -} - -static inline void vn_dispatch_vkAllocateDescriptorSets(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkAllocateDescriptorSets args; - - if (!ctx->dispatch_vkAllocateDescriptorSets) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkAllocateDescriptorSets_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkAllocateDescriptorSets(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkAllocateDescriptorSets returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkAllocateDescriptorSets_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkFreeDescriptorSets(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkFreeDescriptorSets args; - - if (!ctx->dispatch_vkFreeDescriptorSets) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkFreeDescriptorSets_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkFreeDescriptorSets(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkFreeDescriptorSets returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkFreeDescriptorSets_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkUpdateDescriptorSets(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkUpdateDescriptorSets args; - - if (!ctx->dispatch_vkUpdateDescriptorSets) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkUpdateDescriptorSets_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkUpdateDescriptorSets(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkUpdateDescriptorSets_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DESCRIPTOR_SET_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h deleted file mode 100644 index b6135de5..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h +++ /dev/null @@ -1,577 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DESCRIPTOR_SET_LAYOUT_H -#define VN_PROTOCOL_RENDERER_DESCRIPTOR_SET_LAYOUT_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkDescriptorSetLayoutBinding */ - -static inline void -vn_decode_VkDescriptorSetLayoutBinding_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutBinding *val) -{ - vn_decode_uint32_t(dec, &val->binding); - vn_decode_VkDescriptorType(dec, &val->descriptorType); - vn_decode_uint32_t(dec, &val->descriptorCount); - vn_decode_VkFlags(dec, &val->stageFlags); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorCount); - val->pImmutableSamplers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pImmutableSamplers), iter_count); - if (!val->pImmutableSamplers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSampler_lookup(dec, &((VkSampler *)val->pImmutableSamplers)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pImmutableSamplers = NULL; - } -} - -static inline void -vn_replace_VkDescriptorSetLayoutBinding_handle(VkDescriptorSetLayoutBinding *val) -{ - /* skip val->binding */ - /* skip val->descriptorType */ - /* skip val->descriptorCount */ - /* skip val->stageFlags */ - if (val->pImmutableSamplers) { - for (uint32_t i = 0; i < val->descriptorCount; i++) - vn_replace_VkSampler_handle(&((VkSampler *)val->pImmutableSamplers)[i]); - } -} - -/* struct VkDescriptorSetLayoutBindingFlagsCreateInfo chain */ - -static inline void * -vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutBindingFlagsCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->bindingCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bindingCount); - val->pBindingFlags = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBindingFlags), iter_count); - if (!val->pBindingFlags) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkFlags(dec, &((VkDescriptorBindingFlags *)val->pBindingFlags)[i]); - } else { - vn_decode_array_size(dec, val->bindingCount); - val->pBindingFlags = NULL; - } -} - -static inline void -vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutBindingFlagsCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorSetLayoutBindingFlagsCreateInfo_handle_self(VkDescriptorSetLayoutBindingFlagsCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->bindingCount */ - /* skip val->pBindingFlags */ -} - -static inline void -vn_replace_VkDescriptorSetLayoutBindingFlagsCreateInfo_handle(VkDescriptorSetLayoutBindingFlagsCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: - vn_replace_VkDescriptorSetLayoutBindingFlagsCreateInfo_handle_self((VkDescriptorSetLayoutBindingFlagsCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDescriptorSetLayoutCreateInfo chain */ - -static inline void * -vn_decode_VkDescriptorSetLayoutCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDescriptorSetLayoutBindingFlagsCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDescriptorSetLayoutBindingFlagsCreateInfo *)pnext)->pNext = vn_decode_VkDescriptorSetLayoutCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_self_temp(dec, (VkDescriptorSetLayoutBindingFlagsCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMutableDescriptorTypeCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkMutableDescriptorTypeCreateInfoEXT *)pnext)->pNext = vn_decode_VkDescriptorSetLayoutCreateInfo_pnext_temp(dec); - vn_decode_VkMutableDescriptorTypeCreateInfoEXT_self_temp(dec, (VkMutableDescriptorTypeCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDescriptorSetLayoutCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->bindingCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bindingCount); - val->pBindings = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBindings), iter_count); - if (!val->pBindings) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSetLayoutBinding_temp(dec, &((VkDescriptorSetLayoutBinding *)val->pBindings)[i]); - } else { - vn_decode_array_size(dec, val->bindingCount); - val->pBindings = NULL; - } -} - -static inline void -vn_decode_VkDescriptorSetLayoutCreateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetLayoutCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorSetLayoutCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorSetLayoutCreateInfo_handle_self(VkDescriptorSetLayoutCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->bindingCount */ - if (val->pBindings) { - for (uint32_t i = 0; i < val->bindingCount; i++) - vn_replace_VkDescriptorSetLayoutBinding_handle(&((VkDescriptorSetLayoutBinding *)val->pBindings)[i]); - } -} - -static inline void -vn_replace_VkDescriptorSetLayoutCreateInfo_handle(VkDescriptorSetLayoutCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: - vn_replace_VkDescriptorSetLayoutCreateInfo_handle_self((VkDescriptorSetLayoutCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: - vn_replace_VkDescriptorSetLayoutBindingFlagsCreateInfo_handle_self((VkDescriptorSetLayoutBindingFlagsCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: - vn_replace_VkMutableDescriptorTypeCreateInfoEXT_handle_self((VkMutableDescriptorTypeCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDescriptorSetVariableDescriptorCountLayoutSupport chain */ - -static inline void -vn_encode_VkDescriptorSetVariableDescriptorCountLayoutSupport_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkDescriptorSetVariableDescriptorCountLayoutSupport_self(struct vn_cs_encoder *enc, const VkDescriptorSetVariableDescriptorCountLayoutSupport *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxVariableDescriptorCount); -} - -static inline void -vn_encode_VkDescriptorSetVariableDescriptorCountLayoutSupport(struct vn_cs_encoder *enc, const VkDescriptorSetVariableDescriptorCountLayoutSupport *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT }); - vn_encode_VkDescriptorSetVariableDescriptorCountLayoutSupport_pnext(enc, val->pNext); - vn_encode_VkDescriptorSetVariableDescriptorCountLayoutSupport_self(enc, val); -} - -static inline void * -vn_decode_VkDescriptorSetVariableDescriptorCountLayoutSupport_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDescriptorSetVariableDescriptorCountLayoutSupport_self_partial_temp(struct vn_cs_decoder *dec, VkDescriptorSetVariableDescriptorCountLayoutSupport *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxVariableDescriptorCount */ -} - -static inline void -vn_decode_VkDescriptorSetVariableDescriptorCountLayoutSupport_partial_temp(struct vn_cs_decoder *dec, VkDescriptorSetVariableDescriptorCountLayoutSupport *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetVariableDescriptorCountLayoutSupport_pnext_partial_temp(dec); - vn_decode_VkDescriptorSetVariableDescriptorCountLayoutSupport_self_partial_temp(dec, val); -} - -/* struct VkDescriptorSetLayoutSupport chain */ - -static inline void -vn_encode_VkDescriptorSetLayoutSupport_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkDescriptorSetLayoutSupport_pnext(enc, ((const VkDescriptorSetVariableDescriptorCountLayoutSupport *)pnext)->pNext); - vn_encode_VkDescriptorSetVariableDescriptorCountLayoutSupport_self(enc, (const VkDescriptorSetVariableDescriptorCountLayoutSupport *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkDescriptorSetLayoutSupport_self(struct vn_cs_encoder *enc, const VkDescriptorSetLayoutSupport *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->supported); -} - -static inline void -vn_encode_VkDescriptorSetLayoutSupport(struct vn_cs_encoder *enc, const VkDescriptorSetLayoutSupport *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT }); - vn_encode_VkDescriptorSetLayoutSupport_pnext(enc, val->pNext); - vn_encode_VkDescriptorSetLayoutSupport_self(enc, val); -} - -static inline void * -vn_decode_VkDescriptorSetLayoutSupport_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDescriptorSetVariableDescriptorCountLayoutSupport)); - if (pnext) { - pnext->sType = stype; - ((VkDescriptorSetVariableDescriptorCountLayoutSupport *)pnext)->pNext = vn_decode_VkDescriptorSetLayoutSupport_pnext_partial_temp(dec); - vn_decode_VkDescriptorSetVariableDescriptorCountLayoutSupport_self_partial_temp(dec, (VkDescriptorSetVariableDescriptorCountLayoutSupport *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDescriptorSetLayoutSupport_self_partial_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutSupport *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->supported */ -} - -static inline void -vn_decode_VkDescriptorSetLayoutSupport_partial_temp(struct vn_cs_decoder *dec, VkDescriptorSetLayoutSupport *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetLayoutSupport_pnext_partial_temp(dec); - vn_decode_VkDescriptorSetLayoutSupport_self_partial_temp(dec, val); -} - -static inline void vn_decode_vkCreateDescriptorSetLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateDescriptorSetLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkDescriptorSetLayoutCreateInfo_temp(dec, (VkDescriptorSetLayoutCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pSetLayout = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSetLayout)); - if (!args->pSetLayout) return; - vn_decode_VkDescriptorSetLayout(dec, args->pSetLayout); - } else { - args->pSetLayout = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateDescriptorSetLayout_args_handle(struct vn_command_vkCreateDescriptorSetLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkDescriptorSetLayoutCreateInfo_handle((VkDescriptorSetLayoutCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pSetLayout */ -} - -static inline void vn_encode_vkCreateDescriptorSetLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateDescriptorSetLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateDescriptorSetLayout_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pSetLayout)) - vn_encode_VkDescriptorSetLayout(enc, args->pSetLayout); -} - -static inline void vn_decode_vkDestroyDescriptorSetLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyDescriptorSetLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDescriptorSetLayout_lookup(dec, &args->descriptorSetLayout); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyDescriptorSetLayout_args_handle(struct vn_command_vkDestroyDescriptorSetLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDescriptorSetLayout_handle(&args->descriptorSetLayout); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyDescriptorSetLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyDescriptorSetLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyDescriptorSetLayout_EXT}); - - /* skip args->device */ - /* skip args->descriptorSetLayout */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetDescriptorSetLayoutSupport_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDescriptorSetLayoutSupport *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkDescriptorSetLayoutCreateInfo_temp(dec, (VkDescriptorSetLayoutCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pSupport = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSupport)); - if (!args->pSupport) return; - vn_decode_VkDescriptorSetLayoutSupport_partial_temp(dec, args->pSupport); - } else { - args->pSupport = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDescriptorSetLayoutSupport_args_handle(struct vn_command_vkGetDescriptorSetLayoutSupport *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkDescriptorSetLayoutCreateInfo_handle((VkDescriptorSetLayoutCreateInfo *)args->pCreateInfo); - /* skip args->pSupport */ -} - -static inline void vn_encode_vkGetDescriptorSetLayoutSupport_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDescriptorSetLayoutSupport *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDescriptorSetLayoutSupport_EXT}); - - /* skip args->device */ - /* skip args->pCreateInfo */ - if (vn_encode_simple_pointer(enc, args->pSupport)) - vn_encode_VkDescriptorSetLayoutSupport(enc, args->pSupport); -} - -static inline void vn_dispatch_vkCreateDescriptorSetLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateDescriptorSetLayout args; - - if (!ctx->dispatch_vkCreateDescriptorSetLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateDescriptorSetLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateDescriptorSetLayout(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateDescriptorSetLayout returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateDescriptorSetLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyDescriptorSetLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyDescriptorSetLayout args; - - if (!ctx->dispatch_vkDestroyDescriptorSetLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyDescriptorSetLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyDescriptorSetLayout(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyDescriptorSetLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDescriptorSetLayoutSupport(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDescriptorSetLayoutSupport args; - - if (!ctx->dispatch_vkGetDescriptorSetLayoutSupport) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDescriptorSetLayoutSupport_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDescriptorSetLayoutSupport(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDescriptorSetLayoutSupport_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DESCRIPTOR_SET_LAYOUT_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_update_template.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_update_template.h deleted file mode 100644 index 6cefbae7..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_update_template.h +++ /dev/null @@ -1,264 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DESCRIPTOR_UPDATE_TEMPLATE_H -#define VN_PROTOCOL_RENDERER_DESCRIPTOR_UPDATE_TEMPLATE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkDescriptorUpdateTemplateEntry */ - -static inline void -vn_decode_VkDescriptorUpdateTemplateEntry_temp(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplateEntry *val) -{ - vn_decode_uint32_t(dec, &val->dstBinding); - vn_decode_uint32_t(dec, &val->dstArrayElement); - vn_decode_uint32_t(dec, &val->descriptorCount); - vn_decode_VkDescriptorType(dec, &val->descriptorType); - vn_decode_size_t(dec, &val->offset); - vn_decode_size_t(dec, &val->stride); -} - -static inline void -vn_replace_VkDescriptorUpdateTemplateEntry_handle(VkDescriptorUpdateTemplateEntry *val) -{ - /* skip val->dstBinding */ - /* skip val->dstArrayElement */ - /* skip val->descriptorCount */ - /* skip val->descriptorType */ - /* skip val->offset */ - /* skip val->stride */ -} - -/* struct VkDescriptorUpdateTemplateCreateInfo chain */ - -static inline void * -vn_decode_VkDescriptorUpdateTemplateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDescriptorUpdateTemplateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->descriptorUpdateEntryCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorUpdateEntryCount); - val->pDescriptorUpdateEntries = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDescriptorUpdateEntries), iter_count); - if (!val->pDescriptorUpdateEntries) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorUpdateTemplateEntry_temp(dec, &((VkDescriptorUpdateTemplateEntry *)val->pDescriptorUpdateEntries)[i]); - } else { - vn_decode_array_size(dec, val->descriptorUpdateEntryCount); - val->pDescriptorUpdateEntries = NULL; - } - vn_decode_VkDescriptorUpdateTemplateType(dec, &val->templateType); - vn_decode_VkDescriptorSetLayout_lookup(dec, &val->descriptorSetLayout); - vn_decode_VkPipelineBindPoint(dec, &val->pipelineBindPoint); - vn_decode_VkPipelineLayout_lookup(dec, &val->pipelineLayout); - vn_decode_uint32_t(dec, &val->set); -} - -static inline void -vn_decode_VkDescriptorUpdateTemplateCreateInfo_temp(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorUpdateTemplateCreateInfo_pnext_temp(dec); - vn_decode_VkDescriptorUpdateTemplateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorUpdateTemplateCreateInfo_handle_self(VkDescriptorUpdateTemplateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->descriptorUpdateEntryCount */ - if (val->pDescriptorUpdateEntries) { - for (uint32_t i = 0; i < val->descriptorUpdateEntryCount; i++) - vn_replace_VkDescriptorUpdateTemplateEntry_handle(&((VkDescriptorUpdateTemplateEntry *)val->pDescriptorUpdateEntries)[i]); - } - /* skip val->templateType */ - vn_replace_VkDescriptorSetLayout_handle(&val->descriptorSetLayout); - /* skip val->pipelineBindPoint */ - vn_replace_VkPipelineLayout_handle(&val->pipelineLayout); - /* skip val->set */ -} - -static inline void -vn_replace_VkDescriptorUpdateTemplateCreateInfo_handle(VkDescriptorUpdateTemplateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO: - vn_replace_VkDescriptorUpdateTemplateCreateInfo_handle_self((VkDescriptorUpdateTemplateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateDescriptorUpdateTemplate_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateDescriptorUpdateTemplate *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkDescriptorUpdateTemplateCreateInfo_temp(dec, (VkDescriptorUpdateTemplateCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pDescriptorUpdateTemplate = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDescriptorUpdateTemplate)); - if (!args->pDescriptorUpdateTemplate) return; - vn_decode_VkDescriptorUpdateTemplate(dec, args->pDescriptorUpdateTemplate); - } else { - args->pDescriptorUpdateTemplate = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateDescriptorUpdateTemplate_args_handle(struct vn_command_vkCreateDescriptorUpdateTemplate *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkDescriptorUpdateTemplateCreateInfo_handle((VkDescriptorUpdateTemplateCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pDescriptorUpdateTemplate */ -} - -static inline void vn_encode_vkCreateDescriptorUpdateTemplate_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateDescriptorUpdateTemplate *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateDescriptorUpdateTemplate_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pDescriptorUpdateTemplate)) - vn_encode_VkDescriptorUpdateTemplate(enc, args->pDescriptorUpdateTemplate); -} - -static inline void vn_decode_vkDestroyDescriptorUpdateTemplate_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyDescriptorUpdateTemplate *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDescriptorUpdateTemplate_lookup(dec, &args->descriptorUpdateTemplate); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyDescriptorUpdateTemplate_args_handle(struct vn_command_vkDestroyDescriptorUpdateTemplate *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDescriptorUpdateTemplate_handle(&args->descriptorUpdateTemplate); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyDescriptorUpdateTemplate_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyDescriptorUpdateTemplate *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyDescriptorUpdateTemplate_EXT}); - - /* skip args->device */ - /* skip args->descriptorUpdateTemplate */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateDescriptorUpdateTemplate(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateDescriptorUpdateTemplate args; - - if (!ctx->dispatch_vkCreateDescriptorUpdateTemplate) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateDescriptorUpdateTemplate_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateDescriptorUpdateTemplate(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateDescriptorUpdateTemplate returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateDescriptorUpdateTemplate_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyDescriptorUpdateTemplate(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyDescriptorUpdateTemplate args; - - if (!ctx->dispatch_vkDestroyDescriptorUpdateTemplate) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyDescriptorUpdateTemplate_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyDescriptorUpdateTemplate(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyDescriptorUpdateTemplate_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DESCRIPTOR_UPDATE_TEMPLATE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_device.h b/src/venus/venus-protocol/vn_protocol_renderer_device.h deleted file mode 100644 index 0e4032d8..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_device.h +++ /dev/null @@ -1,28302 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DEVICE_H -#define VN_PROTOCOL_RENDERER_DEVICE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkGetDeviceProcAddr - */ - -/* struct VkPhysicalDeviceLimits */ - -static inline void -vn_encode_VkPhysicalDeviceLimits(struct vn_cs_encoder *enc, const VkPhysicalDeviceLimits *val) -{ - vn_encode_uint32_t(enc, &val->maxImageDimension1D); - vn_encode_uint32_t(enc, &val->maxImageDimension2D); - vn_encode_uint32_t(enc, &val->maxImageDimension3D); - vn_encode_uint32_t(enc, &val->maxImageDimensionCube); - vn_encode_uint32_t(enc, &val->maxImageArrayLayers); - vn_encode_uint32_t(enc, &val->maxTexelBufferElements); - vn_encode_uint32_t(enc, &val->maxUniformBufferRange); - vn_encode_uint32_t(enc, &val->maxStorageBufferRange); - vn_encode_uint32_t(enc, &val->maxPushConstantsSize); - vn_encode_uint32_t(enc, &val->maxMemoryAllocationCount); - vn_encode_uint32_t(enc, &val->maxSamplerAllocationCount); - vn_encode_VkDeviceSize(enc, &val->bufferImageGranularity); - vn_encode_VkDeviceSize(enc, &val->sparseAddressSpaceSize); - vn_encode_uint32_t(enc, &val->maxBoundDescriptorSets); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorSamplers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUniformBuffers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorStorageBuffers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorSampledImages); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorStorageImages); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorInputAttachments); - vn_encode_uint32_t(enc, &val->maxPerStageResources); - vn_encode_uint32_t(enc, &val->maxDescriptorSetSamplers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUniformBuffers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUniformBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetStorageBuffers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetStorageBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetSampledImages); - vn_encode_uint32_t(enc, &val->maxDescriptorSetStorageImages); - vn_encode_uint32_t(enc, &val->maxDescriptorSetInputAttachments); - vn_encode_uint32_t(enc, &val->maxVertexInputAttributes); - vn_encode_uint32_t(enc, &val->maxVertexInputBindings); - vn_encode_uint32_t(enc, &val->maxVertexInputAttributeOffset); - vn_encode_uint32_t(enc, &val->maxVertexInputBindingStride); - vn_encode_uint32_t(enc, &val->maxVertexOutputComponents); - vn_encode_uint32_t(enc, &val->maxTessellationGenerationLevel); - vn_encode_uint32_t(enc, &val->maxTessellationPatchSize); - vn_encode_uint32_t(enc, &val->maxTessellationControlPerVertexInputComponents); - vn_encode_uint32_t(enc, &val->maxTessellationControlPerVertexOutputComponents); - vn_encode_uint32_t(enc, &val->maxTessellationControlPerPatchOutputComponents); - vn_encode_uint32_t(enc, &val->maxTessellationControlTotalOutputComponents); - vn_encode_uint32_t(enc, &val->maxTessellationEvaluationInputComponents); - vn_encode_uint32_t(enc, &val->maxTessellationEvaluationOutputComponents); - vn_encode_uint32_t(enc, &val->maxGeometryShaderInvocations); - vn_encode_uint32_t(enc, &val->maxGeometryInputComponents); - vn_encode_uint32_t(enc, &val->maxGeometryOutputComponents); - vn_encode_uint32_t(enc, &val->maxGeometryOutputVertices); - vn_encode_uint32_t(enc, &val->maxGeometryTotalOutputComponents); - vn_encode_uint32_t(enc, &val->maxFragmentInputComponents); - vn_encode_uint32_t(enc, &val->maxFragmentOutputAttachments); - vn_encode_uint32_t(enc, &val->maxFragmentDualSrcAttachments); - vn_encode_uint32_t(enc, &val->maxFragmentCombinedOutputResources); - vn_encode_uint32_t(enc, &val->maxComputeSharedMemorySize); - vn_encode_array_size(enc, 3); - vn_encode_uint32_t_array(enc, val->maxComputeWorkGroupCount, 3); - vn_encode_uint32_t(enc, &val->maxComputeWorkGroupInvocations); - vn_encode_array_size(enc, 3); - vn_encode_uint32_t_array(enc, val->maxComputeWorkGroupSize, 3); - vn_encode_uint32_t(enc, &val->subPixelPrecisionBits); - vn_encode_uint32_t(enc, &val->subTexelPrecisionBits); - vn_encode_uint32_t(enc, &val->mipmapPrecisionBits); - vn_encode_uint32_t(enc, &val->maxDrawIndexedIndexValue); - vn_encode_uint32_t(enc, &val->maxDrawIndirectCount); - vn_encode_float(enc, &val->maxSamplerLodBias); - vn_encode_float(enc, &val->maxSamplerAnisotropy); - vn_encode_uint32_t(enc, &val->maxViewports); - vn_encode_array_size(enc, 2); - vn_encode_uint32_t_array(enc, val->maxViewportDimensions, 2); - vn_encode_array_size(enc, 2); - vn_encode_float_array(enc, val->viewportBoundsRange, 2); - vn_encode_uint32_t(enc, &val->viewportSubPixelBits); - vn_encode_size_t(enc, &val->minMemoryMapAlignment); - vn_encode_VkDeviceSize(enc, &val->minTexelBufferOffsetAlignment); - vn_encode_VkDeviceSize(enc, &val->minUniformBufferOffsetAlignment); - vn_encode_VkDeviceSize(enc, &val->minStorageBufferOffsetAlignment); - vn_encode_int32_t(enc, &val->minTexelOffset); - vn_encode_uint32_t(enc, &val->maxTexelOffset); - vn_encode_int32_t(enc, &val->minTexelGatherOffset); - vn_encode_uint32_t(enc, &val->maxTexelGatherOffset); - vn_encode_float(enc, &val->minInterpolationOffset); - vn_encode_float(enc, &val->maxInterpolationOffset); - vn_encode_uint32_t(enc, &val->subPixelInterpolationOffsetBits); - vn_encode_uint32_t(enc, &val->maxFramebufferWidth); - vn_encode_uint32_t(enc, &val->maxFramebufferHeight); - vn_encode_uint32_t(enc, &val->maxFramebufferLayers); - vn_encode_VkFlags(enc, &val->framebufferColorSampleCounts); - vn_encode_VkFlags(enc, &val->framebufferDepthSampleCounts); - vn_encode_VkFlags(enc, &val->framebufferStencilSampleCounts); - vn_encode_VkFlags(enc, &val->framebufferNoAttachmentsSampleCounts); - vn_encode_uint32_t(enc, &val->maxColorAttachments); - vn_encode_VkFlags(enc, &val->sampledImageColorSampleCounts); - vn_encode_VkFlags(enc, &val->sampledImageIntegerSampleCounts); - vn_encode_VkFlags(enc, &val->sampledImageDepthSampleCounts); - vn_encode_VkFlags(enc, &val->sampledImageStencilSampleCounts); - vn_encode_VkFlags(enc, &val->storageImageSampleCounts); - vn_encode_uint32_t(enc, &val->maxSampleMaskWords); - vn_encode_VkBool32(enc, &val->timestampComputeAndGraphics); - vn_encode_float(enc, &val->timestampPeriod); - vn_encode_uint32_t(enc, &val->maxClipDistances); - vn_encode_uint32_t(enc, &val->maxCullDistances); - vn_encode_uint32_t(enc, &val->maxCombinedClipAndCullDistances); - vn_encode_uint32_t(enc, &val->discreteQueuePriorities); - vn_encode_array_size(enc, 2); - vn_encode_float_array(enc, val->pointSizeRange, 2); - vn_encode_array_size(enc, 2); - vn_encode_float_array(enc, val->lineWidthRange, 2); - vn_encode_float(enc, &val->pointSizeGranularity); - vn_encode_float(enc, &val->lineWidthGranularity); - vn_encode_VkBool32(enc, &val->strictLines); - vn_encode_VkBool32(enc, &val->standardSampleLocations); - vn_encode_VkDeviceSize(enc, &val->optimalBufferCopyOffsetAlignment); - vn_encode_VkDeviceSize(enc, &val->optimalBufferCopyRowPitchAlignment); - vn_encode_VkDeviceSize(enc, &val->nonCoherentAtomSize); -} - -static inline void -vn_decode_VkPhysicalDeviceLimits_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLimits *val) -{ - /* skip val->maxImageDimension1D */ - /* skip val->maxImageDimension2D */ - /* skip val->maxImageDimension3D */ - /* skip val->maxImageDimensionCube */ - /* skip val->maxImageArrayLayers */ - /* skip val->maxTexelBufferElements */ - /* skip val->maxUniformBufferRange */ - /* skip val->maxStorageBufferRange */ - /* skip val->maxPushConstantsSize */ - /* skip val->maxMemoryAllocationCount */ - /* skip val->maxSamplerAllocationCount */ - /* skip val->bufferImageGranularity */ - /* skip val->sparseAddressSpaceSize */ - /* skip val->maxBoundDescriptorSets */ - /* skip val->maxPerStageDescriptorSamplers */ - /* skip val->maxPerStageDescriptorUniformBuffers */ - /* skip val->maxPerStageDescriptorStorageBuffers */ - /* skip val->maxPerStageDescriptorSampledImages */ - /* skip val->maxPerStageDescriptorStorageImages */ - /* skip val->maxPerStageDescriptorInputAttachments */ - /* skip val->maxPerStageResources */ - /* skip val->maxDescriptorSetSamplers */ - /* skip val->maxDescriptorSetUniformBuffers */ - /* skip val->maxDescriptorSetUniformBuffersDynamic */ - /* skip val->maxDescriptorSetStorageBuffers */ - /* skip val->maxDescriptorSetStorageBuffersDynamic */ - /* skip val->maxDescriptorSetSampledImages */ - /* skip val->maxDescriptorSetStorageImages */ - /* skip val->maxDescriptorSetInputAttachments */ - /* skip val->maxVertexInputAttributes */ - /* skip val->maxVertexInputBindings */ - /* skip val->maxVertexInputAttributeOffset */ - /* skip val->maxVertexInputBindingStride */ - /* skip val->maxVertexOutputComponents */ - /* skip val->maxTessellationGenerationLevel */ - /* skip val->maxTessellationPatchSize */ - /* skip val->maxTessellationControlPerVertexInputComponents */ - /* skip val->maxTessellationControlPerVertexOutputComponents */ - /* skip val->maxTessellationControlPerPatchOutputComponents */ - /* skip val->maxTessellationControlTotalOutputComponents */ - /* skip val->maxTessellationEvaluationInputComponents */ - /* skip val->maxTessellationEvaluationOutputComponents */ - /* skip val->maxGeometryShaderInvocations */ - /* skip val->maxGeometryInputComponents */ - /* skip val->maxGeometryOutputComponents */ - /* skip val->maxGeometryOutputVertices */ - /* skip val->maxGeometryTotalOutputComponents */ - /* skip val->maxFragmentInputComponents */ - /* skip val->maxFragmentOutputAttachments */ - /* skip val->maxFragmentDualSrcAttachments */ - /* skip val->maxFragmentCombinedOutputResources */ - /* skip val->maxComputeSharedMemorySize */ - /* skip val->maxComputeWorkGroupCount */ - /* skip val->maxComputeWorkGroupInvocations */ - /* skip val->maxComputeWorkGroupSize */ - /* skip val->subPixelPrecisionBits */ - /* skip val->subTexelPrecisionBits */ - /* skip val->mipmapPrecisionBits */ - /* skip val->maxDrawIndexedIndexValue */ - /* skip val->maxDrawIndirectCount */ - /* skip val->maxSamplerLodBias */ - /* skip val->maxSamplerAnisotropy */ - /* skip val->maxViewports */ - /* skip val->maxViewportDimensions */ - /* skip val->viewportBoundsRange */ - /* skip val->viewportSubPixelBits */ - /* skip val->minMemoryMapAlignment */ - /* skip val->minTexelBufferOffsetAlignment */ - /* skip val->minUniformBufferOffsetAlignment */ - /* skip val->minStorageBufferOffsetAlignment */ - /* skip val->minTexelOffset */ - /* skip val->maxTexelOffset */ - /* skip val->minTexelGatherOffset */ - /* skip val->maxTexelGatherOffset */ - /* skip val->minInterpolationOffset */ - /* skip val->maxInterpolationOffset */ - /* skip val->subPixelInterpolationOffsetBits */ - /* skip val->maxFramebufferWidth */ - /* skip val->maxFramebufferHeight */ - /* skip val->maxFramebufferLayers */ - /* skip val->framebufferColorSampleCounts */ - /* skip val->framebufferDepthSampleCounts */ - /* skip val->framebufferStencilSampleCounts */ - /* skip val->framebufferNoAttachmentsSampleCounts */ - /* skip val->maxColorAttachments */ - /* skip val->sampledImageColorSampleCounts */ - /* skip val->sampledImageIntegerSampleCounts */ - /* skip val->sampledImageDepthSampleCounts */ - /* skip val->sampledImageStencilSampleCounts */ - /* skip val->storageImageSampleCounts */ - /* skip val->maxSampleMaskWords */ - /* skip val->timestampComputeAndGraphics */ - /* skip val->timestampPeriod */ - /* skip val->maxClipDistances */ - /* skip val->maxCullDistances */ - /* skip val->maxCombinedClipAndCullDistances */ - /* skip val->discreteQueuePriorities */ - /* skip val->pointSizeRange */ - /* skip val->lineWidthRange */ - /* skip val->pointSizeGranularity */ - /* skip val->lineWidthGranularity */ - /* skip val->strictLines */ - /* skip val->standardSampleLocations */ - /* skip val->optimalBufferCopyOffsetAlignment */ - /* skip val->optimalBufferCopyRowPitchAlignment */ - /* skip val->nonCoherentAtomSize */ -} - -/* struct VkPhysicalDeviceSparseProperties */ - -static inline void -vn_encode_VkPhysicalDeviceSparseProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceSparseProperties *val) -{ - vn_encode_VkBool32(enc, &val->residencyStandard2DBlockShape); - vn_encode_VkBool32(enc, &val->residencyStandard2DMultisampleBlockShape); - vn_encode_VkBool32(enc, &val->residencyStandard3DBlockShape); - vn_encode_VkBool32(enc, &val->residencyAlignedMipSize); - vn_encode_VkBool32(enc, &val->residencyNonResidentStrict); -} - -static inline void -vn_decode_VkPhysicalDeviceSparseProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSparseProperties *val) -{ - /* skip val->residencyStandard2DBlockShape */ - /* skip val->residencyStandard2DMultisampleBlockShape */ - /* skip val->residencyStandard3DBlockShape */ - /* skip val->residencyAlignedMipSize */ - /* skip val->residencyNonResidentStrict */ -} - -/* struct VkPhysicalDeviceProperties */ - -static inline void -vn_encode_VkPhysicalDeviceProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceProperties *val) -{ - vn_encode_uint32_t(enc, &val->apiVersion); - vn_encode_uint32_t(enc, &val->driverVersion); - vn_encode_uint32_t(enc, &val->vendorID); - vn_encode_uint32_t(enc, &val->deviceID); - vn_encode_VkPhysicalDeviceType(enc, &val->deviceType); - vn_encode_array_size(enc, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE); - vn_encode_char_array(enc, val->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE); - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->pipelineCacheUUID, VK_UUID_SIZE); - vn_encode_VkPhysicalDeviceLimits(enc, &val->limits); - vn_encode_VkPhysicalDeviceSparseProperties(enc, &val->sparseProperties); -} - -static inline void -vn_decode_VkPhysicalDeviceProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProperties *val) -{ - /* skip val->apiVersion */ - /* skip val->driverVersion */ - /* skip val->vendorID */ - /* skip val->deviceID */ - /* skip val->deviceType */ - /* skip val->deviceName */ - /* skip val->pipelineCacheUUID */ - vn_decode_VkPhysicalDeviceLimits_partial_temp(dec, &val->limits); - vn_decode_VkPhysicalDeviceSparseProperties_partial_temp(dec, &val->sparseProperties); -} - -/* struct VkQueueFamilyProperties */ - -static inline void -vn_encode_VkQueueFamilyProperties(struct vn_cs_encoder *enc, const VkQueueFamilyProperties *val) -{ - vn_encode_VkFlags(enc, &val->queueFlags); - vn_encode_uint32_t(enc, &val->queueCount); - vn_encode_uint32_t(enc, &val->timestampValidBits); - vn_encode_VkExtent3D(enc, &val->minImageTransferGranularity); -} - -static inline void -vn_decode_VkQueueFamilyProperties_partial_temp(struct vn_cs_decoder *dec, VkQueueFamilyProperties *val) -{ - /* skip val->queueFlags */ - /* skip val->queueCount */ - /* skip val->timestampValidBits */ - vn_decode_VkExtent3D_partial_temp(dec, &val->minImageTransferGranularity); -} - -/* struct VkMemoryType */ - -static inline void -vn_encode_VkMemoryType(struct vn_cs_encoder *enc, const VkMemoryType *val) -{ - vn_encode_VkFlags(enc, &val->propertyFlags); - vn_encode_uint32_t(enc, &val->heapIndex); -} - -static inline void -vn_decode_VkMemoryType_partial_temp(struct vn_cs_decoder *dec, VkMemoryType *val) -{ - /* skip val->propertyFlags */ - /* skip val->heapIndex */ -} - -/* struct VkMemoryHeap */ - -static inline void -vn_encode_VkMemoryHeap(struct vn_cs_encoder *enc, const VkMemoryHeap *val) -{ - vn_encode_VkDeviceSize(enc, &val->size); - vn_encode_VkFlags(enc, &val->flags); -} - -static inline void -vn_decode_VkMemoryHeap_partial_temp(struct vn_cs_decoder *dec, VkMemoryHeap *val) -{ - /* skip val->size */ - /* skip val->flags */ -} - -/* struct VkPhysicalDeviceMemoryProperties */ - -static inline void -vn_encode_VkPhysicalDeviceMemoryProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceMemoryProperties *val) -{ - vn_encode_uint32_t(enc, &val->memoryTypeCount); - vn_encode_array_size(enc, VK_MAX_MEMORY_TYPES); - for (uint32_t i = 0; i < VK_MAX_MEMORY_TYPES; i++) - vn_encode_VkMemoryType(enc, &val->memoryTypes[i]); - vn_encode_uint32_t(enc, &val->memoryHeapCount); - vn_encode_array_size(enc, VK_MAX_MEMORY_HEAPS); - for (uint32_t i = 0; i < VK_MAX_MEMORY_HEAPS; i++) - vn_encode_VkMemoryHeap(enc, &val->memoryHeaps[i]); -} - -static inline void -vn_decode_VkPhysicalDeviceMemoryProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMemoryProperties *val) -{ - /* skip val->memoryTypeCount */ - { - const uint32_t iter_count = vn_decode_array_size(dec, VK_MAX_MEMORY_TYPES); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMemoryType_partial_temp(dec, &val->memoryTypes[i]); - } - /* skip val->memoryHeapCount */ - { - const uint32_t iter_count = vn_decode_array_size(dec, VK_MAX_MEMORY_HEAPS); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMemoryHeap_partial_temp(dec, &val->memoryHeaps[i]); - } -} - -/* struct VkPhysicalDeviceFeatures */ - -static inline void -vn_encode_VkPhysicalDeviceFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceFeatures *val) -{ - vn_encode_VkBool32(enc, &val->robustBufferAccess); - vn_encode_VkBool32(enc, &val->fullDrawIndexUint32); - vn_encode_VkBool32(enc, &val->imageCubeArray); - vn_encode_VkBool32(enc, &val->independentBlend); - vn_encode_VkBool32(enc, &val->geometryShader); - vn_encode_VkBool32(enc, &val->tessellationShader); - vn_encode_VkBool32(enc, &val->sampleRateShading); - vn_encode_VkBool32(enc, &val->dualSrcBlend); - vn_encode_VkBool32(enc, &val->logicOp); - vn_encode_VkBool32(enc, &val->multiDrawIndirect); - vn_encode_VkBool32(enc, &val->drawIndirectFirstInstance); - vn_encode_VkBool32(enc, &val->depthClamp); - vn_encode_VkBool32(enc, &val->depthBiasClamp); - vn_encode_VkBool32(enc, &val->fillModeNonSolid); - vn_encode_VkBool32(enc, &val->depthBounds); - vn_encode_VkBool32(enc, &val->wideLines); - vn_encode_VkBool32(enc, &val->largePoints); - vn_encode_VkBool32(enc, &val->alphaToOne); - vn_encode_VkBool32(enc, &val->multiViewport); - vn_encode_VkBool32(enc, &val->samplerAnisotropy); - vn_encode_VkBool32(enc, &val->textureCompressionETC2); - vn_encode_VkBool32(enc, &val->textureCompressionASTC_LDR); - vn_encode_VkBool32(enc, &val->textureCompressionBC); - vn_encode_VkBool32(enc, &val->occlusionQueryPrecise); - vn_encode_VkBool32(enc, &val->pipelineStatisticsQuery); - vn_encode_VkBool32(enc, &val->vertexPipelineStoresAndAtomics); - vn_encode_VkBool32(enc, &val->fragmentStoresAndAtomics); - vn_encode_VkBool32(enc, &val->shaderTessellationAndGeometryPointSize); - vn_encode_VkBool32(enc, &val->shaderImageGatherExtended); - vn_encode_VkBool32(enc, &val->shaderStorageImageExtendedFormats); - vn_encode_VkBool32(enc, &val->shaderStorageImageMultisample); - vn_encode_VkBool32(enc, &val->shaderStorageImageReadWithoutFormat); - vn_encode_VkBool32(enc, &val->shaderStorageImageWriteWithoutFormat); - vn_encode_VkBool32(enc, &val->shaderUniformBufferArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderSampledImageArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageBufferArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageImageArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderClipDistance); - vn_encode_VkBool32(enc, &val->shaderCullDistance); - vn_encode_VkBool32(enc, &val->shaderFloat64); - vn_encode_VkBool32(enc, &val->shaderInt64); - vn_encode_VkBool32(enc, &val->shaderInt16); - vn_encode_VkBool32(enc, &val->shaderResourceResidency); - vn_encode_VkBool32(enc, &val->shaderResourceMinLod); - vn_encode_VkBool32(enc, &val->sparseBinding); - vn_encode_VkBool32(enc, &val->sparseResidencyBuffer); - vn_encode_VkBool32(enc, &val->sparseResidencyImage2D); - vn_encode_VkBool32(enc, &val->sparseResidencyImage3D); - vn_encode_VkBool32(enc, &val->sparseResidency2Samples); - vn_encode_VkBool32(enc, &val->sparseResidency4Samples); - vn_encode_VkBool32(enc, &val->sparseResidency8Samples); - vn_encode_VkBool32(enc, &val->sparseResidency16Samples); - vn_encode_VkBool32(enc, &val->sparseResidencyAliased); - vn_encode_VkBool32(enc, &val->variableMultisampleRate); - vn_encode_VkBool32(enc, &val->inheritedQueries); -} - -static inline void -vn_decode_VkPhysicalDeviceFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFeatures *val) -{ - vn_decode_VkBool32(dec, &val->robustBufferAccess); - vn_decode_VkBool32(dec, &val->fullDrawIndexUint32); - vn_decode_VkBool32(dec, &val->imageCubeArray); - vn_decode_VkBool32(dec, &val->independentBlend); - vn_decode_VkBool32(dec, &val->geometryShader); - vn_decode_VkBool32(dec, &val->tessellationShader); - vn_decode_VkBool32(dec, &val->sampleRateShading); - vn_decode_VkBool32(dec, &val->dualSrcBlend); - vn_decode_VkBool32(dec, &val->logicOp); - vn_decode_VkBool32(dec, &val->multiDrawIndirect); - vn_decode_VkBool32(dec, &val->drawIndirectFirstInstance); - vn_decode_VkBool32(dec, &val->depthClamp); - vn_decode_VkBool32(dec, &val->depthBiasClamp); - vn_decode_VkBool32(dec, &val->fillModeNonSolid); - vn_decode_VkBool32(dec, &val->depthBounds); - vn_decode_VkBool32(dec, &val->wideLines); - vn_decode_VkBool32(dec, &val->largePoints); - vn_decode_VkBool32(dec, &val->alphaToOne); - vn_decode_VkBool32(dec, &val->multiViewport); - vn_decode_VkBool32(dec, &val->samplerAnisotropy); - vn_decode_VkBool32(dec, &val->textureCompressionETC2); - vn_decode_VkBool32(dec, &val->textureCompressionASTC_LDR); - vn_decode_VkBool32(dec, &val->textureCompressionBC); - vn_decode_VkBool32(dec, &val->occlusionQueryPrecise); - vn_decode_VkBool32(dec, &val->pipelineStatisticsQuery); - vn_decode_VkBool32(dec, &val->vertexPipelineStoresAndAtomics); - vn_decode_VkBool32(dec, &val->fragmentStoresAndAtomics); - vn_decode_VkBool32(dec, &val->shaderTessellationAndGeometryPointSize); - vn_decode_VkBool32(dec, &val->shaderImageGatherExtended); - vn_decode_VkBool32(dec, &val->shaderStorageImageExtendedFormats); - vn_decode_VkBool32(dec, &val->shaderStorageImageMultisample); - vn_decode_VkBool32(dec, &val->shaderStorageImageReadWithoutFormat); - vn_decode_VkBool32(dec, &val->shaderStorageImageWriteWithoutFormat); - vn_decode_VkBool32(dec, &val->shaderUniformBufferArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderSampledImageArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageBufferArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageImageArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderClipDistance); - vn_decode_VkBool32(dec, &val->shaderCullDistance); - vn_decode_VkBool32(dec, &val->shaderFloat64); - vn_decode_VkBool32(dec, &val->shaderInt64); - vn_decode_VkBool32(dec, &val->shaderInt16); - vn_decode_VkBool32(dec, &val->shaderResourceResidency); - vn_decode_VkBool32(dec, &val->shaderResourceMinLod); - vn_decode_VkBool32(dec, &val->sparseBinding); - vn_decode_VkBool32(dec, &val->sparseResidencyBuffer); - vn_decode_VkBool32(dec, &val->sparseResidencyImage2D); - vn_decode_VkBool32(dec, &val->sparseResidencyImage3D); - vn_decode_VkBool32(dec, &val->sparseResidency2Samples); - vn_decode_VkBool32(dec, &val->sparseResidency4Samples); - vn_decode_VkBool32(dec, &val->sparseResidency8Samples); - vn_decode_VkBool32(dec, &val->sparseResidency16Samples); - vn_decode_VkBool32(dec, &val->sparseResidencyAliased); - vn_decode_VkBool32(dec, &val->variableMultisampleRate); - vn_decode_VkBool32(dec, &val->inheritedQueries); -} - -static inline void -vn_decode_VkPhysicalDeviceFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFeatures *val) -{ - /* skip val->robustBufferAccess */ - /* skip val->fullDrawIndexUint32 */ - /* skip val->imageCubeArray */ - /* skip val->independentBlend */ - /* skip val->geometryShader */ - /* skip val->tessellationShader */ - /* skip val->sampleRateShading */ - /* skip val->dualSrcBlend */ - /* skip val->logicOp */ - /* skip val->multiDrawIndirect */ - /* skip val->drawIndirectFirstInstance */ - /* skip val->depthClamp */ - /* skip val->depthBiasClamp */ - /* skip val->fillModeNonSolid */ - /* skip val->depthBounds */ - /* skip val->wideLines */ - /* skip val->largePoints */ - /* skip val->alphaToOne */ - /* skip val->multiViewport */ - /* skip val->samplerAnisotropy */ - /* skip val->textureCompressionETC2 */ - /* skip val->textureCompressionASTC_LDR */ - /* skip val->textureCompressionBC */ - /* skip val->occlusionQueryPrecise */ - /* skip val->pipelineStatisticsQuery */ - /* skip val->vertexPipelineStoresAndAtomics */ - /* skip val->fragmentStoresAndAtomics */ - /* skip val->shaderTessellationAndGeometryPointSize */ - /* skip val->shaderImageGatherExtended */ - /* skip val->shaderStorageImageExtendedFormats */ - /* skip val->shaderStorageImageMultisample */ - /* skip val->shaderStorageImageReadWithoutFormat */ - /* skip val->shaderStorageImageWriteWithoutFormat */ - /* skip val->shaderUniformBufferArrayDynamicIndexing */ - /* skip val->shaderSampledImageArrayDynamicIndexing */ - /* skip val->shaderStorageBufferArrayDynamicIndexing */ - /* skip val->shaderStorageImageArrayDynamicIndexing */ - /* skip val->shaderClipDistance */ - /* skip val->shaderCullDistance */ - /* skip val->shaderFloat64 */ - /* skip val->shaderInt64 */ - /* skip val->shaderInt16 */ - /* skip val->shaderResourceResidency */ - /* skip val->shaderResourceMinLod */ - /* skip val->sparseBinding */ - /* skip val->sparseResidencyBuffer */ - /* skip val->sparseResidencyImage2D */ - /* skip val->sparseResidencyImage3D */ - /* skip val->sparseResidency2Samples */ - /* skip val->sparseResidency4Samples */ - /* skip val->sparseResidency8Samples */ - /* skip val->sparseResidency16Samples */ - /* skip val->sparseResidencyAliased */ - /* skip val->variableMultisampleRate */ - /* skip val->inheritedQueries */ -} - -static inline void -vn_replace_VkPhysicalDeviceFeatures_handle(VkPhysicalDeviceFeatures *val) -{ - /* skip val->robustBufferAccess */ - /* skip val->fullDrawIndexUint32 */ - /* skip val->imageCubeArray */ - /* skip val->independentBlend */ - /* skip val->geometryShader */ - /* skip val->tessellationShader */ - /* skip val->sampleRateShading */ - /* skip val->dualSrcBlend */ - /* skip val->logicOp */ - /* skip val->multiDrawIndirect */ - /* skip val->drawIndirectFirstInstance */ - /* skip val->depthClamp */ - /* skip val->depthBiasClamp */ - /* skip val->fillModeNonSolid */ - /* skip val->depthBounds */ - /* skip val->wideLines */ - /* skip val->largePoints */ - /* skip val->alphaToOne */ - /* skip val->multiViewport */ - /* skip val->samplerAnisotropy */ - /* skip val->textureCompressionETC2 */ - /* skip val->textureCompressionASTC_LDR */ - /* skip val->textureCompressionBC */ - /* skip val->occlusionQueryPrecise */ - /* skip val->pipelineStatisticsQuery */ - /* skip val->vertexPipelineStoresAndAtomics */ - /* skip val->fragmentStoresAndAtomics */ - /* skip val->shaderTessellationAndGeometryPointSize */ - /* skip val->shaderImageGatherExtended */ - /* skip val->shaderStorageImageExtendedFormats */ - /* skip val->shaderStorageImageMultisample */ - /* skip val->shaderStorageImageReadWithoutFormat */ - /* skip val->shaderStorageImageWriteWithoutFormat */ - /* skip val->shaderUniformBufferArrayDynamicIndexing */ - /* skip val->shaderSampledImageArrayDynamicIndexing */ - /* skip val->shaderStorageBufferArrayDynamicIndexing */ - /* skip val->shaderStorageImageArrayDynamicIndexing */ - /* skip val->shaderClipDistance */ - /* skip val->shaderCullDistance */ - /* skip val->shaderFloat64 */ - /* skip val->shaderInt64 */ - /* skip val->shaderInt16 */ - /* skip val->shaderResourceResidency */ - /* skip val->shaderResourceMinLod */ - /* skip val->sparseBinding */ - /* skip val->sparseResidencyBuffer */ - /* skip val->sparseResidencyImage2D */ - /* skip val->sparseResidencyImage3D */ - /* skip val->sparseResidency2Samples */ - /* skip val->sparseResidency4Samples */ - /* skip val->sparseResidency8Samples */ - /* skip val->sparseResidency16Samples */ - /* skip val->sparseResidencyAliased */ - /* skip val->variableMultisampleRate */ - /* skip val->inheritedQueries */ -} - -/* struct VkFormatProperties */ - -static inline void -vn_encode_VkFormatProperties(struct vn_cs_encoder *enc, const VkFormatProperties *val) -{ - vn_encode_VkFlags(enc, &val->linearTilingFeatures); - vn_encode_VkFlags(enc, &val->optimalTilingFeatures); - vn_encode_VkFlags(enc, &val->bufferFeatures); -} - -static inline void -vn_decode_VkFormatProperties_partial_temp(struct vn_cs_decoder *dec, VkFormatProperties *val) -{ - /* skip val->linearTilingFeatures */ - /* skip val->optimalTilingFeatures */ - /* skip val->bufferFeatures */ -} - -/* struct VkImageFormatProperties */ - -static inline void -vn_encode_VkImageFormatProperties(struct vn_cs_encoder *enc, const VkImageFormatProperties *val) -{ - vn_encode_VkExtent3D(enc, &val->maxExtent); - vn_encode_uint32_t(enc, &val->maxMipLevels); - vn_encode_uint32_t(enc, &val->maxArrayLayers); - vn_encode_VkFlags(enc, &val->sampleCounts); - vn_encode_VkDeviceSize(enc, &val->maxResourceSize); -} - -static inline void -vn_decode_VkImageFormatProperties_partial_temp(struct vn_cs_decoder *dec, VkImageFormatProperties *val) -{ - vn_decode_VkExtent3D_partial_temp(dec, &val->maxExtent); - /* skip val->maxMipLevels */ - /* skip val->maxArrayLayers */ - /* skip val->sampleCounts */ - /* skip val->maxResourceSize */ -} - -/* struct VkDeviceQueueGlobalPriorityCreateInfo chain */ - -static inline void * -vn_decode_VkDeviceQueueGlobalPriorityCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceQueueGlobalPriorityCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceQueueGlobalPriorityCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkQueueGlobalPriority(dec, &val->globalPriority); -} - -static inline void -vn_decode_VkDeviceQueueGlobalPriorityCreateInfo_temp(struct vn_cs_decoder *dec, VkDeviceQueueGlobalPriorityCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceQueueGlobalPriorityCreateInfo_pnext_temp(dec); - vn_decode_VkDeviceQueueGlobalPriorityCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceQueueGlobalPriorityCreateInfo_handle_self(VkDeviceQueueGlobalPriorityCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->globalPriority */ -} - -static inline void -vn_replace_VkDeviceQueueGlobalPriorityCreateInfo_handle(VkDeviceQueueGlobalPriorityCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO: - vn_replace_VkDeviceQueueGlobalPriorityCreateInfo_handle_self((VkDeviceQueueGlobalPriorityCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceQueueCreateInfo chain */ - -static inline void * -vn_decode_VkDeviceQueueCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceQueueGlobalPriorityCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceQueueGlobalPriorityCreateInfo *)pnext)->pNext = vn_decode_VkDeviceQueueCreateInfo_pnext_temp(dec); - vn_decode_VkDeviceQueueGlobalPriorityCreateInfo_self_temp(dec, (VkDeviceQueueGlobalPriorityCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDeviceQueueCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceQueueCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->queueFamilyIndex); - vn_decode_uint32_t(dec, &val->queueCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->queueCount); - val->pQueuePriorities = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pQueuePriorities), array_size); - if (!val->pQueuePriorities) return; - vn_decode_float_array(dec, (float *)val->pQueuePriorities, array_size); - } else { - vn_decode_array_size(dec, val->queueCount); - val->pQueuePriorities = NULL; - } -} - -static inline void -vn_decode_VkDeviceQueueCreateInfo_temp(struct vn_cs_decoder *dec, VkDeviceQueueCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceQueueCreateInfo_pnext_temp(dec); - vn_decode_VkDeviceQueueCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceQueueCreateInfo_handle_self(VkDeviceQueueCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->queueFamilyIndex */ - /* skip val->queueCount */ - /* skip val->pQueuePriorities */ -} - -static inline void -vn_replace_VkDeviceQueueCreateInfo_handle(VkDeviceQueueCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO: - vn_replace_VkDeviceQueueCreateInfo_handle_self((VkDeviceQueueCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO: - vn_replace_VkDeviceQueueGlobalPriorityCreateInfo_handle_self((VkDeviceQueueGlobalPriorityCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDevicePrivateDataCreateInfo chain */ - -static inline void * -vn_decode_VkDevicePrivateDataCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDevicePrivateDataCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDevicePrivateDataCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->privateDataSlotRequestCount); -} - -static inline void -vn_decode_VkDevicePrivateDataCreateInfo_temp(struct vn_cs_decoder *dec, VkDevicePrivateDataCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDevicePrivateDataCreateInfo_pnext_temp(dec); - vn_decode_VkDevicePrivateDataCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDevicePrivateDataCreateInfo_handle_self(VkDevicePrivateDataCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->privateDataSlotRequestCount */ -} - -static inline void -vn_replace_VkDevicePrivateDataCreateInfo_handle(VkDevicePrivateDataCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: - vn_replace_VkDevicePrivateDataCreateInfo_handle_self((VkDevicePrivateDataCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePrivateDataFeatures chain */ - -static inline void -vn_encode_VkPhysicalDevicePrivateDataFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePrivateDataFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePrivateDataFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->privateData); -} - -static inline void -vn_encode_VkPhysicalDevicePrivateDataFeatures(struct vn_cs_encoder *enc, const VkPhysicalDevicePrivateDataFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES }); - vn_encode_VkPhysicalDevicePrivateDataFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePrivateDataFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePrivateDataFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePrivateDataFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrivateDataFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->privateData); -} - -static inline void -vn_decode_VkPhysicalDevicePrivateDataFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrivateDataFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePrivateDataFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrivateDataFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePrivateDataFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePrivateDataFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrivateDataFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->privateData */ -} - -static inline void -vn_decode_VkPhysicalDevicePrivateDataFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrivateDataFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePrivateDataFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePrivateDataFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePrivateDataFeatures_handle_self(VkPhysicalDevicePrivateDataFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->privateData */ -} - -static inline void -vn_replace_VkPhysicalDevicePrivateDataFeatures_handle(VkPhysicalDevicePrivateDataFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - vn_replace_VkPhysicalDevicePrivateDataFeatures_handle_self((VkPhysicalDevicePrivateDataFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVariablePointersFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceVariablePointersFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVariablePointersFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVariablePointersFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->variablePointersStorageBuffer); - vn_encode_VkBool32(enc, &val->variablePointers); -} - -static inline void -vn_encode_VkPhysicalDeviceVariablePointersFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceVariablePointersFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES }); - vn_encode_VkPhysicalDeviceVariablePointersFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVariablePointersFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVariablePointersFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVariablePointersFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->variablePointersStorageBuffer); - vn_decode_VkBool32(dec, &val->variablePointers); -} - -static inline void -vn_decode_VkPhysicalDeviceVariablePointersFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVariablePointersFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVariablePointersFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVariablePointersFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVariablePointersFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->variablePointersStorageBuffer */ - /* skip val->variablePointers */ -} - -static inline void -vn_decode_VkPhysicalDeviceVariablePointersFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVariablePointersFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVariablePointersFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVariablePointersFeatures_handle_self(VkPhysicalDeviceVariablePointersFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->variablePointersStorageBuffer */ - /* skip val->variablePointers */ -} - -static inline void -vn_replace_VkPhysicalDeviceVariablePointersFeatures_handle(VkPhysicalDeviceVariablePointersFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - vn_replace_VkPhysicalDeviceVariablePointersFeatures_handle_self((VkPhysicalDeviceVariablePointersFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMultiviewFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceMultiviewFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiviewFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiviewFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->multiview); - vn_encode_VkBool32(enc, &val->multiviewGeometryShader); - vn_encode_VkBool32(enc, &val->multiviewTessellationShader); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiviewFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiviewFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES }); - vn_encode_VkPhysicalDeviceMultiviewFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMultiviewFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultiviewFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultiviewFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiviewFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->multiview); - vn_decode_VkBool32(dec, &val->multiviewGeometryShader); - vn_decode_VkBool32(dec, &val->multiviewTessellationShader); -} - -static inline void -vn_decode_VkPhysicalDeviceMultiviewFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiviewFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultiviewFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultiviewFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultiviewFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiviewFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->multiview */ - /* skip val->multiviewGeometryShader */ - /* skip val->multiviewTessellationShader */ -} - -static inline void -vn_decode_VkPhysicalDeviceMultiviewFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiviewFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultiviewFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMultiviewFeatures_handle_self(VkPhysicalDeviceMultiviewFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->multiview */ - /* skip val->multiviewGeometryShader */ - /* skip val->multiviewTessellationShader */ -} - -static inline void -vn_replace_VkPhysicalDeviceMultiviewFeatures_handle(VkPhysicalDeviceMultiviewFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - vn_replace_VkPhysicalDeviceMultiviewFeatures_handle_self((VkPhysicalDeviceMultiviewFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevice16BitStorageFeatures chain */ - -static inline void -vn_encode_VkPhysicalDevice16BitStorageFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevice16BitStorageFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDevice16BitStorageFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->storageBuffer16BitAccess); - vn_encode_VkBool32(enc, &val->uniformAndStorageBuffer16BitAccess); - vn_encode_VkBool32(enc, &val->storagePushConstant16); - vn_encode_VkBool32(enc, &val->storageInputOutput16); -} - -static inline void -vn_encode_VkPhysicalDevice16BitStorageFeatures(struct vn_cs_encoder *enc, const VkPhysicalDevice16BitStorageFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES }); - vn_encode_VkPhysicalDevice16BitStorageFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevice16BitStorageFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevice16BitStorageFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevice16BitStorageFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevice16BitStorageFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->storageBuffer16BitAccess); - vn_decode_VkBool32(dec, &val->uniformAndStorageBuffer16BitAccess); - vn_decode_VkBool32(dec, &val->storagePushConstant16); - vn_decode_VkBool32(dec, &val->storageInputOutput16); -} - -static inline void -vn_decode_VkPhysicalDevice16BitStorageFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDevice16BitStorageFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevice16BitStorageFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDevice16BitStorageFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevice16BitStorageFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevice16BitStorageFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevice16BitStorageFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->storageBuffer16BitAccess */ - /* skip val->uniformAndStorageBuffer16BitAccess */ - /* skip val->storagePushConstant16 */ - /* skip val->storageInputOutput16 */ -} - -static inline void -vn_decode_VkPhysicalDevice16BitStorageFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevice16BitStorageFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevice16BitStorageFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevice16BitStorageFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevice16BitStorageFeatures_handle_self(VkPhysicalDevice16BitStorageFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->storageBuffer16BitAccess */ - /* skip val->uniformAndStorageBuffer16BitAccess */ - /* skip val->storagePushConstant16 */ - /* skip val->storageInputOutput16 */ -} - -static inline void -vn_replace_VkPhysicalDevice16BitStorageFeatures_handle(VkPhysicalDevice16BitStorageFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - vn_replace_VkPhysicalDevice16BitStorageFeatures_handle_self((VkPhysicalDevice16BitStorageFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderSubgroupExtendedTypes); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES }); - vn_encode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderSubgroupExtendedTypes); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderSubgroupExtendedTypes */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_handle_self(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderSubgroupExtendedTypes */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_handle(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - vn_replace_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_handle_self((VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceSamplerYcbcrConversionFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->samplerYcbcrConversion); -} - -static inline void -vn_encode_VkPhysicalDeviceSamplerYcbcrConversionFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES }); - vn_encode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->samplerYcbcrConversion); -} - -static inline void -vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->samplerYcbcrConversion */ -} - -static inline void -vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceSamplerYcbcrConversionFeatures_handle_self(VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->samplerYcbcrConversion */ -} - -static inline void -vn_replace_VkPhysicalDeviceSamplerYcbcrConversionFeatures_handle(VkPhysicalDeviceSamplerYcbcrConversionFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - vn_replace_VkPhysicalDeviceSamplerYcbcrConversionFeatures_handle_self((VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceProtectedMemoryFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceProtectedMemoryFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceProtectedMemoryFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->protectedMemory); -} - -static inline void -vn_encode_VkPhysicalDeviceProtectedMemoryFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES }); - vn_encode_VkPhysicalDeviceProtectedMemoryFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceProtectedMemoryFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->protectedMemory); -} - -static inline void -vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->protectedMemory */ -} - -static inline void -vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceProtectedMemoryFeatures_handle_self(VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->protectedMemory */ -} - -static inline void -vn_replace_VkPhysicalDeviceProtectedMemoryFeatures_handle(VkPhysicalDeviceProtectedMemoryFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - vn_replace_VkPhysicalDeviceProtectedMemoryFeatures_handle_self((VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->advancedBlendCoherentOperations); -} - -static inline void -vn_encode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->advancedBlendCoherentOperations); -} - -static inline void -vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->advancedBlendCoherentOperations */ -} - -static inline void -vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_handle_self(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->advancedBlendCoherentOperations */ -} - -static inline void -vn_replace_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_handle(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_handle_self((VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMultiDrawFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMultiDrawFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiDrawFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->multiDraw); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiDrawFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceMultiDrawFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMultiDrawFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->multiDraw); -} - -static inline void -vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->multiDraw */ -} - -static inline void -vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMultiDrawFeaturesEXT_handle_self(VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->multiDraw */ -} - -static inline void -vn_replace_VkPhysicalDeviceMultiDrawFeaturesEXT_handle(VkPhysicalDeviceMultiDrawFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMultiDrawFeaturesEXT_handle_self((VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceInlineUniformBlockFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceInlineUniformBlockFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceInlineUniformBlockFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->inlineUniformBlock); - vn_encode_VkBool32(enc, &val->descriptorBindingInlineUniformBlockUpdateAfterBind); -} - -static inline void -vn_encode_VkPhysicalDeviceInlineUniformBlockFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES }); - vn_encode_VkPhysicalDeviceInlineUniformBlockFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceInlineUniformBlockFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->inlineUniformBlock); - vn_decode_VkBool32(dec, &val->descriptorBindingInlineUniformBlockUpdateAfterBind); -} - -static inline void -vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->inlineUniformBlock */ - /* skip val->descriptorBindingInlineUniformBlockUpdateAfterBind */ -} - -static inline void -vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceInlineUniformBlockFeatures_handle_self(VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->inlineUniformBlock */ - /* skip val->descriptorBindingInlineUniformBlockUpdateAfterBind */ -} - -static inline void -vn_replace_VkPhysicalDeviceInlineUniformBlockFeatures_handle(VkPhysicalDeviceInlineUniformBlockFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - vn_replace_VkPhysicalDeviceInlineUniformBlockFeatures_handle_self((VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMaintenance4Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance4Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance4Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance4Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->maintenance4); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance4Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance4Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES }); - vn_encode_VkPhysicalDeviceMaintenance4Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance4Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance4Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance4Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance4Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->maintenance4); -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance4Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance4Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance4Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance4Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance4Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance4Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maintenance4 */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance4Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance4Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance4Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance4Features_handle_self(VkPhysicalDeviceMaintenance4Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maintenance4 */ -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance4Features_handle(VkPhysicalDeviceMaintenance4Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance4Features_handle_self((VkPhysicalDeviceMaintenance4Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMaintenance5Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance5Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance5Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance5Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->maintenance5); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance5Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance5Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES }); - vn_encode_VkPhysicalDeviceMaintenance5Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance5Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance5Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance5Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance5Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->maintenance5); -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance5Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance5Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance5Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance5Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance5Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance5Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maintenance5 */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance5Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance5Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance5Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance5Features_handle_self(VkPhysicalDeviceMaintenance5Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maintenance5 */ -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance5Features_handle(VkPhysicalDeviceMaintenance5Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance5Features_handle_self((VkPhysicalDeviceMaintenance5Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMaintenance6Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance6Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance6Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance6Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->maintenance6); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance6Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance6Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES }); - vn_encode_VkPhysicalDeviceMaintenance6Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance6Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance6Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance6Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance6Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->maintenance6); -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance6Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance6Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance6Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance6Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance6Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance6Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maintenance6 */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance6Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance6Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance6Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance6Features_handle_self(VkPhysicalDeviceMaintenance6Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maintenance6 */ -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance6Features_handle(VkPhysicalDeviceMaintenance6Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance6Features_handle_self((VkPhysicalDeviceMaintenance6Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMaintenance7FeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance7FeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance7FeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->maintenance7); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance7FeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceMaintenance7FeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance7FeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->maintenance7); -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maintenance7 */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance7FeaturesKHR_handle_self(VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maintenance7 */ -} - -static inline void -vn_replace_VkPhysicalDeviceMaintenance7FeaturesKHR_handle(VkPhysicalDeviceMaintenance7FeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - vn_replace_VkPhysicalDeviceMaintenance7FeaturesKHR_handle_self((VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderDrawParametersFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderDrawParametersFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderDrawParametersFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderDrawParameters); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderDrawParametersFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES }); - vn_encode_VkPhysicalDeviceShaderDrawParametersFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderDrawParametersFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderDrawParameters); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderDrawParameters */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderDrawParametersFeatures_handle_self(VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderDrawParameters */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderDrawParametersFeatures_handle(VkPhysicalDeviceShaderDrawParametersFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - vn_replace_VkPhysicalDeviceShaderDrawParametersFeatures_handle_self((VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderFloat16Int8Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderFloat16Int8Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFloat16Int8Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderFloat16); - vn_encode_VkBool32(enc, &val->shaderInt8); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFloat16Int8Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES }); - vn_encode_VkPhysicalDeviceShaderFloat16Int8Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderFloat16Int8Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderFloat16); - vn_decode_VkBool32(dec, &val->shaderInt8); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderFloat16 */ - /* skip val->shaderInt8 */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFloat16Int8Features_handle_self(VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderFloat16 */ - /* skip val->shaderInt8 */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFloat16Int8Features_handle(VkPhysicalDeviceShaderFloat16Int8Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - vn_replace_VkPhysicalDeviceShaderFloat16Int8Features_handle_self((VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceHostQueryResetFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceHostQueryResetFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceHostQueryResetFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceHostQueryResetFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->hostQueryReset); -} - -static inline void -vn_encode_VkPhysicalDeviceHostQueryResetFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceHostQueryResetFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES }); - vn_encode_VkPhysicalDeviceHostQueryResetFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceHostQueryResetFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceHostQueryResetFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostQueryResetFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->hostQueryReset); -} - -static inline void -vn_decode_VkPhysicalDeviceHostQueryResetFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostQueryResetFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceHostQueryResetFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceHostQueryResetFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostQueryResetFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->hostQueryReset */ -} - -static inline void -vn_decode_VkPhysicalDeviceHostQueryResetFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostQueryResetFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceHostQueryResetFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceHostQueryResetFeatures_handle_self(VkPhysicalDeviceHostQueryResetFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->hostQueryReset */ -} - -static inline void -vn_replace_VkPhysicalDeviceHostQueryResetFeatures_handle(VkPhysicalDeviceHostQueryResetFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - vn_replace_VkPhysicalDeviceHostQueryResetFeatures_handle_self((VkPhysicalDeviceHostQueryResetFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceGlobalPriorityQueryFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceGlobalPriorityQueryFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->globalPriorityQuery); -} - -static inline void -vn_encode_VkPhysicalDeviceGlobalPriorityQueryFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES }); - vn_encode_VkPhysicalDeviceGlobalPriorityQueryFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->globalPriorityQuery); -} - -static inline void -vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->globalPriorityQuery */ -} - -static inline void -vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceGlobalPriorityQueryFeatures_handle_self(VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->globalPriorityQuery */ -} - -static inline void -vn_replace_VkPhysicalDeviceGlobalPriorityQueryFeatures_handle(VkPhysicalDeviceGlobalPriorityQueryFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - vn_replace_VkPhysicalDeviceGlobalPriorityQueryFeatures_handle_self((VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDescriptorIndexingFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceDescriptorIndexingFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorIndexingFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderInputAttachmentArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderUniformTexelBufferArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageTexelBufferArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderUniformBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderSampledImageArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageImageArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderInputAttachmentArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderUniformTexelBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageTexelBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->descriptorBindingUniformBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingSampledImageUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingStorageImageUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingStorageBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingUniformTexelBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingStorageTexelBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingUpdateUnusedWhilePending); - vn_encode_VkBool32(enc, &val->descriptorBindingPartiallyBound); - vn_encode_VkBool32(enc, &val->descriptorBindingVariableDescriptorCount); - vn_encode_VkBool32(enc, &val->runtimeDescriptorArray); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorIndexingFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES }); - vn_encode_VkPhysicalDeviceDescriptorIndexingFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDescriptorIndexingFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderInputAttachmentArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderUniformTexelBufferArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageTexelBufferArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderUniformBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderSampledImageArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageImageArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderInputAttachmentArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderUniformTexelBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageTexelBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->descriptorBindingUniformBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingSampledImageUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingStorageImageUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingStorageBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingUniformTexelBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingStorageTexelBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingUpdateUnusedWhilePending); - vn_decode_VkBool32(dec, &val->descriptorBindingPartiallyBound); - vn_decode_VkBool32(dec, &val->descriptorBindingVariableDescriptorCount); - vn_decode_VkBool32(dec, &val->runtimeDescriptorArray); -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderInputAttachmentArrayDynamicIndexing */ - /* skip val->shaderUniformTexelBufferArrayDynamicIndexing */ - /* skip val->shaderStorageTexelBufferArrayDynamicIndexing */ - /* skip val->shaderUniformBufferArrayNonUniformIndexing */ - /* skip val->shaderSampledImageArrayNonUniformIndexing */ - /* skip val->shaderStorageBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageImageArrayNonUniformIndexing */ - /* skip val->shaderInputAttachmentArrayNonUniformIndexing */ - /* skip val->shaderUniformTexelBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageTexelBufferArrayNonUniformIndexing */ - /* skip val->descriptorBindingUniformBufferUpdateAfterBind */ - /* skip val->descriptorBindingSampledImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageBufferUpdateAfterBind */ - /* skip val->descriptorBindingUniformTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingStorageTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingUpdateUnusedWhilePending */ - /* skip val->descriptorBindingPartiallyBound */ - /* skip val->descriptorBindingVariableDescriptorCount */ - /* skip val->runtimeDescriptorArray */ -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDescriptorIndexingFeatures_handle_self(VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderInputAttachmentArrayDynamicIndexing */ - /* skip val->shaderUniformTexelBufferArrayDynamicIndexing */ - /* skip val->shaderStorageTexelBufferArrayDynamicIndexing */ - /* skip val->shaderUniformBufferArrayNonUniformIndexing */ - /* skip val->shaderSampledImageArrayNonUniformIndexing */ - /* skip val->shaderStorageBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageImageArrayNonUniformIndexing */ - /* skip val->shaderInputAttachmentArrayNonUniformIndexing */ - /* skip val->shaderUniformTexelBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageTexelBufferArrayNonUniformIndexing */ - /* skip val->descriptorBindingUniformBufferUpdateAfterBind */ - /* skip val->descriptorBindingSampledImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageBufferUpdateAfterBind */ - /* skip val->descriptorBindingUniformTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingStorageTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingUpdateUnusedWhilePending */ - /* skip val->descriptorBindingPartiallyBound */ - /* skip val->descriptorBindingVariableDescriptorCount */ - /* skip val->runtimeDescriptorArray */ -} - -static inline void -vn_replace_VkPhysicalDeviceDescriptorIndexingFeatures_handle(VkPhysicalDeviceDescriptorIndexingFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - vn_replace_VkPhysicalDeviceDescriptorIndexingFeatures_handle_self((VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceTimelineSemaphoreFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceTimelineSemaphoreFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTimelineSemaphoreFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->timelineSemaphore); -} - -static inline void -vn_encode_VkPhysicalDeviceTimelineSemaphoreFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES }); - vn_encode_VkPhysicalDeviceTimelineSemaphoreFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTimelineSemaphoreFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->timelineSemaphore); -} - -static inline void -vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->timelineSemaphore */ -} - -static inline void -vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceTimelineSemaphoreFeatures_handle_self(VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->timelineSemaphore */ -} - -static inline void -vn_replace_VkPhysicalDeviceTimelineSemaphoreFeatures_handle(VkPhysicalDeviceTimelineSemaphoreFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - vn_replace_VkPhysicalDeviceTimelineSemaphoreFeatures_handle_self((VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevice8BitStorageFeatures chain */ - -static inline void -vn_encode_VkPhysicalDevice8BitStorageFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevice8BitStorageFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDevice8BitStorageFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->storageBuffer8BitAccess); - vn_encode_VkBool32(enc, &val->uniformAndStorageBuffer8BitAccess); - vn_encode_VkBool32(enc, &val->storagePushConstant8); -} - -static inline void -vn_encode_VkPhysicalDevice8BitStorageFeatures(struct vn_cs_encoder *enc, const VkPhysicalDevice8BitStorageFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES }); - vn_encode_VkPhysicalDevice8BitStorageFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevice8BitStorageFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevice8BitStorageFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevice8BitStorageFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevice8BitStorageFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->storageBuffer8BitAccess); - vn_decode_VkBool32(dec, &val->uniformAndStorageBuffer8BitAccess); - vn_decode_VkBool32(dec, &val->storagePushConstant8); -} - -static inline void -vn_decode_VkPhysicalDevice8BitStorageFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDevice8BitStorageFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevice8BitStorageFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDevice8BitStorageFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevice8BitStorageFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevice8BitStorageFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevice8BitStorageFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->storageBuffer8BitAccess */ - /* skip val->uniformAndStorageBuffer8BitAccess */ - /* skip val->storagePushConstant8 */ -} - -static inline void -vn_decode_VkPhysicalDevice8BitStorageFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevice8BitStorageFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevice8BitStorageFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevice8BitStorageFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevice8BitStorageFeatures_handle_self(VkPhysicalDevice8BitStorageFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->storageBuffer8BitAccess */ - /* skip val->uniformAndStorageBuffer8BitAccess */ - /* skip val->storagePushConstant8 */ -} - -static inline void -vn_replace_VkPhysicalDevice8BitStorageFeatures_handle(VkPhysicalDevice8BitStorageFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - vn_replace_VkPhysicalDevice8BitStorageFeatures_handle_self((VkPhysicalDevice8BitStorageFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceConditionalRenderingFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->conditionalRendering); - vn_encode_VkBool32(enc, &val->inheritedConditionalRendering); -} - -static inline void -vn_encode_VkPhysicalDeviceConditionalRenderingFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->conditionalRendering); - vn_decode_VkBool32(dec, &val->inheritedConditionalRendering); -} - -static inline void -vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->conditionalRendering */ - /* skip val->inheritedConditionalRendering */ -} - -static inline void -vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceConditionalRenderingFeaturesEXT_handle_self(VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->conditionalRendering */ - /* skip val->inheritedConditionalRendering */ -} - -static inline void -vn_replace_VkPhysicalDeviceConditionalRenderingFeaturesEXT_handle(VkPhysicalDeviceConditionalRenderingFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - vn_replace_VkPhysicalDeviceConditionalRenderingFeaturesEXT_handle_self((VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVulkanMemoryModelFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkanMemoryModelFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkanMemoryModelFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->vulkanMemoryModel); - vn_encode_VkBool32(enc, &val->vulkanMemoryModelDeviceScope); - vn_encode_VkBool32(enc, &val->vulkanMemoryModelAvailabilityVisibilityChains); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkanMemoryModelFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES }); - vn_encode_VkPhysicalDeviceVulkanMemoryModelFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkanMemoryModelFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->vulkanMemoryModel); - vn_decode_VkBool32(dec, &val->vulkanMemoryModelDeviceScope); - vn_decode_VkBool32(dec, &val->vulkanMemoryModelAvailabilityVisibilityChains); -} - -static inline void -vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->vulkanMemoryModel */ - /* skip val->vulkanMemoryModelDeviceScope */ - /* skip val->vulkanMemoryModelAvailabilityVisibilityChains */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVulkanMemoryModelFeatures_handle_self(VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->vulkanMemoryModel */ - /* skip val->vulkanMemoryModelDeviceScope */ - /* skip val->vulkanMemoryModelAvailabilityVisibilityChains */ -} - -static inline void -vn_replace_VkPhysicalDeviceVulkanMemoryModelFeatures_handle(VkPhysicalDeviceVulkanMemoryModelFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - vn_replace_VkPhysicalDeviceVulkanMemoryModelFeatures_handle_self((VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderAtomicInt64Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicInt64Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicInt64Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderBufferInt64Atomics); - vn_encode_VkBool32(enc, &val->shaderSharedInt64Atomics); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicInt64Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES }); - vn_encode_VkPhysicalDeviceShaderAtomicInt64Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderAtomicInt64Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderBufferInt64Atomics); - vn_decode_VkBool32(dec, &val->shaderSharedInt64Atomics); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderBufferInt64Atomics */ - /* skip val->shaderSharedInt64Atomics */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderAtomicInt64Features_handle_self(VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderBufferInt64Atomics */ - /* skip val->shaderSharedInt64Atomics */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderAtomicInt64Features_handle(VkPhysicalDeviceShaderAtomicInt64Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - vn_replace_VkPhysicalDeviceShaderAtomicInt64Features_handle_self((VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderBufferFloat32Atomics); - vn_encode_VkBool32(enc, &val->shaderBufferFloat32AtomicAdd); - vn_encode_VkBool32(enc, &val->shaderBufferFloat64Atomics); - vn_encode_VkBool32(enc, &val->shaderBufferFloat64AtomicAdd); - vn_encode_VkBool32(enc, &val->shaderSharedFloat32Atomics); - vn_encode_VkBool32(enc, &val->shaderSharedFloat32AtomicAdd); - vn_encode_VkBool32(enc, &val->shaderSharedFloat64Atomics); - vn_encode_VkBool32(enc, &val->shaderSharedFloat64AtomicAdd); - vn_encode_VkBool32(enc, &val->shaderImageFloat32Atomics); - vn_encode_VkBool32(enc, &val->shaderImageFloat32AtomicAdd); - vn_encode_VkBool32(enc, &val->sparseImageFloat32Atomics); - vn_encode_VkBool32(enc, &val->sparseImageFloat32AtomicAdd); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderBufferFloat32Atomics); - vn_decode_VkBool32(dec, &val->shaderBufferFloat32AtomicAdd); - vn_decode_VkBool32(dec, &val->shaderBufferFloat64Atomics); - vn_decode_VkBool32(dec, &val->shaderBufferFloat64AtomicAdd); - vn_decode_VkBool32(dec, &val->shaderSharedFloat32Atomics); - vn_decode_VkBool32(dec, &val->shaderSharedFloat32AtomicAdd); - vn_decode_VkBool32(dec, &val->shaderSharedFloat64Atomics); - vn_decode_VkBool32(dec, &val->shaderSharedFloat64AtomicAdd); - vn_decode_VkBool32(dec, &val->shaderImageFloat32Atomics); - vn_decode_VkBool32(dec, &val->shaderImageFloat32AtomicAdd); - vn_decode_VkBool32(dec, &val->sparseImageFloat32Atomics); - vn_decode_VkBool32(dec, &val->sparseImageFloat32AtomicAdd); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderBufferFloat32Atomics */ - /* skip val->shaderBufferFloat32AtomicAdd */ - /* skip val->shaderBufferFloat64Atomics */ - /* skip val->shaderBufferFloat64AtomicAdd */ - /* skip val->shaderSharedFloat32Atomics */ - /* skip val->shaderSharedFloat32AtomicAdd */ - /* skip val->shaderSharedFloat64Atomics */ - /* skip val->shaderSharedFloat64AtomicAdd */ - /* skip val->shaderImageFloat32Atomics */ - /* skip val->shaderImageFloat32AtomicAdd */ - /* skip val->sparseImageFloat32Atomics */ - /* skip val->sparseImageFloat32AtomicAdd */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_handle_self(VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderBufferFloat32Atomics */ - /* skip val->shaderBufferFloat32AtomicAdd */ - /* skip val->shaderBufferFloat64Atomics */ - /* skip val->shaderBufferFloat64AtomicAdd */ - /* skip val->shaderSharedFloat32Atomics */ - /* skip val->shaderSharedFloat32AtomicAdd */ - /* skip val->shaderSharedFloat64Atomics */ - /* skip val->shaderSharedFloat64AtomicAdd */ - /* skip val->shaderImageFloat32Atomics */ - /* skip val->shaderImageFloat32AtomicAdd */ - /* skip val->sparseImageFloat32Atomics */ - /* skip val->sparseImageFloat32AtomicAdd */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_handle(VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_handle_self((VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderBufferFloat16Atomics); - vn_encode_VkBool32(enc, &val->shaderBufferFloat16AtomicAdd); - vn_encode_VkBool32(enc, &val->shaderBufferFloat16AtomicMinMax); - vn_encode_VkBool32(enc, &val->shaderBufferFloat32AtomicMinMax); - vn_encode_VkBool32(enc, &val->shaderBufferFloat64AtomicMinMax); - vn_encode_VkBool32(enc, &val->shaderSharedFloat16Atomics); - vn_encode_VkBool32(enc, &val->shaderSharedFloat16AtomicAdd); - vn_encode_VkBool32(enc, &val->shaderSharedFloat16AtomicMinMax); - vn_encode_VkBool32(enc, &val->shaderSharedFloat32AtomicMinMax); - vn_encode_VkBool32(enc, &val->shaderSharedFloat64AtomicMinMax); - vn_encode_VkBool32(enc, &val->shaderImageFloat32AtomicMinMax); - vn_encode_VkBool32(enc, &val->sparseImageFloat32AtomicMinMax); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderBufferFloat16Atomics); - vn_decode_VkBool32(dec, &val->shaderBufferFloat16AtomicAdd); - vn_decode_VkBool32(dec, &val->shaderBufferFloat16AtomicMinMax); - vn_decode_VkBool32(dec, &val->shaderBufferFloat32AtomicMinMax); - vn_decode_VkBool32(dec, &val->shaderBufferFloat64AtomicMinMax); - vn_decode_VkBool32(dec, &val->shaderSharedFloat16Atomics); - vn_decode_VkBool32(dec, &val->shaderSharedFloat16AtomicAdd); - vn_decode_VkBool32(dec, &val->shaderSharedFloat16AtomicMinMax); - vn_decode_VkBool32(dec, &val->shaderSharedFloat32AtomicMinMax); - vn_decode_VkBool32(dec, &val->shaderSharedFloat64AtomicMinMax); - vn_decode_VkBool32(dec, &val->shaderImageFloat32AtomicMinMax); - vn_decode_VkBool32(dec, &val->sparseImageFloat32AtomicMinMax); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderBufferFloat16Atomics */ - /* skip val->shaderBufferFloat16AtomicAdd */ - /* skip val->shaderBufferFloat16AtomicMinMax */ - /* skip val->shaderBufferFloat32AtomicMinMax */ - /* skip val->shaderBufferFloat64AtomicMinMax */ - /* skip val->shaderSharedFloat16Atomics */ - /* skip val->shaderSharedFloat16AtomicAdd */ - /* skip val->shaderSharedFloat16AtomicMinMax */ - /* skip val->shaderSharedFloat32AtomicMinMax */ - /* skip val->shaderSharedFloat64AtomicMinMax */ - /* skip val->shaderImageFloat32AtomicMinMax */ - /* skip val->sparseImageFloat32AtomicMinMax */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_handle_self(VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderBufferFloat16Atomics */ - /* skip val->shaderBufferFloat16AtomicAdd */ - /* skip val->shaderBufferFloat16AtomicMinMax */ - /* skip val->shaderBufferFloat32AtomicMinMax */ - /* skip val->shaderBufferFloat64AtomicMinMax */ - /* skip val->shaderSharedFloat16Atomics */ - /* skip val->shaderSharedFloat16AtomicAdd */ - /* skip val->shaderSharedFloat16AtomicMinMax */ - /* skip val->shaderSharedFloat32AtomicMinMax */ - /* skip val->shaderSharedFloat64AtomicMinMax */ - /* skip val->shaderImageFloat32AtomicMinMax */ - /* skip val->sparseImageFloat32AtomicMinMax */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_handle(VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_handle_self((VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVertexAttributeDivisorFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->vertexAttributeInstanceRateDivisor); - vn_encode_VkBool32(enc, &val->vertexAttributeInstanceRateZeroDivisor); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES }); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->vertexAttributeInstanceRateDivisor); - vn_decode_VkBool32(dec, &val->vertexAttributeInstanceRateZeroDivisor); -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->vertexAttributeInstanceRateDivisor */ - /* skip val->vertexAttributeInstanceRateZeroDivisor */ -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVertexAttributeDivisorFeatures_handle_self(VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->vertexAttributeInstanceRateDivisor */ - /* skip val->vertexAttributeInstanceRateZeroDivisor */ -} - -static inline void -vn_replace_VkPhysicalDeviceVertexAttributeDivisorFeatures_handle(VkPhysicalDeviceVertexAttributeDivisorFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - vn_replace_VkPhysicalDeviceVertexAttributeDivisorFeatures_handle_self((VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceTransformFeedbackFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->transformFeedback); - vn_encode_VkBool32(enc, &val->geometryStreams); -} - -static inline void -vn_encode_VkPhysicalDeviceTransformFeedbackFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->transformFeedback); - vn_decode_VkBool32(dec, &val->geometryStreams); -} - -static inline void -vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->transformFeedback */ - /* skip val->geometryStreams */ -} - -static inline void -vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceTransformFeedbackFeaturesEXT_handle_self(VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->transformFeedback */ - /* skip val->geometryStreams */ -} - -static inline void -vn_replace_VkPhysicalDeviceTransformFeedbackFeaturesEXT_handle(VkPhysicalDeviceTransformFeedbackFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - vn_replace_VkPhysicalDeviceTransformFeedbackFeaturesEXT_handle_self((VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->computeDerivativeGroupQuads); - vn_encode_VkBool32(enc, &val->computeDerivativeGroupLinear); -} - -static inline void -vn_encode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->computeDerivativeGroupQuads); - vn_decode_VkBool32(dec, &val->computeDerivativeGroupLinear); -} - -static inline void -vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->computeDerivativeGroupQuads */ - /* skip val->computeDerivativeGroupLinear */ -} - -static inline void -vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_handle_self(VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->computeDerivativeGroupQuads */ - /* skip val->computeDerivativeGroupLinear */ -} - -static inline void -vn_replace_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_handle(VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - vn_replace_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_handle_self((VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->fragmentShaderBarycentric); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->fragmentShaderBarycentric); -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->fragmentShaderBarycentric */ -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_handle_self(VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->fragmentShaderBarycentric */ -} - -static inline void -vn_replace_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_handle(VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - vn_replace_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_handle_self((VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMeshShaderFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMeshShaderFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMeshShaderFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->taskShader); - vn_encode_VkBool32(enc, &val->meshShader); - vn_encode_VkBool32(enc, &val->multiviewMeshShader); - vn_encode_VkBool32(enc, &val->primitiveFragmentShadingRateMeshShader); - vn_encode_VkBool32(enc, &val->meshShaderQueries); -} - -static inline void -vn_encode_VkPhysicalDeviceMeshShaderFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceMeshShaderFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMeshShaderFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->taskShader); - vn_decode_VkBool32(dec, &val->meshShader); - vn_decode_VkBool32(dec, &val->multiviewMeshShader); - vn_decode_VkBool32(dec, &val->primitiveFragmentShadingRateMeshShader); - vn_decode_VkBool32(dec, &val->meshShaderQueries); -} - -static inline void -vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->taskShader */ - /* skip val->meshShader */ - /* skip val->multiviewMeshShader */ - /* skip val->primitiveFragmentShadingRateMeshShader */ - /* skip val->meshShaderQueries */ -} - -static inline void -vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMeshShaderFeaturesEXT_handle_self(VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->taskShader */ - /* skip val->meshShader */ - /* skip val->multiviewMeshShader */ - /* skip val->primitiveFragmentShadingRateMeshShader */ - /* skip val->meshShaderQueries */ -} - -static inline void -vn_replace_VkPhysicalDeviceMeshShaderFeaturesEXT_handle(VkPhysicalDeviceMeshShaderFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMeshShaderFeaturesEXT_handle_self((VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceAccelerationStructureFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->accelerationStructure); - vn_encode_VkBool32(enc, &val->accelerationStructureCaptureReplay); - vn_encode_VkBool32(enc, &val->accelerationStructureIndirectBuild); - vn_encode_VkBool32(enc, &val->accelerationStructureHostCommands); - vn_encode_VkBool32(enc, &val->descriptorBindingAccelerationStructureUpdateAfterBind); -} - -static inline void -vn_encode_VkPhysicalDeviceAccelerationStructureFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->accelerationStructure); - vn_decode_VkBool32(dec, &val->accelerationStructureCaptureReplay); - vn_decode_VkBool32(dec, &val->accelerationStructureIndirectBuild); - vn_decode_VkBool32(dec, &val->accelerationStructureHostCommands); - vn_decode_VkBool32(dec, &val->descriptorBindingAccelerationStructureUpdateAfterBind); -} - -static inline void -vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->accelerationStructure */ - /* skip val->accelerationStructureCaptureReplay */ - /* skip val->accelerationStructureIndirectBuild */ - /* skip val->accelerationStructureHostCommands */ - /* skip val->descriptorBindingAccelerationStructureUpdateAfterBind */ -} - -static inline void -vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceAccelerationStructureFeaturesKHR_handle_self(VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->accelerationStructure */ - /* skip val->accelerationStructureCaptureReplay */ - /* skip val->accelerationStructureIndirectBuild */ - /* skip val->accelerationStructureHostCommands */ - /* skip val->descriptorBindingAccelerationStructureUpdateAfterBind */ -} - -static inline void -vn_replace_VkPhysicalDeviceAccelerationStructureFeaturesKHR_handle(VkPhysicalDeviceAccelerationStructureFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceAccelerationStructureFeaturesKHR_handle_self((VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->rayTracingPipeline); - vn_encode_VkBool32(enc, &val->rayTracingPipelineShaderGroupHandleCaptureReplay); - vn_encode_VkBool32(enc, &val->rayTracingPipelineShaderGroupHandleCaptureReplayMixed); - vn_encode_VkBool32(enc, &val->rayTracingPipelineTraceRaysIndirect); - vn_encode_VkBool32(enc, &val->rayTraversalPrimitiveCulling); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->rayTracingPipeline); - vn_decode_VkBool32(dec, &val->rayTracingPipelineShaderGroupHandleCaptureReplay); - vn_decode_VkBool32(dec, &val->rayTracingPipelineShaderGroupHandleCaptureReplayMixed); - vn_decode_VkBool32(dec, &val->rayTracingPipelineTraceRaysIndirect); - vn_decode_VkBool32(dec, &val->rayTraversalPrimitiveCulling); -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->rayTracingPipeline */ - /* skip val->rayTracingPipelineShaderGroupHandleCaptureReplay */ - /* skip val->rayTracingPipelineShaderGroupHandleCaptureReplayMixed */ - /* skip val->rayTracingPipelineTraceRaysIndirect */ - /* skip val->rayTraversalPrimitiveCulling */ -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_handle_self(VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->rayTracingPipeline */ - /* skip val->rayTracingPipelineShaderGroupHandleCaptureReplay */ - /* skip val->rayTracingPipelineShaderGroupHandleCaptureReplayMixed */ - /* skip val->rayTracingPipelineTraceRaysIndirect */ - /* skip val->rayTraversalPrimitiveCulling */ -} - -static inline void -vn_replace_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_handle(VkPhysicalDeviceRayTracingPipelineFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_handle_self((VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceRayQueryFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRayQueryFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRayQueryFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->rayQuery); -} - -static inline void -vn_encode_VkPhysicalDeviceRayQueryFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceRayQueryFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRayQueryFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->rayQuery); -} - -static inline void -vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->rayQuery */ -} - -static inline void -vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceRayQueryFeaturesKHR_handle_self(VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->rayQuery */ -} - -static inline void -vn_replace_VkPhysicalDeviceRayQueryFeaturesKHR_handle(VkPhysicalDeviceRayQueryFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayQueryFeaturesKHR_handle_self((VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->rayTracingMaintenance1); - vn_encode_VkBool32(enc, &val->rayTracingPipelineTraceRaysIndirect2); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->rayTracingMaintenance1); - vn_decode_VkBool32(dec, &val->rayTracingPipelineTraceRaysIndirect2); -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->rayTracingMaintenance1 */ - /* skip val->rayTracingPipelineTraceRaysIndirect2 */ -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_handle_self(VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->rayTracingMaintenance1 */ - /* skip val->rayTracingPipelineTraceRaysIndirect2 */ -} - -static inline void -vn_replace_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_handle(VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_handle_self((VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceScalarBlockLayoutFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceScalarBlockLayoutFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceScalarBlockLayoutFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->scalarBlockLayout); -} - -static inline void -vn_encode_VkPhysicalDeviceScalarBlockLayoutFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES }); - vn_encode_VkPhysicalDeviceScalarBlockLayoutFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceScalarBlockLayoutFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->scalarBlockLayout); -} - -static inline void -vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->scalarBlockLayout */ -} - -static inline void -vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceScalarBlockLayoutFeatures_handle_self(VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->scalarBlockLayout */ -} - -static inline void -vn_replace_VkPhysicalDeviceScalarBlockLayoutFeatures_handle(VkPhysicalDeviceScalarBlockLayoutFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - vn_replace_VkPhysicalDeviceScalarBlockLayoutFeatures_handle_self((VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceUniformBufferStandardLayoutFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->uniformBufferStandardLayout); -} - -static inline void -vn_encode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES }); - vn_encode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->uniformBufferStandardLayout); -} - -static inline void -vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->uniformBufferStandardLayout */ -} - -static inline void -vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_handle_self(VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->uniformBufferStandardLayout */ -} - -static inline void -vn_replace_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_handle(VkPhysicalDeviceUniformBufferStandardLayoutFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - vn_replace_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_handle_self((VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDepthClipEnableFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->depthClipEnable); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClipEnableFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->depthClipEnable); -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->depthClipEnable */ -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClipEnableFeaturesEXT_handle_self(VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthClipEnable */ -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClipEnableFeaturesEXT_handle(VkPhysicalDeviceDepthClipEnableFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClipEnableFeaturesEXT_handle_self((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceBufferDeviceAddressFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceBufferDeviceAddressFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceBufferDeviceAddressFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->bufferDeviceAddress); - vn_encode_VkBool32(enc, &val->bufferDeviceAddressCaptureReplay); - vn_encode_VkBool32(enc, &val->bufferDeviceAddressMultiDevice); -} - -static inline void -vn_encode_VkPhysicalDeviceBufferDeviceAddressFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES }); - vn_encode_VkPhysicalDeviceBufferDeviceAddressFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceBufferDeviceAddressFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->bufferDeviceAddress); - vn_decode_VkBool32(dec, &val->bufferDeviceAddressCaptureReplay); - vn_decode_VkBool32(dec, &val->bufferDeviceAddressMultiDevice); -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->bufferDeviceAddress */ - /* skip val->bufferDeviceAddressCaptureReplay */ - /* skip val->bufferDeviceAddressMultiDevice */ -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceBufferDeviceAddressFeatures_handle_self(VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->bufferDeviceAddress */ - /* skip val->bufferDeviceAddressCaptureReplay */ - /* skip val->bufferDeviceAddressMultiDevice */ -} - -static inline void -vn_replace_VkPhysicalDeviceBufferDeviceAddressFeatures_handle(VkPhysicalDeviceBufferDeviceAddressFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - vn_replace_VkPhysicalDeviceBufferDeviceAddressFeatures_handle_self((VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->bufferDeviceAddress); - vn_encode_VkBool32(enc, &val->bufferDeviceAddressCaptureReplay); - vn_encode_VkBool32(enc, &val->bufferDeviceAddressMultiDevice); -} - -static inline void -vn_encode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->bufferDeviceAddress); - vn_decode_VkBool32(dec, &val->bufferDeviceAddressCaptureReplay); - vn_decode_VkBool32(dec, &val->bufferDeviceAddressMultiDevice); -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->bufferDeviceAddress */ - /* skip val->bufferDeviceAddressCaptureReplay */ - /* skip val->bufferDeviceAddressMultiDevice */ -} - -static inline void -vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_handle_self(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->bufferDeviceAddress */ - /* skip val->bufferDeviceAddressCaptureReplay */ - /* skip val->bufferDeviceAddressMultiDevice */ -} - -static inline void -vn_replace_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_handle(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_handle_self((VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImagelessFramebufferFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceImagelessFramebufferFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceImagelessFramebufferFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->imagelessFramebuffer); -} - -static inline void -vn_encode_VkPhysicalDeviceImagelessFramebufferFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES }); - vn_encode_VkPhysicalDeviceImagelessFramebufferFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceImagelessFramebufferFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->imagelessFramebuffer); -} - -static inline void -vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->imagelessFramebuffer */ -} - -static inline void -vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImagelessFramebufferFeatures_handle_self(VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->imagelessFramebuffer */ -} - -static inline void -vn_replace_VkPhysicalDeviceImagelessFramebufferFeatures_handle(VkPhysicalDeviceImagelessFramebufferFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - vn_replace_VkPhysicalDeviceImagelessFramebufferFeatures_handle_self((VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceTextureCompressionASTCHDRFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->textureCompressionASTC_HDR); -} - -static inline void -vn_encode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES }); - vn_encode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->textureCompressionASTC_HDR); -} - -static inline void -vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->textureCompressionASTC_HDR */ -} - -static inline void -vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_handle_self(VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->textureCompressionASTC_HDR */ -} - -static inline void -vn_replace_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_handle(VkPhysicalDeviceTextureCompressionASTCHDRFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - vn_replace_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_handle_self((VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->ycbcrImageArrays); -} - -static inline void -vn_encode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->ycbcrImageArrays); -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->ycbcrImageArrays */ -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_handle_self(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->ycbcrImageArrays */ -} - -static inline void -vn_replace_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_handle(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_handle_self((VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderClockFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderClockFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderClockFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderSubgroupClock); - vn_encode_VkBool32(enc, &val->shaderDeviceClock); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderClockFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderClockFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderClockFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderSubgroupClock); - vn_decode_VkBool32(dec, &val->shaderDeviceClock); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderSubgroupClock */ - /* skip val->shaderDeviceClock */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderClockFeaturesKHR_handle_self(VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderSubgroupClock */ - /* skip val->shaderDeviceClock */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderClockFeaturesKHR_handle(VkPhysicalDeviceShaderClockFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderClockFeaturesKHR_handle_self((VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceIndexTypeUint8Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceIndexTypeUint8Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceIndexTypeUint8Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceIndexTypeUint8Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->indexTypeUint8); -} - -static inline void -vn_encode_VkPhysicalDeviceIndexTypeUint8Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceIndexTypeUint8Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES }); - vn_encode_VkPhysicalDeviceIndexTypeUint8Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceIndexTypeUint8Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceIndexTypeUint8Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceIndexTypeUint8Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->indexTypeUint8); -} - -static inline void -vn_decode_VkPhysicalDeviceIndexTypeUint8Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceIndexTypeUint8Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceIndexTypeUint8Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceIndexTypeUint8Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceIndexTypeUint8Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->indexTypeUint8 */ -} - -static inline void -vn_decode_VkPhysicalDeviceIndexTypeUint8Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceIndexTypeUint8Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceIndexTypeUint8Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceIndexTypeUint8Features_handle_self(VkPhysicalDeviceIndexTypeUint8Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->indexTypeUint8 */ -} - -static inline void -vn_replace_VkPhysicalDeviceIndexTypeUint8Features_handle(VkPhysicalDeviceIndexTypeUint8Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - vn_replace_VkPhysicalDeviceIndexTypeUint8Features_handle_self((VkPhysicalDeviceIndexTypeUint8Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->fragmentShaderSampleInterlock); - vn_encode_VkBool32(enc, &val->fragmentShaderPixelInterlock); - vn_encode_VkBool32(enc, &val->fragmentShaderShadingRateInterlock); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->fragmentShaderSampleInterlock); - vn_decode_VkBool32(dec, &val->fragmentShaderPixelInterlock); - vn_decode_VkBool32(dec, &val->fragmentShaderShadingRateInterlock); -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->fragmentShaderSampleInterlock */ - /* skip val->fragmentShaderPixelInterlock */ - /* skip val->fragmentShaderShadingRateInterlock */ -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_handle_self(VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->fragmentShaderSampleInterlock */ - /* skip val->fragmentShaderPixelInterlock */ - /* skip val->fragmentShaderShadingRateInterlock */ -} - -static inline void -vn_replace_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_handle(VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - vn_replace_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_handle_self((VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->separateDepthStencilLayouts); -} - -static inline void -vn_encode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES }); - vn_encode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->separateDepthStencilLayouts); -} - -static inline void -vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->separateDepthStencilLayouts */ -} - -static inline void -vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_handle_self(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->separateDepthStencilLayouts */ -} - -static inline void -vn_replace_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_handle(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - vn_replace_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_handle_self((VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->primitiveTopologyListRestart); - vn_encode_VkBool32(enc, &val->primitiveTopologyPatchListRestart); -} - -static inline void -vn_encode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT }); - vn_encode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->primitiveTopologyListRestart); - vn_decode_VkBool32(dec, &val->primitiveTopologyPatchListRestart); -} - -static inline void -vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->primitiveTopologyListRestart */ - /* skip val->primitiveTopologyPatchListRestart */ -} - -static inline void -vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_handle_self(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->primitiveTopologyListRestart */ - /* skip val->primitiveTopologyPatchListRestart */ -} - -static inline void -vn_replace_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_handle(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - vn_replace_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_handle_self((VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderDemoteToHelperInvocation); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES }); - vn_encode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderDemoteToHelperInvocation); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderDemoteToHelperInvocation */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_handle_self(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderDemoteToHelperInvocation */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_handle(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - vn_replace_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_handle_self((VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->texelBufferAlignment); -} - -static inline void -vn_encode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->texelBufferAlignment); -} - -static inline void -vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->texelBufferAlignment */ -} - -static inline void -vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_handle_self(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->texelBufferAlignment */ -} - -static inline void -vn_replace_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_handle(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_handle_self((VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceSubgroupSizeControlFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceSubgroupSizeControlFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSubgroupSizeControlFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->subgroupSizeControl); - vn_encode_VkBool32(enc, &val->computeFullSubgroups); -} - -static inline void -vn_encode_VkPhysicalDeviceSubgroupSizeControlFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES }); - vn_encode_VkPhysicalDeviceSubgroupSizeControlFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSubgroupSizeControlFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->subgroupSizeControl); - vn_decode_VkBool32(dec, &val->computeFullSubgroups); -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->subgroupSizeControl */ - /* skip val->computeFullSubgroups */ -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceSubgroupSizeControlFeatures_handle_self(VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->subgroupSizeControl */ - /* skip val->computeFullSubgroups */ -} - -static inline void -vn_replace_VkPhysicalDeviceSubgroupSizeControlFeatures_handle(VkPhysicalDeviceSubgroupSizeControlFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - vn_replace_VkPhysicalDeviceSubgroupSizeControlFeatures_handle_self((VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceLineRasterizationFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceLineRasterizationFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceLineRasterizationFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceLineRasterizationFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->rectangularLines); - vn_encode_VkBool32(enc, &val->bresenhamLines); - vn_encode_VkBool32(enc, &val->smoothLines); - vn_encode_VkBool32(enc, &val->stippledRectangularLines); - vn_encode_VkBool32(enc, &val->stippledBresenhamLines); - vn_encode_VkBool32(enc, &val->stippledSmoothLines); -} - -static inline void -vn_encode_VkPhysicalDeviceLineRasterizationFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceLineRasterizationFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES }); - vn_encode_VkPhysicalDeviceLineRasterizationFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceLineRasterizationFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLineRasterizationFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLineRasterizationFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->rectangularLines); - vn_decode_VkBool32(dec, &val->bresenhamLines); - vn_decode_VkBool32(dec, &val->smoothLines); - vn_decode_VkBool32(dec, &val->stippledRectangularLines); - vn_decode_VkBool32(dec, &val->stippledBresenhamLines); - vn_decode_VkBool32(dec, &val->stippledSmoothLines); -} - -static inline void -vn_decode_VkPhysicalDeviceLineRasterizationFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLineRasterizationFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLineRasterizationFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLineRasterizationFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLineRasterizationFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->rectangularLines */ - /* skip val->bresenhamLines */ - /* skip val->smoothLines */ - /* skip val->stippledRectangularLines */ - /* skip val->stippledBresenhamLines */ - /* skip val->stippledSmoothLines */ -} - -static inline void -vn_decode_VkPhysicalDeviceLineRasterizationFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLineRasterizationFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLineRasterizationFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceLineRasterizationFeatures_handle_self(VkPhysicalDeviceLineRasterizationFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->rectangularLines */ - /* skip val->bresenhamLines */ - /* skip val->smoothLines */ - /* skip val->stippledRectangularLines */ - /* skip val->stippledBresenhamLines */ - /* skip val->stippledSmoothLines */ -} - -static inline void -vn_replace_VkPhysicalDeviceLineRasterizationFeatures_handle(VkPhysicalDeviceLineRasterizationFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - vn_replace_VkPhysicalDeviceLineRasterizationFeatures_handle_self((VkPhysicalDeviceLineRasterizationFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePipelineCreationCacheControlFeatures chain */ - -static inline void -vn_encode_VkPhysicalDevicePipelineCreationCacheControlFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->pipelineCreationCacheControl); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineCreationCacheControlFeatures(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES }); - vn_encode_VkPhysicalDevicePipelineCreationCacheControlFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->pipelineCreationCacheControl); -} - -static inline void -vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pipelineCreationCacheControl */ -} - -static inline void -vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePipelineCreationCacheControlFeatures_handle_self(VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pipelineCreationCacheControl */ -} - -static inline void -vn_replace_VkPhysicalDevicePipelineCreationCacheControlFeatures_handle(VkPhysicalDevicePipelineCreationCacheControlFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - vn_replace_VkPhysicalDevicePipelineCreationCacheControlFeatures_handle_self((VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVulkan11Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan11Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan11Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan11Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->storageBuffer16BitAccess); - vn_encode_VkBool32(enc, &val->uniformAndStorageBuffer16BitAccess); - vn_encode_VkBool32(enc, &val->storagePushConstant16); - vn_encode_VkBool32(enc, &val->storageInputOutput16); - vn_encode_VkBool32(enc, &val->multiview); - vn_encode_VkBool32(enc, &val->multiviewGeometryShader); - vn_encode_VkBool32(enc, &val->multiviewTessellationShader); - vn_encode_VkBool32(enc, &val->variablePointersStorageBuffer); - vn_encode_VkBool32(enc, &val->variablePointers); - vn_encode_VkBool32(enc, &val->protectedMemory); - vn_encode_VkBool32(enc, &val->samplerYcbcrConversion); - vn_encode_VkBool32(enc, &val->shaderDrawParameters); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan11Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan11Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES }); - vn_encode_VkPhysicalDeviceVulkan11Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan11Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan11Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan11Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan11Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->storageBuffer16BitAccess); - vn_decode_VkBool32(dec, &val->uniformAndStorageBuffer16BitAccess); - vn_decode_VkBool32(dec, &val->storagePushConstant16); - vn_decode_VkBool32(dec, &val->storageInputOutput16); - vn_decode_VkBool32(dec, &val->multiview); - vn_decode_VkBool32(dec, &val->multiviewGeometryShader); - vn_decode_VkBool32(dec, &val->multiviewTessellationShader); - vn_decode_VkBool32(dec, &val->variablePointersStorageBuffer); - vn_decode_VkBool32(dec, &val->variablePointers); - vn_decode_VkBool32(dec, &val->protectedMemory); - vn_decode_VkBool32(dec, &val->samplerYcbcrConversion); - vn_decode_VkBool32(dec, &val->shaderDrawParameters); -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan11Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan11Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan11Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan11Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan11Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan11Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->storageBuffer16BitAccess */ - /* skip val->uniformAndStorageBuffer16BitAccess */ - /* skip val->storagePushConstant16 */ - /* skip val->storageInputOutput16 */ - /* skip val->multiview */ - /* skip val->multiviewGeometryShader */ - /* skip val->multiviewTessellationShader */ - /* skip val->variablePointersStorageBuffer */ - /* skip val->variablePointers */ - /* skip val->protectedMemory */ - /* skip val->samplerYcbcrConversion */ - /* skip val->shaderDrawParameters */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan11Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan11Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan11Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan11Features_handle_self(VkPhysicalDeviceVulkan11Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->storageBuffer16BitAccess */ - /* skip val->uniformAndStorageBuffer16BitAccess */ - /* skip val->storagePushConstant16 */ - /* skip val->storageInputOutput16 */ - /* skip val->multiview */ - /* skip val->multiviewGeometryShader */ - /* skip val->multiviewTessellationShader */ - /* skip val->variablePointersStorageBuffer */ - /* skip val->variablePointers */ - /* skip val->protectedMemory */ - /* skip val->samplerYcbcrConversion */ - /* skip val->shaderDrawParameters */ -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan11Features_handle(VkPhysicalDeviceVulkan11Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - vn_replace_VkPhysicalDeviceVulkan11Features_handle_self((VkPhysicalDeviceVulkan11Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVulkan12Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan12Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan12Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan12Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->samplerMirrorClampToEdge); - vn_encode_VkBool32(enc, &val->drawIndirectCount); - vn_encode_VkBool32(enc, &val->storageBuffer8BitAccess); - vn_encode_VkBool32(enc, &val->uniformAndStorageBuffer8BitAccess); - vn_encode_VkBool32(enc, &val->storagePushConstant8); - vn_encode_VkBool32(enc, &val->shaderBufferInt64Atomics); - vn_encode_VkBool32(enc, &val->shaderSharedInt64Atomics); - vn_encode_VkBool32(enc, &val->shaderFloat16); - vn_encode_VkBool32(enc, &val->shaderInt8); - vn_encode_VkBool32(enc, &val->descriptorIndexing); - vn_encode_VkBool32(enc, &val->shaderInputAttachmentArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderUniformTexelBufferArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageTexelBufferArrayDynamicIndexing); - vn_encode_VkBool32(enc, &val->shaderUniformBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderSampledImageArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageImageArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderInputAttachmentArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderUniformTexelBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->shaderStorageTexelBufferArrayNonUniformIndexing); - vn_encode_VkBool32(enc, &val->descriptorBindingUniformBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingSampledImageUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingStorageImageUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingStorageBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingUniformTexelBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingStorageTexelBufferUpdateAfterBind); - vn_encode_VkBool32(enc, &val->descriptorBindingUpdateUnusedWhilePending); - vn_encode_VkBool32(enc, &val->descriptorBindingPartiallyBound); - vn_encode_VkBool32(enc, &val->descriptorBindingVariableDescriptorCount); - vn_encode_VkBool32(enc, &val->runtimeDescriptorArray); - vn_encode_VkBool32(enc, &val->samplerFilterMinmax); - vn_encode_VkBool32(enc, &val->scalarBlockLayout); - vn_encode_VkBool32(enc, &val->imagelessFramebuffer); - vn_encode_VkBool32(enc, &val->uniformBufferStandardLayout); - vn_encode_VkBool32(enc, &val->shaderSubgroupExtendedTypes); - vn_encode_VkBool32(enc, &val->separateDepthStencilLayouts); - vn_encode_VkBool32(enc, &val->hostQueryReset); - vn_encode_VkBool32(enc, &val->timelineSemaphore); - vn_encode_VkBool32(enc, &val->bufferDeviceAddress); - vn_encode_VkBool32(enc, &val->bufferDeviceAddressCaptureReplay); - vn_encode_VkBool32(enc, &val->bufferDeviceAddressMultiDevice); - vn_encode_VkBool32(enc, &val->vulkanMemoryModel); - vn_encode_VkBool32(enc, &val->vulkanMemoryModelDeviceScope); - vn_encode_VkBool32(enc, &val->vulkanMemoryModelAvailabilityVisibilityChains); - vn_encode_VkBool32(enc, &val->shaderOutputViewportIndex); - vn_encode_VkBool32(enc, &val->shaderOutputLayer); - vn_encode_VkBool32(enc, &val->subgroupBroadcastDynamicId); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan12Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan12Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES }); - vn_encode_VkPhysicalDeviceVulkan12Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan12Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan12Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan12Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan12Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->samplerMirrorClampToEdge); - vn_decode_VkBool32(dec, &val->drawIndirectCount); - vn_decode_VkBool32(dec, &val->storageBuffer8BitAccess); - vn_decode_VkBool32(dec, &val->uniformAndStorageBuffer8BitAccess); - vn_decode_VkBool32(dec, &val->storagePushConstant8); - vn_decode_VkBool32(dec, &val->shaderBufferInt64Atomics); - vn_decode_VkBool32(dec, &val->shaderSharedInt64Atomics); - vn_decode_VkBool32(dec, &val->shaderFloat16); - vn_decode_VkBool32(dec, &val->shaderInt8); - vn_decode_VkBool32(dec, &val->descriptorIndexing); - vn_decode_VkBool32(dec, &val->shaderInputAttachmentArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderUniformTexelBufferArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageTexelBufferArrayDynamicIndexing); - vn_decode_VkBool32(dec, &val->shaderUniformBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderSampledImageArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageImageArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderInputAttachmentArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderUniformTexelBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->shaderStorageTexelBufferArrayNonUniformIndexing); - vn_decode_VkBool32(dec, &val->descriptorBindingUniformBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingSampledImageUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingStorageImageUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingStorageBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingUniformTexelBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingStorageTexelBufferUpdateAfterBind); - vn_decode_VkBool32(dec, &val->descriptorBindingUpdateUnusedWhilePending); - vn_decode_VkBool32(dec, &val->descriptorBindingPartiallyBound); - vn_decode_VkBool32(dec, &val->descriptorBindingVariableDescriptorCount); - vn_decode_VkBool32(dec, &val->runtimeDescriptorArray); - vn_decode_VkBool32(dec, &val->samplerFilterMinmax); - vn_decode_VkBool32(dec, &val->scalarBlockLayout); - vn_decode_VkBool32(dec, &val->imagelessFramebuffer); - vn_decode_VkBool32(dec, &val->uniformBufferStandardLayout); - vn_decode_VkBool32(dec, &val->shaderSubgroupExtendedTypes); - vn_decode_VkBool32(dec, &val->separateDepthStencilLayouts); - vn_decode_VkBool32(dec, &val->hostQueryReset); - vn_decode_VkBool32(dec, &val->timelineSemaphore); - vn_decode_VkBool32(dec, &val->bufferDeviceAddress); - vn_decode_VkBool32(dec, &val->bufferDeviceAddressCaptureReplay); - vn_decode_VkBool32(dec, &val->bufferDeviceAddressMultiDevice); - vn_decode_VkBool32(dec, &val->vulkanMemoryModel); - vn_decode_VkBool32(dec, &val->vulkanMemoryModelDeviceScope); - vn_decode_VkBool32(dec, &val->vulkanMemoryModelAvailabilityVisibilityChains); - vn_decode_VkBool32(dec, &val->shaderOutputViewportIndex); - vn_decode_VkBool32(dec, &val->shaderOutputLayer); - vn_decode_VkBool32(dec, &val->subgroupBroadcastDynamicId); -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan12Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan12Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan12Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan12Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan12Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan12Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->samplerMirrorClampToEdge */ - /* skip val->drawIndirectCount */ - /* skip val->storageBuffer8BitAccess */ - /* skip val->uniformAndStorageBuffer8BitAccess */ - /* skip val->storagePushConstant8 */ - /* skip val->shaderBufferInt64Atomics */ - /* skip val->shaderSharedInt64Atomics */ - /* skip val->shaderFloat16 */ - /* skip val->shaderInt8 */ - /* skip val->descriptorIndexing */ - /* skip val->shaderInputAttachmentArrayDynamicIndexing */ - /* skip val->shaderUniformTexelBufferArrayDynamicIndexing */ - /* skip val->shaderStorageTexelBufferArrayDynamicIndexing */ - /* skip val->shaderUniformBufferArrayNonUniformIndexing */ - /* skip val->shaderSampledImageArrayNonUniformIndexing */ - /* skip val->shaderStorageBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageImageArrayNonUniformIndexing */ - /* skip val->shaderInputAttachmentArrayNonUniformIndexing */ - /* skip val->shaderUniformTexelBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageTexelBufferArrayNonUniformIndexing */ - /* skip val->descriptorBindingUniformBufferUpdateAfterBind */ - /* skip val->descriptorBindingSampledImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageBufferUpdateAfterBind */ - /* skip val->descriptorBindingUniformTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingStorageTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingUpdateUnusedWhilePending */ - /* skip val->descriptorBindingPartiallyBound */ - /* skip val->descriptorBindingVariableDescriptorCount */ - /* skip val->runtimeDescriptorArray */ - /* skip val->samplerFilterMinmax */ - /* skip val->scalarBlockLayout */ - /* skip val->imagelessFramebuffer */ - /* skip val->uniformBufferStandardLayout */ - /* skip val->shaderSubgroupExtendedTypes */ - /* skip val->separateDepthStencilLayouts */ - /* skip val->hostQueryReset */ - /* skip val->timelineSemaphore */ - /* skip val->bufferDeviceAddress */ - /* skip val->bufferDeviceAddressCaptureReplay */ - /* skip val->bufferDeviceAddressMultiDevice */ - /* skip val->vulkanMemoryModel */ - /* skip val->vulkanMemoryModelDeviceScope */ - /* skip val->vulkanMemoryModelAvailabilityVisibilityChains */ - /* skip val->shaderOutputViewportIndex */ - /* skip val->shaderOutputLayer */ - /* skip val->subgroupBroadcastDynamicId */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan12Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan12Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan12Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan12Features_handle_self(VkPhysicalDeviceVulkan12Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->samplerMirrorClampToEdge */ - /* skip val->drawIndirectCount */ - /* skip val->storageBuffer8BitAccess */ - /* skip val->uniformAndStorageBuffer8BitAccess */ - /* skip val->storagePushConstant8 */ - /* skip val->shaderBufferInt64Atomics */ - /* skip val->shaderSharedInt64Atomics */ - /* skip val->shaderFloat16 */ - /* skip val->shaderInt8 */ - /* skip val->descriptorIndexing */ - /* skip val->shaderInputAttachmentArrayDynamicIndexing */ - /* skip val->shaderUniformTexelBufferArrayDynamicIndexing */ - /* skip val->shaderStorageTexelBufferArrayDynamicIndexing */ - /* skip val->shaderUniformBufferArrayNonUniformIndexing */ - /* skip val->shaderSampledImageArrayNonUniformIndexing */ - /* skip val->shaderStorageBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageImageArrayNonUniformIndexing */ - /* skip val->shaderInputAttachmentArrayNonUniformIndexing */ - /* skip val->shaderUniformTexelBufferArrayNonUniformIndexing */ - /* skip val->shaderStorageTexelBufferArrayNonUniformIndexing */ - /* skip val->descriptorBindingUniformBufferUpdateAfterBind */ - /* skip val->descriptorBindingSampledImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageImageUpdateAfterBind */ - /* skip val->descriptorBindingStorageBufferUpdateAfterBind */ - /* skip val->descriptorBindingUniformTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingStorageTexelBufferUpdateAfterBind */ - /* skip val->descriptorBindingUpdateUnusedWhilePending */ - /* skip val->descriptorBindingPartiallyBound */ - /* skip val->descriptorBindingVariableDescriptorCount */ - /* skip val->runtimeDescriptorArray */ - /* skip val->samplerFilterMinmax */ - /* skip val->scalarBlockLayout */ - /* skip val->imagelessFramebuffer */ - /* skip val->uniformBufferStandardLayout */ - /* skip val->shaderSubgroupExtendedTypes */ - /* skip val->separateDepthStencilLayouts */ - /* skip val->hostQueryReset */ - /* skip val->timelineSemaphore */ - /* skip val->bufferDeviceAddress */ - /* skip val->bufferDeviceAddressCaptureReplay */ - /* skip val->bufferDeviceAddressMultiDevice */ - /* skip val->vulkanMemoryModel */ - /* skip val->vulkanMemoryModelDeviceScope */ - /* skip val->vulkanMemoryModelAvailabilityVisibilityChains */ - /* skip val->shaderOutputViewportIndex */ - /* skip val->shaderOutputLayer */ - /* skip val->subgroupBroadcastDynamicId */ -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan12Features_handle(VkPhysicalDeviceVulkan12Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - vn_replace_VkPhysicalDeviceVulkan12Features_handle_self((VkPhysicalDeviceVulkan12Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVulkan13Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan13Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan13Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan13Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->robustImageAccess); - vn_encode_VkBool32(enc, &val->inlineUniformBlock); - vn_encode_VkBool32(enc, &val->descriptorBindingInlineUniformBlockUpdateAfterBind); - vn_encode_VkBool32(enc, &val->pipelineCreationCacheControl); - vn_encode_VkBool32(enc, &val->privateData); - vn_encode_VkBool32(enc, &val->shaderDemoteToHelperInvocation); - vn_encode_VkBool32(enc, &val->shaderTerminateInvocation); - vn_encode_VkBool32(enc, &val->subgroupSizeControl); - vn_encode_VkBool32(enc, &val->computeFullSubgroups); - vn_encode_VkBool32(enc, &val->synchronization2); - vn_encode_VkBool32(enc, &val->textureCompressionASTC_HDR); - vn_encode_VkBool32(enc, &val->shaderZeroInitializeWorkgroupMemory); - vn_encode_VkBool32(enc, &val->dynamicRendering); - vn_encode_VkBool32(enc, &val->shaderIntegerDotProduct); - vn_encode_VkBool32(enc, &val->maintenance4); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan13Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan13Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES }); - vn_encode_VkPhysicalDeviceVulkan13Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan13Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan13Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan13Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan13Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->robustImageAccess); - vn_decode_VkBool32(dec, &val->inlineUniformBlock); - vn_decode_VkBool32(dec, &val->descriptorBindingInlineUniformBlockUpdateAfterBind); - vn_decode_VkBool32(dec, &val->pipelineCreationCacheControl); - vn_decode_VkBool32(dec, &val->privateData); - vn_decode_VkBool32(dec, &val->shaderDemoteToHelperInvocation); - vn_decode_VkBool32(dec, &val->shaderTerminateInvocation); - vn_decode_VkBool32(dec, &val->subgroupSizeControl); - vn_decode_VkBool32(dec, &val->computeFullSubgroups); - vn_decode_VkBool32(dec, &val->synchronization2); - vn_decode_VkBool32(dec, &val->textureCompressionASTC_HDR); - vn_decode_VkBool32(dec, &val->shaderZeroInitializeWorkgroupMemory); - vn_decode_VkBool32(dec, &val->dynamicRendering); - vn_decode_VkBool32(dec, &val->shaderIntegerDotProduct); - vn_decode_VkBool32(dec, &val->maintenance4); -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan13Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan13Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan13Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan13Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan13Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan13Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->robustImageAccess */ - /* skip val->inlineUniformBlock */ - /* skip val->descriptorBindingInlineUniformBlockUpdateAfterBind */ - /* skip val->pipelineCreationCacheControl */ - /* skip val->privateData */ - /* skip val->shaderDemoteToHelperInvocation */ - /* skip val->shaderTerminateInvocation */ - /* skip val->subgroupSizeControl */ - /* skip val->computeFullSubgroups */ - /* skip val->synchronization2 */ - /* skip val->textureCompressionASTC_HDR */ - /* skip val->shaderZeroInitializeWorkgroupMemory */ - /* skip val->dynamicRendering */ - /* skip val->shaderIntegerDotProduct */ - /* skip val->maintenance4 */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan13Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan13Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan13Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan13Features_handle_self(VkPhysicalDeviceVulkan13Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->robustImageAccess */ - /* skip val->inlineUniformBlock */ - /* skip val->descriptorBindingInlineUniformBlockUpdateAfterBind */ - /* skip val->pipelineCreationCacheControl */ - /* skip val->privateData */ - /* skip val->shaderDemoteToHelperInvocation */ - /* skip val->shaderTerminateInvocation */ - /* skip val->subgroupSizeControl */ - /* skip val->computeFullSubgroups */ - /* skip val->synchronization2 */ - /* skip val->textureCompressionASTC_HDR */ - /* skip val->shaderZeroInitializeWorkgroupMemory */ - /* skip val->dynamicRendering */ - /* skip val->shaderIntegerDotProduct */ - /* skip val->maintenance4 */ -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan13Features_handle(VkPhysicalDeviceVulkan13Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - vn_replace_VkPhysicalDeviceVulkan13Features_handle_self((VkPhysicalDeviceVulkan13Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVulkan14Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan14Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan14Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan14Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->globalPriorityQuery); - vn_encode_VkBool32(enc, &val->shaderSubgroupRotate); - vn_encode_VkBool32(enc, &val->shaderSubgroupRotateClustered); - vn_encode_VkBool32(enc, &val->shaderFloatControls2); - vn_encode_VkBool32(enc, &val->shaderExpectAssume); - vn_encode_VkBool32(enc, &val->rectangularLines); - vn_encode_VkBool32(enc, &val->bresenhamLines); - vn_encode_VkBool32(enc, &val->smoothLines); - vn_encode_VkBool32(enc, &val->stippledRectangularLines); - vn_encode_VkBool32(enc, &val->stippledBresenhamLines); - vn_encode_VkBool32(enc, &val->stippledSmoothLines); - vn_encode_VkBool32(enc, &val->vertexAttributeInstanceRateDivisor); - vn_encode_VkBool32(enc, &val->vertexAttributeInstanceRateZeroDivisor); - vn_encode_VkBool32(enc, &val->indexTypeUint8); - vn_encode_VkBool32(enc, &val->dynamicRenderingLocalRead); - vn_encode_VkBool32(enc, &val->maintenance5); - vn_encode_VkBool32(enc, &val->maintenance6); - vn_encode_VkBool32(enc, &val->pipelineProtectedAccess); - vn_encode_VkBool32(enc, &val->pipelineRobustness); - vn_encode_VkBool32(enc, &val->hostImageCopy); - vn_encode_VkBool32(enc, &val->pushDescriptor); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan14Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan14Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES }); - vn_encode_VkPhysicalDeviceVulkan14Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan14Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan14Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan14Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan14Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->globalPriorityQuery); - vn_decode_VkBool32(dec, &val->shaderSubgroupRotate); - vn_decode_VkBool32(dec, &val->shaderSubgroupRotateClustered); - vn_decode_VkBool32(dec, &val->shaderFloatControls2); - vn_decode_VkBool32(dec, &val->shaderExpectAssume); - vn_decode_VkBool32(dec, &val->rectangularLines); - vn_decode_VkBool32(dec, &val->bresenhamLines); - vn_decode_VkBool32(dec, &val->smoothLines); - vn_decode_VkBool32(dec, &val->stippledRectangularLines); - vn_decode_VkBool32(dec, &val->stippledBresenhamLines); - vn_decode_VkBool32(dec, &val->stippledSmoothLines); - vn_decode_VkBool32(dec, &val->vertexAttributeInstanceRateDivisor); - vn_decode_VkBool32(dec, &val->vertexAttributeInstanceRateZeroDivisor); - vn_decode_VkBool32(dec, &val->indexTypeUint8); - vn_decode_VkBool32(dec, &val->dynamicRenderingLocalRead); - vn_decode_VkBool32(dec, &val->maintenance5); - vn_decode_VkBool32(dec, &val->maintenance6); - vn_decode_VkBool32(dec, &val->pipelineProtectedAccess); - vn_decode_VkBool32(dec, &val->pipelineRobustness); - vn_decode_VkBool32(dec, &val->hostImageCopy); - vn_decode_VkBool32(dec, &val->pushDescriptor); -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan14Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan14Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan14Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan14Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan14Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan14Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->globalPriorityQuery */ - /* skip val->shaderSubgroupRotate */ - /* skip val->shaderSubgroupRotateClustered */ - /* skip val->shaderFloatControls2 */ - /* skip val->shaderExpectAssume */ - /* skip val->rectangularLines */ - /* skip val->bresenhamLines */ - /* skip val->smoothLines */ - /* skip val->stippledRectangularLines */ - /* skip val->stippledBresenhamLines */ - /* skip val->stippledSmoothLines */ - /* skip val->vertexAttributeInstanceRateDivisor */ - /* skip val->vertexAttributeInstanceRateZeroDivisor */ - /* skip val->indexTypeUint8 */ - /* skip val->dynamicRenderingLocalRead */ - /* skip val->maintenance5 */ - /* skip val->maintenance6 */ - /* skip val->pipelineProtectedAccess */ - /* skip val->pipelineRobustness */ - /* skip val->hostImageCopy */ - /* skip val->pushDescriptor */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan14Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan14Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan14Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan14Features_handle_self(VkPhysicalDeviceVulkan14Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->globalPriorityQuery */ - /* skip val->shaderSubgroupRotate */ - /* skip val->shaderSubgroupRotateClustered */ - /* skip val->shaderFloatControls2 */ - /* skip val->shaderExpectAssume */ - /* skip val->rectangularLines */ - /* skip val->bresenhamLines */ - /* skip val->smoothLines */ - /* skip val->stippledRectangularLines */ - /* skip val->stippledBresenhamLines */ - /* skip val->stippledSmoothLines */ - /* skip val->vertexAttributeInstanceRateDivisor */ - /* skip val->vertexAttributeInstanceRateZeroDivisor */ - /* skip val->indexTypeUint8 */ - /* skip val->dynamicRenderingLocalRead */ - /* skip val->maintenance5 */ - /* skip val->maintenance6 */ - /* skip val->pipelineProtectedAccess */ - /* skip val->pipelineRobustness */ - /* skip val->hostImageCopy */ - /* skip val->pushDescriptor */ -} - -static inline void -vn_replace_VkPhysicalDeviceVulkan14Features_handle(VkPhysicalDeviceVulkan14Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - vn_replace_VkPhysicalDeviceVulkan14Features_handle_self((VkPhysicalDeviceVulkan14Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceCustomBorderColorFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->customBorderColors); - vn_encode_VkBool32(enc, &val->customBorderColorWithoutFormat); -} - -static inline void -vn_encode_VkPhysicalDeviceCustomBorderColorFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->customBorderColors); - vn_decode_VkBool32(dec, &val->customBorderColorWithoutFormat); -} - -static inline void -vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->customBorderColors */ - /* skip val->customBorderColorWithoutFormat */ -} - -static inline void -vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceCustomBorderColorFeaturesEXT_handle_self(VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->customBorderColors */ - /* skip val->customBorderColorWithoutFormat */ -} - -static inline void -vn_replace_VkPhysicalDeviceCustomBorderColorFeaturesEXT_handle(VkPhysicalDeviceCustomBorderColorFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - vn_replace_VkPhysicalDeviceCustomBorderColorFeaturesEXT_handle_self((VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceBorderColorSwizzleFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->borderColorSwizzle); - vn_encode_VkBool32(enc, &val->borderColorSwizzleFromImage); -} - -static inline void -vn_encode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->borderColorSwizzle); - vn_decode_VkBool32(dec, &val->borderColorSwizzleFromImage); -} - -static inline void -vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->borderColorSwizzle */ - /* skip val->borderColorSwizzleFromImage */ -} - -static inline void -vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_handle_self(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->borderColorSwizzle */ - /* skip val->borderColorSwizzleFromImage */ -} - -static inline void -vn_replace_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_handle(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_handle_self((VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->extendedDynamicState); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->extendedDynamicState); -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->extendedDynamicState */ -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_handle_self(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->extendedDynamicState */ -} - -static inline void -vn_replace_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_handle(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->extendedDynamicState2); - vn_encode_VkBool32(enc, &val->extendedDynamicState2LogicOp); - vn_encode_VkBool32(enc, &val->extendedDynamicState2PatchControlPoints); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->extendedDynamicState2); - vn_decode_VkBool32(dec, &val->extendedDynamicState2LogicOp); - vn_decode_VkBool32(dec, &val->extendedDynamicState2PatchControlPoints); -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->extendedDynamicState2 */ - /* skip val->extendedDynamicState2LogicOp */ - /* skip val->extendedDynamicState2PatchControlPoints */ -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_handle_self(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->extendedDynamicState2 */ - /* skip val->extendedDynamicState2LogicOp */ - /* skip val->extendedDynamicState2PatchControlPoints */ -} - -static inline void -vn_replace_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_handle(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceExtendedDynamicState3FeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->extendedDynamicState3TessellationDomainOrigin); - vn_encode_VkBool32(enc, &val->extendedDynamicState3DepthClampEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3PolygonMode); - vn_encode_VkBool32(enc, &val->extendedDynamicState3RasterizationSamples); - vn_encode_VkBool32(enc, &val->extendedDynamicState3SampleMask); - vn_encode_VkBool32(enc, &val->extendedDynamicState3AlphaToCoverageEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3AlphaToOneEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3LogicOpEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ColorBlendEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ColorBlendEquation); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ColorWriteMask); - vn_encode_VkBool32(enc, &val->extendedDynamicState3RasterizationStream); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ConservativeRasterizationMode); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ExtraPrimitiveOverestimationSize); - vn_encode_VkBool32(enc, &val->extendedDynamicState3DepthClipEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3SampleLocationsEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ColorBlendAdvanced); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ProvokingVertexMode); - vn_encode_VkBool32(enc, &val->extendedDynamicState3LineRasterizationMode); - vn_encode_VkBool32(enc, &val->extendedDynamicState3LineStippleEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3DepthClipNegativeOneToOne); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ViewportWScalingEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ViewportSwizzle); - vn_encode_VkBool32(enc, &val->extendedDynamicState3CoverageToColorEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3CoverageToColorLocation); - vn_encode_VkBool32(enc, &val->extendedDynamicState3CoverageModulationMode); - vn_encode_VkBool32(enc, &val->extendedDynamicState3CoverageModulationTableEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3CoverageModulationTable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3CoverageReductionMode); - vn_encode_VkBool32(enc, &val->extendedDynamicState3RepresentativeFragmentTestEnable); - vn_encode_VkBool32(enc, &val->extendedDynamicState3ShadingRateImageEnable); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->extendedDynamicState3TessellationDomainOrigin); - vn_decode_VkBool32(dec, &val->extendedDynamicState3DepthClampEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3PolygonMode); - vn_decode_VkBool32(dec, &val->extendedDynamicState3RasterizationSamples); - vn_decode_VkBool32(dec, &val->extendedDynamicState3SampleMask); - vn_decode_VkBool32(dec, &val->extendedDynamicState3AlphaToCoverageEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3AlphaToOneEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3LogicOpEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ColorBlendEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ColorBlendEquation); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ColorWriteMask); - vn_decode_VkBool32(dec, &val->extendedDynamicState3RasterizationStream); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ConservativeRasterizationMode); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ExtraPrimitiveOverestimationSize); - vn_decode_VkBool32(dec, &val->extendedDynamicState3DepthClipEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3SampleLocationsEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ColorBlendAdvanced); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ProvokingVertexMode); - vn_decode_VkBool32(dec, &val->extendedDynamicState3LineRasterizationMode); - vn_decode_VkBool32(dec, &val->extendedDynamicState3LineStippleEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3DepthClipNegativeOneToOne); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ViewportWScalingEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ViewportSwizzle); - vn_decode_VkBool32(dec, &val->extendedDynamicState3CoverageToColorEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3CoverageToColorLocation); - vn_decode_VkBool32(dec, &val->extendedDynamicState3CoverageModulationMode); - vn_decode_VkBool32(dec, &val->extendedDynamicState3CoverageModulationTableEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3CoverageModulationTable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3CoverageReductionMode); - vn_decode_VkBool32(dec, &val->extendedDynamicState3RepresentativeFragmentTestEnable); - vn_decode_VkBool32(dec, &val->extendedDynamicState3ShadingRateImageEnable); -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->extendedDynamicState3TessellationDomainOrigin */ - /* skip val->extendedDynamicState3DepthClampEnable */ - /* skip val->extendedDynamicState3PolygonMode */ - /* skip val->extendedDynamicState3RasterizationSamples */ - /* skip val->extendedDynamicState3SampleMask */ - /* skip val->extendedDynamicState3AlphaToCoverageEnable */ - /* skip val->extendedDynamicState3AlphaToOneEnable */ - /* skip val->extendedDynamicState3LogicOpEnable */ - /* skip val->extendedDynamicState3ColorBlendEnable */ - /* skip val->extendedDynamicState3ColorBlendEquation */ - /* skip val->extendedDynamicState3ColorWriteMask */ - /* skip val->extendedDynamicState3RasterizationStream */ - /* skip val->extendedDynamicState3ConservativeRasterizationMode */ - /* skip val->extendedDynamicState3ExtraPrimitiveOverestimationSize */ - /* skip val->extendedDynamicState3DepthClipEnable */ - /* skip val->extendedDynamicState3SampleLocationsEnable */ - /* skip val->extendedDynamicState3ColorBlendAdvanced */ - /* skip val->extendedDynamicState3ProvokingVertexMode */ - /* skip val->extendedDynamicState3LineRasterizationMode */ - /* skip val->extendedDynamicState3LineStippleEnable */ - /* skip val->extendedDynamicState3DepthClipNegativeOneToOne */ - /* skip val->extendedDynamicState3ViewportWScalingEnable */ - /* skip val->extendedDynamicState3ViewportSwizzle */ - /* skip val->extendedDynamicState3CoverageToColorEnable */ - /* skip val->extendedDynamicState3CoverageToColorLocation */ - /* skip val->extendedDynamicState3CoverageModulationMode */ - /* skip val->extendedDynamicState3CoverageModulationTableEnable */ - /* skip val->extendedDynamicState3CoverageModulationTable */ - /* skip val->extendedDynamicState3CoverageReductionMode */ - /* skip val->extendedDynamicState3RepresentativeFragmentTestEnable */ - /* skip val->extendedDynamicState3ShadingRateImageEnable */ -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_handle_self(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->extendedDynamicState3TessellationDomainOrigin */ - /* skip val->extendedDynamicState3DepthClampEnable */ - /* skip val->extendedDynamicState3PolygonMode */ - /* skip val->extendedDynamicState3RasterizationSamples */ - /* skip val->extendedDynamicState3SampleMask */ - /* skip val->extendedDynamicState3AlphaToCoverageEnable */ - /* skip val->extendedDynamicState3AlphaToOneEnable */ - /* skip val->extendedDynamicState3LogicOpEnable */ - /* skip val->extendedDynamicState3ColorBlendEnable */ - /* skip val->extendedDynamicState3ColorBlendEquation */ - /* skip val->extendedDynamicState3ColorWriteMask */ - /* skip val->extendedDynamicState3RasterizationStream */ - /* skip val->extendedDynamicState3ConservativeRasterizationMode */ - /* skip val->extendedDynamicState3ExtraPrimitiveOverestimationSize */ - /* skip val->extendedDynamicState3DepthClipEnable */ - /* skip val->extendedDynamicState3SampleLocationsEnable */ - /* skip val->extendedDynamicState3ColorBlendAdvanced */ - /* skip val->extendedDynamicState3ProvokingVertexMode */ - /* skip val->extendedDynamicState3LineRasterizationMode */ - /* skip val->extendedDynamicState3LineStippleEnable */ - /* skip val->extendedDynamicState3DepthClipNegativeOneToOne */ - /* skip val->extendedDynamicState3ViewportWScalingEnable */ - /* skip val->extendedDynamicState3ViewportSwizzle */ - /* skip val->extendedDynamicState3CoverageToColorEnable */ - /* skip val->extendedDynamicState3CoverageToColorLocation */ - /* skip val->extendedDynamicState3CoverageModulationMode */ - /* skip val->extendedDynamicState3CoverageModulationTableEnable */ - /* skip val->extendedDynamicState3CoverageModulationTable */ - /* skip val->extendedDynamicState3CoverageReductionMode */ - /* skip val->extendedDynamicState3RepresentativeFragmentTestEnable */ - /* skip val->extendedDynamicState3ShadingRateImageEnable */ -} - -static inline void -vn_replace_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_handle(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderZeroInitializeWorkgroupMemory); -} - -static inline void -vn_encode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES }); - vn_encode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderZeroInitializeWorkgroupMemory); -} - -static inline void -vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderZeroInitializeWorkgroupMemory */ -} - -static inline void -vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_handle_self(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderZeroInitializeWorkgroupMemory */ -} - -static inline void -vn_replace_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_handle(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - vn_replace_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_handle_self((VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderSubgroupUniformControlFlow); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderSubgroupUniformControlFlow); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderSubgroupUniformControlFlow */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_handle_self(VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderSubgroupUniformControlFlow */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_handle(VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_handle_self((VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceRobustness2FeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRobustness2FeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRobustness2FeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->robustBufferAccess2); - vn_encode_VkBool32(enc, &val->robustImageAccess2); - vn_encode_VkBool32(enc, &val->nullDescriptor); -} - -static inline void -vn_encode_VkPhysicalDeviceRobustness2FeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceRobustness2FeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRobustness2FeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->robustBufferAccess2); - vn_decode_VkBool32(dec, &val->robustImageAccess2); - vn_decode_VkBool32(dec, &val->nullDescriptor); -} - -static inline void -vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->robustBufferAccess2 */ - /* skip val->robustImageAccess2 */ - /* skip val->nullDescriptor */ -} - -static inline void -vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceRobustness2FeaturesKHR_handle_self(VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->robustBufferAccess2 */ - /* skip val->robustImageAccess2 */ - /* skip val->nullDescriptor */ -} - -static inline void -vn_replace_VkPhysicalDeviceRobustness2FeaturesKHR_handle(VkPhysicalDeviceRobustness2FeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRobustness2FeaturesKHR_handle_self((VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImageRobustnessFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceImageRobustnessFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceImageRobustnessFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceImageRobustnessFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->robustImageAccess); -} - -static inline void -vn_encode_VkPhysicalDeviceImageRobustnessFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceImageRobustnessFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES }); - vn_encode_VkPhysicalDeviceImageRobustnessFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceImageRobustnessFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImageRobustnessFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageRobustnessFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->robustImageAccess); -} - -static inline void -vn_decode_VkPhysicalDeviceImageRobustnessFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageRobustnessFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageRobustnessFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImageRobustnessFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageRobustnessFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->robustImageAccess */ -} - -static inline void -vn_decode_VkPhysicalDeviceImageRobustnessFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageRobustnessFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageRobustnessFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImageRobustnessFeatures_handle_self(VkPhysicalDeviceImageRobustnessFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->robustImageAccess */ -} - -static inline void -vn_replace_VkPhysicalDeviceImageRobustnessFeatures_handle(VkPhysicalDeviceImageRobustnessFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - vn_replace_VkPhysicalDeviceImageRobustnessFeatures_handle_self((VkPhysicalDeviceImageRobustnessFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->workgroupMemoryExplicitLayout); - vn_encode_VkBool32(enc, &val->workgroupMemoryExplicitLayoutScalarBlockLayout); - vn_encode_VkBool32(enc, &val->workgroupMemoryExplicitLayout8BitAccess); - vn_encode_VkBool32(enc, &val->workgroupMemoryExplicitLayout16BitAccess); -} - -static inline void -vn_encode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->workgroupMemoryExplicitLayout); - vn_decode_VkBool32(dec, &val->workgroupMemoryExplicitLayoutScalarBlockLayout); - vn_decode_VkBool32(dec, &val->workgroupMemoryExplicitLayout8BitAccess); - vn_decode_VkBool32(dec, &val->workgroupMemoryExplicitLayout16BitAccess); -} - -static inline void -vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->workgroupMemoryExplicitLayout */ - /* skip val->workgroupMemoryExplicitLayoutScalarBlockLayout */ - /* skip val->workgroupMemoryExplicitLayout8BitAccess */ - /* skip val->workgroupMemoryExplicitLayout16BitAccess */ -} - -static inline void -vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_handle_self(VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->workgroupMemoryExplicitLayout */ - /* skip val->workgroupMemoryExplicitLayoutScalarBlockLayout */ - /* skip val->workgroupMemoryExplicitLayout8BitAccess */ - /* skip val->workgroupMemoryExplicitLayout16BitAccess */ -} - -static inline void -vn_replace_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_handle(VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - vn_replace_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_handle_self((VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevice4444FormatsFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDevice4444FormatsFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevice4444FormatsFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->formatA4R4G4B4); - vn_encode_VkBool32(enc, &val->formatA4B4G4R4); -} - -static inline void -vn_encode_VkPhysicalDevice4444FormatsFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT }); - vn_encode_VkPhysicalDevice4444FormatsFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevice4444FormatsFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->formatA4R4G4B4); - vn_decode_VkBool32(dec, &val->formatA4B4G4R4); -} - -static inline void -vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->formatA4R4G4B4 */ - /* skip val->formatA4B4G4R4 */ -} - -static inline void -vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevice4444FormatsFeaturesEXT_handle_self(VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->formatA4R4G4B4 */ - /* skip val->formatA4B4G4R4 */ -} - -static inline void -vn_replace_VkPhysicalDevice4444FormatsFeaturesEXT_handle(VkPhysicalDevice4444FormatsFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - vn_replace_VkPhysicalDevice4444FormatsFeaturesEXT_handle_self((VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderImageInt64Atomics); - vn_encode_VkBool32(enc, &val->sparseImageInt64Atomics); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderImageInt64Atomics); - vn_decode_VkBool32(dec, &val->sparseImageInt64Atomics); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderImageInt64Atomics */ - /* skip val->sparseImageInt64Atomics */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_handle_self(VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderImageInt64Atomics */ - /* skip val->sparseImageInt64Atomics */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_handle(VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_handle_self((VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceFragmentShadingRateFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->pipelineFragmentShadingRate); - vn_encode_VkBool32(enc, &val->primitiveFragmentShadingRate); - vn_encode_VkBool32(enc, &val->attachmentFragmentShadingRate); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->pipelineFragmentShadingRate); - vn_decode_VkBool32(dec, &val->primitiveFragmentShadingRate); - vn_decode_VkBool32(dec, &val->attachmentFragmentShadingRate); -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pipelineFragmentShadingRate */ - /* skip val->primitiveFragmentShadingRate */ - /* skip val->attachmentFragmentShadingRate */ -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_handle_self(VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pipelineFragmentShadingRate */ - /* skip val->primitiveFragmentShadingRate */ - /* skip val->attachmentFragmentShadingRate */ -} - -static inline void -vn_replace_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_handle(VkPhysicalDeviceFragmentShadingRateFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_handle_self((VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderTerminateInvocationFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderTerminateInvocation); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES }); - vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderTerminateInvocation); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderTerminateInvocation */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle_self(VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderTerminateInvocation */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle(VkPhysicalDeviceShaderTerminateInvocationFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle_self((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->image2DViewOf3D); - vn_encode_VkBool32(enc, &val->sampler2DViewOf3D); -} - -static inline void -vn_encode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->image2DViewOf3D); - vn_decode_VkBool32(dec, &val->sampler2DViewOf3D); -} - -static inline void -vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->image2DViewOf3D */ - /* skip val->sampler2DViewOf3D */ -} - -static inline void -vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_handle_self(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->image2DViewOf3D */ - /* skip val->sampler2DViewOf3D */ -} - -static inline void -vn_replace_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_handle(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_handle_self((VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->imageSlicedViewOf3D); -} - -static inline void -vn_encode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->imageSlicedViewOf3D); -} - -static inline void -vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->imageSlicedViewOf3D */ -} - -static inline void -vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_handle_self(VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->imageSlicedViewOf3D */ -} - -static inline void -vn_replace_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_handle(VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_handle_self((VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->attachmentFeedbackLoopDynamicState); -} - -static inline void -vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->attachmentFeedbackLoopDynamicState); -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->attachmentFeedbackLoopDynamicState */ -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_handle_self(VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachmentFeedbackLoopDynamicState */ -} - -static inline void -vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_handle(VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->legacyVertexAttributes); -} - -static inline void -vn_encode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->legacyVertexAttributes); -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->legacyVertexAttributes */ -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_handle_self(VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->legacyVertexAttributes */ -} - -static inline void -vn_replace_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_handle(VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - vn_replace_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_handle_self((VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->mutableDescriptorType); -} - -static inline void -vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->mutableDescriptorType); -} - -static inline void -vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->mutableDescriptorType */ -} - -static inline void -vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_handle_self(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->mutableDescriptorType */ -} - -static inline void -vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_handle(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_handle_self((VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDepthClipControlFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->depthClipControl); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->depthClipControl); -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->depthClipControl */ -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClipControlFeaturesEXT_handle_self(VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthClipControl */ -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClipControlFeaturesEXT_handle(VkPhysicalDeviceDepthClipControlFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClipControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDepthClampControlFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDepthClampControlFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->depthClampControl); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClampControlFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceDepthClampControlFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->depthClampControl); -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->depthClampControl */ -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClampControlFeaturesEXT_handle_self(VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthClampControl */ -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClampControlFeaturesEXT_handle(VkPhysicalDeviceDepthClampControlFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClampControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->vertexInputDynamicState); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->vertexInputDynamicState); -} - -static inline void -vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->vertexInputDynamicState */ -} - -static inline void -vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_handle_self(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->vertexInputDynamicState */ -} - -static inline void -vn_replace_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_handle(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderRelaxedExtendedInstruction); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderRelaxedExtendedInstruction); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderRelaxedExtendedInstruction */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_handle_self(VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderRelaxedExtendedInstruction */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_handle(VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_handle_self((VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceColorWriteEnableFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->colorWriteEnable); -} - -static inline void -vn_encode_VkPhysicalDeviceColorWriteEnableFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->colorWriteEnable); -} - -static inline void -vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->colorWriteEnable */ -} - -static inline void -vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceColorWriteEnableFeaturesEXT_handle_self(VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->colorWriteEnable */ -} - -static inline void -vn_replace_VkPhysicalDeviceColorWriteEnableFeaturesEXT_handle(VkPhysicalDeviceColorWriteEnableFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceColorWriteEnableFeaturesEXT_handle_self((VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceSynchronization2Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceSynchronization2Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSynchronization2Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSynchronization2Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->synchronization2); -} - -static inline void -vn_encode_VkPhysicalDeviceSynchronization2Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceSynchronization2Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES }); - vn_encode_VkPhysicalDeviceSynchronization2Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSynchronization2Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSynchronization2Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSynchronization2Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSynchronization2Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->synchronization2); -} - -static inline void -vn_decode_VkPhysicalDeviceSynchronization2Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSynchronization2Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSynchronization2Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSynchronization2Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSynchronization2Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSynchronization2Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSynchronization2Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->synchronization2 */ -} - -static inline void -vn_decode_VkPhysicalDeviceSynchronization2Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSynchronization2Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSynchronization2Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSynchronization2Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceSynchronization2Features_handle_self(VkPhysicalDeviceSynchronization2Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->synchronization2 */ -} - -static inline void -vn_replace_VkPhysicalDeviceSynchronization2Features_handle(VkPhysicalDeviceSynchronization2Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - vn_replace_VkPhysicalDeviceSynchronization2Features_handle_self((VkPhysicalDeviceSynchronization2Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceHostImageCopyFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceHostImageCopyFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceHostImageCopyFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceHostImageCopyFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->hostImageCopy); -} - -static inline void -vn_encode_VkPhysicalDeviceHostImageCopyFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceHostImageCopyFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES }); - vn_encode_VkPhysicalDeviceHostImageCopyFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceHostImageCopyFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceHostImageCopyFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostImageCopyFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->hostImageCopy); -} - -static inline void -vn_decode_VkPhysicalDeviceHostImageCopyFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostImageCopyFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceHostImageCopyFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceHostImageCopyFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostImageCopyFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->hostImageCopy */ -} - -static inline void -vn_decode_VkPhysicalDeviceHostImageCopyFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostImageCopyFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceHostImageCopyFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceHostImageCopyFeatures_handle_self(VkPhysicalDeviceHostImageCopyFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->hostImageCopy */ -} - -static inline void -vn_replace_VkPhysicalDeviceHostImageCopyFeatures_handle(VkPhysicalDeviceHostImageCopyFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - vn_replace_VkPhysicalDeviceHostImageCopyFeatures_handle_self((VkPhysicalDeviceHostImageCopyFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->primitivesGeneratedQuery); - vn_encode_VkBool32(enc, &val->primitivesGeneratedQueryWithRasterizerDiscard); - vn_encode_VkBool32(enc, &val->primitivesGeneratedQueryWithNonZeroStreams); -} - -static inline void -vn_encode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT }); - vn_encode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->primitivesGeneratedQuery); - vn_decode_VkBool32(dec, &val->primitivesGeneratedQueryWithRasterizerDiscard); - vn_decode_VkBool32(dec, &val->primitivesGeneratedQueryWithNonZeroStreams); -} - -static inline void -vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->primitivesGeneratedQuery */ - /* skip val->primitivesGeneratedQueryWithRasterizerDiscard */ - /* skip val->primitivesGeneratedQueryWithNonZeroStreams */ -} - -static inline void -vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_handle_self(VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->primitivesGeneratedQuery */ - /* skip val->primitivesGeneratedQueryWithRasterizerDiscard */ - /* skip val->primitivesGeneratedQueryWithNonZeroStreams */ -} - -static inline void -vn_replace_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_handle(VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - vn_replace_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_handle_self((VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceLegacyDitheringFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->legacyDithering); -} - -static inline void -vn_encode_VkPhysicalDeviceLegacyDitheringFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->legacyDithering); -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->legacyDithering */ -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceLegacyDitheringFeaturesEXT_handle_self(VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->legacyDithering */ -} - -static inline void -vn_replace_VkPhysicalDeviceLegacyDitheringFeaturesEXT_handle(VkPhysicalDeviceLegacyDitheringFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - vn_replace_VkPhysicalDeviceLegacyDitheringFeaturesEXT_handle_self((VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->multisampledRenderToSingleSampled); -} - -static inline void -vn_encode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->multisampledRenderToSingleSampled); -} - -static inline void -vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->multisampledRenderToSingleSampled */ -} - -static inline void -vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_handle_self(VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->multisampledRenderToSingleSampled */ -} - -static inline void -vn_replace_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_handle(VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_handle_self((VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePipelineProtectedAccessFeatures chain */ - -static inline void -vn_encode_VkPhysicalDevicePipelineProtectedAccessFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineProtectedAccessFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->pipelineProtectedAccess); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineProtectedAccessFeatures(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES }); - vn_encode_VkPhysicalDevicePipelineProtectedAccessFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePipelineProtectedAccessFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->pipelineProtectedAccess); -} - -static inline void -vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pipelineProtectedAccess */ -} - -static inline void -vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePipelineProtectedAccessFeatures_handle_self(VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pipelineProtectedAccess */ -} - -static inline void -vn_replace_VkPhysicalDevicePipelineProtectedAccessFeatures_handle(VkPhysicalDevicePipelineProtectedAccessFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - vn_replace_VkPhysicalDevicePipelineProtectedAccessFeatures_handle_self((VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->ycbcr2plane444Formats); -} - -static inline void -vn_encode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->ycbcr2plane444Formats); -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->ycbcr2plane444Formats */ -} - -static inline void -vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_handle_self(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->ycbcr2plane444Formats */ -} - -static inline void -vn_replace_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_handle(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_handle_self((VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceProvokingVertexFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceProvokingVertexFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->provokingVertexLast); - vn_encode_VkBool32(enc, &val->transformFeedbackPreservesProvokingVertex); -} - -static inline void -vn_encode_VkPhysicalDeviceProvokingVertexFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceProvokingVertexFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->provokingVertexLast); - vn_decode_VkBool32(dec, &val->transformFeedbackPreservesProvokingVertex); -} - -static inline void -vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->provokingVertexLast */ - /* skip val->transformFeedbackPreservesProvokingVertex */ -} - -static inline void -vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceProvokingVertexFeaturesEXT_handle_self(VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->provokingVertexLast */ - /* skip val->transformFeedbackPreservesProvokingVertex */ -} - -static inline void -vn_replace_VkPhysicalDeviceProvokingVertexFeaturesEXT_handle(VkPhysicalDeviceProvokingVertexFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - vn_replace_VkPhysicalDeviceProvokingVertexFeaturesEXT_handle_self((VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderIntegerDotProductFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderIntegerDotProductFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderIntegerDotProduct); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderIntegerDotProductFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES }); - vn_encode_VkPhysicalDeviceShaderIntegerDotProductFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderIntegerDotProduct); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderIntegerDotProduct */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderIntegerDotProductFeatures_handle_self(VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderIntegerDotProduct */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderIntegerDotProductFeatures_handle(VkPhysicalDeviceShaderIntegerDotProductFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - vn_replace_VkPhysicalDeviceShaderIntegerDotProductFeatures_handle_self((VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderFmaFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderFmaFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFmaFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderFmaFloat16); - vn_encode_VkBool32(enc, &val->shaderFmaFloat32); - vn_encode_VkBool32(enc, &val->shaderFmaFloat64); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFmaFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderFmaFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderFmaFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderFmaFloat16); - vn_decode_VkBool32(dec, &val->shaderFmaFloat32); - vn_decode_VkBool32(dec, &val->shaderFmaFloat64); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderFmaFloat16 */ - /* skip val->shaderFmaFloat32 */ - /* skip val->shaderFmaFloat64 */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFmaFeaturesKHR_handle_self(VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderFmaFloat16 */ - /* skip val->shaderFmaFloat32 */ - /* skip val->shaderFmaFloat64 */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFmaFeaturesKHR_handle(VkPhysicalDeviceShaderFmaFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderFmaFeaturesKHR_handle_self((VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDynamicRenderingFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->dynamicRendering); -} - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES }); - vn_encode_VkPhysicalDeviceDynamicRenderingFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDynamicRenderingFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->dynamicRendering); -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->dynamicRendering */ -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDynamicRenderingFeatures_handle_self(VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->dynamicRendering */ -} - -static inline void -vn_replace_VkPhysicalDeviceDynamicRenderingFeatures_handle(VkPhysicalDeviceDynamicRenderingFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - vn_replace_VkPhysicalDeviceDynamicRenderingFeatures_handle_self((VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImageViewMinLodFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->minLod); -} - -static inline void -vn_encode_VkPhysicalDeviceImageViewMinLodFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->minLod); -} - -static inline void -vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->minLod */ -} - -static inline void -vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImageViewMinLodFeaturesEXT_handle_self(VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->minLod */ -} - -static inline void -vn_replace_VkPhysicalDeviceImageViewMinLodFeaturesEXT_handle(VkPhysicalDeviceImageViewMinLodFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImageViewMinLodFeaturesEXT_handle_self((VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->rasterizationOrderColorAttachmentAccess); - vn_encode_VkBool32(enc, &val->rasterizationOrderDepthAttachmentAccess); - vn_encode_VkBool32(enc, &val->rasterizationOrderStencilAttachmentAccess); -} - -static inline void -vn_encode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->rasterizationOrderColorAttachmentAccess); - vn_decode_VkBool32(dec, &val->rasterizationOrderDepthAttachmentAccess); - vn_decode_VkBool32(dec, &val->rasterizationOrderStencilAttachmentAccess); -} - -static inline void -vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->rasterizationOrderColorAttachmentAccess */ - /* skip val->rasterizationOrderDepthAttachmentAccess */ - /* skip val->rasterizationOrderStencilAttachmentAccess */ -} - -static inline void -vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_handle_self(VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->rasterizationOrderColorAttachmentAccess */ - /* skip val->rasterizationOrderDepthAttachmentAccess */ - /* skip val->rasterizationOrderStencilAttachmentAccess */ -} - -static inline void -vn_replace_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_handle(VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_handle_self((VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->graphicsPipelineLibrary); -} - -static inline void -vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->graphicsPipelineLibrary); -} - -static inline void -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->graphicsPipelineLibrary */ -} - -static inline void -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_handle_self(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->graphicsPipelineLibrary */ -} - -static inline void -vn_replace_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_handle(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - vn_replace_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_handle_self((VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->nestedCommandBuffer); - vn_encode_VkBool32(enc, &val->nestedCommandBufferRendering); - vn_encode_VkBool32(enc, &val->nestedCommandBufferSimultaneousUse); -} - -static inline void -vn_encode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->nestedCommandBuffer); - vn_decode_VkBool32(dec, &val->nestedCommandBufferRendering); - vn_decode_VkBool32(dec, &val->nestedCommandBufferSimultaneousUse); -} - -static inline void -vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->nestedCommandBuffer */ - /* skip val->nestedCommandBufferRendering */ - /* skip val->nestedCommandBufferSimultaneousUse */ -} - -static inline void -vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_handle_self(VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->nestedCommandBuffer */ - /* skip val->nestedCommandBufferRendering */ - /* skip val->nestedCommandBufferSimultaneousUse */ -} - -static inline void -vn_replace_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_handle(VkPhysicalDeviceNestedCommandBufferFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - vn_replace_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_handle_self((VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->nonSeamlessCubeMap); -} - -static inline void -vn_encode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->nonSeamlessCubeMap); -} - -static inline void -vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->nonSeamlessCubeMap */ -} - -static inline void -vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_handle_self(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->nonSeamlessCubeMap */ -} - -static inline void -vn_replace_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_handle(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - vn_replace_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_handle_self((VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePipelineRobustnessFeatures chain */ - -static inline void -vn_encode_VkPhysicalDevicePipelineRobustnessFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineRobustnessFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->pipelineRobustness); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineRobustnessFeatures(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES }); - vn_encode_VkPhysicalDevicePipelineRobustnessFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePipelineRobustnessFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->pipelineRobustness); -} - -static inline void -vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pipelineRobustness */ -} - -static inline void -vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePipelineRobustnessFeatures_handle_self(VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pipelineRobustness */ -} - -static inline void -vn_replace_VkPhysicalDevicePipelineRobustnessFeatures_handle(VkPhysicalDevicePipelineRobustnessFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - vn_replace_VkPhysicalDevicePipelineRobustnessFeatures_handle_self((VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->attachmentFeedbackLoopLayout); -} - -static inline void -vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->attachmentFeedbackLoopLayout); -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->attachmentFeedbackLoopLayout */ -} - -static inline void -vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_handle_self(VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachmentFeedbackLoopLayout */ -} - -static inline void -vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_handle(VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_handle_self((VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDepthClampZeroOneFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->depthClampZeroOne); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->depthClampZeroOne); -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->depthClampZeroOne */ -} - -static inline void -vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_handle_self(VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthClampZeroOne */ -} - -static inline void -vn_replace_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_handle(VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_handle_self((VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->pipelineLibraryGroupHandles); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT }); - vn_encode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->pipelineLibraryGroupHandles); -} - -static inline void -vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pipelineLibraryGroupHandles */ -} - -static inline void -vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_handle_self(VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pipelineLibraryGroupHandles */ -} - -static inline void -vn_replace_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_handle(VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - vn_replace_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_handle_self((VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->dynamicRenderingUnusedAttachments); -} - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->dynamicRenderingUnusedAttachments); -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->dynamicRenderingUnusedAttachments */ -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_handle_self(VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->dynamicRenderingUnusedAttachments */ -} - -static inline void -vn_replace_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_handle(VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_handle_self((VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDepthBiasControlFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->depthBiasControl); - vn_encode_VkBool32(enc, &val->leastRepresentableValueForceUnormRepresentation); - vn_encode_VkBool32(enc, &val->floatRepresentation); - vn_encode_VkBool32(enc, &val->depthBiasExact); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthBiasControlFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->depthBiasControl); - vn_decode_VkBool32(dec, &val->leastRepresentableValueForceUnormRepresentation); - vn_decode_VkBool32(dec, &val->floatRepresentation); - vn_decode_VkBool32(dec, &val->depthBiasExact); -} - -static inline void -vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->depthBiasControl */ - /* skip val->leastRepresentableValueForceUnormRepresentation */ - /* skip val->floatRepresentation */ - /* skip val->depthBiasExact */ -} - -static inline void -vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDepthBiasControlFeaturesEXT_handle_self(VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthBiasControl */ - /* skip val->leastRepresentableValueForceUnormRepresentation */ - /* skip val->floatRepresentation */ - /* skip val->depthBiasExact */ -} - -static inline void -vn_replace_VkPhysicalDeviceDepthBiasControlFeaturesEXT_handle(VkPhysicalDeviceDepthBiasControlFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthBiasControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->rayTracingPositionFetch); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->rayTracingPositionFetch); -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->rayTracingPositionFetch */ -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_handle_self(VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->rayTracingPositionFetch */ -} - -static inline void -vn_replace_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_handle(VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_handle_self((VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->cooperativeMatrix); - vn_encode_VkBool32(enc, &val->cooperativeMatrixRobustBufferAccess); -} - -static inline void -vn_encode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->cooperativeMatrix); - vn_decode_VkBool32(dec, &val->cooperativeMatrixRobustBufferAccess); -} - -static inline void -vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->cooperativeMatrix */ - /* skip val->cooperativeMatrixRobustBufferAccess */ -} - -static inline void -vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_handle_self(VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->cooperativeMatrix */ - /* skip val->cooperativeMatrixRobustBufferAccess */ -} - -static inline void -vn_replace_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_handle(VkPhysicalDeviceCooperativeMatrixFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - vn_replace_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_handle_self((VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderMaximalReconvergence); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderMaximalReconvergence); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderMaximalReconvergence */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_handle_self(VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderMaximalReconvergence */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_handle(VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_handle_self((VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderSubgroupRotateFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupRotateFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderSubgroupRotate); - vn_encode_VkBool32(enc, &val->shaderSubgroupRotateClustered); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderSubgroupRotateFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES }); - vn_encode_VkPhysicalDeviceShaderSubgroupRotateFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderSubgroupRotate); - vn_decode_VkBool32(dec, &val->shaderSubgroupRotateClustered); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderSubgroupRotate */ - /* skip val->shaderSubgroupRotateClustered */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderSubgroupRotateFeatures_handle_self(VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderSubgroupRotate */ - /* skip val->shaderSubgroupRotateClustered */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderSubgroupRotateFeatures_handle(VkPhysicalDeviceShaderSubgroupRotateFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - vn_replace_VkPhysicalDeviceShaderSubgroupRotateFeatures_handle_self((VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderExpectAssumeFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderExpectAssumeFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderExpectAssumeFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderExpectAssume); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderExpectAssumeFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES }); - vn_encode_VkPhysicalDeviceShaderExpectAssumeFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderExpectAssumeFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderExpectAssume); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderExpectAssume */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderExpectAssumeFeatures_handle_self(VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderExpectAssume */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderExpectAssumeFeatures_handle(VkPhysicalDeviceShaderExpectAssumeFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - vn_replace_VkPhysicalDeviceShaderExpectAssumeFeatures_handle_self((VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderFloatControls2Features chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderFloatControls2Features_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFloatControls2Features_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFloatControls2Features *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderFloatControls2); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFloatControls2Features(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFloatControls2Features *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES }); - vn_encode_VkPhysicalDeviceShaderFloatControls2Features_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderFloatControls2Features_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFloatControls2Features_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloatControls2Features *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderFloatControls2); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloatControls2Features_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloatControls2Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFloatControls2Features_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFloatControls2Features_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloatControls2Features *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderFloatControls2 */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloatControls2Features_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloatControls2Features *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFloatControls2Features_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFloatControls2Features_handle_self(VkPhysicalDeviceShaderFloatControls2Features *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderFloatControls2 */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFloatControls2Features_handle(VkPhysicalDeviceShaderFloatControls2Features *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - vn_replace_VkPhysicalDeviceShaderFloatControls2Features_handle_self((VkPhysicalDeviceShaderFloatControls2Features *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDynamicRenderingLocalReadFeatures chain */ - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->dynamicRenderingLocalRead); -} - -static inline void -vn_encode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures(struct vn_cs_encoder *enc, const VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES }); - vn_encode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->dynamicRenderingLocalRead); -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->dynamicRenderingLocalRead */ -} - -static inline void -vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_handle_self(VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->dynamicRenderingLocalRead */ -} - -static inline void -vn_replace_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_handle(VkPhysicalDeviceDynamicRenderingLocalReadFeatures *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - vn_replace_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_handle_self((VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderQuadControlFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderQuadControl); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderQuadControlFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderQuadControl); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderQuadControl */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderQuadControlFeaturesKHR_handle_self(VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderQuadControl */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderQuadControlFeaturesKHR_handle(VkPhysicalDeviceShaderQuadControlFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderQuadControlFeaturesKHR_handle_self((VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderBfloat16FeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderBFloat16Type); - vn_encode_VkBool32(enc, &val->shaderBFloat16DotProduct); - vn_encode_VkBool32(enc, &val->shaderBFloat16CooperativeMatrix); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderBfloat16FeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderBFloat16Type); - vn_decode_VkBool32(dec, &val->shaderBFloat16DotProduct); - vn_decode_VkBool32(dec, &val->shaderBFloat16CooperativeMatrix); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderBFloat16Type */ - /* skip val->shaderBFloat16DotProduct */ - /* skip val->shaderBFloat16CooperativeMatrix */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderBfloat16FeaturesKHR_handle_self(VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderBFloat16Type */ - /* skip val->shaderBFloat16DotProduct */ - /* skip val->shaderBFloat16CooperativeMatrix */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderBfloat16FeaturesKHR_handle(VkPhysicalDeviceShaderBfloat16FeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderBfloat16FeaturesKHR_handle_self((VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderReplicatedComposites); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderReplicatedComposites); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderReplicatedComposites */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_handle_self(VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderReplicatedComposites */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_handle(VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_handle_self((VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderUniformBufferUnsizedArray); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderUniformBufferUnsizedArray); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderUniformBufferUnsizedArray */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_handle_self(VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderUniformBufferUnsizedArray */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_handle(VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_handle_self((VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderFloat8FeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderFloat8FeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderFloat8); - vn_encode_VkBool32(enc, &val->shaderFloat8CooperativeMatrix); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderFloat8FeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceShaderFloat8FeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderFloat8); - vn_decode_VkBool32(dec, &val->shaderFloat8CooperativeMatrix); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderFloat8 */ - /* skip val->shaderFloat8CooperativeMatrix */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFloat8FeaturesEXT_handle_self(VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderFloat8 */ - /* skip val->shaderFloat8CooperativeMatrix */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderFloat8FeaturesEXT_handle(VkPhysicalDeviceShaderFloat8FeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderFloat8FeaturesEXT_handle_self((VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceShaderUntypedPointersFeaturesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->shaderUntypedPointers); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR }); - vn_encode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->shaderUntypedPointers); -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderUntypedPointers */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_handle_self(VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->shaderUntypedPointers */ -} - -static inline void -vn_replace_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_handle(VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_handle_self((VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceDescriptorHeapFeaturesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->descriptorHeap); - vn_encode_VkBool32(enc, &val->descriptorHeapCaptureReplay); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorHeapFeaturesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT }); - vn_encode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->descriptorHeap); - vn_decode_VkBool32(dec, &val->descriptorHeapCaptureReplay); -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->descriptorHeap */ - /* skip val->descriptorHeapCaptureReplay */ -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceDescriptorHeapFeaturesEXT_handle_self(VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->descriptorHeap */ - /* skip val->descriptorHeapCaptureReplay */ -} - -static inline void -vn_replace_VkPhysicalDeviceDescriptorHeapFeaturesEXT_handle(VkPhysicalDeviceDescriptorHeapFeaturesEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDescriptorHeapFeaturesEXT_handle_self((VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceFeatures2 chain */ - -static inline void -vn_encode_VkPhysicalDeviceFeatures2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePrivateDataFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDevicePrivateDataFeatures_self(enc, (const VkPhysicalDevicePrivateDataFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVariablePointersFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVariablePointersFeatures_self(enc, (const VkPhysicalDeviceVariablePointersFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMultiviewFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMultiviewFeatures_self(enc, (const VkPhysicalDeviceMultiviewFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevice16BitStorageFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDevice16BitStorageFeatures_self(enc, (const VkPhysicalDevice16BitStorageFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self(enc, (const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self(enc, (const VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceProtectedMemoryFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceProtectedMemoryFeatures_self(enc, (const VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self(enc, (const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMultiDrawFeaturesEXT_self(enc, (const VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceInlineUniformBlockFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceInlineUniformBlockFeatures_self(enc, (const VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMaintenance4Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance4Features_self(enc, (const VkPhysicalDeviceMaintenance4Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMaintenance5Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance5Features_self(enc, (const VkPhysicalDeviceMaintenance5Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMaintenance6Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance6Features_self(enc, (const VkPhysicalDeviceMaintenance6Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance7FeaturesKHR_self(enc, (const VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderDrawParametersFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderDrawParametersFeatures_self(enc, (const VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderFloat16Int8Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderFloat16Int8Features_self(enc, (const VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceHostQueryResetFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceHostQueryResetFeatures_self(enc, (const VkPhysicalDeviceHostQueryResetFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self(enc, (const VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDescriptorIndexingFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDescriptorIndexingFeatures_self(enc, (const VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTimelineSemaphoreFeatures_self(enc, (const VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevice8BitStorageFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDevice8BitStorageFeatures_self(enc, (const VkPhysicalDevice8BitStorageFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self(enc, (const VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkanMemoryModelFeatures_self(enc, (const VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderAtomicInt64Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderAtomicInt64Features_self(enc, (const VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self(enc, (const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self(enc, (const VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self(enc, (const VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self(enc, (const VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self(enc, (const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self(enc, (const VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMeshShaderFeaturesEXT_self(enc, (const VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self(enc, (const VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self(enc, (const VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceRayQueryFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRayQueryFeaturesKHR_self(enc, (const VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self(enc, (const VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceScalarBlockLayoutFeatures_self(enc, (const VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self(enc, (const VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self(enc, (const VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceBufferDeviceAddressFeatures_self(enc, (const VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self(enc, (const VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceImagelessFramebufferFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceImagelessFramebufferFeatures_self(enc, (const VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self(enc, (const VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self(enc, (const VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderClockFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderClockFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceIndexTypeUint8Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceIndexTypeUint8Features_self(enc, (const VkPhysicalDeviceIndexTypeUint8Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self(enc, (const VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self(enc, (const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self(enc, (const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self(enc, (const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self(enc, (const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSubgroupSizeControlFeatures_self(enc, (const VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceLineRasterizationFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceLineRasterizationFeatures_self(enc, (const VkPhysicalDeviceLineRasterizationFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self(enc, (const VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVulkan11Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan11Features_self(enc, (const VkPhysicalDeviceVulkan11Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVulkan12Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan12Features_self(enc, (const VkPhysicalDeviceVulkan12Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVulkan13Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan13Features_self(enc, (const VkPhysicalDeviceVulkan13Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVulkan14Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan14Features_self(enc, (const VkPhysicalDeviceVulkan14Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self(enc, (const VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self(enc, (const VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self(enc, (const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self(enc, (const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self(enc, (const VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self(enc, (const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceRobustness2FeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRobustness2FeaturesKHR_self(enc, (const VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceImageRobustnessFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceImageRobustnessFeatures_self(enc, (const VkPhysicalDeviceImageRobustnessFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self(enc, (const VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevice4444FormatsFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDevice4444FormatsFeaturesEXT_self(enc, (const VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self(enc, (const VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self(enc, (const VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self(enc, (const VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self(enc, (const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self(enc, (const VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self(enc, (const VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self(enc, (const VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self(enc, (const VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self(enc, (const VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self(enc, (const VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self(enc, (const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self(enc, (const VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceSynchronization2Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSynchronization2Features_self(enc, (const VkPhysicalDeviceSynchronization2Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceHostImageCopyFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceHostImageCopyFeatures_self(enc, (const VkPhysicalDeviceHostImageCopyFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self(enc, (const VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self(enc, (const VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self(enc, (const VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDevicePipelineProtectedAccessFeatures_self(enc, (const VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self(enc, (const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self(enc, (const VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self(enc, (const VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderFmaFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDynamicRenderingFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDynamicRenderingFeatures_self(enc, (const VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self(enc, (const VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self(enc, (const VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self(enc, (const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self(enc, (const VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self(enc, (const VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePipelineRobustnessFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDevicePipelineRobustnessFeatures_self(enc, (const VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self(enc, (const VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self(enc, (const VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self(enc, (const VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self(enc, (const VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self(enc, (const VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self(enc, (const VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self(enc, (const VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self(enc, (const VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderExpectAssumeFeatures_self(enc, (const VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderFloatControls2Features *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderFloatControls2Features_self(enc, (const VkPhysicalDeviceShaderFloatControls2Features *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self(enc, (const VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self(enc, (const VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self(enc, (const VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self(enc, (const VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self(enc, (const VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self(enc, (const VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, ((const VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self(enc, (const VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFeatures2_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFeatures2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkPhysicalDeviceFeatures(enc, &val->features); -} - -static inline void -vn_encode_VkPhysicalDeviceFeatures2(struct vn_cs_encoder *enc, const VkPhysicalDeviceFeatures2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 }); - vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFeatures2_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrivateDataFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrivateDataFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrivateDataFeatures_self_temp(dec, (VkPhysicalDevicePrivateDataFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVariablePointersFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVariablePointersFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_temp(dec, (VkPhysicalDeviceVariablePointersFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiviewFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiviewFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewFeatures_self_temp(dec, (VkPhysicalDeviceMultiviewFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice16BitStorageFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice16BitStorageFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevice16BitStorageFeatures_self_temp(dec, (VkPhysicalDevice16BitStorageFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_temp(dec, (VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_temp(dec, (VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProtectedMemoryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProtectedMemoryFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_temp(dec, (VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_temp(dec, (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiDrawFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceInlineUniformBlockFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceInlineUniformBlockFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_temp(dec, (VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance4Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance4Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Features_self_temp(dec, (VkPhysicalDeviceMaintenance4Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance5Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance5Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Features_self_temp(dec, (VkPhysicalDeviceMaintenance5Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance6Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance6Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Features_self_temp(dec, (VkPhysicalDeviceMaintenance6Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance7FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_temp(dec, (VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderDrawParametersFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderDrawParametersFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_temp(dec, (VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloat16Int8Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloat16Int8Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_temp(dec, (VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostQueryResetFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostQueryResetFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_temp(dec, (VkPhysicalDeviceHostQueryResetFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGlobalPriorityQueryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_temp(dec, (VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorIndexingFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorIndexingFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_temp(dec, (VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_temp(dec, (VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice8BitStorageFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice8BitStorageFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevice8BitStorageFeatures_self_temp(dec, (VkPhysicalDevice8BitStorageFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_temp(dec, (VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkanMemoryModelFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_temp(dec, (VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicInt64Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicInt64Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_temp(dec, (VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicFloatFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexAttributeDivisorFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_temp(dec, (VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTransformFeedbackFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_temp(dec, (VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_temp(dec, (VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_temp(dec, (VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMeshShaderFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAccelerationStructureFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_temp(dec, (VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPipelineFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayQueryFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayQueryFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_temp(dec, (VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceUniformBufferStandardLayoutFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_temp(dec, (VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_temp(dec, (VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_temp(dec, (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImagelessFramebufferFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImagelessFramebufferFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_temp(dec, (VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTextureCompressionASTCHDRFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_temp(dec, (VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_temp(dec, (VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderClockFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderClockFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceIndexTypeUint8Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceIndexTypeUint8Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_temp(dec, (VkPhysicalDeviceIndexTypeUint8Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_temp(dec, (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_temp(dec, (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_temp(dec, (VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_temp(dec, (VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_temp(dec, (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSubgroupSizeControlFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_temp(dec, (VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLineRasterizationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLineRasterizationFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_temp(dec, (VkPhysicalDeviceLineRasterizationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineCreationCacheControlFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_temp(dec, (VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan11Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan11Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Features_self_temp(dec, (VkPhysicalDeviceVulkan11Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan12Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan12Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Features_self_temp(dec, (VkPhysicalDeviceVulkan12Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan13Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan13Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Features_self_temp(dec, (VkPhysicalDeviceVulkan13Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan14Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan14Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Features_self_temp(dec, (VkPhysicalDeviceVulkan14Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_temp(dec, (VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_temp(dec, (VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_temp(dec, (VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_temp(dec, (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_temp(dec, (VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_temp(dec, (VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRobustness2FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRobustness2FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_temp(dec, (VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageRobustnessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageRobustnessFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_temp(dec, (VkPhysicalDeviceImageRobustnessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_temp(dec, (VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice4444FormatsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice4444FormatsFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_temp(dec, (VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShadingRateFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_temp(dec, (VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderTerminateInvocationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_temp(dec, (VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_temp(dec, (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_temp(dec, (VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_temp(dec, (VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_temp(dec, (VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClipControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClampControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_temp(dec, (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceColorWriteEnableFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_temp(dec, (VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSynchronization2Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSynchronization2Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSynchronization2Features_self_temp(dec, (VkPhysicalDeviceSynchronization2Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostImageCopyFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostImageCopyFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_temp(dec, (VkPhysicalDeviceHostImageCopyFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_temp(dec, (VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyDitheringFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_temp(dec, (VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineProtectedAccessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_temp(dec, (VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_temp(dec, (VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProvokingVertexFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_temp(dec, (VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderIntegerDotProductFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_temp(dec, (VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFmaFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_temp(dec, (VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageViewMinLodFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_temp(dec, (VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_temp(dec, (VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_temp(dec, (VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNestedCommandBufferFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_temp(dec, (VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_temp(dec, (VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineRobustnessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineRobustnessFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_temp(dec, (VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_temp(dec, (VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClampZeroOneFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_temp(dec, (VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_temp(dec, (VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthBiasControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCooperativeMatrixFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_temp(dec, (VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupRotateFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_temp(dec, (VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderExpectAssumeFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_temp(dec, (VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloatControls2Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloatControls2Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_temp(dec, (VkPhysicalDeviceShaderFloatControls2Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingLocalReadFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_temp(dec, (VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderQuadControlFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderBfloat16FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloat8FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderUntypedPointersFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorHeapFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceFeatures2_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFeatures2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkPhysicalDeviceFeatures_temp(dec, &val->features); -} - -static inline void -vn_decode_VkPhysicalDeviceFeatures2_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFeatures2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFeatures2_self_temp(dec, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrivateDataFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrivateDataFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePrivateDataFeatures_self_partial_temp(dec, (VkPhysicalDevicePrivateDataFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVariablePointersFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVariablePointersFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_partial_temp(dec, (VkPhysicalDeviceVariablePointersFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiviewFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiviewFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewFeatures_self_partial_temp(dec, (VkPhysicalDeviceMultiviewFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice16BitStorageFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice16BitStorageFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevice16BitStorageFeatures_self_partial_temp(dec, (VkPhysicalDevice16BitStorageFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_partial_temp(dec, (VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProtectedMemoryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProtectedMemoryFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_partial_temp(dec, (VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiDrawFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceInlineUniformBlockFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceInlineUniformBlockFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_partial_temp(dec, (VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance4Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance4Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Features_self_partial_temp(dec, (VkPhysicalDeviceMaintenance4Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance5Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance5Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Features_self_partial_temp(dec, (VkPhysicalDeviceMaintenance5Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance6Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance6Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Features_self_partial_temp(dec, (VkPhysicalDeviceMaintenance6Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance7FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderDrawParametersFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderDrawParametersFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloat16Int8Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloat16Int8Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_partial_temp(dec, (VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostQueryResetFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostQueryResetFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_partial_temp(dec, (VkPhysicalDeviceHostQueryResetFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGlobalPriorityQueryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_partial_temp(dec, (VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorIndexingFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorIndexingFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_partial_temp(dec, (VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_partial_temp(dec, (VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice8BitStorageFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice8BitStorageFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevice8BitStorageFeatures_self_partial_temp(dec, (VkPhysicalDevice8BitStorageFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkanMemoryModelFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_partial_temp(dec, (VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicInt64Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicInt64Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_partial_temp(dec, (VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicFloatFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexAttributeDivisorFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_partial_temp(dec, (VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTransformFeedbackFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMeshShaderFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAccelerationStructureFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPipelineFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayQueryFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayQueryFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_partial_temp(dec, (VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceUniformBufferStandardLayoutFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_partial_temp(dec, (VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_partial_temp(dec, (VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImagelessFramebufferFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImagelessFramebufferFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_partial_temp(dec, (VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTextureCompressionASTCHDRFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_partial_temp(dec, (VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderClockFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderClockFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceIndexTypeUint8Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceIndexTypeUint8Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_partial_temp(dec, (VkPhysicalDeviceIndexTypeUint8Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_partial_temp(dec, (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_partial_temp(dec, (VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSubgroupSizeControlFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_partial_temp(dec, (VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLineRasterizationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLineRasterizationFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_partial_temp(dec, (VkPhysicalDeviceLineRasterizationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineCreationCacheControlFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_partial_temp(dec, (VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan11Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan11Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Features_self_partial_temp(dec, (VkPhysicalDeviceVulkan11Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan12Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan12Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Features_self_partial_temp(dec, (VkPhysicalDeviceVulkan12Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan13Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan13Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Features_self_partial_temp(dec, (VkPhysicalDeviceVulkan13Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan14Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan14Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Features_self_partial_temp(dec, (VkPhysicalDeviceVulkan14Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_partial_temp(dec, (VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRobustness2FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRobustness2FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageRobustnessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageRobustnessFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_partial_temp(dec, (VkPhysicalDeviceImageRobustnessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice4444FormatsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice4444FormatsFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_partial_temp(dec, (VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShadingRateFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderTerminateInvocationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClipControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClampControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceColorWriteEnableFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSynchronization2Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSynchronization2Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSynchronization2Features_self_partial_temp(dec, (VkPhysicalDeviceSynchronization2Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostImageCopyFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostImageCopyFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_partial_temp(dec, (VkPhysicalDeviceHostImageCopyFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_partial_temp(dec, (VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyDitheringFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineProtectedAccessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_partial_temp(dec, (VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProvokingVertexFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderIntegerDotProductFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFmaFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_partial_temp(dec, (VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageViewMinLodFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNestedCommandBufferFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineRobustnessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineRobustnessFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_partial_temp(dec, (VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClampZeroOneFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_partial_temp(dec, (VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthBiasControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCooperativeMatrixFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupRotateFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderExpectAssumeFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloatControls2Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloatControls2Features *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_partial_temp(dec, (VkPhysicalDeviceShaderFloatControls2Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingLocalReadFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_partial_temp(dec, (VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderQuadControlFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderBfloat16FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloat8FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderUntypedPointersFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_partial_temp(dec, (VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorHeapFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_partial_temp(dec, (VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceFeatures2_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFeatures2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkPhysicalDeviceFeatures_partial_temp(dec, &val->features); -} - -static inline void -vn_decode_VkPhysicalDeviceFeatures2_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFeatures2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFeatures2_self_partial_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceFeatures2_handle_self(VkPhysicalDeviceFeatures2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkPhysicalDeviceFeatures_handle(&val->features); -} - -static inline void -vn_replace_VkPhysicalDeviceFeatures2_handle(VkPhysicalDeviceFeatures2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: - vn_replace_VkPhysicalDeviceFeatures2_handle_self((VkPhysicalDeviceFeatures2 *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - vn_replace_VkPhysicalDevicePrivateDataFeatures_handle_self((VkPhysicalDevicePrivateDataFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - vn_replace_VkPhysicalDeviceVariablePointersFeatures_handle_self((VkPhysicalDeviceVariablePointersFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - vn_replace_VkPhysicalDeviceMultiviewFeatures_handle_self((VkPhysicalDeviceMultiviewFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - vn_replace_VkPhysicalDevice16BitStorageFeatures_handle_self((VkPhysicalDevice16BitStorageFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - vn_replace_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_handle_self((VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - vn_replace_VkPhysicalDeviceSamplerYcbcrConversionFeatures_handle_self((VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - vn_replace_VkPhysicalDeviceProtectedMemoryFeatures_handle_self((VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_handle_self((VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMultiDrawFeaturesEXT_handle_self((VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - vn_replace_VkPhysicalDeviceInlineUniformBlockFeatures_handle_self((VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance4Features_handle_self((VkPhysicalDeviceMaintenance4Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance5Features_handle_self((VkPhysicalDeviceMaintenance5Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance6Features_handle_self((VkPhysicalDeviceMaintenance6Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - vn_replace_VkPhysicalDeviceMaintenance7FeaturesKHR_handle_self((VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - vn_replace_VkPhysicalDeviceShaderDrawParametersFeatures_handle_self((VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - vn_replace_VkPhysicalDeviceShaderFloat16Int8Features_handle_self((VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - vn_replace_VkPhysicalDeviceHostQueryResetFeatures_handle_self((VkPhysicalDeviceHostQueryResetFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - vn_replace_VkPhysicalDeviceGlobalPriorityQueryFeatures_handle_self((VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - vn_replace_VkPhysicalDeviceDescriptorIndexingFeatures_handle_self((VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - vn_replace_VkPhysicalDeviceTimelineSemaphoreFeatures_handle_self((VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - vn_replace_VkPhysicalDevice8BitStorageFeatures_handle_self((VkPhysicalDevice8BitStorageFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - vn_replace_VkPhysicalDeviceConditionalRenderingFeaturesEXT_handle_self((VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - vn_replace_VkPhysicalDeviceVulkanMemoryModelFeatures_handle_self((VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - vn_replace_VkPhysicalDeviceShaderAtomicInt64Features_handle_self((VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_handle_self((VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_handle_self((VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - vn_replace_VkPhysicalDeviceVertexAttributeDivisorFeatures_handle_self((VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - vn_replace_VkPhysicalDeviceTransformFeedbackFeaturesEXT_handle_self((VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - vn_replace_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_handle_self((VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - vn_replace_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_handle_self((VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMeshShaderFeaturesEXT_handle_self((VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceAccelerationStructureFeaturesKHR_handle_self((VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_handle_self((VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayQueryFeaturesKHR_handle_self((VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_handle_self((VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - vn_replace_VkPhysicalDeviceScalarBlockLayoutFeatures_handle_self((VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - vn_replace_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_handle_self((VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClipEnableFeaturesEXT_handle_self((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - vn_replace_VkPhysicalDeviceBufferDeviceAddressFeatures_handle_self((VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_handle_self((VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - vn_replace_VkPhysicalDeviceImagelessFramebufferFeatures_handle_self((VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - vn_replace_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_handle_self((VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_handle_self((VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderClockFeaturesKHR_handle_self((VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - vn_replace_VkPhysicalDeviceIndexTypeUint8Features_handle_self((VkPhysicalDeviceIndexTypeUint8Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - vn_replace_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_handle_self((VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - vn_replace_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_handle_self((VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - vn_replace_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_handle_self((VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - vn_replace_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_handle_self((VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_handle_self((VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - vn_replace_VkPhysicalDeviceSubgroupSizeControlFeatures_handle_self((VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - vn_replace_VkPhysicalDeviceLineRasterizationFeatures_handle_self((VkPhysicalDeviceLineRasterizationFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - vn_replace_VkPhysicalDevicePipelineCreationCacheControlFeatures_handle_self((VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - vn_replace_VkPhysicalDeviceVulkan11Features_handle_self((VkPhysicalDeviceVulkan11Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - vn_replace_VkPhysicalDeviceVulkan12Features_handle_self((VkPhysicalDeviceVulkan12Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - vn_replace_VkPhysicalDeviceVulkan13Features_handle_self((VkPhysicalDeviceVulkan13Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - vn_replace_VkPhysicalDeviceVulkan14Features_handle_self((VkPhysicalDeviceVulkan14Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - vn_replace_VkPhysicalDeviceCustomBorderColorFeaturesEXT_handle_self((VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_handle_self((VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - vn_replace_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_handle_self((VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_handle_self((VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRobustness2FeaturesKHR_handle_self((VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - vn_replace_VkPhysicalDeviceImageRobustnessFeatures_handle_self((VkPhysicalDeviceImageRobustnessFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - vn_replace_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_handle_self((VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - vn_replace_VkPhysicalDevice4444FormatsFeaturesEXT_handle_self((VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_handle_self((VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_handle_self((VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle_self((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_handle_self((VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_handle_self((VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - vn_replace_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_handle_self((VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_handle_self((VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClipControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClampControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_handle_self((VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceColorWriteEnableFeaturesEXT_handle_self((VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - vn_replace_VkPhysicalDeviceSynchronization2Features_handle_self((VkPhysicalDeviceSynchronization2Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - vn_replace_VkPhysicalDeviceHostImageCopyFeatures_handle_self((VkPhysicalDeviceHostImageCopyFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - vn_replace_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_handle_self((VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - vn_replace_VkPhysicalDeviceLegacyDitheringFeaturesEXT_handle_self((VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_handle_self((VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - vn_replace_VkPhysicalDevicePipelineProtectedAccessFeatures_handle_self((VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_handle_self((VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - vn_replace_VkPhysicalDeviceProvokingVertexFeaturesEXT_handle_self((VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - vn_replace_VkPhysicalDeviceShaderIntegerDotProductFeatures_handle_self((VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderFmaFeaturesKHR_handle_self((VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - vn_replace_VkPhysicalDeviceDynamicRenderingFeatures_handle_self((VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImageViewMinLodFeaturesEXT_handle_self((VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_handle_self((VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - vn_replace_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_handle_self((VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - vn_replace_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_handle_self((VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - vn_replace_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_handle_self((VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - vn_replace_VkPhysicalDevicePipelineRobustnessFeatures_handle_self((VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_handle_self((VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_handle_self((VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - vn_replace_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_handle_self((VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_handle_self((VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthBiasControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_handle_self((VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - vn_replace_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_handle_self((VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_handle_self((VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - vn_replace_VkPhysicalDeviceShaderSubgroupRotateFeatures_handle_self((VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - vn_replace_VkPhysicalDeviceShaderExpectAssumeFeatures_handle_self((VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - vn_replace_VkPhysicalDeviceShaderFloatControls2Features_handle_self((VkPhysicalDeviceShaderFloatControls2Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - vn_replace_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_handle_self((VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderQuadControlFeaturesKHR_handle_self((VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderBfloat16FeaturesKHR_handle_self((VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_handle_self((VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_handle_self((VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderFloat8FeaturesEXT_handle_self((VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_handle_self((VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDescriptorHeapFeaturesEXT_handle_self((VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceGroupDeviceCreateInfo chain */ - -static inline void * -vn_decode_VkDeviceGroupDeviceCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceGroupDeviceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceGroupDeviceCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->physicalDeviceCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->physicalDeviceCount); - val->pPhysicalDevices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPhysicalDevices), iter_count); - if (!val->pPhysicalDevices) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPhysicalDevice_lookup(dec, &((VkPhysicalDevice *)val->pPhysicalDevices)[i]); - } else { - vn_decode_array_size(dec, val->physicalDeviceCount); - val->pPhysicalDevices = NULL; - } -} - -static inline void -vn_decode_VkDeviceGroupDeviceCreateInfo_temp(struct vn_cs_decoder *dec, VkDeviceGroupDeviceCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceGroupDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupDeviceCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceGroupDeviceCreateInfo_handle_self(VkDeviceGroupDeviceCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->physicalDeviceCount */ - if (val->pPhysicalDevices) { - for (uint32_t i = 0; i < val->physicalDeviceCount; i++) - vn_replace_VkPhysicalDevice_handle(&((VkPhysicalDevice *)val->pPhysicalDevices)[i]); - } -} - -static inline void -vn_replace_VkDeviceGroupDeviceCreateInfo_handle(VkDeviceGroupDeviceCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: - vn_replace_VkDeviceGroupDeviceCreateInfo_handle_self((VkDeviceGroupDeviceCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceCreateInfo chain */ - -static inline void * -vn_decode_VkDeviceCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDevicePrivateDataCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDevicePrivateDataCreateInfo *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkDevicePrivateDataCreateInfo_self_temp(dec, (VkDevicePrivateDataCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrivateDataFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrivateDataFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrivateDataFeatures_self_temp(dec, (VkPhysicalDevicePrivateDataFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFeatures2)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFeatures2 *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFeatures2_self_temp(dec, (VkPhysicalDeviceFeatures2 *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVariablePointersFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVariablePointersFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVariablePointersFeatures_self_temp(dec, (VkPhysicalDeviceVariablePointersFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiviewFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiviewFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewFeatures_self_temp(dec, (VkPhysicalDeviceMultiviewFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceGroupDeviceCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceGroupDeviceCreateInfo *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupDeviceCreateInfo_self_temp(dec, (VkDeviceGroupDeviceCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice16BitStorageFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice16BitStorageFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevice16BitStorageFeatures_self_temp(dec, (VkPhysicalDevice16BitStorageFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_self_temp(dec, (VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSamplerYcbcrConversionFeatures_self_temp(dec, (VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProtectedMemoryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProtectedMemoryFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryFeatures_self_temp(dec, (VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_self_temp(dec, (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiDrawFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceInlineUniformBlockFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceInlineUniformBlockFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockFeatures_self_temp(dec, (VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance4Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance4Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Features_self_temp(dec, (VkPhysicalDeviceMaintenance4Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance5Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance5Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Features_self_temp(dec, (VkPhysicalDeviceMaintenance5Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance6Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance6Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Features_self_temp(dec, (VkPhysicalDeviceMaintenance6Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance7FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7FeaturesKHR_self_temp(dec, (VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderDrawParametersFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderDrawParametersFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderDrawParametersFeatures_self_temp(dec, (VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloat16Int8Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloat16Int8Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat16Int8Features_self_temp(dec, (VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostQueryResetFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostQueryResetFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceHostQueryResetFeatures_self_temp(dec, (VkPhysicalDeviceHostQueryResetFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGlobalPriorityQueryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceGlobalPriorityQueryFeatures_self_temp(dec, (VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorIndexingFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorIndexingFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingFeatures_self_temp(dec, (VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreFeatures_self_temp(dec, (VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice8BitStorageFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice8BitStorageFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevice8BitStorageFeatures_self_temp(dec, (VkPhysicalDevice8BitStorageFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceConditionalRenderingFeaturesEXT_self_temp(dec, (VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkanMemoryModelFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkanMemoryModelFeatures_self_temp(dec, (VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicInt64Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicInt64Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicInt64Features_self_temp(dec, (VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicFloatFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexAttributeDivisorFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorFeatures_self_temp(dec, (VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTransformFeedbackFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackFeaturesEXT_self_temp(dec, (VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_self_temp(dec, (VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_self_temp(dec, (VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMeshShaderFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAccelerationStructureFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructureFeaturesKHR_self_temp(dec, (VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPipelineFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayQueryFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayQueryFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayQueryFeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceScalarBlockLayoutFeatures_self_temp(dec, (VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceUniformBufferStandardLayoutFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_self_temp(dec, (VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipEnableFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeatures_self_temp(dec, (VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBufferDeviceAddressFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_self_temp(dec, (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImagelessFramebufferFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImagelessFramebufferFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImagelessFramebufferFeatures_self_temp(dec, (VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTextureCompressionASTCHDRFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_self_temp(dec, (VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_self_temp(dec, (VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderClockFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderClockFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderClockFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceIndexTypeUint8Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceIndexTypeUint8Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceIndexTypeUint8Features_self_temp(dec, (VkPhysicalDeviceIndexTypeUint8Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_self_temp(dec, (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_self_temp(dec, (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_self_temp(dec, (VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_self_temp(dec, (VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_self_temp(dec, (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSubgroupSizeControlFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlFeatures_self_temp(dec, (VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLineRasterizationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLineRasterizationFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationFeatures_self_temp(dec, (VkPhysicalDeviceLineRasterizationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineCreationCacheControlFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineCreationCacheControlFeatures_self_temp(dec, (VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan11Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan11Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Features_self_temp(dec, (VkPhysicalDeviceVulkan11Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan12Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan12Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Features_self_temp(dec, (VkPhysicalDeviceVulkan12Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan13Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan13Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Features_self_temp(dec, (VkPhysicalDeviceVulkan13Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan14Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan14Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Features_self_temp(dec, (VkPhysicalDeviceVulkan14Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorFeaturesEXT_self_temp(dec, (VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBorderColorSwizzleFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_self_temp(dec, (VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_self_temp(dec, (VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_self_temp(dec, (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState3FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_self_temp(dec, (VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_self_temp(dec, (VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRobustness2FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRobustness2FeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2FeaturesKHR_self_temp(dec, (VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageRobustnessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageRobustnessFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageRobustnessFeatures_self_temp(dec, (VkPhysicalDeviceImageRobustnessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_self_temp(dec, (VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevice4444FormatsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevice4444FormatsFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevice4444FormatsFeaturesEXT_self_temp(dec, (VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShadingRateFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_self_temp(dec, (VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderTerminateInvocationFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_temp(dec, (VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImage2DViewOf3DFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_self_temp(dec, (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_self_temp(dec, (VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_self_temp(dec, (VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_self_temp(dec, (VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClipControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClipControlFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClampControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampControlFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_self_temp(dec, (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceColorWriteEnableFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceColorWriteEnableFeaturesEXT_self_temp(dec, (VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSynchronization2Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSynchronization2Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSynchronization2Features_self_temp(dec, (VkPhysicalDeviceSynchronization2Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostImageCopyFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostImageCopyFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyFeatures_self_temp(dec, (VkPhysicalDeviceHostImageCopyFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_self_temp(dec, (VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyDitheringFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceLegacyDitheringFeaturesEXT_self_temp(dec, (VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_self_temp(dec, (VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineProtectedAccessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineProtectedAccessFeatures_self_temp(dec, (VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_self_temp(dec, (VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProvokingVertexFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexFeaturesEXT_self_temp(dec, (VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderIntegerDotProductFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductFeatures_self_temp(dec, (VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFmaFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFmaFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingFeatures_self_temp(dec, (VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageViewMinLodFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageViewMinLodFeaturesEXT_self_temp(dec, (VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_self_temp(dec, (VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_self_temp(dec, (VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNestedCommandBufferFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_self_temp(dec, (VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_self_temp(dec, (VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineRobustnessFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineRobustnessFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessFeatures_self_temp(dec, (VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_self_temp(dec, (VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthClampZeroOneFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_self_temp(dec, (VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_self_temp(dec, (VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthBiasControlFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDepthBiasControlFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_self_temp(dec, (VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCooperativeMatrixFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_self_temp(dec, (VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderSubgroupRotateFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderSubgroupRotateFeatures_self_temp(dec, (VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderExpectAssumeFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderExpectAssumeFeatures_self_temp(dec, (VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloatControls2Features)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloatControls2Features *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloatControls2Features_self_temp(dec, (VkPhysicalDeviceShaderFloatControls2Features *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDynamicRenderingLocalReadFeatures)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_self_temp(dec, (VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderQuadControlFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderQuadControlFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderBfloat16FeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderBfloat16FeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderFloat8FeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderFloat8FeaturesEXT_self_temp(dec, (VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderUntypedPointersFeaturesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_self_temp(dec, (VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorHeapFeaturesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext)->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapFeaturesEXT_self_temp(dec, (VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDeviceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->queueCreateInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->queueCreateInfoCount); - val->pQueueCreateInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pQueueCreateInfos), iter_count); - if (!val->pQueueCreateInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDeviceQueueCreateInfo_temp(dec, &((VkDeviceQueueCreateInfo *)val->pQueueCreateInfos)[i]); - } else { - vn_decode_array_size(dec, val->queueCreateInfoCount); - val->pQueueCreateInfos = NULL; - } - vn_decode_uint32_t(dec, &val->enabledLayerCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->enabledLayerCount); - val->ppEnabledLayerNames = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledLayerNames), iter_count); - if (!val->ppEnabledLayerNames) return; - for (uint32_t i = 0; i < iter_count; i++) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - ((char **)val->ppEnabledLayerNames)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledLayerNames[i]), string_size); - if (!val->ppEnabledLayerNames[i]) return; - vn_decode_char_array(dec, ((char **)val->ppEnabledLayerNames)[i], string_size); - } - } else { - vn_decode_array_size(dec, val->enabledLayerCount); - val->ppEnabledLayerNames = NULL; - } - vn_decode_uint32_t(dec, &val->enabledExtensionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->enabledExtensionCount); - val->ppEnabledExtensionNames = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledExtensionNames), iter_count); - if (!val->ppEnabledExtensionNames) return; - for (uint32_t i = 0; i < iter_count; i++) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - ((char **)val->ppEnabledExtensionNames)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledExtensionNames[i]), string_size); - if (!val->ppEnabledExtensionNames[i]) return; - vn_decode_char_array(dec, ((char **)val->ppEnabledExtensionNames)[i], string_size); - } - } else { - vn_decode_array_size(dec, val->enabledExtensionCount); - val->ppEnabledExtensionNames = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pEnabledFeatures = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pEnabledFeatures)); - if (!val->pEnabledFeatures) return; - vn_decode_VkPhysicalDeviceFeatures_temp(dec, (VkPhysicalDeviceFeatures *)val->pEnabledFeatures); - } else { - val->pEnabledFeatures = NULL; - } -} - -static inline void -vn_decode_VkDeviceCreateInfo_temp(struct vn_cs_decoder *dec, VkDeviceCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec); - vn_decode_VkDeviceCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceCreateInfo_handle_self(VkDeviceCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->queueCreateInfoCount */ - if (val->pQueueCreateInfos) { - for (uint32_t i = 0; i < val->queueCreateInfoCount; i++) - vn_replace_VkDeviceQueueCreateInfo_handle(&((VkDeviceQueueCreateInfo *)val->pQueueCreateInfos)[i]); - } - /* skip val->enabledLayerCount */ - /* skip val->ppEnabledLayerNames */ - /* skip val->enabledExtensionCount */ - /* skip val->ppEnabledExtensionNames */ - if (val->pEnabledFeatures) - vn_replace_VkPhysicalDeviceFeatures_handle((VkPhysicalDeviceFeatures *)val->pEnabledFeatures); -} - -static inline void -vn_replace_VkDeviceCreateInfo_handle(VkDeviceCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: - vn_replace_VkDeviceCreateInfo_handle_self((VkDeviceCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: - vn_replace_VkDevicePrivateDataCreateInfo_handle_self((VkDevicePrivateDataCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: - vn_replace_VkPhysicalDevicePrivateDataFeatures_handle_self((VkPhysicalDevicePrivateDataFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: - vn_replace_VkPhysicalDeviceFeatures2_handle_self((VkPhysicalDeviceFeatures2 *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: - vn_replace_VkPhysicalDeviceVariablePointersFeatures_handle_self((VkPhysicalDeviceVariablePointersFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: - vn_replace_VkPhysicalDeviceMultiviewFeatures_handle_self((VkPhysicalDeviceMultiviewFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: - vn_replace_VkDeviceGroupDeviceCreateInfo_handle_self((VkDeviceGroupDeviceCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: - vn_replace_VkPhysicalDevice16BitStorageFeatures_handle_self((VkPhysicalDevice16BitStorageFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: - vn_replace_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures_handle_self((VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: - vn_replace_VkPhysicalDeviceSamplerYcbcrConversionFeatures_handle_self((VkPhysicalDeviceSamplerYcbcrConversionFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: - vn_replace_VkPhysicalDeviceProtectedMemoryFeatures_handle_self((VkPhysicalDeviceProtectedMemoryFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT_handle_self((VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMultiDrawFeaturesEXT_handle_self((VkPhysicalDeviceMultiDrawFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: - vn_replace_VkPhysicalDeviceInlineUniformBlockFeatures_handle_self((VkPhysicalDeviceInlineUniformBlockFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance4Features_handle_self((VkPhysicalDeviceMaintenance4Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance5Features_handle_self((VkPhysicalDeviceMaintenance5Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES: - vn_replace_VkPhysicalDeviceMaintenance6Features_handle_self((VkPhysicalDeviceMaintenance6Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR: - vn_replace_VkPhysicalDeviceMaintenance7FeaturesKHR_handle_self((VkPhysicalDeviceMaintenance7FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: - vn_replace_VkPhysicalDeviceShaderDrawParametersFeatures_handle_self((VkPhysicalDeviceShaderDrawParametersFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: - vn_replace_VkPhysicalDeviceShaderFloat16Int8Features_handle_self((VkPhysicalDeviceShaderFloat16Int8Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: - vn_replace_VkPhysicalDeviceHostQueryResetFeatures_handle_self((VkPhysicalDeviceHostQueryResetFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES: - vn_replace_VkPhysicalDeviceGlobalPriorityQueryFeatures_handle_self((VkPhysicalDeviceGlobalPriorityQueryFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: - vn_replace_VkPhysicalDeviceDescriptorIndexingFeatures_handle_self((VkPhysicalDeviceDescriptorIndexingFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: - vn_replace_VkPhysicalDeviceTimelineSemaphoreFeatures_handle_self((VkPhysicalDeviceTimelineSemaphoreFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: - vn_replace_VkPhysicalDevice8BitStorageFeatures_handle_self((VkPhysicalDevice8BitStorageFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: - vn_replace_VkPhysicalDeviceConditionalRenderingFeaturesEXT_handle_self((VkPhysicalDeviceConditionalRenderingFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: - vn_replace_VkPhysicalDeviceVulkanMemoryModelFeatures_handle_self((VkPhysicalDeviceVulkanMemoryModelFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: - vn_replace_VkPhysicalDeviceShaderAtomicInt64Features_handle_self((VkPhysicalDeviceShaderAtomicInt64Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT_handle_self((VkPhysicalDeviceShaderAtomicFloatFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT_handle_self((VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES: - vn_replace_VkPhysicalDeviceVertexAttributeDivisorFeatures_handle_self((VkPhysicalDeviceVertexAttributeDivisorFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: - vn_replace_VkPhysicalDeviceTransformFeedbackFeaturesEXT_handle_self((VkPhysicalDeviceTransformFeedbackFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR: - vn_replace_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR_handle_self((VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: - vn_replace_VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR_handle_self((VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMeshShaderFeaturesEXT_handle_self((VkPhysicalDeviceMeshShaderFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceAccelerationStructureFeaturesKHR_handle_self((VkPhysicalDeviceAccelerationStructureFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingPipelineFeaturesKHR_handle_self((VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayQueryFeaturesKHR_handle_self((VkPhysicalDeviceRayQueryFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR_handle_self((VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: - vn_replace_VkPhysicalDeviceScalarBlockLayoutFeatures_handle_self((VkPhysicalDeviceScalarBlockLayoutFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: - vn_replace_VkPhysicalDeviceUniformBufferStandardLayoutFeatures_handle_self((VkPhysicalDeviceUniformBufferStandardLayoutFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClipEnableFeaturesEXT_handle_self((VkPhysicalDeviceDepthClipEnableFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: - vn_replace_VkPhysicalDeviceBufferDeviceAddressFeatures_handle_self((VkPhysicalDeviceBufferDeviceAddressFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBufferDeviceAddressFeaturesEXT_handle_self((VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: - vn_replace_VkPhysicalDeviceImagelessFramebufferFeatures_handle_self((VkPhysicalDeviceImagelessFramebufferFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: - vn_replace_VkPhysicalDeviceTextureCompressionASTCHDRFeatures_handle_self((VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT_handle_self((VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderClockFeaturesKHR_handle_self((VkPhysicalDeviceShaderClockFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES: - vn_replace_VkPhysicalDeviceIndexTypeUint8Features_handle_self((VkPhysicalDeviceIndexTypeUint8Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: - vn_replace_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT_handle_self((VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: - vn_replace_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures_handle_self((VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: - vn_replace_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT_handle_self((VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: - vn_replace_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures_handle_self((VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT_handle_self((VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: - vn_replace_VkPhysicalDeviceSubgroupSizeControlFeatures_handle_self((VkPhysicalDeviceSubgroupSizeControlFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES: - vn_replace_VkPhysicalDeviceLineRasterizationFeatures_handle_self((VkPhysicalDeviceLineRasterizationFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: - vn_replace_VkPhysicalDevicePipelineCreationCacheControlFeatures_handle_self((VkPhysicalDevicePipelineCreationCacheControlFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: - vn_replace_VkPhysicalDeviceVulkan11Features_handle_self((VkPhysicalDeviceVulkan11Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: - vn_replace_VkPhysicalDeviceVulkan12Features_handle_self((VkPhysicalDeviceVulkan12Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: - vn_replace_VkPhysicalDeviceVulkan13Features_handle_self((VkPhysicalDeviceVulkan13Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: - vn_replace_VkPhysicalDeviceVulkan14Features_handle_self((VkPhysicalDeviceVulkan14Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: - vn_replace_VkPhysicalDeviceCustomBorderColorFeaturesEXT_handle_self((VkPhysicalDeviceCustomBorderColorFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceBorderColorSwizzleFeaturesEXT_handle_self((VkPhysicalDeviceBorderColorSwizzleFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicState2FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: - vn_replace_VkPhysicalDeviceExtendedDynamicState3FeaturesEXT_handle_self((VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: - vn_replace_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures_handle_self((VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR_handle_self((VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRobustness2FeaturesKHR_handle_self((VkPhysicalDeviceRobustness2FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: - vn_replace_VkPhysicalDeviceImageRobustnessFeatures_handle_self((VkPhysicalDeviceImageRobustnessFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: - vn_replace_VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR_handle_self((VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: - vn_replace_VkPhysicalDevice4444FormatsFeaturesEXT_handle_self((VkPhysicalDevice4444FormatsFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT_handle_self((VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceFragmentShadingRateFeaturesKHR_handle_self((VkPhysicalDeviceFragmentShadingRateFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: - vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle_self((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImage2DViewOf3DFeaturesEXT_handle_self((VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT_handle_self((VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT: - vn_replace_VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT_handle_self((VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT_handle_self((VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClipControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthClipControlFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthClampControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthClampControlFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT_handle_self((VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR_handle_self((VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: - vn_replace_VkPhysicalDeviceColorWriteEnableFeaturesEXT_handle_self((VkPhysicalDeviceColorWriteEnableFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: - vn_replace_VkPhysicalDeviceSynchronization2Features_handle_self((VkPhysicalDeviceSynchronization2Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES: - vn_replace_VkPhysicalDeviceHostImageCopyFeatures_handle_self((VkPhysicalDeviceHostImageCopyFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: - vn_replace_VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT_handle_self((VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: - vn_replace_VkPhysicalDeviceLegacyDitheringFeaturesEXT_handle_self((VkPhysicalDeviceLegacyDitheringFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: - vn_replace_VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT_handle_self((VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: - vn_replace_VkPhysicalDevicePipelineProtectedAccessFeatures_handle_self((VkPhysicalDevicePipelineProtectedAccessFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT_handle_self((VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: - vn_replace_VkPhysicalDeviceProvokingVertexFeaturesEXT_handle_self((VkPhysicalDeviceProvokingVertexFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: - vn_replace_VkPhysicalDeviceShaderIntegerDotProductFeatures_handle_self((VkPhysicalDeviceShaderIntegerDotProductFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderFmaFeaturesKHR_handle_self((VkPhysicalDeviceShaderFmaFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: - vn_replace_VkPhysicalDeviceDynamicRenderingFeatures_handle_self((VkPhysicalDeviceDynamicRenderingFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: - vn_replace_VkPhysicalDeviceImageViewMinLodFeaturesEXT_handle_self((VkPhysicalDeviceImageViewMinLodFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT_handle_self((VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: - vn_replace_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT_handle_self((VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: - vn_replace_VkPhysicalDeviceNestedCommandBufferFeaturesEXT_handle_self((VkPhysicalDeviceNestedCommandBufferFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: - vn_replace_VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT_handle_self((VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: - vn_replace_VkPhysicalDevicePipelineRobustnessFeatures_handle_self((VkPhysicalDevicePipelineRobustnessFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: - vn_replace_VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT_handle_self((VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceDepthClampZeroOneFeaturesKHR_handle_self((VkPhysicalDeviceDepthClampZeroOneFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: - vn_replace_VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT_handle_self((VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT_handle_self((VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDepthBiasControlFeaturesEXT_handle_self((VkPhysicalDeviceDepthBiasControlFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: - vn_replace_VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR_handle_self((VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: - vn_replace_VkPhysicalDeviceCooperativeMatrixFeaturesKHR_handle_self((VkPhysicalDeviceCooperativeMatrixFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR_handle_self((VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES: - vn_replace_VkPhysicalDeviceShaderSubgroupRotateFeatures_handle_self((VkPhysicalDeviceShaderSubgroupRotateFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES: - vn_replace_VkPhysicalDeviceShaderExpectAssumeFeatures_handle_self((VkPhysicalDeviceShaderExpectAssumeFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES: - vn_replace_VkPhysicalDeviceShaderFloatControls2Features_handle_self((VkPhysicalDeviceShaderFloatControls2Features *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES: - vn_replace_VkPhysicalDeviceDynamicRenderingLocalReadFeatures_handle_self((VkPhysicalDeviceDynamicRenderingLocalReadFeatures *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderQuadControlFeaturesKHR_handle_self((VkPhysicalDeviceShaderQuadControlFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderBfloat16FeaturesKHR_handle_self((VkPhysicalDeviceShaderBfloat16FeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT_handle_self((VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT_handle_self((VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT: - vn_replace_VkPhysicalDeviceShaderFloat8FeaturesEXT_handle_self((VkPhysicalDeviceShaderFloat8FeaturesEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR: - vn_replace_VkPhysicalDeviceShaderUntypedPointersFeaturesKHR_handle_self((VkPhysicalDeviceShaderUntypedPointersFeaturesKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT: - vn_replace_VkPhysicalDeviceDescriptorHeapFeaturesEXT_handle_self((VkPhysicalDeviceDescriptorHeapFeaturesEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceMultiDrawPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMultiDrawPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiDrawPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiDrawPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxMultiDrawCount); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiDrawPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiDrawPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceMultiDrawPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMultiDrawPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultiDrawPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultiDrawPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiDrawPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxMultiDrawCount */ -} - -static inline void -vn_decode_VkPhysicalDeviceMultiDrawPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiDrawPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultiDrawPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDevicePushDescriptorProperties chain */ - -static inline void -vn_encode_VkPhysicalDevicePushDescriptorProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePushDescriptorProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePushDescriptorProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxPushDescriptors); -} - -static inline void -vn_encode_VkPhysicalDevicePushDescriptorProperties(struct vn_cs_encoder *enc, const VkPhysicalDevicePushDescriptorProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES }); - vn_encode_VkPhysicalDevicePushDescriptorProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePushDescriptorProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePushDescriptorProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePushDescriptorProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePushDescriptorProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxPushDescriptors */ -} - -static inline void -vn_decode_VkPhysicalDevicePushDescriptorProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePushDescriptorProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePushDescriptorProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePushDescriptorProperties_self_partial_temp(dec, val); -} - -/* struct VkConformanceVersion */ - -static inline void -vn_encode_VkConformanceVersion(struct vn_cs_encoder *enc, const VkConformanceVersion *val) -{ - vn_encode_uint8_t(enc, &val->major); - vn_encode_uint8_t(enc, &val->minor); - vn_encode_uint8_t(enc, &val->subminor); - vn_encode_uint8_t(enc, &val->patch); -} - -static inline void -vn_decode_VkConformanceVersion_partial_temp(struct vn_cs_decoder *dec, VkConformanceVersion *val) -{ - /* skip val->major */ - /* skip val->minor */ - /* skip val->subminor */ - /* skip val->patch */ -} - -/* struct VkPhysicalDeviceDriverProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceDriverProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDriverProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDriverProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDriverId(enc, &val->driverID); - vn_encode_array_size(enc, VK_MAX_DRIVER_NAME_SIZE); - vn_encode_char_array(enc, val->driverName, VK_MAX_DRIVER_NAME_SIZE); - vn_encode_array_size(enc, VK_MAX_DRIVER_INFO_SIZE); - vn_encode_char_array(enc, val->driverInfo, VK_MAX_DRIVER_INFO_SIZE); - vn_encode_VkConformanceVersion(enc, &val->conformanceVersion); -} - -static inline void -vn_encode_VkPhysicalDeviceDriverProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceDriverProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES }); - vn_encode_VkPhysicalDeviceDriverProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDriverProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDriverProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDriverProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDriverProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->driverID */ - /* skip val->driverName */ - /* skip val->driverInfo */ - vn_decode_VkConformanceVersion_partial_temp(dec, &val->conformanceVersion); -} - -static inline void -vn_decode_VkPhysicalDeviceDriverProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDriverProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDriverProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDriverProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceIDProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceIDProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceIDProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceIDProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->deviceUUID, VK_UUID_SIZE); - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->driverUUID, VK_UUID_SIZE); - vn_encode_array_size(enc, VK_LUID_SIZE); - vn_encode_uint8_t_array(enc, val->deviceLUID, VK_LUID_SIZE); - vn_encode_uint32_t(enc, &val->deviceNodeMask); - vn_encode_VkBool32(enc, &val->deviceLUIDValid); -} - -static inline void -vn_encode_VkPhysicalDeviceIDProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceIDProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES }); - vn_encode_VkPhysicalDeviceIDProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceIDProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceIDProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceIDProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceIDProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->deviceUUID */ - /* skip val->driverUUID */ - /* skip val->deviceLUID */ - /* skip val->deviceNodeMask */ - /* skip val->deviceLUIDValid */ -} - -static inline void -vn_decode_VkPhysicalDeviceIDProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceIDProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceIDProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceIDProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMultiviewProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceMultiviewProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiviewProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiviewProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxMultiviewViewCount); - vn_encode_uint32_t(enc, &val->maxMultiviewInstanceIndex); -} - -static inline void -vn_encode_VkPhysicalDeviceMultiviewProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceMultiviewProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES }); - vn_encode_VkPhysicalDeviceMultiviewProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMultiviewProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMultiviewProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMultiviewProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiviewProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxMultiviewViewCount */ - /* skip val->maxMultiviewInstanceIndex */ -} - -static inline void -vn_decode_VkPhysicalDeviceMultiviewProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMultiviewProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMultiviewProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceSubgroupProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceSubgroupProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSubgroupProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSubgroupProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->subgroupSize); - vn_encode_VkFlags(enc, &val->supportedStages); - vn_encode_VkFlags(enc, &val->supportedOperations); - vn_encode_VkBool32(enc, &val->quadOperationsInAllStages); -} - -static inline void -vn_encode_VkPhysicalDeviceSubgroupProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceSubgroupProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES }); - vn_encode_VkPhysicalDeviceSubgroupProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSubgroupProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSubgroupProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->subgroupSize */ - /* skip val->supportedStages */ - /* skip val->supportedOperations */ - /* skip val->quadOperationsInAllStages */ -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSubgroupProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDevicePointClippingProperties chain */ - -static inline void -vn_encode_VkPhysicalDevicePointClippingProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePointClippingProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePointClippingProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkPointClippingBehavior(enc, &val->pointClippingBehavior); -} - -static inline void -vn_encode_VkPhysicalDevicePointClippingProperties(struct vn_cs_encoder *enc, const VkPhysicalDevicePointClippingProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES }); - vn_encode_VkPhysicalDevicePointClippingProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePointClippingProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePointClippingProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePointClippingProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePointClippingProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pointClippingBehavior */ -} - -static inline void -vn_decode_VkPhysicalDevicePointClippingProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePointClippingProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePointClippingProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePointClippingProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceProtectedMemoryProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceProtectedMemoryProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceProtectedMemoryProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceProtectedMemoryProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->protectedNoFault); -} - -static inline void -vn_encode_VkPhysicalDeviceProtectedMemoryProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceProtectedMemoryProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES }); - vn_encode_VkPhysicalDeviceProtectedMemoryProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceProtectedMemoryProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProtectedMemoryProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceProtectedMemoryProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProtectedMemoryProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->protectedNoFault */ -} - -static inline void -vn_decode_VkPhysicalDeviceProtectedMemoryProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProtectedMemoryProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProtectedMemoryProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceSamplerFilterMinmaxProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceSamplerFilterMinmaxProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSamplerFilterMinmaxProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSamplerFilterMinmaxProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->filterMinmaxSingleComponentFormats); - vn_encode_VkBool32(enc, &val->filterMinmaxImageComponentMapping); -} - -static inline void -vn_encode_VkPhysicalDeviceSamplerFilterMinmaxProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceSamplerFilterMinmaxProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES }); - vn_encode_VkPhysicalDeviceSamplerFilterMinmaxProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSamplerFilterMinmaxProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSamplerFilterMinmaxProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSamplerFilterMinmaxProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSamplerFilterMinmaxProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->filterMinmaxSingleComponentFormats */ - /* skip val->filterMinmaxImageComponentMapping */ -} - -static inline void -vn_decode_VkPhysicalDeviceSamplerFilterMinmaxProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSamplerFilterMinmaxProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSamplerFilterMinmaxProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSamplerFilterMinmaxProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceSampleLocationsPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceSampleLocationsPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSampleLocationsPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSampleLocationsPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags(enc, &val->sampleLocationSampleCounts); - vn_encode_VkExtent2D(enc, &val->maxSampleLocationGridSize); - vn_encode_array_size(enc, 2); - vn_encode_float_array(enc, val->sampleLocationCoordinateRange, 2); - vn_encode_uint32_t(enc, &val->sampleLocationSubPixelBits); - vn_encode_VkBool32(enc, &val->variableSampleLocations); -} - -static inline void -vn_encode_VkPhysicalDeviceSampleLocationsPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceSampleLocationsPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceSampleLocationsPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSampleLocationsPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSampleLocationsPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSampleLocationsPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSampleLocationsPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->sampleLocationSampleCounts */ - vn_decode_VkExtent2D_partial_temp(dec, &val->maxSampleLocationGridSize); - /* skip val->sampleLocationCoordinateRange */ - /* skip val->sampleLocationSubPixelBits */ - /* skip val->variableSampleLocations */ -} - -static inline void -vn_decode_VkPhysicalDeviceSampleLocationsPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSampleLocationsPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSampleLocationsPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSampleLocationsPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->advancedBlendMaxColorAttachments); - vn_encode_VkBool32(enc, &val->advancedBlendIndependentBlend); - vn_encode_VkBool32(enc, &val->advancedBlendNonPremultipliedSrcColor); - vn_encode_VkBool32(enc, &val->advancedBlendNonPremultipliedDstColor); - vn_encode_VkBool32(enc, &val->advancedBlendCorrelatedOverlap); - vn_encode_VkBool32(enc, &val->advancedBlendAllOperations); -} - -static inline void -vn_encode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->advancedBlendMaxColorAttachments */ - /* skip val->advancedBlendIndependentBlend */ - /* skip val->advancedBlendNonPremultipliedSrcColor */ - /* skip val->advancedBlendNonPremultipliedDstColor */ - /* skip val->advancedBlendCorrelatedOverlap */ - /* skip val->advancedBlendAllOperations */ -} - -static inline void -vn_decode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceInlineUniformBlockProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceInlineUniformBlockProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceInlineUniformBlockProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceInlineUniformBlockProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxInlineUniformBlockSize); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxDescriptorSetInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindInlineUniformBlocks); -} - -static inline void -vn_encode_VkPhysicalDeviceInlineUniformBlockProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceInlineUniformBlockProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES }); - vn_encode_VkPhysicalDeviceInlineUniformBlockProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceInlineUniformBlockProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceInlineUniformBlockProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceInlineUniformBlockProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceInlineUniformBlockProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxInlineUniformBlockSize */ - /* skip val->maxPerStageDescriptorInlineUniformBlocks */ - /* skip val->maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks */ - /* skip val->maxDescriptorSetInlineUniformBlocks */ - /* skip val->maxDescriptorSetUpdateAfterBindInlineUniformBlocks */ -} - -static inline void -vn_decode_VkPhysicalDeviceInlineUniformBlockProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceInlineUniformBlockProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceInlineUniformBlockProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMaintenance3Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance3Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance3Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance3Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxPerSetDescriptors); - vn_encode_VkDeviceSize(enc, &val->maxMemoryAllocationSize); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance3Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance3Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES }); - vn_encode_VkPhysicalDeviceMaintenance3Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance3Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance3Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance3Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance3Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxPerSetDescriptors */ - /* skip val->maxMemoryAllocationSize */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance3Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance3Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance3Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance3Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMaintenance4Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance4Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance4Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance4Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDeviceSize(enc, &val->maxBufferSize); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance4Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance4Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES }); - vn_encode_VkPhysicalDeviceMaintenance4Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance4Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance4Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance4Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance4Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxBufferSize */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance4Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance4Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance4Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMaintenance5Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance5Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance5Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance5Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->earlyFragmentMultisampleCoverageAfterSampleCounting); - vn_encode_VkBool32(enc, &val->earlyFragmentSampleMaskTestBeforeSampleCounting); - vn_encode_VkBool32(enc, &val->depthStencilSwizzleOneSupport); - vn_encode_VkBool32(enc, &val->polygonModePointSize); - vn_encode_VkBool32(enc, &val->nonStrictSinglePixelWideLinesUseParallelogram); - vn_encode_VkBool32(enc, &val->nonStrictWideLinesUseParallelogram); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance5Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance5Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES }); - vn_encode_VkPhysicalDeviceMaintenance5Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance5Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance5Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance5Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance5Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->earlyFragmentMultisampleCoverageAfterSampleCounting */ - /* skip val->earlyFragmentSampleMaskTestBeforeSampleCounting */ - /* skip val->depthStencilSwizzleOneSupport */ - /* skip val->polygonModePointSize */ - /* skip val->nonStrictSinglePixelWideLinesUseParallelogram */ - /* skip val->nonStrictWideLinesUseParallelogram */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance5Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance5Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance5Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMaintenance6Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance6Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance6Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance6Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->blockTexelViewCompatibleMultipleLayers); - vn_encode_uint32_t(enc, &val->maxCombinedImageSamplerDescriptorCount); - vn_encode_VkBool32(enc, &val->fragmentShadingRateClampCombinerInputs); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance6Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance6Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES }); - vn_encode_VkPhysicalDeviceMaintenance6Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance6Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance6Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance6Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance6Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->blockTexelViewCompatibleMultipleLayers */ - /* skip val->maxCombinedImageSamplerDescriptorCount */ - /* skip val->fragmentShadingRateClampCombinerInputs */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance6Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance6Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance6Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMaintenance7PropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceMaintenance7PropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance7PropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance7PropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->robustFragmentShadingRateAttachmentAccess); - vn_encode_VkBool32(enc, &val->separateDepthStencilAttachmentAccess); - vn_encode_uint32_t(enc, &val->maxDescriptorSetTotalUniformBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetTotalStorageBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetTotalBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindTotalBuffersDynamic); -} - -static inline void -vn_encode_VkPhysicalDeviceMaintenance7PropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceMaintenance7PropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceMaintenance7PropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMaintenance7PropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMaintenance7PropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance7PropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance7PropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->robustFragmentShadingRateAttachmentAccess */ - /* skip val->separateDepthStencilAttachmentAccess */ - /* skip val->maxDescriptorSetTotalUniformBuffersDynamic */ - /* skip val->maxDescriptorSetTotalStorageBuffersDynamic */ - /* skip val->maxDescriptorSetTotalBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindTotalBuffersDynamic */ -} - -static inline void -vn_decode_VkPhysicalDeviceMaintenance7PropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMaintenance7PropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMaintenance7PropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7PropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceFloatControlsProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceFloatControlsProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFloatControlsProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFloatControlsProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkShaderFloatControlsIndependence(enc, &val->denormBehaviorIndependence); - vn_encode_VkShaderFloatControlsIndependence(enc, &val->roundingModeIndependence); - vn_encode_VkBool32(enc, &val->shaderSignedZeroInfNanPreserveFloat16); - vn_encode_VkBool32(enc, &val->shaderSignedZeroInfNanPreserveFloat32); - vn_encode_VkBool32(enc, &val->shaderSignedZeroInfNanPreserveFloat64); - vn_encode_VkBool32(enc, &val->shaderDenormPreserveFloat16); - vn_encode_VkBool32(enc, &val->shaderDenormPreserveFloat32); - vn_encode_VkBool32(enc, &val->shaderDenormPreserveFloat64); - vn_encode_VkBool32(enc, &val->shaderDenormFlushToZeroFloat16); - vn_encode_VkBool32(enc, &val->shaderDenormFlushToZeroFloat32); - vn_encode_VkBool32(enc, &val->shaderDenormFlushToZeroFloat64); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTEFloat16); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTEFloat32); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTEFloat64); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTZFloat16); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTZFloat32); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTZFloat64); -} - -static inline void -vn_encode_VkPhysicalDeviceFloatControlsProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceFloatControlsProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES }); - vn_encode_VkPhysicalDeviceFloatControlsProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFloatControlsProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFloatControlsProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFloatControlsProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFloatControlsProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->denormBehaviorIndependence */ - /* skip val->roundingModeIndependence */ - /* skip val->shaderSignedZeroInfNanPreserveFloat16 */ - /* skip val->shaderSignedZeroInfNanPreserveFloat32 */ - /* skip val->shaderSignedZeroInfNanPreserveFloat64 */ - /* skip val->shaderDenormPreserveFloat16 */ - /* skip val->shaderDenormPreserveFloat32 */ - /* skip val->shaderDenormPreserveFloat64 */ - /* skip val->shaderDenormFlushToZeroFloat16 */ - /* skip val->shaderDenormFlushToZeroFloat32 */ - /* skip val->shaderDenormFlushToZeroFloat64 */ - /* skip val->shaderRoundingModeRTEFloat16 */ - /* skip val->shaderRoundingModeRTEFloat32 */ - /* skip val->shaderRoundingModeRTEFloat64 */ - /* skip val->shaderRoundingModeRTZFloat16 */ - /* skip val->shaderRoundingModeRTZFloat32 */ - /* skip val->shaderRoundingModeRTZFloat64 */ -} - -static inline void -vn_decode_VkPhysicalDeviceFloatControlsProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFloatControlsProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFloatControlsProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFloatControlsProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceConservativeRasterizationPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_float(enc, &val->primitiveOverestimationSize); - vn_encode_float(enc, &val->maxExtraPrimitiveOverestimationSize); - vn_encode_float(enc, &val->extraPrimitiveOverestimationSizeGranularity); - vn_encode_VkBool32(enc, &val->primitiveUnderestimation); - vn_encode_VkBool32(enc, &val->conservativePointAndLineRasterization); - vn_encode_VkBool32(enc, &val->degenerateTrianglesRasterized); - vn_encode_VkBool32(enc, &val->degenerateLinesRasterized); - vn_encode_VkBool32(enc, &val->fullyCoveredFragmentShaderInputVariable); - vn_encode_VkBool32(enc, &val->conservativeRasterizationPostDepthCoverage); -} - -static inline void -vn_encode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceConservativeRasterizationPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceConservativeRasterizationPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->primitiveOverestimationSize */ - /* skip val->maxExtraPrimitiveOverestimationSize */ - /* skip val->extraPrimitiveOverestimationSizeGranularity */ - /* skip val->primitiveUnderestimation */ - /* skip val->conservativePointAndLineRasterization */ - /* skip val->degenerateTrianglesRasterized */ - /* skip val->degenerateLinesRasterized */ - /* skip val->fullyCoveredFragmentShaderInputVariable */ - /* skip val->conservativeRasterizationPostDepthCoverage */ -} - -static inline void -vn_decode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceConservativeRasterizationPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceDescriptorIndexingProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceDescriptorIndexingProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorIndexingProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorIndexingProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxUpdateAfterBindDescriptorsInAllPools); - vn_encode_VkBool32(enc, &val->shaderUniformBufferArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderSampledImageArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderStorageBufferArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderStorageImageArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderInputAttachmentArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->robustBufferAccessUpdateAfterBind); - vn_encode_VkBool32(enc, &val->quadDivergentImplicitLod); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindSamplers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindUniformBuffers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindStorageBuffers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindSampledImages); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindStorageImages); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindInputAttachments); - vn_encode_uint32_t(enc, &val->maxPerStageUpdateAfterBindResources); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindSamplers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindUniformBuffers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindStorageBuffers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindSampledImages); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindStorageImages); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindInputAttachments); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorIndexingProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorIndexingProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES }); - vn_encode_VkPhysicalDeviceDescriptorIndexingProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDescriptorIndexingProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDescriptorIndexingProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorIndexingProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorIndexingProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxUpdateAfterBindDescriptorsInAllPools */ - /* skip val->shaderUniformBufferArrayNonUniformIndexingNative */ - /* skip val->shaderSampledImageArrayNonUniformIndexingNative */ - /* skip val->shaderStorageBufferArrayNonUniformIndexingNative */ - /* skip val->shaderStorageImageArrayNonUniformIndexingNative */ - /* skip val->shaderInputAttachmentArrayNonUniformIndexingNative */ - /* skip val->robustBufferAccessUpdateAfterBind */ - /* skip val->quadDivergentImplicitLod */ - /* skip val->maxPerStageDescriptorUpdateAfterBindSamplers */ - /* skip val->maxPerStageDescriptorUpdateAfterBindUniformBuffers */ - /* skip val->maxPerStageDescriptorUpdateAfterBindStorageBuffers */ - /* skip val->maxPerStageDescriptorUpdateAfterBindSampledImages */ - /* skip val->maxPerStageDescriptorUpdateAfterBindStorageImages */ - /* skip val->maxPerStageDescriptorUpdateAfterBindInputAttachments */ - /* skip val->maxPerStageUpdateAfterBindResources */ - /* skip val->maxDescriptorSetUpdateAfterBindSamplers */ - /* skip val->maxDescriptorSetUpdateAfterBindUniformBuffers */ - /* skip val->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindStorageBuffers */ - /* skip val->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindSampledImages */ - /* skip val->maxDescriptorSetUpdateAfterBindStorageImages */ - /* skip val->maxDescriptorSetUpdateAfterBindInputAttachments */ -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorIndexingProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorIndexingProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDescriptorIndexingProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceTimelineSemaphoreProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceTimelineSemaphoreProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTimelineSemaphoreProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTimelineSemaphoreProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint64_t(enc, &val->maxTimelineSemaphoreValueDifference); -} - -static inline void -vn_encode_VkPhysicalDeviceTimelineSemaphoreProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceTimelineSemaphoreProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES }); - vn_encode_VkPhysicalDeviceTimelineSemaphoreProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTimelineSemaphoreProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTimelineSemaphoreProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTimelineSemaphoreProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTimelineSemaphoreProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxTimelineSemaphoreValueDifference */ -} - -static inline void -vn_decode_VkPhysicalDeviceTimelineSemaphoreProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTimelineSemaphoreProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTimelineSemaphoreProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxVertexAttribDivisor); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxVertexAttribDivisor */ -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceVertexAttributeDivisorProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexAttributeDivisorProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxVertexAttribDivisor); - vn_encode_VkBool32(enc, &val->supportsNonZeroFirstInstance); -} - -static inline void -vn_encode_VkPhysicalDeviceVertexAttributeDivisorProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceVertexAttributeDivisorProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES }); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVertexAttributeDivisorProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxVertexAttribDivisor */ - /* skip val->supportsNonZeroFirstInstance */ -} - -static inline void -vn_decode_VkPhysicalDeviceVertexAttributeDivisorProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVertexAttributeDivisorProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVertexAttributeDivisorProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDevicePCIBusInfoPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDevicePCIBusInfoPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePCIBusInfoPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePCIBusInfoPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->pciDomain); - vn_encode_uint32_t(enc, &val->pciBus); - vn_encode_uint32_t(enc, &val->pciDevice); - vn_encode_uint32_t(enc, &val->pciFunction); -} - -static inline void -vn_encode_VkPhysicalDevicePCIBusInfoPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDevicePCIBusInfoPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT }); - vn_encode_VkPhysicalDevicePCIBusInfoPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePCIBusInfoPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePCIBusInfoPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePCIBusInfoPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePCIBusInfoPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->pciDomain */ - /* skip val->pciBus */ - /* skip val->pciDevice */ - /* skip val->pciFunction */ -} - -static inline void -vn_decode_VkPhysicalDevicePCIBusInfoPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePCIBusInfoPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePCIBusInfoPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePCIBusInfoPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceDepthStencilResolveProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceDepthStencilResolveProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthStencilResolveProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthStencilResolveProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags(enc, &val->supportedDepthResolveModes); - vn_encode_VkFlags(enc, &val->supportedStencilResolveModes); - vn_encode_VkBool32(enc, &val->independentResolveNone); - vn_encode_VkBool32(enc, &val->independentResolve); -} - -static inline void -vn_encode_VkPhysicalDeviceDepthStencilResolveProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceDepthStencilResolveProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES }); - vn_encode_VkPhysicalDeviceDepthStencilResolveProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDepthStencilResolveProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDepthStencilResolveProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDepthStencilResolveProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthStencilResolveProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->supportedDepthResolveModes */ - /* skip val->supportedStencilResolveModes */ - /* skip val->independentResolveNone */ - /* skip val->independentResolve */ -} - -static inline void -vn_decode_VkPhysicalDeviceDepthStencilResolveProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDepthStencilResolveProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDepthStencilResolveProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthStencilResolveProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceTransformFeedbackPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTransformFeedbackPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxTransformFeedbackStreams); - vn_encode_uint32_t(enc, &val->maxTransformFeedbackBuffers); - vn_encode_VkDeviceSize(enc, &val->maxTransformFeedbackBufferSize); - vn_encode_uint32_t(enc, &val->maxTransformFeedbackStreamDataSize); - vn_encode_uint32_t(enc, &val->maxTransformFeedbackBufferDataSize); - vn_encode_uint32_t(enc, &val->maxTransformFeedbackBufferDataStride); - vn_encode_VkBool32(enc, &val->transformFeedbackQueries); - vn_encode_VkBool32(enc, &val->transformFeedbackStreamsLinesTriangles); - vn_encode_VkBool32(enc, &val->transformFeedbackRasterizationStreamSelect); - vn_encode_VkBool32(enc, &val->transformFeedbackDraw); -} - -static inline void -vn_encode_VkPhysicalDeviceTransformFeedbackPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceTransformFeedbackPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTransformFeedbackPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxTransformFeedbackStreams */ - /* skip val->maxTransformFeedbackBuffers */ - /* skip val->maxTransformFeedbackBufferSize */ - /* skip val->maxTransformFeedbackStreamDataSize */ - /* skip val->maxTransformFeedbackBufferDataSize */ - /* skip val->maxTransformFeedbackBufferDataStride */ - /* skip val->transformFeedbackQueries */ - /* skip val->transformFeedbackStreamsLinesTriangles */ - /* skip val->transformFeedbackRasterizationStreamSelect */ - /* skip val->transformFeedbackDraw */ -} - -static inline void -vn_decode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTransformFeedbackPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->meshAndTaskShaderDerivatives); -} - -static inline void -vn_encode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->meshAndTaskShaderDerivatives */ -} - -static inline void -vn_decode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMeshShaderPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMeshShaderPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMeshShaderPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMeshShaderPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxTaskWorkGroupTotalCount); - vn_encode_array_size(enc, 3); - vn_encode_uint32_t_array(enc, val->maxTaskWorkGroupCount, 3); - vn_encode_uint32_t(enc, &val->maxTaskWorkGroupInvocations); - vn_encode_array_size(enc, 3); - vn_encode_uint32_t_array(enc, val->maxTaskWorkGroupSize, 3); - vn_encode_uint32_t(enc, &val->maxTaskPayloadSize); - vn_encode_uint32_t(enc, &val->maxTaskSharedMemorySize); - vn_encode_uint32_t(enc, &val->maxTaskPayloadAndSharedMemorySize); - vn_encode_uint32_t(enc, &val->maxMeshWorkGroupTotalCount); - vn_encode_array_size(enc, 3); - vn_encode_uint32_t_array(enc, val->maxMeshWorkGroupCount, 3); - vn_encode_uint32_t(enc, &val->maxMeshWorkGroupInvocations); - vn_encode_array_size(enc, 3); - vn_encode_uint32_t_array(enc, val->maxMeshWorkGroupSize, 3); - vn_encode_uint32_t(enc, &val->maxMeshSharedMemorySize); - vn_encode_uint32_t(enc, &val->maxMeshPayloadAndSharedMemorySize); - vn_encode_uint32_t(enc, &val->maxMeshOutputMemorySize); - vn_encode_uint32_t(enc, &val->maxMeshPayloadAndOutputMemorySize); - vn_encode_uint32_t(enc, &val->maxMeshOutputComponents); - vn_encode_uint32_t(enc, &val->maxMeshOutputVertices); - vn_encode_uint32_t(enc, &val->maxMeshOutputPrimitives); - vn_encode_uint32_t(enc, &val->maxMeshOutputLayers); - vn_encode_uint32_t(enc, &val->maxMeshMultiviewViewCount); - vn_encode_uint32_t(enc, &val->meshOutputPerVertexGranularity); - vn_encode_uint32_t(enc, &val->meshOutputPerPrimitiveGranularity); - vn_encode_uint32_t(enc, &val->maxPreferredTaskWorkGroupInvocations); - vn_encode_uint32_t(enc, &val->maxPreferredMeshWorkGroupInvocations); - vn_encode_VkBool32(enc, &val->prefersLocalInvocationVertexOutput); - vn_encode_VkBool32(enc, &val->prefersLocalInvocationPrimitiveOutput); - vn_encode_VkBool32(enc, &val->prefersCompactVertexOutput); - vn_encode_VkBool32(enc, &val->prefersCompactPrimitiveOutput); -} - -static inline void -vn_encode_VkPhysicalDeviceMeshShaderPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMeshShaderPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceMeshShaderPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMeshShaderPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMeshShaderPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMeshShaderPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMeshShaderPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxTaskWorkGroupTotalCount */ - /* skip val->maxTaskWorkGroupCount */ - /* skip val->maxTaskWorkGroupInvocations */ - /* skip val->maxTaskWorkGroupSize */ - /* skip val->maxTaskPayloadSize */ - /* skip val->maxTaskSharedMemorySize */ - /* skip val->maxTaskPayloadAndSharedMemorySize */ - /* skip val->maxMeshWorkGroupTotalCount */ - /* skip val->maxMeshWorkGroupCount */ - /* skip val->maxMeshWorkGroupInvocations */ - /* skip val->maxMeshWorkGroupSize */ - /* skip val->maxMeshSharedMemorySize */ - /* skip val->maxMeshPayloadAndSharedMemorySize */ - /* skip val->maxMeshOutputMemorySize */ - /* skip val->maxMeshPayloadAndOutputMemorySize */ - /* skip val->maxMeshOutputComponents */ - /* skip val->maxMeshOutputVertices */ - /* skip val->maxMeshOutputPrimitives */ - /* skip val->maxMeshOutputLayers */ - /* skip val->maxMeshMultiviewViewCount */ - /* skip val->meshOutputPerVertexGranularity */ - /* skip val->meshOutputPerPrimitiveGranularity */ - /* skip val->maxPreferredTaskWorkGroupInvocations */ - /* skip val->maxPreferredMeshWorkGroupInvocations */ - /* skip val->prefersLocalInvocationVertexOutput */ - /* skip val->prefersLocalInvocationPrimitiveOutput */ - /* skip val->prefersCompactVertexOutput */ - /* skip val->prefersCompactPrimitiveOutput */ -} - -static inline void -vn_decode_VkPhysicalDeviceMeshShaderPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMeshShaderPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMeshShaderPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceAccelerationStructurePropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceAccelerationStructurePropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint64_t(enc, &val->maxGeometryCount); - vn_encode_uint64_t(enc, &val->maxInstanceCount); - vn_encode_uint64_t(enc, &val->maxPrimitiveCount); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorAccelerationStructures); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindAccelerationStructures); - vn_encode_uint32_t(enc, &val->maxDescriptorSetAccelerationStructures); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindAccelerationStructures); - vn_encode_uint32_t(enc, &val->minAccelerationStructureScratchOffsetAlignment); -} - -static inline void -vn_encode_VkPhysicalDeviceAccelerationStructurePropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceAccelerationStructurePropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAccelerationStructurePropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxGeometryCount */ - /* skip val->maxInstanceCount */ - /* skip val->maxPrimitiveCount */ - /* skip val->maxPerStageDescriptorAccelerationStructures */ - /* skip val->maxPerStageDescriptorUpdateAfterBindAccelerationStructures */ - /* skip val->maxDescriptorSetAccelerationStructures */ - /* skip val->maxDescriptorSetUpdateAfterBindAccelerationStructures */ - /* skip val->minAccelerationStructureScratchOffsetAlignment */ -} - -static inline void -vn_decode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceAccelerationStructurePropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceRayTracingPipelinePropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingPipelinePropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->shaderGroupHandleSize); - vn_encode_uint32_t(enc, &val->maxRayRecursionDepth); - vn_encode_uint32_t(enc, &val->maxShaderGroupStride); - vn_encode_uint32_t(enc, &val->shaderGroupBaseAlignment); - vn_encode_uint32_t(enc, &val->shaderGroupHandleCaptureReplaySize); - vn_encode_uint32_t(enc, &val->maxRayDispatchInvocationCount); - vn_encode_uint32_t(enc, &val->shaderGroupHandleAlignment); - vn_encode_uint32_t(enc, &val->maxRayHitAttributeSize); -} - -static inline void -vn_encode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRayTracingPipelinePropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPipelinePropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->shaderGroupHandleSize */ - /* skip val->maxRayRecursionDepth */ - /* skip val->maxShaderGroupStride */ - /* skip val->shaderGroupBaseAlignment */ - /* skip val->shaderGroupHandleCaptureReplaySize */ - /* skip val->maxRayDispatchInvocationCount */ - /* skip val->shaderGroupHandleAlignment */ - /* skip val->maxRayHitAttributeSize */ -} - -static inline void -vn_decode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRayTracingPipelinePropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceTexelBufferAlignmentProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceTexelBufferAlignmentProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceTexelBufferAlignmentProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceTexelBufferAlignmentProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDeviceSize(enc, &val->storageTexelBufferOffsetAlignmentBytes); - vn_encode_VkBool32(enc, &val->storageTexelBufferOffsetSingleTexelAlignment); - vn_encode_VkDeviceSize(enc, &val->uniformTexelBufferOffsetAlignmentBytes); - vn_encode_VkBool32(enc, &val->uniformTexelBufferOffsetSingleTexelAlignment); -} - -static inline void -vn_encode_VkPhysicalDeviceTexelBufferAlignmentProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceTexelBufferAlignmentProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES }); - vn_encode_VkPhysicalDeviceTexelBufferAlignmentProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceTexelBufferAlignmentProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceTexelBufferAlignmentProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceTexelBufferAlignmentProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTexelBufferAlignmentProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->storageTexelBufferOffsetAlignmentBytes */ - /* skip val->storageTexelBufferOffsetSingleTexelAlignment */ - /* skip val->uniformTexelBufferOffsetAlignmentBytes */ - /* skip val->uniformTexelBufferOffsetSingleTexelAlignment */ -} - -static inline void -vn_decode_VkPhysicalDeviceTexelBufferAlignmentProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceTexelBufferAlignmentProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceTexelBufferAlignmentProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceSubgroupSizeControlProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceSubgroupSizeControlProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceSubgroupSizeControlProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceSubgroupSizeControlProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->minSubgroupSize); - vn_encode_uint32_t(enc, &val->maxSubgroupSize); - vn_encode_uint32_t(enc, &val->maxComputeWorkgroupSubgroups); - vn_encode_VkFlags(enc, &val->requiredSubgroupSizeStages); -} - -static inline void -vn_encode_VkPhysicalDeviceSubgroupSizeControlProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceSubgroupSizeControlProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES }); - vn_encode_VkPhysicalDeviceSubgroupSizeControlProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceSubgroupSizeControlProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceSubgroupSizeControlProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupSizeControlProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupSizeControlProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->minSubgroupSize */ - /* skip val->maxSubgroupSize */ - /* skip val->maxComputeWorkgroupSubgroups */ - /* skip val->requiredSubgroupSizeStages */ -} - -static inline void -vn_decode_VkPhysicalDeviceSubgroupSizeControlProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSubgroupSizeControlProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSubgroupSizeControlProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceLineRasterizationProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceLineRasterizationProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceLineRasterizationProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceLineRasterizationProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->lineSubPixelPrecisionBits); -} - -static inline void -vn_encode_VkPhysicalDeviceLineRasterizationProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceLineRasterizationProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES }); - vn_encode_VkPhysicalDeviceLineRasterizationProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceLineRasterizationProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLineRasterizationProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLineRasterizationProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLineRasterizationProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->lineSubPixelPrecisionBits */ -} - -static inline void -vn_decode_VkPhysicalDeviceLineRasterizationProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLineRasterizationProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLineRasterizationProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceVulkan11Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan11Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan11Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan11Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->deviceUUID, VK_UUID_SIZE); - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->driverUUID, VK_UUID_SIZE); - vn_encode_array_size(enc, VK_LUID_SIZE); - vn_encode_uint8_t_array(enc, val->deviceLUID, VK_LUID_SIZE); - vn_encode_uint32_t(enc, &val->deviceNodeMask); - vn_encode_VkBool32(enc, &val->deviceLUIDValid); - vn_encode_uint32_t(enc, &val->subgroupSize); - vn_encode_VkFlags(enc, &val->subgroupSupportedStages); - vn_encode_VkFlags(enc, &val->subgroupSupportedOperations); - vn_encode_VkBool32(enc, &val->subgroupQuadOperationsInAllStages); - vn_encode_VkPointClippingBehavior(enc, &val->pointClippingBehavior); - vn_encode_uint32_t(enc, &val->maxMultiviewViewCount); - vn_encode_uint32_t(enc, &val->maxMultiviewInstanceIndex); - vn_encode_VkBool32(enc, &val->protectedNoFault); - vn_encode_uint32_t(enc, &val->maxPerSetDescriptors); - vn_encode_VkDeviceSize(enc, &val->maxMemoryAllocationSize); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan11Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan11Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES }); - vn_encode_VkPhysicalDeviceVulkan11Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan11Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan11Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan11Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan11Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->deviceUUID */ - /* skip val->driverUUID */ - /* skip val->deviceLUID */ - /* skip val->deviceNodeMask */ - /* skip val->deviceLUIDValid */ - /* skip val->subgroupSize */ - /* skip val->subgroupSupportedStages */ - /* skip val->subgroupSupportedOperations */ - /* skip val->subgroupQuadOperationsInAllStages */ - /* skip val->pointClippingBehavior */ - /* skip val->maxMultiviewViewCount */ - /* skip val->maxMultiviewInstanceIndex */ - /* skip val->protectedNoFault */ - /* skip val->maxPerSetDescriptors */ - /* skip val->maxMemoryAllocationSize */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan11Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan11Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan11Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceVulkan12Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan12Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan12Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan12Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDriverId(enc, &val->driverID); - vn_encode_array_size(enc, VK_MAX_DRIVER_NAME_SIZE); - vn_encode_char_array(enc, val->driverName, VK_MAX_DRIVER_NAME_SIZE); - vn_encode_array_size(enc, VK_MAX_DRIVER_INFO_SIZE); - vn_encode_char_array(enc, val->driverInfo, VK_MAX_DRIVER_INFO_SIZE); - vn_encode_VkConformanceVersion(enc, &val->conformanceVersion); - vn_encode_VkShaderFloatControlsIndependence(enc, &val->denormBehaviorIndependence); - vn_encode_VkShaderFloatControlsIndependence(enc, &val->roundingModeIndependence); - vn_encode_VkBool32(enc, &val->shaderSignedZeroInfNanPreserveFloat16); - vn_encode_VkBool32(enc, &val->shaderSignedZeroInfNanPreserveFloat32); - vn_encode_VkBool32(enc, &val->shaderSignedZeroInfNanPreserveFloat64); - vn_encode_VkBool32(enc, &val->shaderDenormPreserveFloat16); - vn_encode_VkBool32(enc, &val->shaderDenormPreserveFloat32); - vn_encode_VkBool32(enc, &val->shaderDenormPreserveFloat64); - vn_encode_VkBool32(enc, &val->shaderDenormFlushToZeroFloat16); - vn_encode_VkBool32(enc, &val->shaderDenormFlushToZeroFloat32); - vn_encode_VkBool32(enc, &val->shaderDenormFlushToZeroFloat64); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTEFloat16); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTEFloat32); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTEFloat64); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTZFloat16); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTZFloat32); - vn_encode_VkBool32(enc, &val->shaderRoundingModeRTZFloat64); - vn_encode_uint32_t(enc, &val->maxUpdateAfterBindDescriptorsInAllPools); - vn_encode_VkBool32(enc, &val->shaderUniformBufferArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderSampledImageArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderStorageBufferArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderStorageImageArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->shaderInputAttachmentArrayNonUniformIndexingNative); - vn_encode_VkBool32(enc, &val->robustBufferAccessUpdateAfterBind); - vn_encode_VkBool32(enc, &val->quadDivergentImplicitLod); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindSamplers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindUniformBuffers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindStorageBuffers); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindSampledImages); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindStorageImages); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindInputAttachments); - vn_encode_uint32_t(enc, &val->maxPerStageUpdateAfterBindResources); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindSamplers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindUniformBuffers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindStorageBuffers); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindSampledImages); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindStorageImages); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindInputAttachments); - vn_encode_VkFlags(enc, &val->supportedDepthResolveModes); - vn_encode_VkFlags(enc, &val->supportedStencilResolveModes); - vn_encode_VkBool32(enc, &val->independentResolveNone); - vn_encode_VkBool32(enc, &val->independentResolve); - vn_encode_VkBool32(enc, &val->filterMinmaxSingleComponentFormats); - vn_encode_VkBool32(enc, &val->filterMinmaxImageComponentMapping); - vn_encode_uint64_t(enc, &val->maxTimelineSemaphoreValueDifference); - vn_encode_VkFlags(enc, &val->framebufferIntegerColorSampleCounts); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan12Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan12Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES }); - vn_encode_VkPhysicalDeviceVulkan12Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan12Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan12Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan12Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan12Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->driverID */ - /* skip val->driverName */ - /* skip val->driverInfo */ - vn_decode_VkConformanceVersion_partial_temp(dec, &val->conformanceVersion); - /* skip val->denormBehaviorIndependence */ - /* skip val->roundingModeIndependence */ - /* skip val->shaderSignedZeroInfNanPreserveFloat16 */ - /* skip val->shaderSignedZeroInfNanPreserveFloat32 */ - /* skip val->shaderSignedZeroInfNanPreserveFloat64 */ - /* skip val->shaderDenormPreserveFloat16 */ - /* skip val->shaderDenormPreserveFloat32 */ - /* skip val->shaderDenormPreserveFloat64 */ - /* skip val->shaderDenormFlushToZeroFloat16 */ - /* skip val->shaderDenormFlushToZeroFloat32 */ - /* skip val->shaderDenormFlushToZeroFloat64 */ - /* skip val->shaderRoundingModeRTEFloat16 */ - /* skip val->shaderRoundingModeRTEFloat32 */ - /* skip val->shaderRoundingModeRTEFloat64 */ - /* skip val->shaderRoundingModeRTZFloat16 */ - /* skip val->shaderRoundingModeRTZFloat32 */ - /* skip val->shaderRoundingModeRTZFloat64 */ - /* skip val->maxUpdateAfterBindDescriptorsInAllPools */ - /* skip val->shaderUniformBufferArrayNonUniformIndexingNative */ - /* skip val->shaderSampledImageArrayNonUniformIndexingNative */ - /* skip val->shaderStorageBufferArrayNonUniformIndexingNative */ - /* skip val->shaderStorageImageArrayNonUniformIndexingNative */ - /* skip val->shaderInputAttachmentArrayNonUniformIndexingNative */ - /* skip val->robustBufferAccessUpdateAfterBind */ - /* skip val->quadDivergentImplicitLod */ - /* skip val->maxPerStageDescriptorUpdateAfterBindSamplers */ - /* skip val->maxPerStageDescriptorUpdateAfterBindUniformBuffers */ - /* skip val->maxPerStageDescriptorUpdateAfterBindStorageBuffers */ - /* skip val->maxPerStageDescriptorUpdateAfterBindSampledImages */ - /* skip val->maxPerStageDescriptorUpdateAfterBindStorageImages */ - /* skip val->maxPerStageDescriptorUpdateAfterBindInputAttachments */ - /* skip val->maxPerStageUpdateAfterBindResources */ - /* skip val->maxDescriptorSetUpdateAfterBindSamplers */ - /* skip val->maxDescriptorSetUpdateAfterBindUniformBuffers */ - /* skip val->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindStorageBuffers */ - /* skip val->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic */ - /* skip val->maxDescriptorSetUpdateAfterBindSampledImages */ - /* skip val->maxDescriptorSetUpdateAfterBindStorageImages */ - /* skip val->maxDescriptorSetUpdateAfterBindInputAttachments */ - /* skip val->supportedDepthResolveModes */ - /* skip val->supportedStencilResolveModes */ - /* skip val->independentResolveNone */ - /* skip val->independentResolve */ - /* skip val->filterMinmaxSingleComponentFormats */ - /* skip val->filterMinmaxImageComponentMapping */ - /* skip val->maxTimelineSemaphoreValueDifference */ - /* skip val->framebufferIntegerColorSampleCounts */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan12Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan12Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan12Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceVulkan13Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan13Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan13Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan13Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->minSubgroupSize); - vn_encode_uint32_t(enc, &val->maxSubgroupSize); - vn_encode_uint32_t(enc, &val->maxComputeWorkgroupSubgroups); - vn_encode_VkFlags(enc, &val->requiredSubgroupSizeStages); - vn_encode_uint32_t(enc, &val->maxInlineUniformBlockSize); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxDescriptorSetInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxDescriptorSetUpdateAfterBindInlineUniformBlocks); - vn_encode_uint32_t(enc, &val->maxInlineUniformTotalSize); - vn_encode_VkBool32(enc, &val->integerDotProduct8BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct8BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct8BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct4x8BitPackedUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct4x8BitPackedSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct4x8BitPackedMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct16BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct16BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct16BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct32BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct32BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct32BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct64BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct64BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct64BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating8BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating8BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating16BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating16BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating32BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating32BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating64BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating64BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated); - vn_encode_VkDeviceSize(enc, &val->storageTexelBufferOffsetAlignmentBytes); - vn_encode_VkBool32(enc, &val->storageTexelBufferOffsetSingleTexelAlignment); - vn_encode_VkDeviceSize(enc, &val->uniformTexelBufferOffsetAlignmentBytes); - vn_encode_VkBool32(enc, &val->uniformTexelBufferOffsetSingleTexelAlignment); - vn_encode_VkDeviceSize(enc, &val->maxBufferSize); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan13Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan13Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES }); - vn_encode_VkPhysicalDeviceVulkan13Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan13Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan13Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan13Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan13Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->minSubgroupSize */ - /* skip val->maxSubgroupSize */ - /* skip val->maxComputeWorkgroupSubgroups */ - /* skip val->requiredSubgroupSizeStages */ - /* skip val->maxInlineUniformBlockSize */ - /* skip val->maxPerStageDescriptorInlineUniformBlocks */ - /* skip val->maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks */ - /* skip val->maxDescriptorSetInlineUniformBlocks */ - /* skip val->maxDescriptorSetUpdateAfterBindInlineUniformBlocks */ - /* skip val->maxInlineUniformTotalSize */ - /* skip val->integerDotProduct8BitUnsignedAccelerated */ - /* skip val->integerDotProduct8BitSignedAccelerated */ - /* skip val->integerDotProduct8BitMixedSignednessAccelerated */ - /* skip val->integerDotProduct4x8BitPackedUnsignedAccelerated */ - /* skip val->integerDotProduct4x8BitPackedSignedAccelerated */ - /* skip val->integerDotProduct4x8BitPackedMixedSignednessAccelerated */ - /* skip val->integerDotProduct16BitUnsignedAccelerated */ - /* skip val->integerDotProduct16BitSignedAccelerated */ - /* skip val->integerDotProduct16BitMixedSignednessAccelerated */ - /* skip val->integerDotProduct32BitUnsignedAccelerated */ - /* skip val->integerDotProduct32BitSignedAccelerated */ - /* skip val->integerDotProduct32BitMixedSignednessAccelerated */ - /* skip val->integerDotProduct64BitUnsignedAccelerated */ - /* skip val->integerDotProduct64BitSignedAccelerated */ - /* skip val->integerDotProduct64BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating8BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating8BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating16BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating16BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating32BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating32BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating64BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating64BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated */ - /* skip val->storageTexelBufferOffsetAlignmentBytes */ - /* skip val->storageTexelBufferOffsetSingleTexelAlignment */ - /* skip val->uniformTexelBufferOffsetAlignmentBytes */ - /* skip val->uniformTexelBufferOffsetSingleTexelAlignment */ - /* skip val->maxBufferSize */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan13Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan13Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan13Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceVulkan14Properties chain */ - -static inline void -vn_encode_VkPhysicalDeviceVulkan14Properties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan14Properties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan14Properties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->lineSubPixelPrecisionBits); - vn_encode_uint32_t(enc, &val->maxVertexAttribDivisor); - vn_encode_VkBool32(enc, &val->supportsNonZeroFirstInstance); - vn_encode_uint32_t(enc, &val->maxPushDescriptors); - vn_encode_VkBool32(enc, &val->dynamicRenderingLocalReadDepthStencilAttachments); - vn_encode_VkBool32(enc, &val->dynamicRenderingLocalReadMultisampledAttachments); - vn_encode_VkBool32(enc, &val->earlyFragmentMultisampleCoverageAfterSampleCounting); - vn_encode_VkBool32(enc, &val->earlyFragmentSampleMaskTestBeforeSampleCounting); - vn_encode_VkBool32(enc, &val->depthStencilSwizzleOneSupport); - vn_encode_VkBool32(enc, &val->polygonModePointSize); - vn_encode_VkBool32(enc, &val->nonStrictSinglePixelWideLinesUseParallelogram); - vn_encode_VkBool32(enc, &val->nonStrictWideLinesUseParallelogram); - vn_encode_VkBool32(enc, &val->blockTexelViewCompatibleMultipleLayers); - vn_encode_uint32_t(enc, &val->maxCombinedImageSamplerDescriptorCount); - vn_encode_VkBool32(enc, &val->fragmentShadingRateClampCombinerInputs); - vn_encode_VkPipelineRobustnessBufferBehavior(enc, &val->defaultRobustnessStorageBuffers); - vn_encode_VkPipelineRobustnessBufferBehavior(enc, &val->defaultRobustnessUniformBuffers); - vn_encode_VkPipelineRobustnessBufferBehavior(enc, &val->defaultRobustnessVertexInputs); - vn_encode_VkPipelineRobustnessImageBehavior(enc, &val->defaultRobustnessImages); - vn_encode_uint32_t(enc, &val->copySrcLayoutCount); - if (val->pCopySrcLayouts) { - vn_encode_array_size(enc, val->copySrcLayoutCount); - vn_encode_VkImageLayout_array(enc, val->pCopySrcLayouts, val->copySrcLayoutCount); - } else { - vn_encode_array_size(enc, 0); - } - vn_encode_uint32_t(enc, &val->copyDstLayoutCount); - if (val->pCopyDstLayouts) { - vn_encode_array_size(enc, val->copyDstLayoutCount); - vn_encode_VkImageLayout_array(enc, val->pCopyDstLayouts, val->copyDstLayoutCount); - } else { - vn_encode_array_size(enc, 0); - } - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->optimalTilingLayoutUUID, VK_UUID_SIZE); - vn_encode_VkBool32(enc, &val->identicalMemoryTypeRequirements); -} - -static inline void -vn_encode_VkPhysicalDeviceVulkan14Properties(struct vn_cs_encoder *enc, const VkPhysicalDeviceVulkan14Properties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES }); - vn_encode_VkPhysicalDeviceVulkan14Properties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceVulkan14Properties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceVulkan14Properties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan14Properties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan14Properties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->lineSubPixelPrecisionBits */ - /* skip val->maxVertexAttribDivisor */ - /* skip val->supportsNonZeroFirstInstance */ - /* skip val->maxPushDescriptors */ - /* skip val->dynamicRenderingLocalReadDepthStencilAttachments */ - /* skip val->dynamicRenderingLocalReadMultisampledAttachments */ - /* skip val->earlyFragmentMultisampleCoverageAfterSampleCounting */ - /* skip val->earlyFragmentSampleMaskTestBeforeSampleCounting */ - /* skip val->depthStencilSwizzleOneSupport */ - /* skip val->polygonModePointSize */ - /* skip val->nonStrictSinglePixelWideLinesUseParallelogram */ - /* skip val->nonStrictWideLinesUseParallelogram */ - /* skip val->blockTexelViewCompatibleMultipleLayers */ - /* skip val->maxCombinedImageSamplerDescriptorCount */ - /* skip val->fragmentShadingRateClampCombinerInputs */ - /* skip val->defaultRobustnessStorageBuffers */ - /* skip val->defaultRobustnessUniformBuffers */ - /* skip val->defaultRobustnessVertexInputs */ - /* skip val->defaultRobustnessImages */ - vn_decode_uint32_t(dec, &val->copySrcLayoutCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->copySrcLayoutCount); - val->pCopySrcLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCopySrcLayouts), array_size); - if (!val->pCopySrcLayouts) return; - } else { - vn_decode_array_size_unchecked(dec); - val->pCopySrcLayouts = NULL; - } - vn_decode_uint32_t(dec, &val->copyDstLayoutCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->copyDstLayoutCount); - val->pCopyDstLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCopyDstLayouts), array_size); - if (!val->pCopyDstLayouts) return; - } else { - vn_decode_array_size_unchecked(dec); - val->pCopyDstLayouts = NULL; - } - /* skip val->optimalTilingLayoutUUID */ - /* skip val->identicalMemoryTypeRequirements */ -} - -static inline void -vn_decode_VkPhysicalDeviceVulkan14Properties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceVulkan14Properties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceVulkan14Properties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Properties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceCustomBorderColorPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceCustomBorderColorPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxCustomBorderColorSamplers); -} - -static inline void -vn_encode_VkPhysicalDeviceCustomBorderColorPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceCustomBorderColorPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCustomBorderColorPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxCustomBorderColorSamplers */ -} - -static inline void -vn_decode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCustomBorderColorPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceExtendedDynamicState3PropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->dynamicPrimitiveTopologyUnrestricted); -} - -static inline void -vn_encode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->dynamicPrimitiveTopologyUnrestricted */ -} - -static inline void -vn_decode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceRobustness2PropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceRobustness2PropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceRobustness2PropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceRobustness2PropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDeviceSize(enc, &val->robustStorageBufferAccessSizeAlignment); - vn_encode_VkDeviceSize(enc, &val->robustUniformBufferAccessSizeAlignment); -} - -static inline void -vn_encode_VkPhysicalDeviceRobustness2PropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceRobustness2PropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceRobustness2PropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceRobustness2PropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceRobustness2PropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceRobustness2PropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRobustness2PropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->robustStorageBufferAccessSizeAlignment */ - /* skip val->robustUniformBufferAccessSizeAlignment */ -} - -static inline void -vn_decode_VkPhysicalDeviceRobustness2PropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceRobustness2PropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceRobustness2PropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2PropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShadingRatePropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkExtent2D(enc, &val->minFragmentShadingRateAttachmentTexelSize); - vn_encode_VkExtent2D(enc, &val->maxFragmentShadingRateAttachmentTexelSize); - vn_encode_uint32_t(enc, &val->maxFragmentShadingRateAttachmentTexelSizeAspectRatio); - vn_encode_VkBool32(enc, &val->primitiveFragmentShadingRateWithMultipleViewports); - vn_encode_VkBool32(enc, &val->layeredShadingRateAttachments); - vn_encode_VkBool32(enc, &val->fragmentShadingRateNonTrivialCombinerOps); - vn_encode_VkExtent2D(enc, &val->maxFragmentSize); - vn_encode_uint32_t(enc, &val->maxFragmentSizeAspectRatio); - vn_encode_uint32_t(enc, &val->maxFragmentShadingRateCoverageSamples); - vn_encode_VkSampleCountFlagBits(enc, &val->maxFragmentShadingRateRasterizationSamples); - vn_encode_VkBool32(enc, &val->fragmentShadingRateWithShaderDepthStencilWrites); - vn_encode_VkBool32(enc, &val->fragmentShadingRateWithSampleMask); - vn_encode_VkBool32(enc, &val->fragmentShadingRateWithShaderSampleMask); - vn_encode_VkBool32(enc, &val->fragmentShadingRateWithConservativeRasterization); - vn_encode_VkBool32(enc, &val->fragmentShadingRateWithFragmentShaderInterlock); - vn_encode_VkBool32(enc, &val->fragmentShadingRateWithCustomSampleLocations); - vn_encode_VkBool32(enc, &val->fragmentShadingRateStrictMultiplyCombiner); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShadingRatePropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRatePropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExtent2D_partial_temp(dec, &val->minFragmentShadingRateAttachmentTexelSize); - vn_decode_VkExtent2D_partial_temp(dec, &val->maxFragmentShadingRateAttachmentTexelSize); - /* skip val->maxFragmentShadingRateAttachmentTexelSizeAspectRatio */ - /* skip val->primitiveFragmentShadingRateWithMultipleViewports */ - /* skip val->layeredShadingRateAttachments */ - /* skip val->fragmentShadingRateNonTrivialCombinerOps */ - vn_decode_VkExtent2D_partial_temp(dec, &val->maxFragmentSize); - /* skip val->maxFragmentSizeAspectRatio */ - /* skip val->maxFragmentShadingRateCoverageSamples */ - /* skip val->maxFragmentShadingRateRasterizationSamples */ - /* skip val->fragmentShadingRateWithShaderDepthStencilWrites */ - /* skip val->fragmentShadingRateWithSampleMask */ - /* skip val->fragmentShadingRateWithShaderSampleMask */ - /* skip val->fragmentShadingRateWithConservativeRasterization */ - /* skip val->fragmentShadingRateWithFragmentShaderInterlock */ - /* skip val->fragmentShadingRateWithCustomSampleLocations */ - /* skip val->fragmentShadingRateStrictMultiplyCombiner */ -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRatePropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->nativeUnalignedPerformance); -} - -static inline void -vn_encode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->nativeUnalignedPerformance */ -} - -static inline void -vn_decode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceHostImageCopyProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceHostImageCopyProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceHostImageCopyProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceHostImageCopyProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->copySrcLayoutCount); - if (val->pCopySrcLayouts) { - vn_encode_array_size(enc, val->copySrcLayoutCount); - vn_encode_VkImageLayout_array(enc, val->pCopySrcLayouts, val->copySrcLayoutCount); - } else { - vn_encode_array_size(enc, 0); - } - vn_encode_uint32_t(enc, &val->copyDstLayoutCount); - if (val->pCopyDstLayouts) { - vn_encode_array_size(enc, val->copyDstLayoutCount); - vn_encode_VkImageLayout_array(enc, val->pCopyDstLayouts, val->copyDstLayoutCount); - } else { - vn_encode_array_size(enc, 0); - } - vn_encode_array_size(enc, VK_UUID_SIZE); - vn_encode_uint8_t_array(enc, val->optimalTilingLayoutUUID, VK_UUID_SIZE); - vn_encode_VkBool32(enc, &val->identicalMemoryTypeRequirements); -} - -static inline void -vn_encode_VkPhysicalDeviceHostImageCopyProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceHostImageCopyProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES }); - vn_encode_VkPhysicalDeviceHostImageCopyProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceHostImageCopyProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceHostImageCopyProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceHostImageCopyProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostImageCopyProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->copySrcLayoutCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->copySrcLayoutCount); - val->pCopySrcLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCopySrcLayouts), array_size); - if (!val->pCopySrcLayouts) return; - } else { - vn_decode_array_size_unchecked(dec); - val->pCopySrcLayouts = NULL; - } - vn_decode_uint32_t(dec, &val->copyDstLayoutCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->copyDstLayoutCount); - val->pCopyDstLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCopyDstLayouts), array_size); - if (!val->pCopyDstLayouts) return; - } else { - vn_decode_array_size_unchecked(dec); - val->pCopyDstLayouts = NULL; - } - /* skip val->optimalTilingLayoutUUID */ - /* skip val->identicalMemoryTypeRequirements */ -} - -static inline void -vn_decode_VkPhysicalDeviceHostImageCopyProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceHostImageCopyProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceHostImageCopyProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceProvokingVertexPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceProvokingVertexPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceProvokingVertexPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceProvokingVertexPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->provokingVertexModePerPipeline); - vn_encode_VkBool32(enc, &val->transformFeedbackPreservesTriangleFanProvokingVertex); -} - -static inline void -vn_encode_VkPhysicalDeviceProvokingVertexPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceProvokingVertexPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceProvokingVertexPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceProvokingVertexPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProvokingVertexPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceProvokingVertexPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProvokingVertexPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->provokingVertexModePerPipeline */ - /* skip val->transformFeedbackPreservesTriangleFanProvokingVertex */ -} - -static inline void -vn_decode_VkPhysicalDeviceProvokingVertexPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProvokingVertexPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProvokingVertexPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceShaderIntegerDotProductProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceShaderIntegerDotProductProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderIntegerDotProductProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderIntegerDotProductProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->integerDotProduct8BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct8BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct8BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct4x8BitPackedUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct4x8BitPackedSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct4x8BitPackedMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct16BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct16BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct16BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct32BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct32BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct32BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct64BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct64BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProduct64BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating8BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating8BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating16BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating16BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating32BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating32BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating64BitUnsignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating64BitSignedAccelerated); - vn_encode_VkBool32(enc, &val->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated); -} - -static inline void -vn_encode_VkPhysicalDeviceShaderIntegerDotProductProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceShaderIntegerDotProductProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES }); - vn_encode_VkPhysicalDeviceShaderIntegerDotProductProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceShaderIntegerDotProductProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceShaderIntegerDotProductProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceShaderIntegerDotProductProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderIntegerDotProductProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->integerDotProduct8BitUnsignedAccelerated */ - /* skip val->integerDotProduct8BitSignedAccelerated */ - /* skip val->integerDotProduct8BitMixedSignednessAccelerated */ - /* skip val->integerDotProduct4x8BitPackedUnsignedAccelerated */ - /* skip val->integerDotProduct4x8BitPackedSignedAccelerated */ - /* skip val->integerDotProduct4x8BitPackedMixedSignednessAccelerated */ - /* skip val->integerDotProduct16BitUnsignedAccelerated */ - /* skip val->integerDotProduct16BitSignedAccelerated */ - /* skip val->integerDotProduct16BitMixedSignednessAccelerated */ - /* skip val->integerDotProduct32BitUnsignedAccelerated */ - /* skip val->integerDotProduct32BitSignedAccelerated */ - /* skip val->integerDotProduct32BitMixedSignednessAccelerated */ - /* skip val->integerDotProduct64BitUnsignedAccelerated */ - /* skip val->integerDotProduct64BitSignedAccelerated */ - /* skip val->integerDotProduct64BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating8BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating8BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating16BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating16BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating32BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating32BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating64BitUnsignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating64BitSignedAccelerated */ - /* skip val->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated */ -} - -static inline void -vn_decode_VkPhysicalDeviceShaderIntegerDotProductProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceShaderIntegerDotProductProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceShaderIntegerDotProductProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->triStripVertexOrderIndependentOfProvokingVertex); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->triStripVertexOrderIndependentOfProvokingVertex */ -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->graphicsPipelineLibraryFastLinking); - vn_encode_VkBool32(enc, &val->graphicsPipelineLibraryIndependentInterpolationDecoration); -} - -static inline void -vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->graphicsPipelineLibraryFastLinking */ - /* skip val->graphicsPipelineLibraryIndependentInterpolationDecoration */ -} - -static inline void -vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceNestedCommandBufferPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceNestedCommandBufferPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->maxCommandBufferNestingLevel); -} - -static inline void -vn_encode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceNestedCommandBufferPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNestedCommandBufferPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->maxCommandBufferNestingLevel */ -} - -static inline void -vn_decode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceNestedCommandBufferPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDevicePipelineRobustnessProperties chain */ - -static inline void -vn_encode_VkPhysicalDevicePipelineRobustnessProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineRobustnessProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineRobustnessProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkPipelineRobustnessBufferBehavior(enc, &val->defaultRobustnessStorageBuffers); - vn_encode_VkPipelineRobustnessBufferBehavior(enc, &val->defaultRobustnessUniformBuffers); - vn_encode_VkPipelineRobustnessBufferBehavior(enc, &val->defaultRobustnessVertexInputs); - vn_encode_VkPipelineRobustnessImageBehavior(enc, &val->defaultRobustnessImages); -} - -static inline void -vn_encode_VkPhysicalDevicePipelineRobustnessProperties(struct vn_cs_encoder *enc, const VkPhysicalDevicePipelineRobustnessProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES }); - vn_encode_VkPhysicalDevicePipelineRobustnessProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDevicePipelineRobustnessProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDevicePipelineRobustnessProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDevicePipelineRobustnessProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineRobustnessProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->defaultRobustnessStorageBuffers */ - /* skip val->defaultRobustnessUniformBuffers */ - /* skip val->defaultRobustnessVertexInputs */ - /* skip val->defaultRobustnessImages */ -} - -static inline void -vn_decode_VkPhysicalDevicePipelineRobustnessProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDevicePipelineRobustnessProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDevicePipelineRobustnessProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceCooperativeMatrixPropertiesKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceCooperativeMatrixPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags(enc, &val->cooperativeMatrixSupportedStages); -} - -static inline void -vn_encode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceCooperativeMatrixPropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR }); - vn_encode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCooperativeMatrixPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->cooperativeMatrixSupportedStages */ -} - -static inline void -vn_decode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceCooperativeMatrixPropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceDescriptorHeapPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorHeapPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDeviceSize(enc, &val->samplerHeapAlignment); - vn_encode_VkDeviceSize(enc, &val->resourceHeapAlignment); - vn_encode_VkDeviceSize(enc, &val->maxSamplerHeapSize); - vn_encode_VkDeviceSize(enc, &val->maxResourceHeapSize); - vn_encode_VkDeviceSize(enc, &val->minSamplerHeapReservedRange); - vn_encode_VkDeviceSize(enc, &val->minSamplerHeapReservedRangeWithEmbedded); - vn_encode_VkDeviceSize(enc, &val->minResourceHeapReservedRange); - vn_encode_VkDeviceSize(enc, &val->samplerDescriptorSize); - vn_encode_VkDeviceSize(enc, &val->imageDescriptorSize); - vn_encode_VkDeviceSize(enc, &val->bufferDescriptorSize); - vn_encode_VkDeviceSize(enc, &val->samplerDescriptorAlignment); - vn_encode_VkDeviceSize(enc, &val->imageDescriptorAlignment); - vn_encode_VkDeviceSize(enc, &val->bufferDescriptorAlignment); - vn_encode_VkDeviceSize(enc, &val->maxPushDataSize); - vn_encode_size_t(enc, &val->imageCaptureReplayOpaqueDataSize); - vn_encode_uint32_t(enc, &val->maxDescriptorHeapEmbeddedSamplers); - vn_encode_uint32_t(enc, &val->samplerYcbcrConversionCount); - vn_encode_VkBool32(enc, &val->sparseDescriptorHeaps); - vn_encode_VkBool32(enc, &val->protectedDescriptorHeaps); -} - -static inline void -vn_encode_VkPhysicalDeviceDescriptorHeapPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceDescriptorHeapPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorHeapPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->samplerHeapAlignment */ - /* skip val->resourceHeapAlignment */ - /* skip val->maxSamplerHeapSize */ - /* skip val->maxResourceHeapSize */ - /* skip val->minSamplerHeapReservedRange */ - /* skip val->minSamplerHeapReservedRangeWithEmbedded */ - /* skip val->minResourceHeapReservedRange */ - /* skip val->samplerDescriptorSize */ - /* skip val->imageDescriptorSize */ - /* skip val->bufferDescriptorSize */ - /* skip val->samplerDescriptorAlignment */ - /* skip val->imageDescriptorAlignment */ - /* skip val->bufferDescriptorAlignment */ - /* skip val->maxPushDataSize */ - /* skip val->imageCaptureReplayOpaqueDataSize */ - /* skip val->maxDescriptorHeapEmbeddedSamplers */ - /* skip val->samplerYcbcrConversionCount */ - /* skip val->sparseDescriptorHeaps */ - /* skip val->protectedDescriptorHeaps */ -} - -static inline void -vn_decode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceDescriptorHeapPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceProperties2 chain */ - -static inline void -vn_encode_VkPhysicalDeviceProperties2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMultiDrawPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMultiDrawPropertiesEXT_self(enc, (const VkPhysicalDeviceMultiDrawPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDevicePushDescriptorProperties *)pnext)->pNext); - vn_encode_VkPhysicalDevicePushDescriptorProperties_self(enc, (const VkPhysicalDevicePushDescriptorProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceDriverProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDriverProperties_self(enc, (const VkPhysicalDeviceDriverProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceIDProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceIDProperties_self(enc, (const VkPhysicalDeviceIDProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMultiviewProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMultiviewProperties_self(enc, (const VkPhysicalDeviceMultiviewProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceSubgroupProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSubgroupProperties_self(enc, (const VkPhysicalDeviceSubgroupProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDevicePointClippingProperties *)pnext)->pNext); - vn_encode_VkPhysicalDevicePointClippingProperties_self(enc, (const VkPhysicalDevicePointClippingProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceProtectedMemoryProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceProtectedMemoryProperties_self(enc, (const VkPhysicalDeviceProtectedMemoryProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceSamplerFilterMinmaxProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSamplerFilterMinmaxProperties_self(enc, (const VkPhysicalDeviceSamplerFilterMinmaxProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceSampleLocationsPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSampleLocationsPropertiesEXT_self(enc, (const VkPhysicalDeviceSampleLocationsPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_self(enc, (const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceInlineUniformBlockProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceInlineUniformBlockProperties_self(enc, (const VkPhysicalDeviceInlineUniformBlockProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMaintenance3Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance3Properties_self(enc, (const VkPhysicalDeviceMaintenance3Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMaintenance4Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance4Properties_self(enc, (const VkPhysicalDeviceMaintenance4Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMaintenance5Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance5Properties_self(enc, (const VkPhysicalDeviceMaintenance5Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMaintenance6Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance6Properties_self(enc, (const VkPhysicalDeviceMaintenance6Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMaintenance7PropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMaintenance7PropertiesKHR_self(enc, (const VkPhysicalDeviceMaintenance7PropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceFloatControlsProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceFloatControlsProperties_self(enc, (const VkPhysicalDeviceFloatControlsProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceConservativeRasterizationPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_self(enc, (const VkPhysicalDeviceConservativeRasterizationPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceDescriptorIndexingProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDescriptorIndexingProperties_self(enc, (const VkPhysicalDeviceDescriptorIndexingProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceTimelineSemaphoreProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTimelineSemaphoreProperties_self(enc, (const VkPhysicalDeviceTimelineSemaphoreProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_self(enc, (const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceVertexAttributeDivisorProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVertexAttributeDivisorProperties_self(enc, (const VkPhysicalDeviceVertexAttributeDivisorProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDevicePCIBusInfoPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDevicePCIBusInfoPropertiesEXT_self(enc, (const VkPhysicalDevicePCIBusInfoPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceDepthStencilResolveProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDepthStencilResolveProperties_self(enc, (const VkPhysicalDeviceDepthStencilResolveProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceTransformFeedbackPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_self(enc, (const VkPhysicalDeviceTransformFeedbackPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_self(enc, (const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceMeshShaderPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMeshShaderPropertiesEXT_self(enc, (const VkPhysicalDeviceMeshShaderPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceAccelerationStructurePropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_self(enc, (const VkPhysicalDeviceAccelerationStructurePropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceRayTracingPipelinePropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_self(enc, (const VkPhysicalDeviceRayTracingPipelinePropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceTexelBufferAlignmentProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceTexelBufferAlignmentProperties_self(enc, (const VkPhysicalDeviceTexelBufferAlignmentProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceSubgroupSizeControlProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceSubgroupSizeControlProperties_self(enc, (const VkPhysicalDeviceSubgroupSizeControlProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceLineRasterizationProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceLineRasterizationProperties_self(enc, (const VkPhysicalDeviceLineRasterizationProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceVulkan11Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan11Properties_self(enc, (const VkPhysicalDeviceVulkan11Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceVulkan12Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan12Properties_self(enc, (const VkPhysicalDeviceVulkan12Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceVulkan13Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan13Properties_self(enc, (const VkPhysicalDeviceVulkan13Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceVulkan14Properties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceVulkan14Properties_self(enc, (const VkPhysicalDeviceVulkan14Properties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceCustomBorderColorPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_self(enc, (const VkPhysicalDeviceCustomBorderColorPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_self(enc, (const VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceRobustness2PropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceRobustness2PropertiesKHR_self(enc, (const VkPhysicalDeviceRobustness2PropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceFragmentShadingRatePropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_self(enc, (const VkPhysicalDeviceFragmentShadingRatePropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_self(enc, (const VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceHostImageCopyProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceHostImageCopyProperties_self(enc, (const VkPhysicalDeviceHostImageCopyProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceProvokingVertexPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceProvokingVertexPropertiesEXT_self(enc, (const VkPhysicalDeviceProvokingVertexPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceShaderIntegerDotProductProperties *)pnext)->pNext); - vn_encode_VkPhysicalDeviceShaderIntegerDotProductProperties_self(enc, (const VkPhysicalDeviceShaderIntegerDotProductProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_self(enc, (const VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_self(enc, (const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceNestedCommandBufferPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_self(enc, (const VkPhysicalDeviceNestedCommandBufferPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDevicePipelineRobustnessProperties *)pnext)->pNext); - vn_encode_VkPhysicalDevicePipelineRobustnessProperties_self(enc, (const VkPhysicalDevicePipelineRobustnessProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceCooperativeMatrixPropertiesKHR *)pnext)->pNext); - vn_encode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_self(enc, (const VkPhysicalDeviceCooperativeMatrixPropertiesKHR *)pnext); - return; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, ((const VkPhysicalDeviceDescriptorHeapPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_self(enc, (const VkPhysicalDeviceDescriptorHeapPropertiesEXT *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceProperties2_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkPhysicalDeviceProperties(enc, &val->properties); -} - -static inline void -vn_encode_VkPhysicalDeviceProperties2(struct vn_cs_encoder *enc, const VkPhysicalDeviceProperties2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 }); - vn_encode_VkPhysicalDeviceProperties2_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceProperties2_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiDrawPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiDrawPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiDrawPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceMultiDrawPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePushDescriptorProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePushDescriptorProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePushDescriptorProperties_self_partial_temp(dec, (VkPhysicalDevicePushDescriptorProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDriverProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDriverProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDriverProperties_self_partial_temp(dec, (VkPhysicalDeviceDriverProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceIDProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceIDProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceIDProperties_self_partial_temp(dec, (VkPhysicalDeviceIDProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMultiviewProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMultiviewProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMultiviewProperties_self_partial_temp(dec, (VkPhysicalDeviceMultiviewProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSubgroupProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSubgroupProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupProperties_self_partial_temp(dec, (VkPhysicalDeviceSubgroupProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePointClippingProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePointClippingProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePointClippingProperties_self_partial_temp(dec, (VkPhysicalDevicePointClippingProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProtectedMemoryProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProtectedMemoryProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProtectedMemoryProperties_self_partial_temp(dec, (VkPhysicalDeviceProtectedMemoryProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSamplerFilterMinmaxProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSamplerFilterMinmaxProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSamplerFilterMinmaxProperties_self_partial_temp(dec, (VkPhysicalDeviceSamplerFilterMinmaxProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSampleLocationsPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSampleLocationsPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSampleLocationsPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceSampleLocationsPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceInlineUniformBlockProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceInlineUniformBlockProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceInlineUniformBlockProperties_self_partial_temp(dec, (VkPhysicalDeviceInlineUniformBlockProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance3Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance3Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance3Properties_self_partial_temp(dec, (VkPhysicalDeviceMaintenance3Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance4Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance4Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance4Properties_self_partial_temp(dec, (VkPhysicalDeviceMaintenance4Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance5Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance5Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance5Properties_self_partial_temp(dec, (VkPhysicalDeviceMaintenance5Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance6Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance6Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance6Properties_self_partial_temp(dec, (VkPhysicalDeviceMaintenance6Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMaintenance7PropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMaintenance7PropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMaintenance7PropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceMaintenance7PropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFloatControlsProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFloatControlsProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFloatControlsProperties_self_partial_temp(dec, (VkPhysicalDeviceFloatControlsProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceConservativeRasterizationPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceConservativeRasterizationPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceConservativeRasterizationPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceConservativeRasterizationPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorIndexingProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorIndexingProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorIndexingProperties_self_partial_temp(dec, (VkPhysicalDeviceDescriptorIndexingProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTimelineSemaphoreProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTimelineSemaphoreProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTimelineSemaphoreProperties_self_partial_temp(dec, (VkPhysicalDeviceTimelineSemaphoreProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVertexAttributeDivisorProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVertexAttributeDivisorProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVertexAttributeDivisorProperties_self_partial_temp(dec, (VkPhysicalDeviceVertexAttributeDivisorProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePCIBusInfoPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePCIBusInfoPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePCIBusInfoPropertiesEXT_self_partial_temp(dec, (VkPhysicalDevicePCIBusInfoPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDepthStencilResolveProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDepthStencilResolveProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDepthStencilResolveProperties_self_partial_temp(dec, (VkPhysicalDeviceDepthStencilResolveProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTransformFeedbackPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTransformFeedbackPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTransformFeedbackPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceTransformFeedbackPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMeshShaderPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMeshShaderPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMeshShaderPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceMeshShaderPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceAccelerationStructurePropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceAccelerationStructurePropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceAccelerationStructurePropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceAccelerationStructurePropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRayTracingPipelinePropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRayTracingPipelinePropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRayTracingPipelinePropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceRayTracingPipelinePropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceTexelBufferAlignmentProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceTexelBufferAlignmentProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceTexelBufferAlignmentProperties_self_partial_temp(dec, (VkPhysicalDeviceTexelBufferAlignmentProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSubgroupSizeControlProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceSubgroupSizeControlProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceSubgroupSizeControlProperties_self_partial_temp(dec, (VkPhysicalDeviceSubgroupSizeControlProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLineRasterizationProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLineRasterizationProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLineRasterizationProperties_self_partial_temp(dec, (VkPhysicalDeviceLineRasterizationProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan11Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan11Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan11Properties_self_partial_temp(dec, (VkPhysicalDeviceVulkan11Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan12Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan12Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan12Properties_self_partial_temp(dec, (VkPhysicalDeviceVulkan12Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan13Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan13Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan13Properties_self_partial_temp(dec, (VkPhysicalDeviceVulkan13Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceVulkan14Properties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceVulkan14Properties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceVulkan14Properties_self_partial_temp(dec, (VkPhysicalDeviceVulkan14Properties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCustomBorderColorPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCustomBorderColorPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCustomBorderColorPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceCustomBorderColorPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExtendedDynamicState3PropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceExtendedDynamicState3PropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceExtendedDynamicState3PropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceRobustness2PropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceRobustness2PropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceRobustness2PropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceRobustness2PropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShadingRatePropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShadingRatePropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRatePropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceFragmentShadingRatePropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceHostImageCopyProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceHostImageCopyProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceHostImageCopyProperties_self_partial_temp(dec, (VkPhysicalDeviceHostImageCopyProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceProvokingVertexPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceProvokingVertexPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProvokingVertexPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceProvokingVertexPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceShaderIntegerDotProductProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceShaderIntegerDotProductProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceShaderIntegerDotProductProperties_self_partial_temp(dec, (VkPhysicalDeviceShaderIntegerDotProductProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceNestedCommandBufferPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceNestedCommandBufferPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceNestedCommandBufferPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceNestedCommandBufferPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDevicePipelineRobustnessProperties)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDevicePipelineRobustnessProperties *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDevicePipelineRobustnessProperties_self_partial_temp(dec, (VkPhysicalDevicePipelineRobustnessProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceCooperativeMatrixPropertiesKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceCooperativeMatrixPropertiesKHR *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceCooperativeMatrixPropertiesKHR_self_partial_temp(dec, (VkPhysicalDeviceCooperativeMatrixPropertiesKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceDescriptorHeapPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceDescriptorHeapPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceDescriptorHeapPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceDescriptorHeapPropertiesEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceProperties2_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkPhysicalDeviceProperties_partial_temp(dec, &val->properties); -} - -static inline void -vn_decode_VkPhysicalDeviceProperties2_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceProperties2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceProperties2_self_partial_temp(dec, val); -} - -/* struct VkDrmFormatModifierPropertiesEXT */ - -static inline void -vn_encode_VkDrmFormatModifierPropertiesEXT(struct vn_cs_encoder *enc, const VkDrmFormatModifierPropertiesEXT *val) -{ - vn_encode_uint64_t(enc, &val->drmFormatModifier); - vn_encode_uint32_t(enc, &val->drmFormatModifierPlaneCount); - vn_encode_VkFlags(enc, &val->drmFormatModifierTilingFeatures); -} - -static inline void -vn_decode_VkDrmFormatModifierPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkDrmFormatModifierPropertiesEXT *val) -{ - /* skip val->drmFormatModifier */ - /* skip val->drmFormatModifierPlaneCount */ - /* skip val->drmFormatModifierTilingFeatures */ -} - -/* struct VkDrmFormatModifierPropertiesListEXT chain */ - -static inline void -vn_encode_VkDrmFormatModifierPropertiesListEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkDrmFormatModifierPropertiesListEXT_self(struct vn_cs_encoder *enc, const VkDrmFormatModifierPropertiesListEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->drmFormatModifierCount); - if (val->pDrmFormatModifierProperties) { - vn_encode_array_size(enc, val->drmFormatModifierCount); - for (uint32_t i = 0; i < val->drmFormatModifierCount; i++) - vn_encode_VkDrmFormatModifierPropertiesEXT(enc, &val->pDrmFormatModifierProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void -vn_encode_VkDrmFormatModifierPropertiesListEXT(struct vn_cs_encoder *enc, const VkDrmFormatModifierPropertiesListEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT }); - vn_encode_VkDrmFormatModifierPropertiesListEXT_pnext(enc, val->pNext); - vn_encode_VkDrmFormatModifierPropertiesListEXT_self(enc, val); -} - -static inline void * -vn_decode_VkDrmFormatModifierPropertiesListEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDrmFormatModifierPropertiesListEXT_self_partial_temp(struct vn_cs_decoder *dec, VkDrmFormatModifierPropertiesListEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->drmFormatModifierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->drmFormatModifierCount); - val->pDrmFormatModifierProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDrmFormatModifierProperties), iter_count); - if (!val->pDrmFormatModifierProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDrmFormatModifierPropertiesEXT_partial_temp(dec, &val->pDrmFormatModifierProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pDrmFormatModifierProperties = NULL; - } -} - -static inline void -vn_decode_VkDrmFormatModifierPropertiesListEXT_partial_temp(struct vn_cs_decoder *dec, VkDrmFormatModifierPropertiesListEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDrmFormatModifierPropertiesListEXT_pnext_partial_temp(dec); - vn_decode_VkDrmFormatModifierPropertiesListEXT_self_partial_temp(dec, val); -} - -/* struct VkSubpassResolvePerformanceQueryEXT chain */ - -static inline void -vn_encode_VkSubpassResolvePerformanceQueryEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkSubpassResolvePerformanceQueryEXT_self(struct vn_cs_encoder *enc, const VkSubpassResolvePerformanceQueryEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->optimal); -} - -static inline void -vn_encode_VkSubpassResolvePerformanceQueryEXT(struct vn_cs_encoder *enc, const VkSubpassResolvePerformanceQueryEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT }); - vn_encode_VkSubpassResolvePerformanceQueryEXT_pnext(enc, val->pNext); - vn_encode_VkSubpassResolvePerformanceQueryEXT_self(enc, val); -} - -static inline void * -vn_decode_VkSubpassResolvePerformanceQueryEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSubpassResolvePerformanceQueryEXT_self_partial_temp(struct vn_cs_decoder *dec, VkSubpassResolvePerformanceQueryEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->optimal */ -} - -static inline void -vn_decode_VkSubpassResolvePerformanceQueryEXT_partial_temp(struct vn_cs_decoder *dec, VkSubpassResolvePerformanceQueryEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubpassResolvePerformanceQueryEXT_pnext_partial_temp(dec); - vn_decode_VkSubpassResolvePerformanceQueryEXT_self_partial_temp(dec, val); -} - -/* struct VkFormatProperties3 chain */ - -static inline void -vn_encode_VkFormatProperties3_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkFormatProperties3_self(struct vn_cs_encoder *enc, const VkFormatProperties3 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags64(enc, &val->linearTilingFeatures); - vn_encode_VkFlags64(enc, &val->optimalTilingFeatures); - vn_encode_VkFlags64(enc, &val->bufferFeatures); -} - -static inline void -vn_encode_VkFormatProperties3(struct vn_cs_encoder *enc, const VkFormatProperties3 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 }); - vn_encode_VkFormatProperties3_pnext(enc, val->pNext); - vn_encode_VkFormatProperties3_self(enc, val); -} - -static inline void * -vn_decode_VkFormatProperties3_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkFormatProperties3_self_partial_temp(struct vn_cs_decoder *dec, VkFormatProperties3 *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->linearTilingFeatures */ - /* skip val->optimalTilingFeatures */ - /* skip val->bufferFeatures */ -} - -static inline void -vn_decode_VkFormatProperties3_partial_temp(struct vn_cs_decoder *dec, VkFormatProperties3 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFormatProperties3_pnext_partial_temp(dec); - vn_decode_VkFormatProperties3_self_partial_temp(dec, val); -} - -/* struct VkDrmFormatModifierProperties2EXT */ - -static inline void -vn_encode_VkDrmFormatModifierProperties2EXT(struct vn_cs_encoder *enc, const VkDrmFormatModifierProperties2EXT *val) -{ - vn_encode_uint64_t(enc, &val->drmFormatModifier); - vn_encode_uint32_t(enc, &val->drmFormatModifierPlaneCount); - vn_encode_VkFlags64(enc, &val->drmFormatModifierTilingFeatures); -} - -static inline void -vn_decode_VkDrmFormatModifierProperties2EXT_partial_temp(struct vn_cs_decoder *dec, VkDrmFormatModifierProperties2EXT *val) -{ - /* skip val->drmFormatModifier */ - /* skip val->drmFormatModifierPlaneCount */ - /* skip val->drmFormatModifierTilingFeatures */ -} - -/* struct VkDrmFormatModifierPropertiesList2EXT chain */ - -static inline void -vn_encode_VkDrmFormatModifierPropertiesList2EXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkDrmFormatModifierPropertiesList2EXT_self(struct vn_cs_encoder *enc, const VkDrmFormatModifierPropertiesList2EXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->drmFormatModifierCount); - if (val->pDrmFormatModifierProperties) { - vn_encode_array_size(enc, val->drmFormatModifierCount); - for (uint32_t i = 0; i < val->drmFormatModifierCount; i++) - vn_encode_VkDrmFormatModifierProperties2EXT(enc, &val->pDrmFormatModifierProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void -vn_encode_VkDrmFormatModifierPropertiesList2EXT(struct vn_cs_encoder *enc, const VkDrmFormatModifierPropertiesList2EXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT }); - vn_encode_VkDrmFormatModifierPropertiesList2EXT_pnext(enc, val->pNext); - vn_encode_VkDrmFormatModifierPropertiesList2EXT_self(enc, val); -} - -static inline void * -vn_decode_VkDrmFormatModifierPropertiesList2EXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDrmFormatModifierPropertiesList2EXT_self_partial_temp(struct vn_cs_decoder *dec, VkDrmFormatModifierPropertiesList2EXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->drmFormatModifierCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->drmFormatModifierCount); - val->pDrmFormatModifierProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDrmFormatModifierProperties), iter_count); - if (!val->pDrmFormatModifierProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDrmFormatModifierProperties2EXT_partial_temp(dec, &val->pDrmFormatModifierProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pDrmFormatModifierProperties = NULL; - } -} - -static inline void -vn_decode_VkDrmFormatModifierPropertiesList2EXT_partial_temp(struct vn_cs_decoder *dec, VkDrmFormatModifierPropertiesList2EXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDrmFormatModifierPropertiesList2EXT_pnext_partial_temp(dec); - vn_decode_VkDrmFormatModifierPropertiesList2EXT_self_partial_temp(dec, val); -} - -/* struct VkFormatProperties2 chain */ - -static inline void -vn_encode_VkFormatProperties2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkFormatProperties2_pnext(enc, ((const VkDrmFormatModifierPropertiesListEXT *)pnext)->pNext); - vn_encode_VkDrmFormatModifierPropertiesListEXT_self(enc, (const VkDrmFormatModifierPropertiesListEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkFormatProperties2_pnext(enc, ((const VkSubpassResolvePerformanceQueryEXT *)pnext)->pNext); - vn_encode_VkSubpassResolvePerformanceQueryEXT_self(enc, (const VkSubpassResolvePerformanceQueryEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkFormatProperties2_pnext(enc, ((const VkFormatProperties3 *)pnext)->pNext); - vn_encode_VkFormatProperties3_self(enc, (const VkFormatProperties3 *)pnext); - return; - case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkFormatProperties2_pnext(enc, ((const VkDrmFormatModifierPropertiesList2EXT *)pnext)->pNext); - vn_encode_VkDrmFormatModifierPropertiesList2EXT_self(enc, (const VkDrmFormatModifierPropertiesList2EXT *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkFormatProperties2_self(struct vn_cs_encoder *enc, const VkFormatProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFormatProperties(enc, &val->formatProperties); -} - -static inline void -vn_encode_VkFormatProperties2(struct vn_cs_encoder *enc, const VkFormatProperties2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 }); - vn_encode_VkFormatProperties2_pnext(enc, val->pNext); - vn_encode_VkFormatProperties2_self(enc, val); -} - -static inline void * -vn_decode_VkFormatProperties2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDrmFormatModifierPropertiesListEXT)); - if (pnext) { - pnext->sType = stype; - ((VkDrmFormatModifierPropertiesListEXT *)pnext)->pNext = vn_decode_VkFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkDrmFormatModifierPropertiesListEXT_self_partial_temp(dec, (VkDrmFormatModifierPropertiesListEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSubpassResolvePerformanceQueryEXT)); - if (pnext) { - pnext->sType = stype; - ((VkSubpassResolvePerformanceQueryEXT *)pnext)->pNext = vn_decode_VkFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkSubpassResolvePerformanceQueryEXT_self_partial_temp(dec, (VkSubpassResolvePerformanceQueryEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkFormatProperties3)); - if (pnext) { - pnext->sType = stype; - ((VkFormatProperties3 *)pnext)->pNext = vn_decode_VkFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkFormatProperties3_self_partial_temp(dec, (VkFormatProperties3 *)pnext); - } - break; - case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDrmFormatModifierPropertiesList2EXT)); - if (pnext) { - pnext->sType = stype; - ((VkDrmFormatModifierPropertiesList2EXT *)pnext)->pNext = vn_decode_VkFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkDrmFormatModifierPropertiesList2EXT_self_partial_temp(dec, (VkDrmFormatModifierPropertiesList2EXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkFormatProperties2_self_partial_temp(struct vn_cs_decoder *dec, VkFormatProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFormatProperties_partial_temp(dec, &val->formatProperties); -} - -static inline void -vn_decode_VkFormatProperties2_partial_temp(struct vn_cs_decoder *dec, VkFormatProperties2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkFormatProperties2_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceExternalImageFormatInfo chain */ - -static inline void * -vn_decode_VkPhysicalDeviceExternalImageFormatInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExternalImageFormatInfo_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalImageFormatInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExternalMemoryHandleTypeFlagBits(dec, &val->handleType); -} - -static inline void -vn_decode_VkPhysicalDeviceExternalImageFormatInfo_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalImageFormatInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExternalImageFormatInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExternalImageFormatInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExternalImageFormatInfo_handle_self(VkPhysicalDeviceExternalImageFormatInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleType */ -} - -static inline void -vn_replace_VkPhysicalDeviceExternalImageFormatInfo_handle(VkPhysicalDeviceExternalImageFormatInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: - vn_replace_VkPhysicalDeviceExternalImageFormatInfo_handle_self((VkPhysicalDeviceExternalImageFormatInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT chain */ - -static inline void * -vn_decode_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageDrmFormatModifierInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint64_t(dec, &val->drmFormatModifier); - vn_decode_VkSharingMode(dec, &val->sharingMode); - vn_decode_uint32_t(dec, &val->queueFamilyIndexCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->queueFamilyIndexCount); - val->pQueueFamilyIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pQueueFamilyIndices), array_size); - if (!val->pQueueFamilyIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pQueueFamilyIndices, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pQueueFamilyIndices = NULL; - } -} - -static inline void -vn_decode_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageDrmFormatModifierInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_handle_self(VkPhysicalDeviceImageDrmFormatModifierInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->drmFormatModifier */ - /* skip val->sharingMode */ - /* skip val->queueFamilyIndexCount */ - /* skip val->pQueueFamilyIndices */ -} - -static inline void -vn_replace_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_handle(VkPhysicalDeviceImageDrmFormatModifierInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: - vn_replace_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_handle_self((VkPhysicalDeviceImageDrmFormatModifierInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImageViewImageFormatInfoEXT chain */ - -static inline void * -vn_decode_VkPhysicalDeviceImageViewImageFormatInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceImageViewImageFormatInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageViewImageFormatInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageViewType(dec, &val->imageViewType); -} - -static inline void -vn_decode_VkPhysicalDeviceImageViewImageFormatInfoEXT_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageViewImageFormatInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageViewImageFormatInfoEXT_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageViewImageFormatInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImageViewImageFormatInfoEXT_handle_self(VkPhysicalDeviceImageViewImageFormatInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->imageViewType */ -} - -static inline void -vn_replace_VkPhysicalDeviceImageViewImageFormatInfoEXT_handle(VkPhysicalDeviceImageViewImageFormatInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT: - vn_replace_VkPhysicalDeviceImageViewImageFormatInfoEXT_handle_self((VkPhysicalDeviceImageViewImageFormatInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceImageFormatInfo2 chain */ - -static inline void * -vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceExternalImageFormatInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceExternalImageFormatInfo *)pnext)->pNext = vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExternalImageFormatInfo_self_temp(dec, (VkPhysicalDeviceExternalImageFormatInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageFormatListCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkImageFormatListCreateInfo *)pnext)->pNext = vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(dec); - vn_decode_VkImageFormatListCreateInfo_self_temp(dec, (VkImageFormatListCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageDrmFormatModifierInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageDrmFormatModifierInfoEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_self_temp(dec, (VkPhysicalDeviceImageDrmFormatModifierInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageStencilUsageCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkImageStencilUsageCreateInfo *)pnext)->pNext = vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(dec); - vn_decode_VkImageStencilUsageCreateInfo_self_temp(dec, (VkImageStencilUsageCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceImageViewImageFormatInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceImageViewImageFormatInfoEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageViewImageFormatInfoEXT_self_temp(dec, (VkPhysicalDeviceImageViewImageFormatInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceImageFormatInfo2_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageFormatInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkImageType(dec, &val->type); - vn_decode_VkImageTiling(dec, &val->tiling); - vn_decode_VkFlags(dec, &val->usage); - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkPhysicalDeviceImageFormatInfo2_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceImageFormatInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceImageFormatInfo2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceImageFormatInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceImageFormatInfo2_handle_self(VkPhysicalDeviceImageFormatInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->format */ - /* skip val->type */ - /* skip val->tiling */ - /* skip val->usage */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkPhysicalDeviceImageFormatInfo2_handle(VkPhysicalDeviceImageFormatInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2: - vn_replace_VkPhysicalDeviceImageFormatInfo2_handle_self((VkPhysicalDeviceImageFormatInfo2 *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: - vn_replace_VkPhysicalDeviceExternalImageFormatInfo_handle_self((VkPhysicalDeviceExternalImageFormatInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: - vn_replace_VkImageFormatListCreateInfo_handle_self((VkImageFormatListCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: - vn_replace_VkPhysicalDeviceImageDrmFormatModifierInfoEXT_handle_self((VkPhysicalDeviceImageDrmFormatModifierInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: - vn_replace_VkImageStencilUsageCreateInfo_handle_self((VkImageStencilUsageCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT: - vn_replace_VkPhysicalDeviceImageViewImageFormatInfoEXT_handle_self((VkPhysicalDeviceImageViewImageFormatInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkExternalMemoryProperties */ - -static inline void -vn_encode_VkExternalMemoryProperties(struct vn_cs_encoder *enc, const VkExternalMemoryProperties *val) -{ - vn_encode_VkFlags(enc, &val->externalMemoryFeatures); - vn_encode_VkFlags(enc, &val->exportFromImportedHandleTypes); - vn_encode_VkFlags(enc, &val->compatibleHandleTypes); -} - -static inline void -vn_decode_VkExternalMemoryProperties_partial_temp(struct vn_cs_decoder *dec, VkExternalMemoryProperties *val) -{ - /* skip val->externalMemoryFeatures */ - /* skip val->exportFromImportedHandleTypes */ - /* skip val->compatibleHandleTypes */ -} - -/* struct VkExternalImageFormatProperties chain */ - -static inline void -vn_encode_VkExternalImageFormatProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkExternalImageFormatProperties_self(struct vn_cs_encoder *enc, const VkExternalImageFormatProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkExternalMemoryProperties(enc, &val->externalMemoryProperties); -} - -static inline void -vn_encode_VkExternalImageFormatProperties(struct vn_cs_encoder *enc, const VkExternalImageFormatProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES }); - vn_encode_VkExternalImageFormatProperties_pnext(enc, val->pNext); - vn_encode_VkExternalImageFormatProperties_self(enc, val); -} - -static inline void * -vn_decode_VkExternalImageFormatProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalImageFormatProperties_self_partial_temp(struct vn_cs_decoder *dec, VkExternalImageFormatProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExternalMemoryProperties_partial_temp(dec, &val->externalMemoryProperties); -} - -static inline void -vn_decode_VkExternalImageFormatProperties_partial_temp(struct vn_cs_decoder *dec, VkExternalImageFormatProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalImageFormatProperties_pnext_partial_temp(dec); - vn_decode_VkExternalImageFormatProperties_self_partial_temp(dec, val); -} - -/* struct VkSamplerYcbcrConversionImageFormatProperties chain */ - -static inline void -vn_encode_VkSamplerYcbcrConversionImageFormatProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkSamplerYcbcrConversionImageFormatProperties_self(struct vn_cs_encoder *enc, const VkSamplerYcbcrConversionImageFormatProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->combinedImageSamplerDescriptorCount); -} - -static inline void -vn_encode_VkSamplerYcbcrConversionImageFormatProperties(struct vn_cs_encoder *enc, const VkSamplerYcbcrConversionImageFormatProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES }); - vn_encode_VkSamplerYcbcrConversionImageFormatProperties_pnext(enc, val->pNext); - vn_encode_VkSamplerYcbcrConversionImageFormatProperties_self(enc, val); -} - -static inline void * -vn_decode_VkSamplerYcbcrConversionImageFormatProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerYcbcrConversionImageFormatProperties_self_partial_temp(struct vn_cs_decoder *dec, VkSamplerYcbcrConversionImageFormatProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->combinedImageSamplerDescriptorCount */ -} - -static inline void -vn_decode_VkSamplerYcbcrConversionImageFormatProperties_partial_temp(struct vn_cs_decoder *dec, VkSamplerYcbcrConversionImageFormatProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerYcbcrConversionImageFormatProperties_pnext_partial_temp(dec); - vn_decode_VkSamplerYcbcrConversionImageFormatProperties_self_partial_temp(dec, val); -} - -/* struct VkFilterCubicImageViewImageFormatPropertiesEXT chain */ - -static inline void -vn_encode_VkFilterCubicImageViewImageFormatPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkFilterCubicImageViewImageFormatPropertiesEXT_self(struct vn_cs_encoder *enc, const VkFilterCubicImageViewImageFormatPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->filterCubic); - vn_encode_VkBool32(enc, &val->filterCubicMinmax); -} - -static inline void -vn_encode_VkFilterCubicImageViewImageFormatPropertiesEXT(struct vn_cs_encoder *enc, const VkFilterCubicImageViewImageFormatPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT }); - vn_encode_VkFilterCubicImageViewImageFormatPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkFilterCubicImageViewImageFormatPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkFilterCubicImageViewImageFormatPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkFilterCubicImageViewImageFormatPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkFilterCubicImageViewImageFormatPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->filterCubic */ - /* skip val->filterCubicMinmax */ -} - -static inline void -vn_decode_VkFilterCubicImageViewImageFormatPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkFilterCubicImageViewImageFormatPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFilterCubicImageViewImageFormatPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkFilterCubicImageViewImageFormatPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkHostImageCopyDevicePerformanceQuery chain */ - -static inline void -vn_encode_VkHostImageCopyDevicePerformanceQuery_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkHostImageCopyDevicePerformanceQuery_self(struct vn_cs_encoder *enc, const VkHostImageCopyDevicePerformanceQuery *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->optimalDeviceAccess); - vn_encode_VkBool32(enc, &val->identicalMemoryLayout); -} - -static inline void -vn_encode_VkHostImageCopyDevicePerformanceQuery(struct vn_cs_encoder *enc, const VkHostImageCopyDevicePerformanceQuery *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY }); - vn_encode_VkHostImageCopyDevicePerformanceQuery_pnext(enc, val->pNext); - vn_encode_VkHostImageCopyDevicePerformanceQuery_self(enc, val); -} - -static inline void * -vn_decode_VkHostImageCopyDevicePerformanceQuery_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkHostImageCopyDevicePerformanceQuery_self_partial_temp(struct vn_cs_decoder *dec, VkHostImageCopyDevicePerformanceQuery *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->optimalDeviceAccess */ - /* skip val->identicalMemoryLayout */ -} - -static inline void -vn_decode_VkHostImageCopyDevicePerformanceQuery_partial_temp(struct vn_cs_decoder *dec, VkHostImageCopyDevicePerformanceQuery *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkHostImageCopyDevicePerformanceQuery_pnext_partial_temp(dec); - vn_decode_VkHostImageCopyDevicePerformanceQuery_self_partial_temp(dec, val); -} - -/* struct VkImageFormatProperties2 chain */ - -static inline void -vn_encode_VkImageFormatProperties2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkImageFormatProperties2_pnext(enc, ((const VkExternalImageFormatProperties *)pnext)->pNext); - vn_encode_VkExternalImageFormatProperties_self(enc, (const VkExternalImageFormatProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkImageFormatProperties2_pnext(enc, ((const VkSamplerYcbcrConversionImageFormatProperties *)pnext)->pNext); - vn_encode_VkSamplerYcbcrConversionImageFormatProperties_self(enc, (const VkSamplerYcbcrConversionImageFormatProperties *)pnext); - return; - case VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkImageFormatProperties2_pnext(enc, ((const VkFilterCubicImageViewImageFormatPropertiesEXT *)pnext)->pNext); - vn_encode_VkFilterCubicImageViewImageFormatPropertiesEXT_self(enc, (const VkFilterCubicImageViewImageFormatPropertiesEXT *)pnext); - return; - case VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkImageFormatProperties2_pnext(enc, ((const VkHostImageCopyDevicePerformanceQuery *)pnext)->pNext); - vn_encode_VkHostImageCopyDevicePerformanceQuery_self(enc, (const VkHostImageCopyDevicePerformanceQuery *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkImageFormatProperties2_self(struct vn_cs_encoder *enc, const VkImageFormatProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkImageFormatProperties(enc, &val->imageFormatProperties); -} - -static inline void -vn_encode_VkImageFormatProperties2(struct vn_cs_encoder *enc, const VkImageFormatProperties2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 }); - vn_encode_VkImageFormatProperties2_pnext(enc, val->pNext); - vn_encode_VkImageFormatProperties2_self(enc, val); -} - -static inline void * -vn_decode_VkImageFormatProperties2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalImageFormatProperties)); - if (pnext) { - pnext->sType = stype; - ((VkExternalImageFormatProperties *)pnext)->pNext = vn_decode_VkImageFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkExternalImageFormatProperties_self_partial_temp(dec, (VkExternalImageFormatProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerYcbcrConversionImageFormatProperties)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerYcbcrConversionImageFormatProperties *)pnext)->pNext = vn_decode_VkImageFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkSamplerYcbcrConversionImageFormatProperties_self_partial_temp(dec, (VkSamplerYcbcrConversionImageFormatProperties *)pnext); - } - break; - case VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkFilterCubicImageViewImageFormatPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkFilterCubicImageViewImageFormatPropertiesEXT *)pnext)->pNext = vn_decode_VkImageFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkFilterCubicImageViewImageFormatPropertiesEXT_self_partial_temp(dec, (VkFilterCubicImageViewImageFormatPropertiesEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkHostImageCopyDevicePerformanceQuery)); - if (pnext) { - pnext->sType = stype; - ((VkHostImageCopyDevicePerformanceQuery *)pnext)->pNext = vn_decode_VkImageFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkHostImageCopyDevicePerformanceQuery_self_partial_temp(dec, (VkHostImageCopyDevicePerformanceQuery *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkImageFormatProperties2_self_partial_temp(struct vn_cs_decoder *dec, VkImageFormatProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageFormatProperties_partial_temp(dec, &val->imageFormatProperties); -} - -static inline void -vn_decode_VkImageFormatProperties2_partial_temp(struct vn_cs_decoder *dec, VkImageFormatProperties2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkImageFormatProperties2_self_partial_temp(dec, val); -} - -/* struct VkQueueFamilyGlobalPriorityProperties chain */ - -static inline void -vn_encode_VkQueueFamilyGlobalPriorityProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkQueueFamilyGlobalPriorityProperties_self(struct vn_cs_encoder *enc, const VkQueueFamilyGlobalPriorityProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->priorityCount); - vn_encode_array_size(enc, VK_MAX_GLOBAL_PRIORITY_SIZE); - vn_encode_VkQueueGlobalPriority_array(enc, val->priorities, VK_MAX_GLOBAL_PRIORITY_SIZE); -} - -static inline void -vn_encode_VkQueueFamilyGlobalPriorityProperties(struct vn_cs_encoder *enc, const VkQueueFamilyGlobalPriorityProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES }); - vn_encode_VkQueueFamilyGlobalPriorityProperties_pnext(enc, val->pNext); - vn_encode_VkQueueFamilyGlobalPriorityProperties_self(enc, val); -} - -static inline void * -vn_decode_VkQueueFamilyGlobalPriorityProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkQueueFamilyGlobalPriorityProperties_self_partial_temp(struct vn_cs_decoder *dec, VkQueueFamilyGlobalPriorityProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->priorityCount */ - /* skip val->priorities */ -} - -static inline void -vn_decode_VkQueueFamilyGlobalPriorityProperties_partial_temp(struct vn_cs_decoder *dec, VkQueueFamilyGlobalPriorityProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkQueueFamilyGlobalPriorityProperties_pnext_partial_temp(dec); - vn_decode_VkQueueFamilyGlobalPriorityProperties_self_partial_temp(dec, val); -} - -/* struct VkQueueFamilyProperties2 chain */ - -static inline void -vn_encode_VkQueueFamilyProperties2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkQueueFamilyProperties2_pnext(enc, ((const VkQueueFamilyGlobalPriorityProperties *)pnext)->pNext); - vn_encode_VkQueueFamilyGlobalPriorityProperties_self(enc, (const VkQueueFamilyGlobalPriorityProperties *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkQueueFamilyProperties2_self(struct vn_cs_encoder *enc, const VkQueueFamilyProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkQueueFamilyProperties(enc, &val->queueFamilyProperties); -} - -static inline void -vn_encode_VkQueueFamilyProperties2(struct vn_cs_encoder *enc, const VkQueueFamilyProperties2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 }); - vn_encode_VkQueueFamilyProperties2_pnext(enc, val->pNext); - vn_encode_VkQueueFamilyProperties2_self(enc, val); -} - -static inline void * -vn_decode_VkQueueFamilyProperties2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkQueueFamilyGlobalPriorityProperties)); - if (pnext) { - pnext->sType = stype; - ((VkQueueFamilyGlobalPriorityProperties *)pnext)->pNext = vn_decode_VkQueueFamilyProperties2_pnext_partial_temp(dec); - vn_decode_VkQueueFamilyGlobalPriorityProperties_self_partial_temp(dec, (VkQueueFamilyGlobalPriorityProperties *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkQueueFamilyProperties2_self_partial_temp(struct vn_cs_decoder *dec, VkQueueFamilyProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkQueueFamilyProperties_partial_temp(dec, &val->queueFamilyProperties); -} - -static inline void -vn_decode_VkQueueFamilyProperties2_partial_temp(struct vn_cs_decoder *dec, VkQueueFamilyProperties2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkQueueFamilyProperties2_pnext_partial_temp(dec); - vn_decode_VkQueueFamilyProperties2_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMemoryBudgetPropertiesEXT chain */ - -static inline void -vn_encode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMemoryBudgetPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_array_size(enc, VK_MAX_MEMORY_HEAPS); - vn_encode_VkDeviceSize_array(enc, val->heapBudget, VK_MAX_MEMORY_HEAPS); - vn_encode_array_size(enc, VK_MAX_MEMORY_HEAPS); - vn_encode_VkDeviceSize_array(enc, val->heapUsage, VK_MAX_MEMORY_HEAPS); -} - -static inline void -vn_encode_VkPhysicalDeviceMemoryBudgetPropertiesEXT(struct vn_cs_encoder *enc, const VkPhysicalDeviceMemoryBudgetPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT }); - vn_encode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMemoryBudgetPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->heapBudget */ - /* skip val->heapUsage */ -} - -static inline void -vn_decode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMemoryBudgetPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceMemoryProperties2 chain */ - -static inline void -vn_encode_VkPhysicalDeviceMemoryProperties2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkPhysicalDeviceMemoryProperties2_pnext(enc, ((const VkPhysicalDeviceMemoryBudgetPropertiesEXT *)pnext)->pNext); - vn_encode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_self(enc, (const VkPhysicalDeviceMemoryBudgetPropertiesEXT *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceMemoryProperties2_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMemoryProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkPhysicalDeviceMemoryProperties(enc, &val->memoryProperties); -} - -static inline void -vn_encode_VkPhysicalDeviceMemoryProperties2(struct vn_cs_encoder *enc, const VkPhysicalDeviceMemoryProperties2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 }); - vn_encode_VkPhysicalDeviceMemoryProperties2_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceMemoryProperties2_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceMemoryProperties2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMemoryBudgetPropertiesEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPhysicalDeviceMemoryBudgetPropertiesEXT *)pnext)->pNext = vn_decode_VkPhysicalDeviceMemoryProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMemoryBudgetPropertiesEXT_self_partial_temp(dec, (VkPhysicalDeviceMemoryBudgetPropertiesEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceMemoryProperties2_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMemoryProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkPhysicalDeviceMemoryProperties_partial_temp(dec, &val->memoryProperties); -} - -static inline void -vn_decode_VkPhysicalDeviceMemoryProperties2_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMemoryProperties2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceMemoryProperties2_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceMemoryProperties2_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceSparseImageFormatInfo2 chain */ - -static inline void * -vn_decode_VkPhysicalDeviceSparseImageFormatInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceSparseImageFormatInfo2_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSparseImageFormatInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkImageType(dec, &val->type); - vn_decode_VkSampleCountFlagBits(dec, &val->samples); - vn_decode_VkFlags(dec, &val->usage); - vn_decode_VkImageTiling(dec, &val->tiling); -} - -static inline void -vn_decode_VkPhysicalDeviceSparseImageFormatInfo2_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceSparseImageFormatInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceSparseImageFormatInfo2_pnext_temp(dec); - vn_decode_VkPhysicalDeviceSparseImageFormatInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceSparseImageFormatInfo2_handle_self(VkPhysicalDeviceSparseImageFormatInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->format */ - /* skip val->type */ - /* skip val->samples */ - /* skip val->usage */ - /* skip val->tiling */ -} - -static inline void -vn_replace_VkPhysicalDeviceSparseImageFormatInfo2_handle(VkPhysicalDeviceSparseImageFormatInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2: - vn_replace_VkPhysicalDeviceSparseImageFormatInfo2_handle_self((VkPhysicalDeviceSparseImageFormatInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSparseImageFormatProperties2 chain */ - -static inline void -vn_encode_VkSparseImageFormatProperties2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkSparseImageFormatProperties2_self(struct vn_cs_encoder *enc, const VkSparseImageFormatProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkSparseImageFormatProperties(enc, &val->properties); -} - -static inline void -vn_encode_VkSparseImageFormatProperties2(struct vn_cs_encoder *enc, const VkSparseImageFormatProperties2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 }); - vn_encode_VkSparseImageFormatProperties2_pnext(enc, val->pNext); - vn_encode_VkSparseImageFormatProperties2_self(enc, val); -} - -static inline void * -vn_decode_VkSparseImageFormatProperties2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSparseImageFormatProperties2_self_partial_temp(struct vn_cs_decoder *dec, VkSparseImageFormatProperties2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSparseImageFormatProperties_partial_temp(dec, &val->properties); -} - -static inline void -vn_decode_VkSparseImageFormatProperties2_partial_temp(struct vn_cs_decoder *dec, VkSparseImageFormatProperties2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSparseImageFormatProperties2_pnext_partial_temp(dec); - vn_decode_VkSparseImageFormatProperties2_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceExternalBufferInfo chain */ - -static inline void * -vn_decode_VkPhysicalDeviceExternalBufferInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBufferUsageFlags2CreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBufferUsageFlags2CreateInfo *)pnext)->pNext = vn_decode_VkPhysicalDeviceExternalBufferInfo_pnext_temp(dec); - vn_decode_VkBufferUsageFlags2CreateInfo_self_temp(dec, (VkBufferUsageFlags2CreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceExternalBufferInfo_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalBufferInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkFlags(dec, &val->usage); - vn_decode_VkExternalMemoryHandleTypeFlagBits(dec, &val->handleType); -} - -static inline void -vn_decode_VkPhysicalDeviceExternalBufferInfo_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalBufferInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExternalBufferInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExternalBufferInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExternalBufferInfo_handle_self(VkPhysicalDeviceExternalBufferInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->usage */ - /* skip val->handleType */ -} - -static inline void -vn_replace_VkPhysicalDeviceExternalBufferInfo_handle(VkPhysicalDeviceExternalBufferInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO: - vn_replace_VkPhysicalDeviceExternalBufferInfo_handle_self((VkPhysicalDeviceExternalBufferInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - vn_replace_VkBufferUsageFlags2CreateInfo_handle_self((VkBufferUsageFlags2CreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkExternalBufferProperties chain */ - -static inline void -vn_encode_VkExternalBufferProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkExternalBufferProperties_self(struct vn_cs_encoder *enc, const VkExternalBufferProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkExternalMemoryProperties(enc, &val->externalMemoryProperties); -} - -static inline void -vn_encode_VkExternalBufferProperties(struct vn_cs_encoder *enc, const VkExternalBufferProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES }); - vn_encode_VkExternalBufferProperties_pnext(enc, val->pNext); - vn_encode_VkExternalBufferProperties_self(enc, val); -} - -static inline void * -vn_decode_VkExternalBufferProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalBufferProperties_self_partial_temp(struct vn_cs_decoder *dec, VkExternalBufferProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExternalMemoryProperties_partial_temp(dec, &val->externalMemoryProperties); -} - -static inline void -vn_decode_VkExternalBufferProperties_partial_temp(struct vn_cs_decoder *dec, VkExternalBufferProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalBufferProperties_pnext_partial_temp(dec); - vn_decode_VkExternalBufferProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceExternalSemaphoreInfo chain */ - -static inline void * -vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSemaphoreTypeCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkSemaphoreTypeCreateInfo *)pnext)->pNext = vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_pnext_temp(dec); - vn_decode_VkSemaphoreTypeCreateInfo_self_temp(dec, (VkSemaphoreTypeCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalSemaphoreInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExternalSemaphoreHandleTypeFlagBits(dec, &val->handleType); -} - -static inline void -vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalSemaphoreInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExternalSemaphoreInfo_handle_self(VkPhysicalDeviceExternalSemaphoreInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleType */ -} - -static inline void -vn_replace_VkPhysicalDeviceExternalSemaphoreInfo_handle(VkPhysicalDeviceExternalSemaphoreInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO: - vn_replace_VkPhysicalDeviceExternalSemaphoreInfo_handle_self((VkPhysicalDeviceExternalSemaphoreInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: - vn_replace_VkSemaphoreTypeCreateInfo_handle_self((VkSemaphoreTypeCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkExternalSemaphoreProperties chain */ - -static inline void -vn_encode_VkExternalSemaphoreProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkExternalSemaphoreProperties_self(struct vn_cs_encoder *enc, const VkExternalSemaphoreProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags(enc, &val->exportFromImportedHandleTypes); - vn_encode_VkFlags(enc, &val->compatibleHandleTypes); - vn_encode_VkFlags(enc, &val->externalSemaphoreFeatures); -} - -static inline void -vn_encode_VkExternalSemaphoreProperties(struct vn_cs_encoder *enc, const VkExternalSemaphoreProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES }); - vn_encode_VkExternalSemaphoreProperties_pnext(enc, val->pNext); - vn_encode_VkExternalSemaphoreProperties_self(enc, val); -} - -static inline void * -vn_decode_VkExternalSemaphoreProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalSemaphoreProperties_self_partial_temp(struct vn_cs_decoder *dec, VkExternalSemaphoreProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->exportFromImportedHandleTypes */ - /* skip val->compatibleHandleTypes */ - /* skip val->externalSemaphoreFeatures */ -} - -static inline void -vn_decode_VkExternalSemaphoreProperties_partial_temp(struct vn_cs_decoder *dec, VkExternalSemaphoreProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalSemaphoreProperties_pnext_partial_temp(dec); - vn_decode_VkExternalSemaphoreProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceExternalFenceInfo chain */ - -static inline void * -vn_decode_VkPhysicalDeviceExternalFenceInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceExternalFenceInfo_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalFenceInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExternalFenceHandleTypeFlagBits(dec, &val->handleType); -} - -static inline void -vn_decode_VkPhysicalDeviceExternalFenceInfo_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceExternalFenceInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceExternalFenceInfo_pnext_temp(dec); - vn_decode_VkPhysicalDeviceExternalFenceInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPhysicalDeviceExternalFenceInfo_handle_self(VkPhysicalDeviceExternalFenceInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleType */ -} - -static inline void -vn_replace_VkPhysicalDeviceExternalFenceInfo_handle(VkPhysicalDeviceExternalFenceInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO: - vn_replace_VkPhysicalDeviceExternalFenceInfo_handle_self((VkPhysicalDeviceExternalFenceInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkExternalFenceProperties chain */ - -static inline void -vn_encode_VkExternalFenceProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkExternalFenceProperties_self(struct vn_cs_encoder *enc, const VkExternalFenceProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags(enc, &val->exportFromImportedHandleTypes); - vn_encode_VkFlags(enc, &val->compatibleHandleTypes); - vn_encode_VkFlags(enc, &val->externalFenceFeatures); -} - -static inline void -vn_encode_VkExternalFenceProperties(struct vn_cs_encoder *enc, const VkExternalFenceProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES }); - vn_encode_VkExternalFenceProperties_pnext(enc, val->pNext); - vn_encode_VkExternalFenceProperties_self(enc, val); -} - -static inline void * -vn_decode_VkExternalFenceProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalFenceProperties_self_partial_temp(struct vn_cs_decoder *dec, VkExternalFenceProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->exportFromImportedHandleTypes */ - /* skip val->compatibleHandleTypes */ - /* skip val->externalFenceFeatures */ -} - -static inline void -vn_decode_VkExternalFenceProperties_partial_temp(struct vn_cs_decoder *dec, VkExternalFenceProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalFenceProperties_pnext_partial_temp(dec); - vn_decode_VkExternalFenceProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceGroupProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceGroupProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceGroupProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceGroupProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->physicalDeviceCount); - vn_encode_array_size(enc, VK_MAX_DEVICE_GROUP_SIZE); - for (uint32_t i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; i++) - vn_encode_VkPhysicalDevice(enc, &val->physicalDevices[i]); - vn_encode_VkBool32(enc, &val->subsetAllocation); -} - -static inline void -vn_encode_VkPhysicalDeviceGroupProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceGroupProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES }); - vn_encode_VkPhysicalDeviceGroupProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceGroupProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceGroupProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceGroupProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGroupProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->physicalDeviceCount */ - { - const uint32_t iter_count = vn_decode_array_size(dec, VK_MAX_DEVICE_GROUP_SIZE); - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPhysicalDevice_temp(dec, &val->physicalDevices[i]); - } - /* skip val->subsetAllocation */ -} - -static inline void -vn_decode_VkPhysicalDeviceGroupProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceGroupProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceGroupProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceGroupProperties_self_partial_temp(dec, val); -} - -/* struct VkMultisamplePropertiesEXT chain */ - -static inline void -vn_encode_VkMultisamplePropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkMultisamplePropertiesEXT_self(struct vn_cs_encoder *enc, const VkMultisamplePropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkExtent2D(enc, &val->maxSampleLocationGridSize); -} - -static inline void -vn_encode_VkMultisamplePropertiesEXT(struct vn_cs_encoder *enc, const VkMultisamplePropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT }); - vn_encode_VkMultisamplePropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkMultisamplePropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkMultisamplePropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMultisamplePropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkMultisamplePropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExtent2D_partial_temp(dec, &val->maxSampleLocationGridSize); -} - -static inline void -vn_decode_VkMultisamplePropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkMultisamplePropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMultisamplePropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkMultisamplePropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkDeviceQueueTimelineInfoMESA chain */ - -static inline void * -vn_decode_VkDeviceQueueTimelineInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceQueueTimelineInfoMESA_self_temp(struct vn_cs_decoder *dec, VkDeviceQueueTimelineInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->ringIdx); -} - -static inline void -vn_decode_VkDeviceQueueTimelineInfoMESA_temp(struct vn_cs_decoder *dec, VkDeviceQueueTimelineInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceQueueTimelineInfoMESA_pnext_temp(dec); - vn_decode_VkDeviceQueueTimelineInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceQueueTimelineInfoMESA_handle_self(VkDeviceQueueTimelineInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->ringIdx */ -} - -static inline void -vn_replace_VkDeviceQueueTimelineInfoMESA_handle(VkDeviceQueueTimelineInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA: - vn_replace_VkDeviceQueueTimelineInfoMESA_handle_self((VkDeviceQueueTimelineInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceQueueInfo2 chain */ - -static inline void * -vn_decode_VkDeviceQueueInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceQueueTimelineInfoMESA)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceQueueTimelineInfoMESA *)pnext)->pNext = vn_decode_VkDeviceQueueInfo2_pnext_temp(dec); - vn_decode_VkDeviceQueueTimelineInfoMESA_self_temp(dec, (VkDeviceQueueTimelineInfoMESA *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkDeviceQueueInfo2_self_temp(struct vn_cs_decoder *dec, VkDeviceQueueInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->queueFamilyIndex); - vn_decode_uint32_t(dec, &val->queueIndex); -} - -static inline void -vn_decode_VkDeviceQueueInfo2_temp(struct vn_cs_decoder *dec, VkDeviceQueueInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceQueueInfo2_pnext_temp(dec); - vn_decode_VkDeviceQueueInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceQueueInfo2_handle_self(VkDeviceQueueInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->queueFamilyIndex */ - /* skip val->queueIndex */ -} - -static inline void -vn_replace_VkDeviceQueueInfo2_handle(VkDeviceQueueInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2: - vn_replace_VkDeviceQueueInfo2_handle_self((VkDeviceQueueInfo2 *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA: - vn_replace_VkDeviceQueueTimelineInfoMESA_handle_self((VkDeviceQueueTimelineInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCalibratedTimestampInfoKHR chain */ - -static inline void * -vn_decode_VkCalibratedTimestampInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCalibratedTimestampInfoKHR_self_temp(struct vn_cs_decoder *dec, VkCalibratedTimestampInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkTimeDomainKHR(dec, &val->timeDomain); -} - -static inline void -vn_decode_VkCalibratedTimestampInfoKHR_temp(struct vn_cs_decoder *dec, VkCalibratedTimestampInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCalibratedTimestampInfoKHR_pnext_temp(dec); - vn_decode_VkCalibratedTimestampInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkCalibratedTimestampInfoKHR_handle_self(VkCalibratedTimestampInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->timeDomain */ -} - -static inline void -vn_replace_VkCalibratedTimestampInfoKHR_handle(VkCalibratedTimestampInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR: - vn_replace_VkCalibratedTimestampInfoKHR_handle_self((VkCalibratedTimestampInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPhysicalDeviceToolProperties chain */ - -static inline void -vn_encode_VkPhysicalDeviceToolProperties_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceToolProperties_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceToolProperties *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_array_size(enc, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_char_array(enc, val->name, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_array_size(enc, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_char_array(enc, val->version, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_VkFlags(enc, &val->purposes); - vn_encode_array_size(enc, VK_MAX_DESCRIPTION_SIZE); - vn_encode_char_array(enc, val->description, VK_MAX_DESCRIPTION_SIZE); - vn_encode_array_size(enc, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_char_array(enc, val->layer, VK_MAX_EXTENSION_NAME_SIZE); -} - -static inline void -vn_encode_VkPhysicalDeviceToolProperties(struct vn_cs_encoder *enc, const VkPhysicalDeviceToolProperties *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES }); - vn_encode_VkPhysicalDeviceToolProperties_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceToolProperties_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceToolProperties_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceToolProperties_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceToolProperties *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->name */ - /* skip val->version */ - /* skip val->purposes */ - /* skip val->description */ - /* skip val->layer */ -} - -static inline void -vn_decode_VkPhysicalDeviceToolProperties_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceToolProperties *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceToolProperties_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceToolProperties_self_partial_temp(dec, val); -} - -/* struct VkPhysicalDeviceFragmentShadingRateKHR chain */ - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRateKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRateKHR_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShadingRateKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkFlags(enc, &val->sampleCounts); - vn_encode_VkExtent2D(enc, &val->fragmentSize); -} - -static inline void -vn_encode_VkPhysicalDeviceFragmentShadingRateKHR(struct vn_cs_encoder *enc, const VkPhysicalDeviceFragmentShadingRateKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR }); - vn_encode_VkPhysicalDeviceFragmentShadingRateKHR_pnext(enc, val->pNext); - vn_encode_VkPhysicalDeviceFragmentShadingRateKHR_self(enc, val); -} - -static inline void * -vn_decode_VkPhysicalDeviceFragmentShadingRateKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRateKHR_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRateKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->sampleCounts */ - vn_decode_VkExtent2D_partial_temp(dec, &val->fragmentSize); -} - -static inline void -vn_decode_VkPhysicalDeviceFragmentShadingRateKHR_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceFragmentShadingRateKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPhysicalDeviceFragmentShadingRateKHR_pnext_partial_temp(dec); - vn_decode_VkPhysicalDeviceFragmentShadingRateKHR_self_partial_temp(dec, val); -} - -/* struct VkCooperativeMatrixPropertiesKHR chain */ - -static inline void -vn_encode_VkCooperativeMatrixPropertiesKHR_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkCooperativeMatrixPropertiesKHR_self(struct vn_cs_encoder *enc, const VkCooperativeMatrixPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->MSize); - vn_encode_uint32_t(enc, &val->NSize); - vn_encode_uint32_t(enc, &val->KSize); - vn_encode_VkComponentTypeKHR(enc, &val->AType); - vn_encode_VkComponentTypeKHR(enc, &val->BType); - vn_encode_VkComponentTypeKHR(enc, &val->CType); - vn_encode_VkComponentTypeKHR(enc, &val->ResultType); - vn_encode_VkBool32(enc, &val->saturatingAccumulation); - vn_encode_VkScopeKHR(enc, &val->scope); -} - -static inline void -vn_encode_VkCooperativeMatrixPropertiesKHR(struct vn_cs_encoder *enc, const VkCooperativeMatrixPropertiesKHR *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR }); - vn_encode_VkCooperativeMatrixPropertiesKHR_pnext(enc, val->pNext); - vn_encode_VkCooperativeMatrixPropertiesKHR_self(enc, val); -} - -static inline void * -vn_decode_VkCooperativeMatrixPropertiesKHR_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCooperativeMatrixPropertiesKHR_self_partial_temp(struct vn_cs_decoder *dec, VkCooperativeMatrixPropertiesKHR *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->MSize */ - /* skip val->NSize */ - /* skip val->KSize */ - /* skip val->AType */ - /* skip val->BType */ - /* skip val->CType */ - /* skip val->ResultType */ - /* skip val->saturatingAccumulation */ - /* skip val->scope */ -} - -static inline void -vn_decode_VkCooperativeMatrixPropertiesKHR_partial_temp(struct vn_cs_decoder *dec, VkCooperativeMatrixPropertiesKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCooperativeMatrixPropertiesKHR_pnext_partial_temp(dec); - vn_decode_VkCooperativeMatrixPropertiesKHR_self_partial_temp(dec, val); -} - -static inline void vn_decode_vkEnumeratePhysicalDevices_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumeratePhysicalDevices *args) -{ - vn_decode_VkInstance_lookup(dec, &args->instance); - if (vn_decode_simple_pointer(dec)) { - args->pPhysicalDeviceCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPhysicalDeviceCount)); - if (!args->pPhysicalDeviceCount) return; - vn_decode_uint32_t(dec, args->pPhysicalDeviceCount); - } else { - args->pPhysicalDeviceCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPhysicalDeviceCount ? *args->pPhysicalDeviceCount : 0)); - args->pPhysicalDevices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pPhysicalDevices), iter_count); - if (!args->pPhysicalDevices) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPhysicalDevice_temp(dec, &args->pPhysicalDevices[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pPhysicalDevices = NULL; - } -} - -static inline void vn_replace_vkEnumeratePhysicalDevices_args_handle(struct vn_command_vkEnumeratePhysicalDevices *args) -{ - vn_replace_VkInstance_handle(&args->instance); - /* skip args->pPhysicalDeviceCount */ - /* skip args->pPhysicalDevices */ -} - -static inline void vn_encode_vkEnumeratePhysicalDevices_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumeratePhysicalDevices *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumeratePhysicalDevices_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->instance */ - if (vn_encode_simple_pointer(enc, args->pPhysicalDeviceCount)) - vn_encode_uint32_t(enc, args->pPhysicalDeviceCount); - if (args->pPhysicalDevices) { - vn_encode_array_size(enc, (args->pPhysicalDeviceCount ? *args->pPhysicalDeviceCount : 0)); - for (uint32_t i = 0; i < (args->pPhysicalDeviceCount ? *args->pPhysicalDeviceCount : 0); i++) - vn_encode_VkPhysicalDevice(enc, &args->pPhysicalDevices[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pProperties)); - if (!args->pProperties) return; - vn_decode_VkPhysicalDeviceProperties_partial_temp(dec, args->pProperties); - } else { - args->pProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceProperties_args_handle(struct vn_command_vkGetPhysicalDeviceProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pProperties)) - vn_encode_VkPhysicalDeviceProperties(enc, args->pProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceQueueFamilyProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pQueueFamilyPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pQueueFamilyPropertyCount)); - if (!args->pQueueFamilyPropertyCount) return; - vn_decode_uint32_t(dec, args->pQueueFamilyPropertyCount); - } else { - args->pQueueFamilyPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pQueueFamilyPropertyCount ? *args->pQueueFamilyPropertyCount : 0)); - args->pQueueFamilyProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pQueueFamilyProperties), iter_count); - if (!args->pQueueFamilyProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkQueueFamilyProperties_partial_temp(dec, &args->pQueueFamilyProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pQueueFamilyProperties = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceQueueFamilyProperties_args_handle(struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pQueueFamilyPropertyCount */ - /* skip args->pQueueFamilyProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceQueueFamilyProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pQueueFamilyPropertyCount)) - vn_encode_uint32_t(enc, args->pQueueFamilyPropertyCount); - if (args->pQueueFamilyProperties) { - vn_encode_array_size(enc, (args->pQueueFamilyPropertyCount ? *args->pQueueFamilyPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pQueueFamilyPropertyCount ? *args->pQueueFamilyPropertyCount : 0); i++) - vn_encode_VkQueueFamilyProperties(enc, &args->pQueueFamilyProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceMemoryProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceMemoryProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pMemoryProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryProperties)); - if (!args->pMemoryProperties) return; - vn_decode_VkPhysicalDeviceMemoryProperties_partial_temp(dec, args->pMemoryProperties); - } else { - args->pMemoryProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceMemoryProperties_args_handle(struct vn_command_vkGetPhysicalDeviceMemoryProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pMemoryProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceMemoryProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceMemoryProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pMemoryProperties)) - vn_encode_VkPhysicalDeviceMemoryProperties(enc, args->pMemoryProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceFeatures_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceFeatures *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pFeatures = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFeatures)); - if (!args->pFeatures) return; - vn_decode_VkPhysicalDeviceFeatures_partial_temp(dec, args->pFeatures); - } else { - args->pFeatures = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceFeatures_args_handle(struct vn_command_vkGetPhysicalDeviceFeatures *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pFeatures */ -} - -static inline void vn_encode_vkGetPhysicalDeviceFeatures_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceFeatures *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pFeatures)) - vn_encode_VkPhysicalDeviceFeatures(enc, args->pFeatures); -} - -static inline void vn_decode_vkGetPhysicalDeviceFormatProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceFormatProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - vn_decode_VkFormat(dec, &args->format); - if (vn_decode_simple_pointer(dec)) { - args->pFormatProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFormatProperties)); - if (!args->pFormatProperties) return; - vn_decode_VkFormatProperties_partial_temp(dec, args->pFormatProperties); - } else { - args->pFormatProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceFormatProperties_args_handle(struct vn_command_vkGetPhysicalDeviceFormatProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->format */ - /* skip args->pFormatProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceFormatProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceFormatProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties_EXT}); - - /* skip args->physicalDevice */ - /* skip args->format */ - if (vn_encode_simple_pointer(enc, args->pFormatProperties)) - vn_encode_VkFormatProperties(enc, args->pFormatProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceImageFormatProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceImageFormatProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - vn_decode_VkFormat(dec, &args->format); - vn_decode_VkImageType(dec, &args->type); - vn_decode_VkImageTiling(dec, &args->tiling); - vn_decode_VkFlags(dec, &args->usage); - vn_decode_VkFlags(dec, &args->flags); - if (vn_decode_simple_pointer(dec)) { - args->pImageFormatProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pImageFormatProperties)); - if (!args->pImageFormatProperties) return; - vn_decode_VkImageFormatProperties_partial_temp(dec, args->pImageFormatProperties); - } else { - args->pImageFormatProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceImageFormatProperties_args_handle(struct vn_command_vkGetPhysicalDeviceImageFormatProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->format */ - /* skip args->type */ - /* skip args->tiling */ - /* skip args->usage */ - /* skip args->flags */ - /* skip args->pImageFormatProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceImageFormatProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceImageFormatProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - /* skip args->format */ - /* skip args->type */ - /* skip args->tiling */ - /* skip args->usage */ - /* skip args->flags */ - if (vn_encode_simple_pointer(enc, args->pImageFormatProperties)) - vn_encode_VkImageFormatProperties(enc, args->pImageFormatProperties); -} - -static inline void vn_decode_vkCreateDevice_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateDevice *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkDeviceCreateInfo_temp(dec, (VkDeviceCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pDevice = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDevice)); - if (!args->pDevice) return; - vn_decode_VkDevice_temp(dec, args->pDevice); - } else { - args->pDevice = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateDevice_args_handle(struct vn_command_vkCreateDevice *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - if (args->pCreateInfo) - vn_replace_VkDeviceCreateInfo_handle((VkDeviceCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pDevice */ -} - -static inline void vn_encode_vkCreateDevice_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateDevice *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateDevice_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pDevice)) - vn_encode_VkDevice(enc, args->pDevice); -} - -static inline void vn_decode_vkDestroyDevice_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyDevice *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyDevice_args_handle(struct vn_command_vkDestroyDevice *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyDevice_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyDevice *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyDevice_EXT}); - - /* skip args->device */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkEnumerateDeviceLayerProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumerateDeviceLayerProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkLayerProperties_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkEnumerateDeviceLayerProperties_args_handle(struct vn_command_vkEnumerateDeviceLayerProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkEnumerateDeviceLayerProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumerateDeviceLayerProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumerateDeviceLayerProperties_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkLayerProperties(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkEnumerateDeviceExtensionProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumerateDeviceExtensionProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_peek_array_size(dec)) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - args->pLayerName = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pLayerName), string_size); - if (!args->pLayerName) return; - vn_decode_char_array(dec, (char *)args->pLayerName, string_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pLayerName = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkExtensionProperties_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkEnumerateDeviceExtensionProperties_args_handle(struct vn_command_vkEnumerateDeviceExtensionProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pLayerName */ - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkEnumerateDeviceExtensionProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumerateDeviceExtensionProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumerateDeviceExtensionProperties_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - /* skip args->pLayerName */ - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkExtensionProperties(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetDeviceQueue_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceQueue *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->queueFamilyIndex); - vn_decode_uint32_t(dec, &args->queueIndex); - if (vn_decode_simple_pointer(dec)) { - args->pQueue = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pQueue)); - if (!args->pQueue) return; - vn_decode_VkQueue_temp(dec, args->pQueue); - } else { - args->pQueue = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceQueue_args_handle(struct vn_command_vkGetDeviceQueue *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->queueFamilyIndex */ - /* skip args->queueIndex */ - /* skip args->pQueue */ -} - -static inline void vn_encode_vkGetDeviceQueue_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceQueue *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceQueue_EXT}); - - /* skip args->device */ - /* skip args->queueFamilyIndex */ - /* skip args->queueIndex */ - if (vn_encode_simple_pointer(enc, args->pQueue)) - vn_encode_VkQueue(enc, args->pQueue); -} - -static inline void vn_decode_vkDeviceWaitIdle_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDeviceWaitIdle *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); -} - -static inline void vn_replace_vkDeviceWaitIdle_args_handle(struct vn_command_vkDeviceWaitIdle *args) -{ - vn_replace_VkDevice_handle(&args->device); -} - -static inline void vn_encode_vkDeviceWaitIdle_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDeviceWaitIdle *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDeviceWaitIdle_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ -} - -static inline void vn_decode_vkGetPhysicalDeviceSparseImageFormatProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - vn_decode_VkFormat(dec, &args->format); - vn_decode_VkImageType(dec, &args->type); - vn_decode_VkSampleCountFlagBits(dec, &args->samples); - vn_decode_VkFlags(dec, &args->usage); - vn_decode_VkImageTiling(dec, &args->tiling); - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageFormatProperties_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceSparseImageFormatProperties_args_handle(struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->format */ - /* skip args->type */ - /* skip args->samples */ - /* skip args->usage */ - /* skip args->tiling */ - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceSparseImageFormatProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties_EXT}); - - /* skip args->physicalDevice */ - /* skip args->format */ - /* skip args->type */ - /* skip args->samples */ - /* skip args->usage */ - /* skip args->tiling */ - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkSparseImageFormatProperties(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceFeatures2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceFeatures2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pFeatures = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFeatures)); - if (!args->pFeatures) return; - vn_decode_VkPhysicalDeviceFeatures2_partial_temp(dec, args->pFeatures); - } else { - args->pFeatures = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceFeatures2_args_handle(struct vn_command_vkGetPhysicalDeviceFeatures2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pFeatures */ -} - -static inline void vn_encode_vkGetPhysicalDeviceFeatures2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceFeatures2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures2_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pFeatures)) - vn_encode_VkPhysicalDeviceFeatures2(enc, args->pFeatures); -} - -static inline void vn_decode_vkGetPhysicalDeviceProperties2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceProperties2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pProperties)); - if (!args->pProperties) return; - vn_decode_VkPhysicalDeviceProperties2_partial_temp(dec, args->pProperties); - } else { - args->pProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceProperties2_args_handle(struct vn_command_vkGetPhysicalDeviceProperties2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceProperties2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceProperties2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties2_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pProperties)) - vn_encode_VkPhysicalDeviceProperties2(enc, args->pProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceFormatProperties2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceFormatProperties2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - vn_decode_VkFormat(dec, &args->format); - if (vn_decode_simple_pointer(dec)) { - args->pFormatProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFormatProperties)); - if (!args->pFormatProperties) return; - vn_decode_VkFormatProperties2_partial_temp(dec, args->pFormatProperties); - } else { - args->pFormatProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceFormatProperties2_args_handle(struct vn_command_vkGetPhysicalDeviceFormatProperties2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->format */ - /* skip args->pFormatProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceFormatProperties2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceFormatProperties2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties2_EXT}); - - /* skip args->physicalDevice */ - /* skip args->format */ - if (vn_encode_simple_pointer(enc, args->pFormatProperties)) - vn_encode_VkFormatProperties2(enc, args->pFormatProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceImageFormatProperties2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceImageFormatProperties2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pImageFormatInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pImageFormatInfo)); - if (!args->pImageFormatInfo) return; - vn_decode_VkPhysicalDeviceImageFormatInfo2_temp(dec, (VkPhysicalDeviceImageFormatInfo2 *)args->pImageFormatInfo); - } else { - args->pImageFormatInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pImageFormatProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pImageFormatProperties)); - if (!args->pImageFormatProperties) return; - vn_decode_VkImageFormatProperties2_partial_temp(dec, args->pImageFormatProperties); - } else { - args->pImageFormatProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceImageFormatProperties2_args_handle(struct vn_command_vkGetPhysicalDeviceImageFormatProperties2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - if (args->pImageFormatInfo) - vn_replace_VkPhysicalDeviceImageFormatInfo2_handle((VkPhysicalDeviceImageFormatInfo2 *)args->pImageFormatInfo); - /* skip args->pImageFormatProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceImageFormatProperties2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceImageFormatProperties2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties2_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - /* skip args->pImageFormatInfo */ - if (vn_encode_simple_pointer(enc, args->pImageFormatProperties)) - vn_encode_VkImageFormatProperties2(enc, args->pImageFormatProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceQueueFamilyProperties2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pQueueFamilyPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pQueueFamilyPropertyCount)); - if (!args->pQueueFamilyPropertyCount) return; - vn_decode_uint32_t(dec, args->pQueueFamilyPropertyCount); - } else { - args->pQueueFamilyPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pQueueFamilyPropertyCount ? *args->pQueueFamilyPropertyCount : 0)); - args->pQueueFamilyProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pQueueFamilyProperties), iter_count); - if (!args->pQueueFamilyProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkQueueFamilyProperties2_partial_temp(dec, &args->pQueueFamilyProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pQueueFamilyProperties = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceQueueFamilyProperties2_args_handle(struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pQueueFamilyPropertyCount */ - /* skip args->pQueueFamilyProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceQueueFamilyProperties2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties2_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pQueueFamilyPropertyCount)) - vn_encode_uint32_t(enc, args->pQueueFamilyPropertyCount); - if (args->pQueueFamilyProperties) { - vn_encode_array_size(enc, (args->pQueueFamilyPropertyCount ? *args->pQueueFamilyPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pQueueFamilyPropertyCount ? *args->pQueueFamilyPropertyCount : 0); i++) - vn_encode_VkQueueFamilyProperties2(enc, &args->pQueueFamilyProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceMemoryProperties2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceMemoryProperties2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pMemoryProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryProperties)); - if (!args->pMemoryProperties) return; - vn_decode_VkPhysicalDeviceMemoryProperties2_partial_temp(dec, args->pMemoryProperties); - } else { - args->pMemoryProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceMemoryProperties2_args_handle(struct vn_command_vkGetPhysicalDeviceMemoryProperties2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pMemoryProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceMemoryProperties2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceMemoryProperties2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties2_EXT}); - - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pMemoryProperties)) - vn_encode_VkPhysicalDeviceMemoryProperties2(enc, args->pMemoryProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceSparseImageFormatProperties2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties2 *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pFormatInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFormatInfo)); - if (!args->pFormatInfo) return; - vn_decode_VkPhysicalDeviceSparseImageFormatInfo2_temp(dec, (VkPhysicalDeviceSparseImageFormatInfo2 *)args->pFormatInfo); - } else { - args->pFormatInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageFormatProperties2_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceSparseImageFormatProperties2_args_handle(struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties2 *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - if (args->pFormatInfo) - vn_replace_VkPhysicalDeviceSparseImageFormatInfo2_handle((VkPhysicalDeviceSparseImageFormatInfo2 *)args->pFormatInfo); - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceSparseImageFormatProperties2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties2_EXT}); - - /* skip args->physicalDevice */ - /* skip args->pFormatInfo */ - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkSparseImageFormatProperties2(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceExternalBufferProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceExternalBufferProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pExternalBufferInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pExternalBufferInfo)); - if (!args->pExternalBufferInfo) return; - vn_decode_VkPhysicalDeviceExternalBufferInfo_temp(dec, (VkPhysicalDeviceExternalBufferInfo *)args->pExternalBufferInfo); - } else { - args->pExternalBufferInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pExternalBufferProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pExternalBufferProperties)); - if (!args->pExternalBufferProperties) return; - vn_decode_VkExternalBufferProperties_partial_temp(dec, args->pExternalBufferProperties); - } else { - args->pExternalBufferProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceExternalBufferProperties_args_handle(struct vn_command_vkGetPhysicalDeviceExternalBufferProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - if (args->pExternalBufferInfo) - vn_replace_VkPhysicalDeviceExternalBufferInfo_handle((VkPhysicalDeviceExternalBufferInfo *)args->pExternalBufferInfo); - /* skip args->pExternalBufferProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceExternalBufferProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceExternalBufferProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalBufferProperties_EXT}); - - /* skip args->physicalDevice */ - /* skip args->pExternalBufferInfo */ - if (vn_encode_simple_pointer(enc, args->pExternalBufferProperties)) - vn_encode_VkExternalBufferProperties(enc, args->pExternalBufferProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceExternalSemaphoreProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceExternalSemaphoreProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pExternalSemaphoreInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pExternalSemaphoreInfo)); - if (!args->pExternalSemaphoreInfo) return; - vn_decode_VkPhysicalDeviceExternalSemaphoreInfo_temp(dec, (VkPhysicalDeviceExternalSemaphoreInfo *)args->pExternalSemaphoreInfo); - } else { - args->pExternalSemaphoreInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pExternalSemaphoreProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pExternalSemaphoreProperties)); - if (!args->pExternalSemaphoreProperties) return; - vn_decode_VkExternalSemaphoreProperties_partial_temp(dec, args->pExternalSemaphoreProperties); - } else { - args->pExternalSemaphoreProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceExternalSemaphoreProperties_args_handle(struct vn_command_vkGetPhysicalDeviceExternalSemaphoreProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - if (args->pExternalSemaphoreInfo) - vn_replace_VkPhysicalDeviceExternalSemaphoreInfo_handle((VkPhysicalDeviceExternalSemaphoreInfo *)args->pExternalSemaphoreInfo); - /* skip args->pExternalSemaphoreProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceExternalSemaphoreProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceExternalSemaphoreProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalSemaphoreProperties_EXT}); - - /* skip args->physicalDevice */ - /* skip args->pExternalSemaphoreInfo */ - if (vn_encode_simple_pointer(enc, args->pExternalSemaphoreProperties)) - vn_encode_VkExternalSemaphoreProperties(enc, args->pExternalSemaphoreProperties); -} - -static inline void vn_decode_vkGetPhysicalDeviceExternalFenceProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceExternalFenceProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pExternalFenceInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pExternalFenceInfo)); - if (!args->pExternalFenceInfo) return; - vn_decode_VkPhysicalDeviceExternalFenceInfo_temp(dec, (VkPhysicalDeviceExternalFenceInfo *)args->pExternalFenceInfo); - } else { - args->pExternalFenceInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pExternalFenceProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pExternalFenceProperties)); - if (!args->pExternalFenceProperties) return; - vn_decode_VkExternalFenceProperties_partial_temp(dec, args->pExternalFenceProperties); - } else { - args->pExternalFenceProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceExternalFenceProperties_args_handle(struct vn_command_vkGetPhysicalDeviceExternalFenceProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - if (args->pExternalFenceInfo) - vn_replace_VkPhysicalDeviceExternalFenceInfo_handle((VkPhysicalDeviceExternalFenceInfo *)args->pExternalFenceInfo); - /* skip args->pExternalFenceProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceExternalFenceProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceExternalFenceProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalFenceProperties_EXT}); - - /* skip args->physicalDevice */ - /* skip args->pExternalFenceInfo */ - if (vn_encode_simple_pointer(enc, args->pExternalFenceProperties)) - vn_encode_VkExternalFenceProperties(enc, args->pExternalFenceProperties); -} - -static inline void vn_decode_vkEnumeratePhysicalDeviceGroups_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumeratePhysicalDeviceGroups *args) -{ - vn_decode_VkInstance_lookup(dec, &args->instance); - if (vn_decode_simple_pointer(dec)) { - args->pPhysicalDeviceGroupCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPhysicalDeviceGroupCount)); - if (!args->pPhysicalDeviceGroupCount) return; - vn_decode_uint32_t(dec, args->pPhysicalDeviceGroupCount); - } else { - args->pPhysicalDeviceGroupCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPhysicalDeviceGroupCount ? *args->pPhysicalDeviceGroupCount : 0)); - args->pPhysicalDeviceGroupProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pPhysicalDeviceGroupProperties), iter_count); - if (!args->pPhysicalDeviceGroupProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPhysicalDeviceGroupProperties_partial_temp(dec, &args->pPhysicalDeviceGroupProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pPhysicalDeviceGroupProperties = NULL; - } -} - -static inline void vn_replace_vkEnumeratePhysicalDeviceGroups_args_handle(struct vn_command_vkEnumeratePhysicalDeviceGroups *args) -{ - vn_replace_VkInstance_handle(&args->instance); - /* skip args->pPhysicalDeviceGroupCount */ - /* skip args->pPhysicalDeviceGroupProperties */ -} - -static inline void vn_encode_vkEnumeratePhysicalDeviceGroups_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumeratePhysicalDeviceGroups *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumeratePhysicalDeviceGroups_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->instance */ - if (vn_encode_simple_pointer(enc, args->pPhysicalDeviceGroupCount)) - vn_encode_uint32_t(enc, args->pPhysicalDeviceGroupCount); - if (args->pPhysicalDeviceGroupProperties) { - vn_encode_array_size(enc, (args->pPhysicalDeviceGroupCount ? *args->pPhysicalDeviceGroupCount : 0)); - for (uint32_t i = 0; i < (args->pPhysicalDeviceGroupCount ? *args->pPhysicalDeviceGroupCount : 0); i++) - vn_encode_VkPhysicalDeviceGroupProperties(enc, &args->pPhysicalDeviceGroupProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetDeviceGroupPeerMemoryFeatures_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceGroupPeerMemoryFeatures *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->heapIndex); - vn_decode_uint32_t(dec, &args->localDeviceIndex); - vn_decode_uint32_t(dec, &args->remoteDeviceIndex); - if (vn_decode_simple_pointer(dec)) { - args->pPeerMemoryFeatures = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPeerMemoryFeatures)); - if (!args->pPeerMemoryFeatures) return; - } else { - args->pPeerMemoryFeatures = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceGroupPeerMemoryFeatures_args_handle(struct vn_command_vkGetDeviceGroupPeerMemoryFeatures *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->heapIndex */ - /* skip args->localDeviceIndex */ - /* skip args->remoteDeviceIndex */ - /* skip args->pPeerMemoryFeatures */ -} - -static inline void vn_encode_vkGetDeviceGroupPeerMemoryFeatures_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceGroupPeerMemoryFeatures *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceGroupPeerMemoryFeatures_EXT}); - - /* skip args->device */ - /* skip args->heapIndex */ - /* skip args->localDeviceIndex */ - /* skip args->remoteDeviceIndex */ - if (vn_encode_simple_pointer(enc, args->pPeerMemoryFeatures)) - vn_encode_VkFlags(enc, args->pPeerMemoryFeatures); -} - -static inline void vn_decode_vkGetPhysicalDeviceMultisamplePropertiesEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceMultisamplePropertiesEXT *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - vn_decode_VkSampleCountFlagBits(dec, &args->samples); - if (vn_decode_simple_pointer(dec)) { - args->pMultisampleProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMultisampleProperties)); - if (!args->pMultisampleProperties) return; - vn_decode_VkMultisamplePropertiesEXT_partial_temp(dec, args->pMultisampleProperties); - } else { - args->pMultisampleProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPhysicalDeviceMultisamplePropertiesEXT_args_handle(struct vn_command_vkGetPhysicalDeviceMultisamplePropertiesEXT *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->samples */ - /* skip args->pMultisampleProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceMultisamplePropertiesEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceMultisamplePropertiesEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceMultisamplePropertiesEXT_EXT}); - - /* skip args->physicalDevice */ - /* skip args->samples */ - if (vn_encode_simple_pointer(enc, args->pMultisampleProperties)) - vn_encode_VkMultisamplePropertiesEXT(enc, args->pMultisampleProperties); -} - -static inline void vn_decode_vkGetDeviceQueue2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceQueue2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pQueueInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pQueueInfo)); - if (!args->pQueueInfo) return; - vn_decode_VkDeviceQueueInfo2_temp(dec, (VkDeviceQueueInfo2 *)args->pQueueInfo); - } else { - args->pQueueInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pQueue = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pQueue)); - if (!args->pQueue) return; - vn_decode_VkQueue_temp(dec, args->pQueue); - } else { - args->pQueue = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceQueue2_args_handle(struct vn_command_vkGetDeviceQueue2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pQueueInfo) - vn_replace_VkDeviceQueueInfo2_handle((VkDeviceQueueInfo2 *)args->pQueueInfo); - /* skip args->pQueue */ -} - -static inline void vn_encode_vkGetDeviceQueue2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceQueue2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceQueue2_EXT}); - - /* skip args->device */ - /* skip args->pQueueInfo */ - if (vn_encode_simple_pointer(enc, args->pQueue)) - vn_encode_VkQueue(enc, args->pQueue); -} - -static inline void vn_decode_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pTimeDomainCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pTimeDomainCount)); - if (!args->pTimeDomainCount) return; - vn_decode_uint32_t(dec, args->pTimeDomainCount); - } else { - args->pTimeDomainCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, (args->pTimeDomainCount ? *args->pTimeDomainCount : 0)); - args->pTimeDomains = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pTimeDomains), array_size); - if (!args->pTimeDomains) return; - } else { - vn_decode_array_size_unchecked(dec); - args->pTimeDomains = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_args_handle(struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pTimeDomainCount */ - /* skip args->pTimeDomains */ -} - -static inline void vn_encode_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pTimeDomainCount)) - vn_encode_uint32_t(enc, args->pTimeDomainCount); - if (args->pTimeDomains) { - vn_encode_array_size(enc, (args->pTimeDomainCount ? *args->pTimeDomainCount : 0)); - vn_encode_VkTimeDomainKHR_array(enc, args->pTimeDomains, (args->pTimeDomainCount ? *args->pTimeDomainCount : 0)); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetCalibratedTimestampsKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetCalibratedTimestampsKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->timestampCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->timestampCount); - args->pTimestampInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pTimestampInfos), iter_count); - if (!args->pTimestampInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCalibratedTimestampInfoKHR_temp(dec, &((VkCalibratedTimestampInfoKHR *)args->pTimestampInfos)[i]); - } else { - vn_decode_array_size(dec, args->timestampCount); - args->pTimestampInfos = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->timestampCount); - args->pTimestamps = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pTimestamps), array_size); - if (!args->pTimestamps) return; - } else { - vn_decode_array_size(dec, args->timestampCount); - args->pTimestamps = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pMaxDeviation = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMaxDeviation)); - if (!args->pMaxDeviation) return; - } else { - args->pMaxDeviation = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetCalibratedTimestampsKHR_args_handle(struct vn_command_vkGetCalibratedTimestampsKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->timestampCount */ - if (args->pTimestampInfos) { - for (uint32_t i = 0; i < args->timestampCount; i++) - vn_replace_VkCalibratedTimestampInfoKHR_handle(&((VkCalibratedTimestampInfoKHR *)args->pTimestampInfos)[i]); - } - /* skip args->pTimestamps */ - /* skip args->pMaxDeviation */ -} - -static inline void vn_encode_vkGetCalibratedTimestampsKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetCalibratedTimestampsKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetCalibratedTimestampsKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->timestampCount */ - /* skip args->pTimestampInfos */ - if (args->pTimestamps) { - vn_encode_array_size(enc, args->timestampCount); - vn_encode_uint64_t_array(enc, args->pTimestamps, args->timestampCount); - } else { - vn_encode_array_size(enc, 0); - } - if (vn_encode_simple_pointer(enc, args->pMaxDeviation)) - vn_encode_uint64_t(enc, args->pMaxDeviation); -} - -static inline void vn_decode_vkGetPhysicalDeviceToolProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceToolProperties *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pToolCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pToolCount)); - if (!args->pToolCount) return; - vn_decode_uint32_t(dec, args->pToolCount); - } else { - args->pToolCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pToolCount ? *args->pToolCount : 0)); - args->pToolProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pToolProperties), iter_count); - if (!args->pToolProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPhysicalDeviceToolProperties_partial_temp(dec, &args->pToolProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pToolProperties = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceToolProperties_args_handle(struct vn_command_vkGetPhysicalDeviceToolProperties *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pToolCount */ - /* skip args->pToolProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceToolProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceToolProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceToolProperties_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pToolCount)) - vn_encode_uint32_t(enc, args->pToolCount); - if (args->pToolProperties) { - vn_encode_array_size(enc, (args->pToolCount ? *args->pToolCount : 0)); - for (uint32_t i = 0; i < (args->pToolCount ? *args->pToolCount : 0); i++) - vn_encode_VkPhysicalDeviceToolProperties(enc, &args->pToolProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceFragmentShadingRatesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceFragmentShadingRatesKHR *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pFragmentShadingRateCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFragmentShadingRateCount)); - if (!args->pFragmentShadingRateCount) return; - vn_decode_uint32_t(dec, args->pFragmentShadingRateCount); - } else { - args->pFragmentShadingRateCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pFragmentShadingRateCount ? *args->pFragmentShadingRateCount : 0)); - args->pFragmentShadingRates = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pFragmentShadingRates), iter_count); - if (!args->pFragmentShadingRates) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPhysicalDeviceFragmentShadingRateKHR_partial_temp(dec, &args->pFragmentShadingRates[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pFragmentShadingRates = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceFragmentShadingRatesKHR_args_handle(struct vn_command_vkGetPhysicalDeviceFragmentShadingRatesKHR *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pFragmentShadingRateCount */ - /* skip args->pFragmentShadingRates */ -} - -static inline void vn_encode_vkGetPhysicalDeviceFragmentShadingRatesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceFragmentShadingRatesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceFragmentShadingRatesKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pFragmentShadingRateCount)) - vn_encode_uint32_t(enc, args->pFragmentShadingRateCount); - if (args->pFragmentShadingRates) { - vn_encode_array_size(enc, (args->pFragmentShadingRateCount ? *args->pFragmentShadingRateCount : 0)); - for (uint32_t i = 0; i < (args->pFragmentShadingRateCount ? *args->pFragmentShadingRateCount : 0); i++) - vn_encode_VkPhysicalDeviceFragmentShadingRateKHR(enc, &args->pFragmentShadingRates[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCooperativeMatrixPropertiesKHR_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_args_handle(struct vn_command_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->physicalDevice */ - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkCooperativeMatrixPropertiesKHR(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetPhysicalDeviceDescriptorSizeEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPhysicalDeviceDescriptorSizeEXT *args) -{ - vn_decode_VkPhysicalDevice_lookup(dec, &args->physicalDevice); - vn_decode_VkDescriptorType(dec, &args->descriptorType); -} - -static inline void vn_replace_vkGetPhysicalDeviceDescriptorSizeEXT_args_handle(struct vn_command_vkGetPhysicalDeviceDescriptorSizeEXT *args) -{ - vn_replace_VkPhysicalDevice_handle(&args->physicalDevice); - /* skip args->descriptorType */ -} - -static inline void vn_encode_vkGetPhysicalDeviceDescriptorSizeEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPhysicalDeviceDescriptorSizeEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPhysicalDeviceDescriptorSizeEXT_EXT}); - - vn_encode_VkDeviceSize(enc, &args->ret); - /* skip args->physicalDevice */ - /* skip args->descriptorType */ -} - -static inline void vn_dispatch_vkEnumeratePhysicalDevices(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumeratePhysicalDevices args; - - if (!ctx->dispatch_vkEnumeratePhysicalDevices) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumeratePhysicalDevices_args_temp(ctx->decoder, &args); - if (!args.instance) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumeratePhysicalDevices(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumeratePhysicalDevices returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumeratePhysicalDevices_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceQueueFamilyProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceQueueFamilyProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceQueueFamilyProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceQueueFamilyProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceQueueFamilyProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceMemoryProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceMemoryProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceMemoryProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceMemoryProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceMemoryProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceMemoryProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceFeatures(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceFeatures args; - - if (!ctx->dispatch_vkGetPhysicalDeviceFeatures) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceFeatures_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceFeatures(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceFeatures_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceFormatProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceFormatProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceFormatProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceFormatProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceFormatProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceFormatProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceImageFormatProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceImageFormatProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceImageFormatProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceImageFormatProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceImageFormatProperties(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPhysicalDeviceImageFormatProperties returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceImageFormatProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateDevice(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateDevice args; - - if (!ctx->dispatch_vkCreateDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateDevice_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateDevice(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateDevice returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateDevice_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyDevice(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyDevice args; - - if (!ctx->dispatch_vkDestroyDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyDevice_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyDevice(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyDevice_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEnumerateDeviceLayerProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumerateDeviceLayerProperties args; - - if (!ctx->dispatch_vkEnumerateDeviceLayerProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumerateDeviceLayerProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumerateDeviceLayerProperties(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumerateDeviceLayerProperties returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumerateDeviceLayerProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEnumerateDeviceExtensionProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumerateDeviceExtensionProperties args; - - if (!ctx->dispatch_vkEnumerateDeviceExtensionProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumerateDeviceExtensionProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumerateDeviceExtensionProperties(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumerateDeviceExtensionProperties returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumerateDeviceExtensionProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceQueue(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceQueue args; - - if (!ctx->dispatch_vkGetDeviceQueue) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceQueue_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceQueue(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceQueue_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDeviceWaitIdle(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDeviceWaitIdle args; - - if (!ctx->dispatch_vkDeviceWaitIdle) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDeviceWaitIdle_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDeviceWaitIdle(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkDeviceWaitIdle returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDeviceWaitIdle_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceSparseImageFormatProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceSparseImageFormatProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceSparseImageFormatProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceSparseImageFormatProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceSparseImageFormatProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceFeatures2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceFeatures2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceFeatures2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceFeatures2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceFeatures2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceFeatures2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceProperties2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceProperties2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceProperties2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceProperties2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceProperties2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceProperties2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceFormatProperties2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceFormatProperties2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceFormatProperties2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceFormatProperties2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceFormatProperties2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceFormatProperties2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceImageFormatProperties2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceImageFormatProperties2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceImageFormatProperties2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceImageFormatProperties2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceImageFormatProperties2(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPhysicalDeviceImageFormatProperties2 returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceImageFormatProperties2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceQueueFamilyProperties2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceQueueFamilyProperties2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceQueueFamilyProperties2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceQueueFamilyProperties2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceQueueFamilyProperties2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceQueueFamilyProperties2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceMemoryProperties2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceMemoryProperties2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceMemoryProperties2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceMemoryProperties2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceMemoryProperties2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceMemoryProperties2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceSparseImageFormatProperties2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceSparseImageFormatProperties2 args; - - if (!ctx->dispatch_vkGetPhysicalDeviceSparseImageFormatProperties2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceSparseImageFormatProperties2_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceSparseImageFormatProperties2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceSparseImageFormatProperties2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceExternalBufferProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceExternalBufferProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceExternalBufferProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceExternalBufferProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceExternalBufferProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceExternalBufferProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceExternalSemaphoreProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceExternalSemaphoreProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceExternalSemaphoreProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceExternalSemaphoreProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceExternalSemaphoreProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceExternalSemaphoreProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceExternalFenceProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceExternalFenceProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceExternalFenceProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceExternalFenceProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceExternalFenceProperties(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceExternalFenceProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEnumeratePhysicalDeviceGroups(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumeratePhysicalDeviceGroups args; - - if (!ctx->dispatch_vkEnumeratePhysicalDeviceGroups) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumeratePhysicalDeviceGroups_args_temp(ctx->decoder, &args); - if (!args.instance) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumeratePhysicalDeviceGroups(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumeratePhysicalDeviceGroups returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumeratePhysicalDeviceGroups_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceGroupPeerMemoryFeatures(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceGroupPeerMemoryFeatures args; - - if (!ctx->dispatch_vkGetDeviceGroupPeerMemoryFeatures) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceGroupPeerMemoryFeatures_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceGroupPeerMemoryFeatures(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceGroupPeerMemoryFeatures_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceMultisamplePropertiesEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceMultisamplePropertiesEXT args; - - if (!ctx->dispatch_vkGetPhysicalDeviceMultisamplePropertiesEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceMultisamplePropertiesEXT_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceMultisamplePropertiesEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceMultisamplePropertiesEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceQueue2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceQueue2 args; - - if (!ctx->dispatch_vkGetDeviceQueue2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceQueue2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceQueue2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceQueue2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR args; - - if (!ctx->dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetCalibratedTimestampsKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetCalibratedTimestampsKHR args; - - if (!ctx->dispatch_vkGetCalibratedTimestampsKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetCalibratedTimestampsKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetCalibratedTimestampsKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetCalibratedTimestampsKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetCalibratedTimestampsKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceToolProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceToolProperties args; - - if (!ctx->dispatch_vkGetPhysicalDeviceToolProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceToolProperties_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceToolProperties(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPhysicalDeviceToolProperties returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceToolProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceFragmentShadingRatesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceFragmentShadingRatesKHR args; - - if (!ctx->dispatch_vkGetPhysicalDeviceFragmentShadingRatesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceFragmentShadingRatesKHR_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceFragmentShadingRatesKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPhysicalDeviceFragmentShadingRatesKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceFragmentShadingRatesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR args; - - if (!ctx->dispatch_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPhysicalDeviceDescriptorSizeEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPhysicalDeviceDescriptorSizeEXT args; - - if (!ctx->dispatch_vkGetPhysicalDeviceDescriptorSizeEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPhysicalDeviceDescriptorSizeEXT_args_temp(ctx->decoder, &args); - if (!args.physicalDevice) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPhysicalDeviceDescriptorSizeEXT(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPhysicalDeviceDescriptorSizeEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DEVICE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_device_memory.h b/src/venus/venus-protocol/vn_protocol_renderer_device_memory.h deleted file mode 100644 index d91a76f0..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_device_memory.h +++ /dev/null @@ -1,1333 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DEVICE_MEMORY_H -#define VN_PROTOCOL_RENDERER_DEVICE_MEMORY_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * VkImportMemoryFdInfoKHR - * vkMapMemory - * vkGetMemoryFdKHR - * vkGetMemoryFdPropertiesKHR - * vkMapMemory2 - */ - -/* struct VkExportMemoryAllocateInfo chain */ - -static inline void * -vn_decode_VkExportMemoryAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExportMemoryAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkExportMemoryAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->handleTypes); -} - -static inline void -vn_decode_VkExportMemoryAllocateInfo_temp(struct vn_cs_decoder *dec, VkExportMemoryAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExportMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkExportMemoryAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkExportMemoryAllocateInfo_handle_self(VkExportMemoryAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleTypes */ -} - -static inline void -vn_replace_VkExportMemoryAllocateInfo_handle(VkExportMemoryAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: - vn_replace_VkExportMemoryAllocateInfo_handle_self((VkExportMemoryAllocateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryAllocateFlagsInfo chain */ - -static inline void * -vn_decode_VkMemoryAllocateFlagsInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryAllocateFlagsInfo_self_temp(struct vn_cs_decoder *dec, VkMemoryAllocateFlagsInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->deviceMask); -} - -static inline void -vn_decode_VkMemoryAllocateFlagsInfo_temp(struct vn_cs_decoder *dec, VkMemoryAllocateFlagsInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryAllocateFlagsInfo_pnext_temp(dec); - vn_decode_VkMemoryAllocateFlagsInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryAllocateFlagsInfo_handle_self(VkMemoryAllocateFlagsInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->deviceMask */ -} - -static inline void -vn_replace_VkMemoryAllocateFlagsInfo_handle(VkMemoryAllocateFlagsInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: - vn_replace_VkMemoryAllocateFlagsInfo_handle_self((VkMemoryAllocateFlagsInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryDedicatedAllocateInfo chain */ - -static inline void * -vn_decode_VkMemoryDedicatedAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryDedicatedAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkMemoryDedicatedAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_VkBuffer_lookup(dec, &val->buffer); -} - -static inline void -vn_decode_VkMemoryDedicatedAllocateInfo_temp(struct vn_cs_decoder *dec, VkMemoryDedicatedAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryDedicatedAllocateInfo_pnext_temp(dec); - vn_decode_VkMemoryDedicatedAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryDedicatedAllocateInfo_handle_self(VkMemoryDedicatedAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->image); - vn_replace_VkBuffer_handle(&val->buffer); -} - -static inline void -vn_replace_VkMemoryDedicatedAllocateInfo_handle(VkMemoryDedicatedAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: - vn_replace_VkMemoryDedicatedAllocateInfo_handle_self((VkMemoryDedicatedAllocateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryOpaqueCaptureAddressAllocateInfo chain */ - -static inline void * -vn_decode_VkMemoryOpaqueCaptureAddressAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryOpaqueCaptureAddressAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkMemoryOpaqueCaptureAddressAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint64_t(dec, &val->opaqueCaptureAddress); -} - -static inline void -vn_decode_VkMemoryOpaqueCaptureAddressAllocateInfo_temp(struct vn_cs_decoder *dec, VkMemoryOpaqueCaptureAddressAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryOpaqueCaptureAddressAllocateInfo_pnext_temp(dec); - vn_decode_VkMemoryOpaqueCaptureAddressAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryOpaqueCaptureAddressAllocateInfo_handle_self(VkMemoryOpaqueCaptureAddressAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->opaqueCaptureAddress */ -} - -static inline void -vn_replace_VkMemoryOpaqueCaptureAddressAllocateInfo_handle(VkMemoryOpaqueCaptureAddressAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: - vn_replace_VkMemoryOpaqueCaptureAddressAllocateInfo_handle_self((VkMemoryOpaqueCaptureAddressAllocateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImportMemoryResourceInfoMESA chain */ - -static inline void * -vn_decode_VkImportMemoryResourceInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImportMemoryResourceInfoMESA_self_temp(struct vn_cs_decoder *dec, VkImportMemoryResourceInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->resourceId); -} - -static inline void -vn_decode_VkImportMemoryResourceInfoMESA_temp(struct vn_cs_decoder *dec, VkImportMemoryResourceInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImportMemoryResourceInfoMESA_pnext_temp(dec); - vn_decode_VkImportMemoryResourceInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkImportMemoryResourceInfoMESA_handle_self(VkImportMemoryResourceInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->resourceId */ -} - -static inline void -vn_replace_VkImportMemoryResourceInfoMESA_handle(VkImportMemoryResourceInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA: - vn_replace_VkImportMemoryResourceInfoMESA_handle_self((VkImportMemoryResourceInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryAllocateInfo chain */ - -static inline void * -vn_decode_VkMemoryAllocateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExportMemoryAllocateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkExportMemoryAllocateInfo *)pnext)->pNext = vn_decode_VkMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkExportMemoryAllocateInfo_self_temp(dec, (VkExportMemoryAllocateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryAllocateFlagsInfo)); - if (pnext) { - pnext->sType = stype; - ((VkMemoryAllocateFlagsInfo *)pnext)->pNext = vn_decode_VkMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkMemoryAllocateFlagsInfo_self_temp(dec, (VkMemoryAllocateFlagsInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryDedicatedAllocateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkMemoryDedicatedAllocateInfo *)pnext)->pNext = vn_decode_VkMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkMemoryDedicatedAllocateInfo_self_temp(dec, (VkMemoryDedicatedAllocateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryOpaqueCaptureAddressAllocateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkMemoryOpaqueCaptureAddressAllocateInfo *)pnext)->pNext = vn_decode_VkMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkMemoryOpaqueCaptureAddressAllocateInfo_self_temp(dec, (VkMemoryOpaqueCaptureAddressAllocateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImportMemoryResourceInfoMESA)); - if (pnext) { - pnext->sType = stype; - ((VkImportMemoryResourceInfoMESA *)pnext)->pNext = vn_decode_VkMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkImportMemoryResourceInfoMESA_self_temp(dec, (VkImportMemoryResourceInfoMESA *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkMemoryAllocateInfo_self_temp(struct vn_cs_decoder *dec, VkMemoryAllocateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceSize(dec, &val->allocationSize); - vn_decode_uint32_t(dec, &val->memoryTypeIndex); -} - -static inline void -vn_decode_VkMemoryAllocateInfo_temp(struct vn_cs_decoder *dec, VkMemoryAllocateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryAllocateInfo_pnext_temp(dec); - vn_decode_VkMemoryAllocateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryAllocateInfo_handle_self(VkMemoryAllocateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->allocationSize */ - /* skip val->memoryTypeIndex */ -} - -static inline void -vn_replace_VkMemoryAllocateInfo_handle(VkMemoryAllocateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: - vn_replace_VkMemoryAllocateInfo_handle_self((VkMemoryAllocateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: - vn_replace_VkExportMemoryAllocateInfo_handle_self((VkExportMemoryAllocateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: - vn_replace_VkMemoryAllocateFlagsInfo_handle_self((VkMemoryAllocateFlagsInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: - vn_replace_VkMemoryDedicatedAllocateInfo_handle_self((VkMemoryDedicatedAllocateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: - vn_replace_VkMemoryOpaqueCaptureAddressAllocateInfo_handle_self((VkMemoryOpaqueCaptureAddressAllocateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA: - vn_replace_VkImportMemoryResourceInfoMESA_handle_self((VkImportMemoryResourceInfoMESA *)pnext); - break; - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMappedMemoryRange chain */ - -static inline void * -vn_decode_VkMappedMemoryRange_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMappedMemoryRange_self_temp(struct vn_cs_decoder *dec, VkMappedMemoryRange *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_decode_VkMappedMemoryRange_temp(struct vn_cs_decoder *dec, VkMappedMemoryRange *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMappedMemoryRange_pnext_temp(dec); - vn_decode_VkMappedMemoryRange_self_temp(dec, val); -} - -static inline void -vn_replace_VkMappedMemoryRange_handle_self(VkMappedMemoryRange *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkDeviceMemory_handle(&val->memory); - /* skip val->offset */ - /* skip val->size */ -} - -static inline void -vn_replace_VkMappedMemoryRange_handle(VkMappedMemoryRange *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE: - vn_replace_VkMappedMemoryRange_handle_self((VkMappedMemoryRange *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceMemoryOpaqueCaptureAddressInfo chain */ - -static inline void * -vn_decode_VkDeviceMemoryOpaqueCaptureAddressInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceMemoryOpaqueCaptureAddressInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceMemoryOpaqueCaptureAddressInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); -} - -static inline void -vn_decode_VkDeviceMemoryOpaqueCaptureAddressInfo_temp(struct vn_cs_decoder *dec, VkDeviceMemoryOpaqueCaptureAddressInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceMemoryOpaqueCaptureAddressInfo_pnext_temp(dec); - vn_decode_VkDeviceMemoryOpaqueCaptureAddressInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceMemoryOpaqueCaptureAddressInfo_handle_self(VkDeviceMemoryOpaqueCaptureAddressInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkDeviceMemory_handle(&val->memory); -} - -static inline void -vn_replace_VkDeviceMemoryOpaqueCaptureAddressInfo_handle(VkDeviceMemoryOpaqueCaptureAddressInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO: - vn_replace_VkDeviceMemoryOpaqueCaptureAddressInfo_handle_self((VkDeviceMemoryOpaqueCaptureAddressInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryUnmapInfo chain */ - -static inline void * -vn_decode_VkMemoryUnmapInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryUnmapInfo_self_temp(struct vn_cs_decoder *dec, VkMemoryUnmapInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); -} - -static inline void -vn_decode_VkMemoryUnmapInfo_temp(struct vn_cs_decoder *dec, VkMemoryUnmapInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryUnmapInfo_pnext_temp(dec); - vn_decode_VkMemoryUnmapInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryUnmapInfo_handle_self(VkMemoryUnmapInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkDeviceMemory_handle(&val->memory); -} - -static inline void -vn_replace_VkMemoryUnmapInfo_handle(VkMemoryUnmapInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO: - vn_replace_VkMemoryUnmapInfo_handle_self((VkMemoryUnmapInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryResourceAllocationSizePropertiesMESA chain */ - -static inline void -vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_self(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizePropertiesMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint64_t(enc, &val->allocationSize); -} - -static inline void -vn_encode_VkMemoryResourceAllocationSizePropertiesMESA(struct vn_cs_encoder *enc, const VkMemoryResourceAllocationSizePropertiesMESA *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA }); - vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_pnext(enc, val->pNext); - vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_self(enc, val); -} - -static inline void * -vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_self_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizePropertiesMESA *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->allocationSize */ -} - -static inline void -vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourceAllocationSizePropertiesMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_pnext_partial_temp(dec); - vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_self_partial_temp(dec, val); -} - -/* struct VkMemoryResourcePropertiesMESA chain */ - -static inline void -vn_encode_VkMemoryResourcePropertiesMESA_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkMemoryResourcePropertiesMESA_pnext(enc, ((const VkMemoryResourceAllocationSizePropertiesMESA *)pnext)->pNext); - vn_encode_VkMemoryResourceAllocationSizePropertiesMESA_self(enc, (const VkMemoryResourceAllocationSizePropertiesMESA *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkMemoryResourcePropertiesMESA_self(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint32_t(enc, &val->memoryTypeBits); -} - -static inline void -vn_encode_VkMemoryResourcePropertiesMESA(struct vn_cs_encoder *enc, const VkMemoryResourcePropertiesMESA *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA }); - vn_encode_VkMemoryResourcePropertiesMESA_pnext(enc, val->pNext); - vn_encode_VkMemoryResourcePropertiesMESA_self(enc, val); -} - -static inline void * -vn_decode_VkMemoryResourcePropertiesMESA_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_MESA: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryResourceAllocationSizePropertiesMESA)); - if (pnext) { - pnext->sType = stype; - ((VkMemoryResourceAllocationSizePropertiesMESA *)pnext)->pNext = vn_decode_VkMemoryResourcePropertiesMESA_pnext_partial_temp(dec); - vn_decode_VkMemoryResourceAllocationSizePropertiesMESA_self_partial_temp(dec, (VkMemoryResourceAllocationSizePropertiesMESA *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkMemoryResourcePropertiesMESA_self_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->memoryTypeBits */ -} - -static inline void -vn_decode_VkMemoryResourcePropertiesMESA_partial_temp(struct vn_cs_decoder *dec, VkMemoryResourcePropertiesMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryResourcePropertiesMESA_pnext_partial_temp(dec); - vn_decode_VkMemoryResourcePropertiesMESA_self_partial_temp(dec, val); -} - -static inline void vn_decode_vkAllocateMemory_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkAllocateMemory *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pAllocateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pAllocateInfo)); - if (!args->pAllocateInfo) return; - vn_decode_VkMemoryAllocateInfo_temp(dec, (VkMemoryAllocateInfo *)args->pAllocateInfo); - } else { - args->pAllocateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pMemory = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemory)); - if (!args->pMemory) return; - vn_decode_VkDeviceMemory(dec, args->pMemory); - } else { - args->pMemory = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkAllocateMemory_args_handle(struct vn_command_vkAllocateMemory *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pAllocateInfo) - vn_replace_VkMemoryAllocateInfo_handle((VkMemoryAllocateInfo *)args->pAllocateInfo); - /* skip args->pAllocator */ - /* skip args->pMemory */ -} - -static inline void vn_encode_vkAllocateMemory_reply(struct vn_cs_encoder *enc, const struct vn_command_vkAllocateMemory *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkAllocateMemory_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pAllocateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pMemory)) - vn_encode_VkDeviceMemory(enc, args->pMemory); -} - -static inline void vn_decode_vkFreeMemory_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkFreeMemory *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeviceMemory_lookup(dec, &args->memory); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkFreeMemory_args_handle(struct vn_command_vkFreeMemory *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeviceMemory_handle(&args->memory); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkFreeMemory_reply(struct vn_cs_encoder *enc, const struct vn_command_vkFreeMemory *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkFreeMemory_EXT}); - - /* skip args->device */ - /* skip args->memory */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkUnmapMemory_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkUnmapMemory *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeviceMemory_lookup(dec, &args->memory); -} - -static inline void vn_replace_vkUnmapMemory_args_handle(struct vn_command_vkUnmapMemory *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeviceMemory_handle(&args->memory); -} - -static inline void vn_encode_vkUnmapMemory_reply(struct vn_cs_encoder *enc, const struct vn_command_vkUnmapMemory *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkUnmapMemory_EXT}); - - /* skip args->device */ - /* skip args->memory */ -} - -static inline void vn_decode_vkFlushMappedMemoryRanges_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkFlushMappedMemoryRanges *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->memoryRangeCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->memoryRangeCount); - args->pMemoryRanges = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pMemoryRanges), iter_count); - if (!args->pMemoryRanges) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMappedMemoryRange_temp(dec, &((VkMappedMemoryRange *)args->pMemoryRanges)[i]); - } else { - vn_decode_array_size(dec, args->memoryRangeCount); - args->pMemoryRanges = NULL; - } -} - -static inline void vn_replace_vkFlushMappedMemoryRanges_args_handle(struct vn_command_vkFlushMappedMemoryRanges *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->memoryRangeCount */ - if (args->pMemoryRanges) { - for (uint32_t i = 0; i < args->memoryRangeCount; i++) - vn_replace_VkMappedMemoryRange_handle(&((VkMappedMemoryRange *)args->pMemoryRanges)[i]); - } -} - -static inline void vn_encode_vkFlushMappedMemoryRanges_reply(struct vn_cs_encoder *enc, const struct vn_command_vkFlushMappedMemoryRanges *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkFlushMappedMemoryRanges_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->memoryRangeCount */ - /* skip args->pMemoryRanges */ -} - -static inline void vn_decode_vkInvalidateMappedMemoryRanges_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkInvalidateMappedMemoryRanges *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->memoryRangeCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->memoryRangeCount); - args->pMemoryRanges = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pMemoryRanges), iter_count); - if (!args->pMemoryRanges) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMappedMemoryRange_temp(dec, &((VkMappedMemoryRange *)args->pMemoryRanges)[i]); - } else { - vn_decode_array_size(dec, args->memoryRangeCount); - args->pMemoryRanges = NULL; - } -} - -static inline void vn_replace_vkInvalidateMappedMemoryRanges_args_handle(struct vn_command_vkInvalidateMappedMemoryRanges *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->memoryRangeCount */ - if (args->pMemoryRanges) { - for (uint32_t i = 0; i < args->memoryRangeCount; i++) - vn_replace_VkMappedMemoryRange_handle(&((VkMappedMemoryRange *)args->pMemoryRanges)[i]); - } -} - -static inline void vn_encode_vkInvalidateMappedMemoryRanges_reply(struct vn_cs_encoder *enc, const struct vn_command_vkInvalidateMappedMemoryRanges *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkInvalidateMappedMemoryRanges_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->memoryRangeCount */ - /* skip args->pMemoryRanges */ -} - -static inline void vn_decode_vkGetDeviceMemoryCommitment_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceMemoryCommitment *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeviceMemory_lookup(dec, &args->memory); - if (vn_decode_simple_pointer(dec)) { - args->pCommittedMemoryInBytes = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCommittedMemoryInBytes)); - if (!args->pCommittedMemoryInBytes) return; - } else { - args->pCommittedMemoryInBytes = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceMemoryCommitment_args_handle(struct vn_command_vkGetDeviceMemoryCommitment *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeviceMemory_handle(&args->memory); - /* skip args->pCommittedMemoryInBytes */ -} - -static inline void vn_encode_vkGetDeviceMemoryCommitment_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceMemoryCommitment *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceMemoryCommitment_EXT}); - - /* skip args->device */ - /* skip args->memory */ - if (vn_encode_simple_pointer(enc, args->pCommittedMemoryInBytes)) - vn_encode_VkDeviceSize(enc, args->pCommittedMemoryInBytes); -} - -static inline void vn_decode_vkGetDeviceMemoryOpaqueCaptureAddress_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceMemoryOpaqueCaptureAddress *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkDeviceMemoryOpaqueCaptureAddressInfo_temp(dec, (VkDeviceMemoryOpaqueCaptureAddressInfo *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceMemoryOpaqueCaptureAddress_args_handle(struct vn_command_vkGetDeviceMemoryOpaqueCaptureAddress *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkDeviceMemoryOpaqueCaptureAddressInfo_handle((VkDeviceMemoryOpaqueCaptureAddressInfo *)args->pInfo); -} - -static inline void vn_encode_vkGetDeviceMemoryOpaqueCaptureAddress_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceMemoryOpaqueCaptureAddress *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceMemoryOpaqueCaptureAddress_EXT}); - - vn_encode_uint64_t(enc, &args->ret); - /* skip args->device */ - /* skip args->pInfo */ -} - -static inline void vn_decode_vkUnmapMemory2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkUnmapMemory2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pMemoryUnmapInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryUnmapInfo)); - if (!args->pMemoryUnmapInfo) return; - vn_decode_VkMemoryUnmapInfo_temp(dec, (VkMemoryUnmapInfo *)args->pMemoryUnmapInfo); - } else { - args->pMemoryUnmapInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkUnmapMemory2_args_handle(struct vn_command_vkUnmapMemory2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pMemoryUnmapInfo) - vn_replace_VkMemoryUnmapInfo_handle((VkMemoryUnmapInfo *)args->pMemoryUnmapInfo); -} - -static inline void vn_encode_vkUnmapMemory2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkUnmapMemory2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkUnmapMemory2_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pMemoryUnmapInfo */ -} - -static inline void vn_decode_vkGetMemoryResourcePropertiesMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetMemoryResourcePropertiesMESA *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->resourceId); - if (vn_decode_simple_pointer(dec)) { - args->pMemoryResourceProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryResourceProperties)); - if (!args->pMemoryResourceProperties) return; - vn_decode_VkMemoryResourcePropertiesMESA_partial_temp(dec, args->pMemoryResourceProperties); - } else { - args->pMemoryResourceProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetMemoryResourcePropertiesMESA_args_handle(struct vn_command_vkGetMemoryResourcePropertiesMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->resourceId */ - /* skip args->pMemoryResourceProperties */ -} - -static inline void vn_encode_vkGetMemoryResourcePropertiesMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetMemoryResourcePropertiesMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->resourceId */ - if (vn_encode_simple_pointer(enc, args->pMemoryResourceProperties)) - vn_encode_VkMemoryResourcePropertiesMESA(enc, args->pMemoryResourceProperties); -} - -static inline void vn_dispatch_vkAllocateMemory(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkAllocateMemory args; - - if (!ctx->dispatch_vkAllocateMemory) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkAllocateMemory_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkAllocateMemory(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkAllocateMemory returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkAllocateMemory_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkFreeMemory(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkFreeMemory args; - - if (!ctx->dispatch_vkFreeMemory) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkFreeMemory_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkFreeMemory(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkFreeMemory_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkUnmapMemory(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkUnmapMemory args; - - if (!ctx->dispatch_vkUnmapMemory) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkUnmapMemory_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkUnmapMemory(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkUnmapMemory_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkFlushMappedMemoryRanges(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkFlushMappedMemoryRanges args; - - if (!ctx->dispatch_vkFlushMappedMemoryRanges) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkFlushMappedMemoryRanges_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkFlushMappedMemoryRanges(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkFlushMappedMemoryRanges returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkFlushMappedMemoryRanges_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkInvalidateMappedMemoryRanges(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkInvalidateMappedMemoryRanges args; - - if (!ctx->dispatch_vkInvalidateMappedMemoryRanges) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkInvalidateMappedMemoryRanges_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkInvalidateMappedMemoryRanges(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkInvalidateMappedMemoryRanges returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkInvalidateMappedMemoryRanges_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceMemoryCommitment(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceMemoryCommitment args; - - if (!ctx->dispatch_vkGetDeviceMemoryCommitment) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceMemoryCommitment_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceMemoryCommitment(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceMemoryCommitment_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceMemoryOpaqueCaptureAddress(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceMemoryOpaqueCaptureAddress args; - - if (!ctx->dispatch_vkGetDeviceMemoryOpaqueCaptureAddress) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceMemoryOpaqueCaptureAddress_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceMemoryOpaqueCaptureAddress(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceMemoryOpaqueCaptureAddress_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkUnmapMemory2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkUnmapMemory2 args; - - if (!ctx->dispatch_vkUnmapMemory2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkUnmapMemory2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkUnmapMemory2(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkUnmapMemory2 returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkUnmapMemory2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetMemoryResourcePropertiesMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetMemoryResourcePropertiesMESA args; - - if (!ctx->dispatch_vkGetMemoryResourcePropertiesMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetMemoryResourcePropertiesMESA_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetMemoryResourcePropertiesMESA(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetMemoryResourcePropertiesMESA returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetMemoryResourcePropertiesMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_DEVICE_MEMORY_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_dispatches.h b/src/venus/venus-protocol/vn_protocol_renderer_dispatches.h deleted file mode 100644 index a29a4fc6..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_dispatches.h +++ /dev/null @@ -1,743 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_DISPATCHES_H -#define VN_PROTOCOL_RENDERER_DISPATCHES_H - -#include "vn_protocol_renderer_structs.h" -#include "vn_protocol_renderer_transport.h" -#include "vn_protocol_renderer_instance.h" -#include "vn_protocol_renderer_device.h" -#include "vn_protocol_renderer_queue.h" -#include "vn_protocol_renderer_fence.h" -#include "vn_protocol_renderer_semaphore.h" -#include "vn_protocol_renderer_event.h" -#include "vn_protocol_renderer_device_memory.h" -#include "vn_protocol_renderer_image.h" -#include "vn_protocol_renderer_image_view.h" -#include "vn_protocol_renderer_sampler.h" -#include "vn_protocol_renderer_sampler_ycbcr_conversion.h" -#include "vn_protocol_renderer_buffer.h" -#include "vn_protocol_renderer_buffer_view.h" -#include "vn_protocol_renderer_descriptor_pool.h" -#include "vn_protocol_renderer_descriptor_set.h" -#include "vn_protocol_renderer_descriptor_set_layout.h" -#include "vn_protocol_renderer_descriptor_update_template.h" -#include "vn_protocol_renderer_render_pass.h" -#include "vn_protocol_renderer_framebuffer.h" -#include "vn_protocol_renderer_query_pool.h" -#include "vn_protocol_renderer_shader_module.h" -#include "vn_protocol_renderer_pipeline.h" -#include "vn_protocol_renderer_pipeline_layout.h" -#include "vn_protocol_renderer_pipeline_cache.h" -#include "vn_protocol_renderer_command_pool.h" -#include "vn_protocol_renderer_command_buffer.h" -#include "vn_protocol_renderer_private_data_slot.h" -#include "vn_protocol_renderer_host_copy.h" -#include "vn_protocol_renderer_acceleration_structure.h" -#include "vn_protocol_renderer_descriptor_heap.h" - -static inline const char *vn_dispatch_command_name(VkCommandTypeEXT type) -{ - switch (type) { - case VK_COMMAND_TYPE_vkCreateInstance_EXT: return "vkCreateInstance"; - case VK_COMMAND_TYPE_vkDestroyInstance_EXT: return "vkDestroyInstance"; - case VK_COMMAND_TYPE_vkEnumeratePhysicalDevices_EXT: return "vkEnumeratePhysicalDevices"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties_EXT: return "vkGetPhysicalDeviceProperties"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties_EXT: return "vkGetPhysicalDeviceQueueFamilyProperties"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties_EXT: return "vkGetPhysicalDeviceMemoryProperties"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures_EXT: return "vkGetPhysicalDeviceFeatures"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties_EXT: return "vkGetPhysicalDeviceFormatProperties"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties_EXT: return "vkGetPhysicalDeviceImageFormatProperties"; - case VK_COMMAND_TYPE_vkCreateDevice_EXT: return "vkCreateDevice"; - case VK_COMMAND_TYPE_vkDestroyDevice_EXT: return "vkDestroyDevice"; - case VK_COMMAND_TYPE_vkEnumerateInstanceVersion_EXT: return "vkEnumerateInstanceVersion"; - case VK_COMMAND_TYPE_vkEnumerateInstanceLayerProperties_EXT: return "vkEnumerateInstanceLayerProperties"; - case VK_COMMAND_TYPE_vkEnumerateInstanceExtensionProperties_EXT: return "vkEnumerateInstanceExtensionProperties"; - case VK_COMMAND_TYPE_vkEnumerateDeviceLayerProperties_EXT: return "vkEnumerateDeviceLayerProperties"; - case VK_COMMAND_TYPE_vkEnumerateDeviceExtensionProperties_EXT: return "vkEnumerateDeviceExtensionProperties"; - case VK_COMMAND_TYPE_vkGetDeviceQueue_EXT: return "vkGetDeviceQueue"; - case VK_COMMAND_TYPE_vkQueueSubmit_EXT: return "vkQueueSubmit"; - case VK_COMMAND_TYPE_vkQueueWaitIdle_EXT: return "vkQueueWaitIdle"; - case VK_COMMAND_TYPE_vkDeviceWaitIdle_EXT: return "vkDeviceWaitIdle"; - case VK_COMMAND_TYPE_vkAllocateMemory_EXT: return "vkAllocateMemory"; - case VK_COMMAND_TYPE_vkFreeMemory_EXT: return "vkFreeMemory"; - case VK_COMMAND_TYPE_vkUnmapMemory_EXT: return "vkUnmapMemory"; - case VK_COMMAND_TYPE_vkFlushMappedMemoryRanges_EXT: return "vkFlushMappedMemoryRanges"; - case VK_COMMAND_TYPE_vkInvalidateMappedMemoryRanges_EXT: return "vkInvalidateMappedMemoryRanges"; - case VK_COMMAND_TYPE_vkGetDeviceMemoryCommitment_EXT: return "vkGetDeviceMemoryCommitment"; - case VK_COMMAND_TYPE_vkGetBufferMemoryRequirements_EXT: return "vkGetBufferMemoryRequirements"; - case VK_COMMAND_TYPE_vkBindBufferMemory_EXT: return "vkBindBufferMemory"; - case VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT: return "vkGetImageMemoryRequirements"; - case VK_COMMAND_TYPE_vkBindImageMemory_EXT: return "vkBindImageMemory"; - case VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT: return "vkGetImageSparseMemoryRequirements"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties_EXT: return "vkGetPhysicalDeviceSparseImageFormatProperties"; - case VK_COMMAND_TYPE_vkQueueBindSparse_EXT: return "vkQueueBindSparse"; - case VK_COMMAND_TYPE_vkCreateFence_EXT: return "vkCreateFence"; - case VK_COMMAND_TYPE_vkDestroyFence_EXT: return "vkDestroyFence"; - case VK_COMMAND_TYPE_vkResetFences_EXT: return "vkResetFences"; - case VK_COMMAND_TYPE_vkGetFenceStatus_EXT: return "vkGetFenceStatus"; - case VK_COMMAND_TYPE_vkWaitForFences_EXT: return "vkWaitForFences"; - case VK_COMMAND_TYPE_vkCreateSemaphore_EXT: return "vkCreateSemaphore"; - case VK_COMMAND_TYPE_vkDestroySemaphore_EXT: return "vkDestroySemaphore"; - case VK_COMMAND_TYPE_vkCreateEvent_EXT: return "vkCreateEvent"; - case VK_COMMAND_TYPE_vkDestroyEvent_EXT: return "vkDestroyEvent"; - case VK_COMMAND_TYPE_vkGetEventStatus_EXT: return "vkGetEventStatus"; - case VK_COMMAND_TYPE_vkSetEvent_EXT: return "vkSetEvent"; - case VK_COMMAND_TYPE_vkResetEvent_EXT: return "vkResetEvent"; - case VK_COMMAND_TYPE_vkCreateQueryPool_EXT: return "vkCreateQueryPool"; - case VK_COMMAND_TYPE_vkDestroyQueryPool_EXT: return "vkDestroyQueryPool"; - case VK_COMMAND_TYPE_vkGetQueryPoolResults_EXT: return "vkGetQueryPoolResults"; - case VK_COMMAND_TYPE_vkResetQueryPool_EXT: return "vkResetQueryPool"; - case VK_COMMAND_TYPE_vkCreateBuffer_EXT: return "vkCreateBuffer"; - case VK_COMMAND_TYPE_vkDestroyBuffer_EXT: return "vkDestroyBuffer"; - case VK_COMMAND_TYPE_vkCreateBufferView_EXT: return "vkCreateBufferView"; - case VK_COMMAND_TYPE_vkDestroyBufferView_EXT: return "vkDestroyBufferView"; - case VK_COMMAND_TYPE_vkCreateImage_EXT: return "vkCreateImage"; - case VK_COMMAND_TYPE_vkDestroyImage_EXT: return "vkDestroyImage"; - case VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT: return "vkGetImageSubresourceLayout"; - case VK_COMMAND_TYPE_vkCreateImageView_EXT: return "vkCreateImageView"; - case VK_COMMAND_TYPE_vkDestroyImageView_EXT: return "vkDestroyImageView"; - case VK_COMMAND_TYPE_vkCreateShaderModule_EXT: return "vkCreateShaderModule"; - case VK_COMMAND_TYPE_vkDestroyShaderModule_EXT: return "vkDestroyShaderModule"; - case VK_COMMAND_TYPE_vkCreatePipelineCache_EXT: return "vkCreatePipelineCache"; - case VK_COMMAND_TYPE_vkDestroyPipelineCache_EXT: return "vkDestroyPipelineCache"; - case VK_COMMAND_TYPE_vkGetPipelineCacheData_EXT: return "vkGetPipelineCacheData"; - case VK_COMMAND_TYPE_vkMergePipelineCaches_EXT: return "vkMergePipelineCaches"; - case VK_COMMAND_TYPE_vkCreateGraphicsPipelines_EXT: return "vkCreateGraphicsPipelines"; - case VK_COMMAND_TYPE_vkCreateComputePipelines_EXT: return "vkCreateComputePipelines"; - case VK_COMMAND_TYPE_vkDestroyPipeline_EXT: return "vkDestroyPipeline"; - case VK_COMMAND_TYPE_vkCreatePipelineLayout_EXT: return "vkCreatePipelineLayout"; - case VK_COMMAND_TYPE_vkDestroyPipelineLayout_EXT: return "vkDestroyPipelineLayout"; - case VK_COMMAND_TYPE_vkCreateSampler_EXT: return "vkCreateSampler"; - case VK_COMMAND_TYPE_vkDestroySampler_EXT: return "vkDestroySampler"; - case VK_COMMAND_TYPE_vkCreateDescriptorSetLayout_EXT: return "vkCreateDescriptorSetLayout"; - case VK_COMMAND_TYPE_vkDestroyDescriptorSetLayout_EXT: return "vkDestroyDescriptorSetLayout"; - case VK_COMMAND_TYPE_vkCreateDescriptorPool_EXT: return "vkCreateDescriptorPool"; - case VK_COMMAND_TYPE_vkDestroyDescriptorPool_EXT: return "vkDestroyDescriptorPool"; - case VK_COMMAND_TYPE_vkResetDescriptorPool_EXT: return "vkResetDescriptorPool"; - case VK_COMMAND_TYPE_vkAllocateDescriptorSets_EXT: return "vkAllocateDescriptorSets"; - case VK_COMMAND_TYPE_vkFreeDescriptorSets_EXT: return "vkFreeDescriptorSets"; - case VK_COMMAND_TYPE_vkUpdateDescriptorSets_EXT: return "vkUpdateDescriptorSets"; - case VK_COMMAND_TYPE_vkCreateFramebuffer_EXT: return "vkCreateFramebuffer"; - case VK_COMMAND_TYPE_vkDestroyFramebuffer_EXT: return "vkDestroyFramebuffer"; - case VK_COMMAND_TYPE_vkCreateRenderPass_EXT: return "vkCreateRenderPass"; - case VK_COMMAND_TYPE_vkDestroyRenderPass_EXT: return "vkDestroyRenderPass"; - case VK_COMMAND_TYPE_vkGetRenderAreaGranularity_EXT: return "vkGetRenderAreaGranularity"; - case VK_COMMAND_TYPE_vkGetRenderingAreaGranularity_EXT: return "vkGetRenderingAreaGranularity"; - case VK_COMMAND_TYPE_vkCreateCommandPool_EXT: return "vkCreateCommandPool"; - case VK_COMMAND_TYPE_vkDestroyCommandPool_EXT: return "vkDestroyCommandPool"; - case VK_COMMAND_TYPE_vkResetCommandPool_EXT: return "vkResetCommandPool"; - case VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT: return "vkAllocateCommandBuffers"; - case VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT: return "vkFreeCommandBuffers"; - case VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT: return "vkBeginCommandBuffer"; - case VK_COMMAND_TYPE_vkEndCommandBuffer_EXT: return "vkEndCommandBuffer"; - case VK_COMMAND_TYPE_vkResetCommandBuffer_EXT: return "vkResetCommandBuffer"; - case VK_COMMAND_TYPE_vkCmdBindPipeline_EXT: return "vkCmdBindPipeline"; - case VK_COMMAND_TYPE_vkCmdSetAttachmentFeedbackLoopEnableEXT_EXT: return "vkCmdSetAttachmentFeedbackLoopEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetViewport_EXT: return "vkCmdSetViewport"; - case VK_COMMAND_TYPE_vkCmdSetScissor_EXT: return "vkCmdSetScissor"; - case VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT: return "vkCmdSetLineWidth"; - case VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT: return "vkCmdSetDepthBias"; - case VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT: return "vkCmdSetBlendConstants"; - case VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT: return "vkCmdSetDepthBounds"; - case VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT: return "vkCmdSetStencilCompareMask"; - case VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT: return "vkCmdSetStencilWriteMask"; - case VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT: return "vkCmdSetStencilReference"; - case VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT: return "vkCmdBindDescriptorSets"; - case VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT: return "vkCmdBindIndexBuffer"; - case VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT: return "vkCmdBindVertexBuffers"; - case VK_COMMAND_TYPE_vkCmdDraw_EXT: return "vkCmdDraw"; - case VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT: return "vkCmdDrawIndexed"; - case VK_COMMAND_TYPE_vkCmdDrawMultiEXT_EXT: return "vkCmdDrawMultiEXT"; - case VK_COMMAND_TYPE_vkCmdDrawMultiIndexedEXT_EXT: return "vkCmdDrawMultiIndexedEXT"; - case VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT: return "vkCmdDrawIndirect"; - case VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT: return "vkCmdDrawIndexedIndirect"; - case VK_COMMAND_TYPE_vkCmdDispatch_EXT: return "vkCmdDispatch"; - case VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT: return "vkCmdDispatchIndirect"; - case VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT: return "vkCmdCopyBuffer"; - case VK_COMMAND_TYPE_vkCmdCopyImage_EXT: return "vkCmdCopyImage"; - case VK_COMMAND_TYPE_vkCmdBlitImage_EXT: return "vkCmdBlitImage"; - case VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT: return "vkCmdCopyBufferToImage"; - case VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT: return "vkCmdCopyImageToBuffer"; - case VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT: return "vkCmdUpdateBuffer"; - case VK_COMMAND_TYPE_vkCmdFillBuffer_EXT: return "vkCmdFillBuffer"; - case VK_COMMAND_TYPE_vkCmdClearColorImage_EXT: return "vkCmdClearColorImage"; - case VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT: return "vkCmdClearDepthStencilImage"; - case VK_COMMAND_TYPE_vkCmdClearAttachments_EXT: return "vkCmdClearAttachments"; - case VK_COMMAND_TYPE_vkCmdResolveImage_EXT: return "vkCmdResolveImage"; - case VK_COMMAND_TYPE_vkCmdSetEvent_EXT: return "vkCmdSetEvent"; - case VK_COMMAND_TYPE_vkCmdResetEvent_EXT: return "vkCmdResetEvent"; - case VK_COMMAND_TYPE_vkCmdWaitEvents_EXT: return "vkCmdWaitEvents"; - case VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT: return "vkCmdPipelineBarrier"; - case VK_COMMAND_TYPE_vkCmdBeginQuery_EXT: return "vkCmdBeginQuery"; - case VK_COMMAND_TYPE_vkCmdEndQuery_EXT: return "vkCmdEndQuery"; - case VK_COMMAND_TYPE_vkCmdBeginConditionalRenderingEXT_EXT: return "vkCmdBeginConditionalRenderingEXT"; - case VK_COMMAND_TYPE_vkCmdEndConditionalRenderingEXT_EXT: return "vkCmdEndConditionalRenderingEXT"; - case VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT: return "vkCmdResetQueryPool"; - case VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT: return "vkCmdWriteTimestamp"; - case VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT: return "vkCmdCopyQueryPoolResults"; - case VK_COMMAND_TYPE_vkCmdPushConstants_EXT: return "vkCmdPushConstants"; - case VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT: return "vkCmdBeginRenderPass"; - case VK_COMMAND_TYPE_vkCmdNextSubpass_EXT: return "vkCmdNextSubpass"; - case VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT: return "vkCmdEndRenderPass"; - case VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT: return "vkCmdExecuteCommands"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures2_EXT: return "vkGetPhysicalDeviceFeatures2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties2_EXT: return "vkGetPhysicalDeviceProperties2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties2_EXT: return "vkGetPhysicalDeviceFormatProperties2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties2_EXT: return "vkGetPhysicalDeviceImageFormatProperties2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties2_EXT: return "vkGetPhysicalDeviceQueueFamilyProperties2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties2_EXT: return "vkGetPhysicalDeviceMemoryProperties2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties2_EXT: return "vkGetPhysicalDeviceSparseImageFormatProperties2"; - case VK_COMMAND_TYPE_vkCmdPushDescriptorSet_EXT: return "vkCmdPushDescriptorSet"; - case VK_COMMAND_TYPE_vkTrimCommandPool_EXT: return "vkTrimCommandPool"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalBufferProperties_EXT: return "vkGetPhysicalDeviceExternalBufferProperties"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalSemaphoreProperties_EXT: return "vkGetPhysicalDeviceExternalSemaphoreProperties"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalFenceProperties_EXT: return "vkGetPhysicalDeviceExternalFenceProperties"; - case VK_COMMAND_TYPE_vkEnumeratePhysicalDeviceGroups_EXT: return "vkEnumeratePhysicalDeviceGroups"; - case VK_COMMAND_TYPE_vkGetDeviceGroupPeerMemoryFeatures_EXT: return "vkGetDeviceGroupPeerMemoryFeatures"; - case VK_COMMAND_TYPE_vkBindBufferMemory2_EXT: return "vkBindBufferMemory2"; - case VK_COMMAND_TYPE_vkBindImageMemory2_EXT: return "vkBindImageMemory2"; - case VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT: return "vkCmdSetDeviceMask"; - case VK_COMMAND_TYPE_vkCmdDispatchBase_EXT: return "vkCmdDispatchBase"; - case VK_COMMAND_TYPE_vkCreateDescriptorUpdateTemplate_EXT: return "vkCreateDescriptorUpdateTemplate"; - case VK_COMMAND_TYPE_vkDestroyDescriptorUpdateTemplate_EXT: return "vkDestroyDescriptorUpdateTemplate"; - case VK_COMMAND_TYPE_vkCmdSetSampleLocationsEXT_EXT: return "vkCmdSetSampleLocationsEXT"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceMultisamplePropertiesEXT_EXT: return "vkGetPhysicalDeviceMultisamplePropertiesEXT"; - case VK_COMMAND_TYPE_vkGetBufferMemoryRequirements2_EXT: return "vkGetBufferMemoryRequirements2"; - case VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT: return "vkGetImageMemoryRequirements2"; - case VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT: return "vkGetImageSparseMemoryRequirements2"; - case VK_COMMAND_TYPE_vkGetDeviceBufferMemoryRequirements_EXT: return "vkGetDeviceBufferMemoryRequirements"; - case VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT: return "vkGetDeviceImageMemoryRequirements"; - case VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT: return "vkGetDeviceImageSparseMemoryRequirements"; - case VK_COMMAND_TYPE_vkCreateSamplerYcbcrConversion_EXT: return "vkCreateSamplerYcbcrConversion"; - case VK_COMMAND_TYPE_vkDestroySamplerYcbcrConversion_EXT: return "vkDestroySamplerYcbcrConversion"; - case VK_COMMAND_TYPE_vkGetDeviceQueue2_EXT: return "vkGetDeviceQueue2"; - case VK_COMMAND_TYPE_vkGetDescriptorSetLayoutSupport_EXT: return "vkGetDescriptorSetLayoutSupport"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_EXT: return "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR"; - case VK_COMMAND_TYPE_vkGetCalibratedTimestampsKHR_EXT: return "vkGetCalibratedTimestampsKHR"; - case VK_COMMAND_TYPE_vkCreateRenderPass2_EXT: return "vkCreateRenderPass2"; - case VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT: return "vkCmdBeginRenderPass2"; - case VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT: return "vkCmdNextSubpass2"; - case VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT: return "vkCmdEndRenderPass2"; - case VK_COMMAND_TYPE_vkGetSemaphoreCounterValue_EXT: return "vkGetSemaphoreCounterValue"; - case VK_COMMAND_TYPE_vkWaitSemaphores_EXT: return "vkWaitSemaphores"; - case VK_COMMAND_TYPE_vkSignalSemaphore_EXT: return "vkSignalSemaphore"; - case VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT: return "vkCmdDrawIndirectCount"; - case VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT: return "vkCmdDrawIndexedIndirectCount"; - case VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT: return "vkCmdBindTransformFeedbackBuffersEXT"; - case VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT: return "vkCmdBeginTransformFeedbackEXT"; - case VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT: return "vkCmdEndTransformFeedbackEXT"; - case VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT: return "vkCmdBeginQueryIndexedEXT"; - case VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT: return "vkCmdEndQueryIndexedEXT"; - case VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT: return "vkCmdDrawIndirectByteCountEXT"; - case VK_COMMAND_TYPE_vkCmdDrawMeshTasksEXT_EXT: return "vkCmdDrawMeshTasksEXT"; - case VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectEXT_EXT: return "vkCmdDrawMeshTasksIndirectEXT"; - case VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectCountEXT_EXT: return "vkCmdDrawMeshTasksIndirectCountEXT"; - case VK_COMMAND_TYPE_vkDestroyAccelerationStructureKHR_EXT: return "vkDestroyAccelerationStructureKHR"; - case VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureKHR_EXT: return "vkCmdCopyAccelerationStructureKHR"; - case VK_COMMAND_TYPE_vkCopyAccelerationStructureKHR_EXT: return "vkCopyAccelerationStructureKHR"; - case VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureToMemoryKHR_EXT: return "vkCmdCopyAccelerationStructureToMemoryKHR"; - case VK_COMMAND_TYPE_vkCmdCopyMemoryToAccelerationStructureKHR_EXT: return "vkCmdCopyMemoryToAccelerationStructureKHR"; - case VK_COMMAND_TYPE_vkCmdWriteAccelerationStructuresPropertiesKHR_EXT: return "vkCmdWriteAccelerationStructuresPropertiesKHR"; - case VK_COMMAND_TYPE_vkWriteAccelerationStructuresPropertiesKHR_EXT: return "vkWriteAccelerationStructuresPropertiesKHR"; - case VK_COMMAND_TYPE_vkCmdTraceRaysKHR_EXT: return "vkCmdTraceRaysKHR"; - case VK_COMMAND_TYPE_vkGetRayTracingShaderGroupHandlesKHR_EXT: return "vkGetRayTracingShaderGroupHandlesKHR"; - case VK_COMMAND_TYPE_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_EXT: return "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"; - case VK_COMMAND_TYPE_vkCreateRayTracingPipelinesKHR_EXT: return "vkCreateRayTracingPipelinesKHR"; - case VK_COMMAND_TYPE_vkCmdTraceRaysIndirectKHR_EXT: return "vkCmdTraceRaysIndirectKHR"; - case VK_COMMAND_TYPE_vkCmdTraceRaysIndirect2KHR_EXT: return "vkCmdTraceRaysIndirect2KHR"; - case VK_COMMAND_TYPE_vkGetDeviceAccelerationStructureCompatibilityKHR_EXT: return "vkGetDeviceAccelerationStructureCompatibilityKHR"; - case VK_COMMAND_TYPE_vkGetRayTracingShaderGroupStackSizeKHR_EXT: return "vkGetRayTracingShaderGroupStackSizeKHR"; - case VK_COMMAND_TYPE_vkCmdSetRayTracingPipelineStackSizeKHR_EXT: return "vkCmdSetRayTracingPipelineStackSizeKHR"; - case VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT: return "vkGetImageDrmFormatModifierPropertiesEXT"; - case VK_COMMAND_TYPE_vkGetBufferOpaqueCaptureAddress_EXT: return "vkGetBufferOpaqueCaptureAddress"; - case VK_COMMAND_TYPE_vkGetBufferDeviceAddress_EXT: return "vkGetBufferDeviceAddress"; - case VK_COMMAND_TYPE_vkGetDeviceMemoryOpaqueCaptureAddress_EXT: return "vkGetDeviceMemoryOpaqueCaptureAddress"; - case VK_COMMAND_TYPE_vkCmdSetLineStipple_EXT: return "vkCmdSetLineStipple"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceToolProperties_EXT: return "vkGetPhysicalDeviceToolProperties"; - case VK_COMMAND_TYPE_vkCreateAccelerationStructureKHR_EXT: return "vkCreateAccelerationStructureKHR"; - case VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresKHR_EXT: return "vkCmdBuildAccelerationStructuresKHR"; - case VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresIndirectKHR_EXT: return "vkCmdBuildAccelerationStructuresIndirectKHR"; - case VK_COMMAND_TYPE_vkGetAccelerationStructureDeviceAddressKHR_EXT: return "vkGetAccelerationStructureDeviceAddressKHR"; - case VK_COMMAND_TYPE_vkCreateDeferredOperationKHR_EXT: return "vkCreateDeferredOperationKHR"; - case VK_COMMAND_TYPE_vkDestroyDeferredOperationKHR_EXT: return "vkDestroyDeferredOperationKHR"; - case VK_COMMAND_TYPE_vkGetDeferredOperationMaxConcurrencyKHR_EXT: return "vkGetDeferredOperationMaxConcurrencyKHR"; - case VK_COMMAND_TYPE_vkGetDeferredOperationResultKHR_EXT: return "vkGetDeferredOperationResultKHR"; - case VK_COMMAND_TYPE_vkDeferredOperationJoinKHR_EXT: return "vkDeferredOperationJoinKHR"; - case VK_COMMAND_TYPE_vkCmdSetCullMode_EXT: return "vkCmdSetCullMode"; - case VK_COMMAND_TYPE_vkCmdSetFrontFace_EXT: return "vkCmdSetFrontFace"; - case VK_COMMAND_TYPE_vkCmdSetPrimitiveTopology_EXT: return "vkCmdSetPrimitiveTopology"; - case VK_COMMAND_TYPE_vkCmdSetViewportWithCount_EXT: return "vkCmdSetViewportWithCount"; - case VK_COMMAND_TYPE_vkCmdSetScissorWithCount_EXT: return "vkCmdSetScissorWithCount"; - case VK_COMMAND_TYPE_vkCmdBindIndexBuffer2_EXT: return "vkCmdBindIndexBuffer2"; - case VK_COMMAND_TYPE_vkCmdBindVertexBuffers2_EXT: return "vkCmdBindVertexBuffers2"; - case VK_COMMAND_TYPE_vkCmdSetDepthTestEnable_EXT: return "vkCmdSetDepthTestEnable"; - case VK_COMMAND_TYPE_vkCmdSetDepthWriteEnable_EXT: return "vkCmdSetDepthWriteEnable"; - case VK_COMMAND_TYPE_vkCmdSetDepthCompareOp_EXT: return "vkCmdSetDepthCompareOp"; - case VK_COMMAND_TYPE_vkCmdSetDepthBoundsTestEnable_EXT: return "vkCmdSetDepthBoundsTestEnable"; - case VK_COMMAND_TYPE_vkCmdSetStencilTestEnable_EXT: return "vkCmdSetStencilTestEnable"; - case VK_COMMAND_TYPE_vkCmdSetStencilOp_EXT: return "vkCmdSetStencilOp"; - case VK_COMMAND_TYPE_vkCmdSetPatchControlPointsEXT_EXT: return "vkCmdSetPatchControlPointsEXT"; - case VK_COMMAND_TYPE_vkCmdSetRasterizerDiscardEnable_EXT: return "vkCmdSetRasterizerDiscardEnable"; - case VK_COMMAND_TYPE_vkCmdSetDepthBiasEnable_EXT: return "vkCmdSetDepthBiasEnable"; - case VK_COMMAND_TYPE_vkCmdSetLogicOpEXT_EXT: return "vkCmdSetLogicOpEXT"; - case VK_COMMAND_TYPE_vkCmdSetPrimitiveRestartEnable_EXT: return "vkCmdSetPrimitiveRestartEnable"; - case VK_COMMAND_TYPE_vkCmdSetTessellationDomainOriginEXT_EXT: return "vkCmdSetTessellationDomainOriginEXT"; - case VK_COMMAND_TYPE_vkCmdSetDepthClampEnableEXT_EXT: return "vkCmdSetDepthClampEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetPolygonModeEXT_EXT: return "vkCmdSetPolygonModeEXT"; - case VK_COMMAND_TYPE_vkCmdSetRasterizationSamplesEXT_EXT: return "vkCmdSetRasterizationSamplesEXT"; - case VK_COMMAND_TYPE_vkCmdSetSampleMaskEXT_EXT: return "vkCmdSetSampleMaskEXT"; - case VK_COMMAND_TYPE_vkCmdSetAlphaToCoverageEnableEXT_EXT: return "vkCmdSetAlphaToCoverageEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetAlphaToOneEnableEXT_EXT: return "vkCmdSetAlphaToOneEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetLogicOpEnableEXT_EXT: return "vkCmdSetLogicOpEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetColorBlendEnableEXT_EXT: return "vkCmdSetColorBlendEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetColorBlendEquationEXT_EXT: return "vkCmdSetColorBlendEquationEXT"; - case VK_COMMAND_TYPE_vkCmdSetColorWriteMaskEXT_EXT: return "vkCmdSetColorWriteMaskEXT"; - case VK_COMMAND_TYPE_vkCmdSetRasterizationStreamEXT_EXT: return "vkCmdSetRasterizationStreamEXT"; - case VK_COMMAND_TYPE_vkCmdSetConservativeRasterizationModeEXT_EXT: return "vkCmdSetConservativeRasterizationModeEXT"; - case VK_COMMAND_TYPE_vkCmdSetExtraPrimitiveOverestimationSizeEXT_EXT: return "vkCmdSetExtraPrimitiveOverestimationSizeEXT"; - case VK_COMMAND_TYPE_vkCmdSetDepthClipEnableEXT_EXT: return "vkCmdSetDepthClipEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetSampleLocationsEnableEXT_EXT: return "vkCmdSetSampleLocationsEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetColorBlendAdvancedEXT_EXT: return "vkCmdSetColorBlendAdvancedEXT"; - case VK_COMMAND_TYPE_vkCmdSetProvokingVertexModeEXT_EXT: return "vkCmdSetProvokingVertexModeEXT"; - case VK_COMMAND_TYPE_vkCmdSetLineRasterizationModeEXT_EXT: return "vkCmdSetLineRasterizationModeEXT"; - case VK_COMMAND_TYPE_vkCmdSetLineStippleEnableEXT_EXT: return "vkCmdSetLineStippleEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetDepthClipNegativeOneToOneEXT_EXT: return "vkCmdSetDepthClipNegativeOneToOneEXT"; - case VK_COMMAND_TYPE_vkCreatePrivateDataSlot_EXT: return "vkCreatePrivateDataSlot"; - case VK_COMMAND_TYPE_vkDestroyPrivateDataSlot_EXT: return "vkDestroyPrivateDataSlot"; - case VK_COMMAND_TYPE_vkSetPrivateData_EXT: return "vkSetPrivateData"; - case VK_COMMAND_TYPE_vkGetPrivateData_EXT: return "vkGetPrivateData"; - case VK_COMMAND_TYPE_vkCmdCopyBuffer2_EXT: return "vkCmdCopyBuffer2"; - case VK_COMMAND_TYPE_vkCmdCopyImage2_EXT: return "vkCmdCopyImage2"; - case VK_COMMAND_TYPE_vkCmdBlitImage2_EXT: return "vkCmdBlitImage2"; - case VK_COMMAND_TYPE_vkCmdCopyBufferToImage2_EXT: return "vkCmdCopyBufferToImage2"; - case VK_COMMAND_TYPE_vkCmdCopyImageToBuffer2_EXT: return "vkCmdCopyImageToBuffer2"; - case VK_COMMAND_TYPE_vkCmdResolveImage2_EXT: return "vkCmdResolveImage2"; - case VK_COMMAND_TYPE_vkCmdSetFragmentShadingRateKHR_EXT: return "vkCmdSetFragmentShadingRateKHR"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceFragmentShadingRatesKHR_EXT: return "vkGetPhysicalDeviceFragmentShadingRatesKHR"; - case VK_COMMAND_TYPE_vkGetAccelerationStructureBuildSizesKHR_EXT: return "vkGetAccelerationStructureBuildSizesKHR"; - case VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT: return "vkCmdSetVertexInputEXT"; - case VK_COMMAND_TYPE_vkCmdSetColorWriteEnableEXT_EXT: return "vkCmdSetColorWriteEnableEXT"; - case VK_COMMAND_TYPE_vkCmdSetEvent2_EXT: return "vkCmdSetEvent2"; - case VK_COMMAND_TYPE_vkCmdResetEvent2_EXT: return "vkCmdResetEvent2"; - case VK_COMMAND_TYPE_vkCmdWaitEvents2_EXT: return "vkCmdWaitEvents2"; - case VK_COMMAND_TYPE_vkCmdPipelineBarrier2_EXT: return "vkCmdPipelineBarrier2"; - case VK_COMMAND_TYPE_vkQueueSubmit2_EXT: return "vkQueueSubmit2"; - case VK_COMMAND_TYPE_vkCmdWriteTimestamp2_EXT: return "vkCmdWriteTimestamp2"; - case VK_COMMAND_TYPE_vkCopyImageToImage_EXT: return "vkCopyImageToImage"; - case VK_COMMAND_TYPE_vkTransitionImageLayout_EXT: return "vkTransitionImageLayout"; - case VK_COMMAND_TYPE_vkCmdBeginRendering_EXT: return "vkCmdBeginRendering"; - case VK_COMMAND_TYPE_vkCmdEndRendering_EXT: return "vkCmdEndRendering"; - case VK_COMMAND_TYPE_vkGetImageSubresourceLayout2_EXT: return "vkGetImageSubresourceLayout2"; - case VK_COMMAND_TYPE_vkCmdSetDepthBias2EXT_EXT: return "vkCmdSetDepthBias2EXT"; - case VK_COMMAND_TYPE_vkGetDeviceImageSubresourceLayout_EXT: return "vkGetDeviceImageSubresourceLayout"; - case VK_COMMAND_TYPE_vkUnmapMemory2_EXT: return "vkUnmapMemory2"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_EXT: return "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR"; - case VK_COMMAND_TYPE_vkCmdBindDescriptorSets2_EXT: return "vkCmdBindDescriptorSets2"; - case VK_COMMAND_TYPE_vkCmdPushConstants2_EXT: return "vkCmdPushConstants2"; - case VK_COMMAND_TYPE_vkCmdPushDescriptorSet2_EXT: return "vkCmdPushDescriptorSet2"; - case VK_COMMAND_TYPE_vkCmdSetRenderingAttachmentLocations_EXT: return "vkCmdSetRenderingAttachmentLocations"; - case VK_COMMAND_TYPE_vkCmdSetRenderingInputAttachmentIndices_EXT: return "vkCmdSetRenderingInputAttachmentIndices"; - case VK_COMMAND_TYPE_vkCmdSetDepthClampRangeEXT_EXT: return "vkCmdSetDepthClampRangeEXT"; - case VK_COMMAND_TYPE_vkCmdBindSamplerHeapEXT_EXT: return "vkCmdBindSamplerHeapEXT"; - case VK_COMMAND_TYPE_vkCmdBindResourceHeapEXT_EXT: return "vkCmdBindResourceHeapEXT"; - case VK_COMMAND_TYPE_vkCmdPushDataEXT_EXT: return "vkCmdPushDataEXT"; - case VK_COMMAND_TYPE_vkRegisterCustomBorderColorEXT_EXT: return "vkRegisterCustomBorderColorEXT"; - case VK_COMMAND_TYPE_vkUnregisterCustomBorderColorEXT_EXT: return "vkUnregisterCustomBorderColorEXT"; - case VK_COMMAND_TYPE_vkGetImageOpaqueCaptureDataEXT_EXT: return "vkGetImageOpaqueCaptureDataEXT"; - case VK_COMMAND_TYPE_vkGetPhysicalDeviceDescriptorSizeEXT_EXT: return "vkGetPhysicalDeviceDescriptorSizeEXT"; - case VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT: return "vkSetReplyCommandStreamMESA"; - case VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT: return "vkSeekReplyCommandStreamMESA"; - case VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT: return "vkExecuteCommandStreamsMESA"; - case VK_COMMAND_TYPE_vkCreateRingMESA_EXT: return "vkCreateRingMESA"; - case VK_COMMAND_TYPE_vkDestroyRingMESA_EXT: return "vkDestroyRingMESA"; - case VK_COMMAND_TYPE_vkNotifyRingMESA_EXT: return "vkNotifyRingMESA"; - case VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT: return "vkWriteRingExtraMESA"; - case VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT: return "vkGetMemoryResourcePropertiesMESA"; - case VK_COMMAND_TYPE_vkResetFenceResourceMESA_EXT: return "vkResetFenceResourceMESA"; - case VK_COMMAND_TYPE_vkWaitSemaphoreResourceMESA_EXT: return "vkWaitSemaphoreResourceMESA"; - case VK_COMMAND_TYPE_vkImportSemaphoreResourceMESA_EXT: return "vkImportSemaphoreResourceMESA"; - case VK_COMMAND_TYPE_vkSubmitVirtqueueSeqnoMESA_EXT: return "vkSubmitVirtqueueSeqnoMESA"; - case VK_COMMAND_TYPE_vkWaitVirtqueueSeqnoMESA_EXT: return "vkWaitVirtqueueSeqnoMESA"; - case VK_COMMAND_TYPE_vkWaitRingSeqnoMESA_EXT: return "vkWaitRingSeqnoMESA"; - case VK_COMMAND_TYPE_vkCopyImageToMemoryMESA_EXT: return "vkCopyImageToMemoryMESA"; - case VK_COMMAND_TYPE_vkCopyMemoryToImageMESA_EXT: return "vkCopyMemoryToImageMESA"; - case VK_COMMAND_TYPE_vkWriteSamplerDescriptorMESA_EXT: return "vkWriteSamplerDescriptorMESA"; - case VK_COMMAND_TYPE_vkWriteResourceDescriptorMESA_EXT: return "vkWriteResourceDescriptorMESA"; - case VK_COMMAND_TYPE_vkGetDeviceProcAddr_EXT: return "vkGetDeviceProcAddr"; - case VK_COMMAND_TYPE_vkGetInstanceProcAddr_EXT: return "vkGetInstanceProcAddr"; - case VK_COMMAND_TYPE_vkMapMemory_EXT: return "vkMapMemory"; - case VK_COMMAND_TYPE_vkGetMemoryFdKHR_EXT: return "vkGetMemoryFdKHR"; - case VK_COMMAND_TYPE_vkGetMemoryFdPropertiesKHR_EXT: return "vkGetMemoryFdPropertiesKHR"; - case VK_COMMAND_TYPE_vkGetSemaphoreFdKHR_EXT: return "vkGetSemaphoreFdKHR"; - case VK_COMMAND_TYPE_vkImportSemaphoreFdKHR_EXT: return "vkImportSemaphoreFdKHR"; - case VK_COMMAND_TYPE_vkGetFenceFdKHR_EXT: return "vkGetFenceFdKHR"; - case VK_COMMAND_TYPE_vkImportFenceFdKHR_EXT: return "vkImportFenceFdKHR"; - case VK_COMMAND_TYPE_vkUpdateDescriptorSetWithTemplate_EXT: return "vkUpdateDescriptorSetWithTemplate"; - case VK_COMMAND_TYPE_vkCmdPushDescriptorSetWithTemplate_EXT: return "vkCmdPushDescriptorSetWithTemplate"; - case VK_COMMAND_TYPE_vkCopyAccelerationStructureToMemoryKHR_EXT: return "vkCopyAccelerationStructureToMemoryKHR"; - case VK_COMMAND_TYPE_vkCopyMemoryToAccelerationStructureKHR_EXT: return "vkCopyMemoryToAccelerationStructureKHR"; - case VK_COMMAND_TYPE_vkBuildAccelerationStructuresKHR_EXT: return "vkBuildAccelerationStructuresKHR"; - case VK_COMMAND_TYPE_vkCopyMemoryToImage_EXT: return "vkCopyMemoryToImage"; - case VK_COMMAND_TYPE_vkCopyImageToMemory_EXT: return "vkCopyImageToMemory"; - case VK_COMMAND_TYPE_vkMapMemory2_EXT: return "vkMapMemory2"; - case VK_COMMAND_TYPE_vkCmdPushDescriptorSetWithTemplate2_EXT: return "vkCmdPushDescriptorSetWithTemplate2"; - case VK_COMMAND_TYPE_vkWriteSamplerDescriptorsEXT_EXT: return "vkWriteSamplerDescriptorsEXT"; - case VK_COMMAND_TYPE_vkWriteResourceDescriptorsEXT_EXT: return "vkWriteResourceDescriptorsEXT"; - default: return "unknown"; - } -} - -static void (*const vn_dispatch_table[346])(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) = { - [VK_COMMAND_TYPE_vkCreateInstance_EXT] = vn_dispatch_vkCreateInstance, - [VK_COMMAND_TYPE_vkDestroyInstance_EXT] = vn_dispatch_vkDestroyInstance, - [VK_COMMAND_TYPE_vkEnumeratePhysicalDevices_EXT] = vn_dispatch_vkEnumeratePhysicalDevices, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceProperties, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceQueueFamilyProperties, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceMemoryProperties, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures_EXT] = vn_dispatch_vkGetPhysicalDeviceFeatures, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceFormatProperties, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceImageFormatProperties, - [VK_COMMAND_TYPE_vkCreateDevice_EXT] = vn_dispatch_vkCreateDevice, - [VK_COMMAND_TYPE_vkDestroyDevice_EXT] = vn_dispatch_vkDestroyDevice, - [VK_COMMAND_TYPE_vkEnumerateInstanceVersion_EXT] = vn_dispatch_vkEnumerateInstanceVersion, - [VK_COMMAND_TYPE_vkEnumerateInstanceLayerProperties_EXT] = vn_dispatch_vkEnumerateInstanceLayerProperties, - [VK_COMMAND_TYPE_vkEnumerateInstanceExtensionProperties_EXT] = vn_dispatch_vkEnumerateInstanceExtensionProperties, - [VK_COMMAND_TYPE_vkEnumerateDeviceLayerProperties_EXT] = vn_dispatch_vkEnumerateDeviceLayerProperties, - [VK_COMMAND_TYPE_vkEnumerateDeviceExtensionProperties_EXT] = vn_dispatch_vkEnumerateDeviceExtensionProperties, - [VK_COMMAND_TYPE_vkGetDeviceQueue_EXT] = vn_dispatch_vkGetDeviceQueue, - [VK_COMMAND_TYPE_vkQueueSubmit_EXT] = vn_dispatch_vkQueueSubmit, - [VK_COMMAND_TYPE_vkQueueWaitIdle_EXT] = vn_dispatch_vkQueueWaitIdle, - [VK_COMMAND_TYPE_vkDeviceWaitIdle_EXT] = vn_dispatch_vkDeviceWaitIdle, - [VK_COMMAND_TYPE_vkAllocateMemory_EXT] = vn_dispatch_vkAllocateMemory, - [VK_COMMAND_TYPE_vkFreeMemory_EXT] = vn_dispatch_vkFreeMemory, - [VK_COMMAND_TYPE_vkUnmapMemory_EXT] = vn_dispatch_vkUnmapMemory, - [VK_COMMAND_TYPE_vkFlushMappedMemoryRanges_EXT] = vn_dispatch_vkFlushMappedMemoryRanges, - [VK_COMMAND_TYPE_vkInvalidateMappedMemoryRanges_EXT] = vn_dispatch_vkInvalidateMappedMemoryRanges, - [VK_COMMAND_TYPE_vkGetDeviceMemoryCommitment_EXT] = vn_dispatch_vkGetDeviceMemoryCommitment, - [VK_COMMAND_TYPE_vkGetBufferMemoryRequirements_EXT] = vn_dispatch_vkGetBufferMemoryRequirements, - [VK_COMMAND_TYPE_vkBindBufferMemory_EXT] = vn_dispatch_vkBindBufferMemory, - [VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT] = vn_dispatch_vkGetImageMemoryRequirements, - [VK_COMMAND_TYPE_vkBindImageMemory_EXT] = vn_dispatch_vkBindImageMemory, - [VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT] = vn_dispatch_vkGetImageSparseMemoryRequirements, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceSparseImageFormatProperties, - [VK_COMMAND_TYPE_vkQueueBindSparse_EXT] = vn_dispatch_vkQueueBindSparse, - [VK_COMMAND_TYPE_vkCreateFence_EXT] = vn_dispatch_vkCreateFence, - [VK_COMMAND_TYPE_vkDestroyFence_EXT] = vn_dispatch_vkDestroyFence, - [VK_COMMAND_TYPE_vkResetFences_EXT] = vn_dispatch_vkResetFences, - [VK_COMMAND_TYPE_vkGetFenceStatus_EXT] = vn_dispatch_vkGetFenceStatus, - [VK_COMMAND_TYPE_vkWaitForFences_EXT] = vn_dispatch_vkWaitForFences, - [VK_COMMAND_TYPE_vkCreateSemaphore_EXT] = vn_dispatch_vkCreateSemaphore, - [VK_COMMAND_TYPE_vkDestroySemaphore_EXT] = vn_dispatch_vkDestroySemaphore, - [VK_COMMAND_TYPE_vkCreateEvent_EXT] = vn_dispatch_vkCreateEvent, - [VK_COMMAND_TYPE_vkDestroyEvent_EXT] = vn_dispatch_vkDestroyEvent, - [VK_COMMAND_TYPE_vkGetEventStatus_EXT] = vn_dispatch_vkGetEventStatus, - [VK_COMMAND_TYPE_vkSetEvent_EXT] = vn_dispatch_vkSetEvent, - [VK_COMMAND_TYPE_vkResetEvent_EXT] = vn_dispatch_vkResetEvent, - [VK_COMMAND_TYPE_vkCreateQueryPool_EXT] = vn_dispatch_vkCreateQueryPool, - [VK_COMMAND_TYPE_vkDestroyQueryPool_EXT] = vn_dispatch_vkDestroyQueryPool, - [VK_COMMAND_TYPE_vkGetQueryPoolResults_EXT] = vn_dispatch_vkGetQueryPoolResults, - [VK_COMMAND_TYPE_vkResetQueryPool_EXT] = vn_dispatch_vkResetQueryPool, - [VK_COMMAND_TYPE_vkCreateBuffer_EXT] = vn_dispatch_vkCreateBuffer, - [VK_COMMAND_TYPE_vkDestroyBuffer_EXT] = vn_dispatch_vkDestroyBuffer, - [VK_COMMAND_TYPE_vkCreateBufferView_EXT] = vn_dispatch_vkCreateBufferView, - [VK_COMMAND_TYPE_vkDestroyBufferView_EXT] = vn_dispatch_vkDestroyBufferView, - [VK_COMMAND_TYPE_vkCreateImage_EXT] = vn_dispatch_vkCreateImage, - [VK_COMMAND_TYPE_vkDestroyImage_EXT] = vn_dispatch_vkDestroyImage, - [VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT] = vn_dispatch_vkGetImageSubresourceLayout, - [VK_COMMAND_TYPE_vkCreateImageView_EXT] = vn_dispatch_vkCreateImageView, - [VK_COMMAND_TYPE_vkDestroyImageView_EXT] = vn_dispatch_vkDestroyImageView, - [VK_COMMAND_TYPE_vkCreateShaderModule_EXT] = vn_dispatch_vkCreateShaderModule, - [VK_COMMAND_TYPE_vkDestroyShaderModule_EXT] = vn_dispatch_vkDestroyShaderModule, - [VK_COMMAND_TYPE_vkCreatePipelineCache_EXT] = vn_dispatch_vkCreatePipelineCache, - [VK_COMMAND_TYPE_vkDestroyPipelineCache_EXT] = vn_dispatch_vkDestroyPipelineCache, - [VK_COMMAND_TYPE_vkGetPipelineCacheData_EXT] = vn_dispatch_vkGetPipelineCacheData, - [VK_COMMAND_TYPE_vkMergePipelineCaches_EXT] = vn_dispatch_vkMergePipelineCaches, - [VK_COMMAND_TYPE_vkCreateGraphicsPipelines_EXT] = vn_dispatch_vkCreateGraphicsPipelines, - [VK_COMMAND_TYPE_vkCreateComputePipelines_EXT] = vn_dispatch_vkCreateComputePipelines, - [VK_COMMAND_TYPE_vkDestroyPipeline_EXT] = vn_dispatch_vkDestroyPipeline, - [VK_COMMAND_TYPE_vkCreatePipelineLayout_EXT] = vn_dispatch_vkCreatePipelineLayout, - [VK_COMMAND_TYPE_vkDestroyPipelineLayout_EXT] = vn_dispatch_vkDestroyPipelineLayout, - [VK_COMMAND_TYPE_vkCreateSampler_EXT] = vn_dispatch_vkCreateSampler, - [VK_COMMAND_TYPE_vkDestroySampler_EXT] = vn_dispatch_vkDestroySampler, - [VK_COMMAND_TYPE_vkCreateDescriptorSetLayout_EXT] = vn_dispatch_vkCreateDescriptorSetLayout, - [VK_COMMAND_TYPE_vkDestroyDescriptorSetLayout_EXT] = vn_dispatch_vkDestroyDescriptorSetLayout, - [VK_COMMAND_TYPE_vkCreateDescriptorPool_EXT] = vn_dispatch_vkCreateDescriptorPool, - [VK_COMMAND_TYPE_vkDestroyDescriptorPool_EXT] = vn_dispatch_vkDestroyDescriptorPool, - [VK_COMMAND_TYPE_vkResetDescriptorPool_EXT] = vn_dispatch_vkResetDescriptorPool, - [VK_COMMAND_TYPE_vkAllocateDescriptorSets_EXT] = vn_dispatch_vkAllocateDescriptorSets, - [VK_COMMAND_TYPE_vkFreeDescriptorSets_EXT] = vn_dispatch_vkFreeDescriptorSets, - [VK_COMMAND_TYPE_vkUpdateDescriptorSets_EXT] = vn_dispatch_vkUpdateDescriptorSets, - [VK_COMMAND_TYPE_vkCreateFramebuffer_EXT] = vn_dispatch_vkCreateFramebuffer, - [VK_COMMAND_TYPE_vkDestroyFramebuffer_EXT] = vn_dispatch_vkDestroyFramebuffer, - [VK_COMMAND_TYPE_vkCreateRenderPass_EXT] = vn_dispatch_vkCreateRenderPass, - [VK_COMMAND_TYPE_vkDestroyRenderPass_EXT] = vn_dispatch_vkDestroyRenderPass, - [VK_COMMAND_TYPE_vkGetRenderAreaGranularity_EXT] = vn_dispatch_vkGetRenderAreaGranularity, - [VK_COMMAND_TYPE_vkGetRenderingAreaGranularity_EXT] = vn_dispatch_vkGetRenderingAreaGranularity, - [VK_COMMAND_TYPE_vkCreateCommandPool_EXT] = vn_dispatch_vkCreateCommandPool, - [VK_COMMAND_TYPE_vkDestroyCommandPool_EXT] = vn_dispatch_vkDestroyCommandPool, - [VK_COMMAND_TYPE_vkResetCommandPool_EXT] = vn_dispatch_vkResetCommandPool, - [VK_COMMAND_TYPE_vkAllocateCommandBuffers_EXT] = vn_dispatch_vkAllocateCommandBuffers, - [VK_COMMAND_TYPE_vkFreeCommandBuffers_EXT] = vn_dispatch_vkFreeCommandBuffers, - [VK_COMMAND_TYPE_vkBeginCommandBuffer_EXT] = vn_dispatch_vkBeginCommandBuffer, - [VK_COMMAND_TYPE_vkEndCommandBuffer_EXT] = vn_dispatch_vkEndCommandBuffer, - [VK_COMMAND_TYPE_vkResetCommandBuffer_EXT] = vn_dispatch_vkResetCommandBuffer, - [VK_COMMAND_TYPE_vkCmdBindPipeline_EXT] = vn_dispatch_vkCmdBindPipeline, - [VK_COMMAND_TYPE_vkCmdSetAttachmentFeedbackLoopEnableEXT_EXT] = vn_dispatch_vkCmdSetAttachmentFeedbackLoopEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetViewport_EXT] = vn_dispatch_vkCmdSetViewport, - [VK_COMMAND_TYPE_vkCmdSetScissor_EXT] = vn_dispatch_vkCmdSetScissor, - [VK_COMMAND_TYPE_vkCmdSetLineWidth_EXT] = vn_dispatch_vkCmdSetLineWidth, - [VK_COMMAND_TYPE_vkCmdSetDepthBias_EXT] = vn_dispatch_vkCmdSetDepthBias, - [VK_COMMAND_TYPE_vkCmdSetBlendConstants_EXT] = vn_dispatch_vkCmdSetBlendConstants, - [VK_COMMAND_TYPE_vkCmdSetDepthBounds_EXT] = vn_dispatch_vkCmdSetDepthBounds, - [VK_COMMAND_TYPE_vkCmdSetStencilCompareMask_EXT] = vn_dispatch_vkCmdSetStencilCompareMask, - [VK_COMMAND_TYPE_vkCmdSetStencilWriteMask_EXT] = vn_dispatch_vkCmdSetStencilWriteMask, - [VK_COMMAND_TYPE_vkCmdSetStencilReference_EXT] = vn_dispatch_vkCmdSetStencilReference, - [VK_COMMAND_TYPE_vkCmdBindDescriptorSets_EXT] = vn_dispatch_vkCmdBindDescriptorSets, - [VK_COMMAND_TYPE_vkCmdBindIndexBuffer_EXT] = vn_dispatch_vkCmdBindIndexBuffer, - [VK_COMMAND_TYPE_vkCmdBindVertexBuffers_EXT] = vn_dispatch_vkCmdBindVertexBuffers, - [VK_COMMAND_TYPE_vkCmdDraw_EXT] = vn_dispatch_vkCmdDraw, - [VK_COMMAND_TYPE_vkCmdDrawIndexed_EXT] = vn_dispatch_vkCmdDrawIndexed, - [VK_COMMAND_TYPE_vkCmdDrawMultiEXT_EXT] = vn_dispatch_vkCmdDrawMultiEXT, - [VK_COMMAND_TYPE_vkCmdDrawMultiIndexedEXT_EXT] = vn_dispatch_vkCmdDrawMultiIndexedEXT, - [VK_COMMAND_TYPE_vkCmdDrawIndirect_EXT] = vn_dispatch_vkCmdDrawIndirect, - [VK_COMMAND_TYPE_vkCmdDrawIndexedIndirect_EXT] = vn_dispatch_vkCmdDrawIndexedIndirect, - [VK_COMMAND_TYPE_vkCmdDispatch_EXT] = vn_dispatch_vkCmdDispatch, - [VK_COMMAND_TYPE_vkCmdDispatchIndirect_EXT] = vn_dispatch_vkCmdDispatchIndirect, - [VK_COMMAND_TYPE_vkCmdCopyBuffer_EXT] = vn_dispatch_vkCmdCopyBuffer, - [VK_COMMAND_TYPE_vkCmdCopyImage_EXT] = vn_dispatch_vkCmdCopyImage, - [VK_COMMAND_TYPE_vkCmdBlitImage_EXT] = vn_dispatch_vkCmdBlitImage, - [VK_COMMAND_TYPE_vkCmdCopyBufferToImage_EXT] = vn_dispatch_vkCmdCopyBufferToImage, - [VK_COMMAND_TYPE_vkCmdCopyImageToBuffer_EXT] = vn_dispatch_vkCmdCopyImageToBuffer, - [VK_COMMAND_TYPE_vkCmdUpdateBuffer_EXT] = vn_dispatch_vkCmdUpdateBuffer, - [VK_COMMAND_TYPE_vkCmdFillBuffer_EXT] = vn_dispatch_vkCmdFillBuffer, - [VK_COMMAND_TYPE_vkCmdClearColorImage_EXT] = vn_dispatch_vkCmdClearColorImage, - [VK_COMMAND_TYPE_vkCmdClearDepthStencilImage_EXT] = vn_dispatch_vkCmdClearDepthStencilImage, - [VK_COMMAND_TYPE_vkCmdClearAttachments_EXT] = vn_dispatch_vkCmdClearAttachments, - [VK_COMMAND_TYPE_vkCmdResolveImage_EXT] = vn_dispatch_vkCmdResolveImage, - [VK_COMMAND_TYPE_vkCmdSetEvent_EXT] = vn_dispatch_vkCmdSetEvent, - [VK_COMMAND_TYPE_vkCmdResetEvent_EXT] = vn_dispatch_vkCmdResetEvent, - [VK_COMMAND_TYPE_vkCmdWaitEvents_EXT] = vn_dispatch_vkCmdWaitEvents, - [VK_COMMAND_TYPE_vkCmdPipelineBarrier_EXT] = vn_dispatch_vkCmdPipelineBarrier, - [VK_COMMAND_TYPE_vkCmdBeginQuery_EXT] = vn_dispatch_vkCmdBeginQuery, - [VK_COMMAND_TYPE_vkCmdEndQuery_EXT] = vn_dispatch_vkCmdEndQuery, - [VK_COMMAND_TYPE_vkCmdBeginConditionalRenderingEXT_EXT] = vn_dispatch_vkCmdBeginConditionalRenderingEXT, - [VK_COMMAND_TYPE_vkCmdEndConditionalRenderingEXT_EXT] = vn_dispatch_vkCmdEndConditionalRenderingEXT, - [VK_COMMAND_TYPE_vkCmdResetQueryPool_EXT] = vn_dispatch_vkCmdResetQueryPool, - [VK_COMMAND_TYPE_vkCmdWriteTimestamp_EXT] = vn_dispatch_vkCmdWriteTimestamp, - [VK_COMMAND_TYPE_vkCmdCopyQueryPoolResults_EXT] = vn_dispatch_vkCmdCopyQueryPoolResults, - [VK_COMMAND_TYPE_vkCmdPushConstants_EXT] = vn_dispatch_vkCmdPushConstants, - [VK_COMMAND_TYPE_vkCmdBeginRenderPass_EXT] = vn_dispatch_vkCmdBeginRenderPass, - [VK_COMMAND_TYPE_vkCmdNextSubpass_EXT] = vn_dispatch_vkCmdNextSubpass, - [VK_COMMAND_TYPE_vkCmdEndRenderPass_EXT] = vn_dispatch_vkCmdEndRenderPass, - [VK_COMMAND_TYPE_vkCmdExecuteCommands_EXT] = vn_dispatch_vkCmdExecuteCommands, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceFeatures2_EXT] = vn_dispatch_vkGetPhysicalDeviceFeatures2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceProperties2_EXT] = vn_dispatch_vkGetPhysicalDeviceProperties2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceFormatProperties2_EXT] = vn_dispatch_vkGetPhysicalDeviceFormatProperties2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceImageFormatProperties2_EXT] = vn_dispatch_vkGetPhysicalDeviceImageFormatProperties2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceQueueFamilyProperties2_EXT] = vn_dispatch_vkGetPhysicalDeviceQueueFamilyProperties2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceMemoryProperties2_EXT] = vn_dispatch_vkGetPhysicalDeviceMemoryProperties2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceSparseImageFormatProperties2_EXT] = vn_dispatch_vkGetPhysicalDeviceSparseImageFormatProperties2, - [VK_COMMAND_TYPE_vkCmdPushDescriptorSet_EXT] = vn_dispatch_vkCmdPushDescriptorSet, - [VK_COMMAND_TYPE_vkTrimCommandPool_EXT] = vn_dispatch_vkTrimCommandPool, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalBufferProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceExternalBufferProperties, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalSemaphoreProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceExternalSemaphoreProperties, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceExternalFenceProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceExternalFenceProperties, - [VK_COMMAND_TYPE_vkEnumeratePhysicalDeviceGroups_EXT] = vn_dispatch_vkEnumeratePhysicalDeviceGroups, - [VK_COMMAND_TYPE_vkGetDeviceGroupPeerMemoryFeatures_EXT] = vn_dispatch_vkGetDeviceGroupPeerMemoryFeatures, - [VK_COMMAND_TYPE_vkBindBufferMemory2_EXT] = vn_dispatch_vkBindBufferMemory2, - [VK_COMMAND_TYPE_vkBindImageMemory2_EXT] = vn_dispatch_vkBindImageMemory2, - [VK_COMMAND_TYPE_vkCmdSetDeviceMask_EXT] = vn_dispatch_vkCmdSetDeviceMask, - [VK_COMMAND_TYPE_vkCmdDispatchBase_EXT] = vn_dispatch_vkCmdDispatchBase, - [VK_COMMAND_TYPE_vkCreateDescriptorUpdateTemplate_EXT] = vn_dispatch_vkCreateDescriptorUpdateTemplate, - [VK_COMMAND_TYPE_vkDestroyDescriptorUpdateTemplate_EXT] = vn_dispatch_vkDestroyDescriptorUpdateTemplate, - [VK_COMMAND_TYPE_vkCmdSetSampleLocationsEXT_EXT] = vn_dispatch_vkCmdSetSampleLocationsEXT, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceMultisamplePropertiesEXT_EXT] = vn_dispatch_vkGetPhysicalDeviceMultisamplePropertiesEXT, - [VK_COMMAND_TYPE_vkGetBufferMemoryRequirements2_EXT] = vn_dispatch_vkGetBufferMemoryRequirements2, - [VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT] = vn_dispatch_vkGetImageMemoryRequirements2, - [VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT] = vn_dispatch_vkGetImageSparseMemoryRequirements2, - [VK_COMMAND_TYPE_vkGetDeviceBufferMemoryRequirements_EXT] = vn_dispatch_vkGetDeviceBufferMemoryRequirements, - [VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT] = vn_dispatch_vkGetDeviceImageMemoryRequirements, - [VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT] = vn_dispatch_vkGetDeviceImageSparseMemoryRequirements, - [VK_COMMAND_TYPE_vkCreateSamplerYcbcrConversion_EXT] = vn_dispatch_vkCreateSamplerYcbcrConversion, - [VK_COMMAND_TYPE_vkDestroySamplerYcbcrConversion_EXT] = vn_dispatch_vkDestroySamplerYcbcrConversion, - [VK_COMMAND_TYPE_vkGetDeviceQueue2_EXT] = vn_dispatch_vkGetDeviceQueue2, - [VK_COMMAND_TYPE_vkGetDescriptorSetLayoutSupport_EXT] = vn_dispatch_vkGetDescriptorSetLayoutSupport, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR_EXT] = vn_dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR, - [VK_COMMAND_TYPE_vkGetCalibratedTimestampsKHR_EXT] = vn_dispatch_vkGetCalibratedTimestampsKHR, - [VK_COMMAND_TYPE_vkCreateRenderPass2_EXT] = vn_dispatch_vkCreateRenderPass2, - [VK_COMMAND_TYPE_vkCmdBeginRenderPass2_EXT] = vn_dispatch_vkCmdBeginRenderPass2, - [VK_COMMAND_TYPE_vkCmdNextSubpass2_EXT] = vn_dispatch_vkCmdNextSubpass2, - [VK_COMMAND_TYPE_vkCmdEndRenderPass2_EXT] = vn_dispatch_vkCmdEndRenderPass2, - [VK_COMMAND_TYPE_vkGetSemaphoreCounterValue_EXT] = vn_dispatch_vkGetSemaphoreCounterValue, - [VK_COMMAND_TYPE_vkWaitSemaphores_EXT] = vn_dispatch_vkWaitSemaphores, - [VK_COMMAND_TYPE_vkSignalSemaphore_EXT] = vn_dispatch_vkSignalSemaphore, - [VK_COMMAND_TYPE_vkCmdDrawIndirectCount_EXT] = vn_dispatch_vkCmdDrawIndirectCount, - [VK_COMMAND_TYPE_vkCmdDrawIndexedIndirectCount_EXT] = vn_dispatch_vkCmdDrawIndexedIndirectCount, - [VK_COMMAND_TYPE_vkCmdBindTransformFeedbackBuffersEXT_EXT] = vn_dispatch_vkCmdBindTransformFeedbackBuffersEXT, - [VK_COMMAND_TYPE_vkCmdBeginTransformFeedbackEXT_EXT] = vn_dispatch_vkCmdBeginTransformFeedbackEXT, - [VK_COMMAND_TYPE_vkCmdEndTransformFeedbackEXT_EXT] = vn_dispatch_vkCmdEndTransformFeedbackEXT, - [VK_COMMAND_TYPE_vkCmdBeginQueryIndexedEXT_EXT] = vn_dispatch_vkCmdBeginQueryIndexedEXT, - [VK_COMMAND_TYPE_vkCmdEndQueryIndexedEXT_EXT] = vn_dispatch_vkCmdEndQueryIndexedEXT, - [VK_COMMAND_TYPE_vkCmdDrawIndirectByteCountEXT_EXT] = vn_dispatch_vkCmdDrawIndirectByteCountEXT, - [VK_COMMAND_TYPE_vkCmdDrawMeshTasksEXT_EXT] = vn_dispatch_vkCmdDrawMeshTasksEXT, - [VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectEXT_EXT] = vn_dispatch_vkCmdDrawMeshTasksIndirectEXT, - [VK_COMMAND_TYPE_vkCmdDrawMeshTasksIndirectCountEXT_EXT] = vn_dispatch_vkCmdDrawMeshTasksIndirectCountEXT, - [VK_COMMAND_TYPE_vkDestroyAccelerationStructureKHR_EXT] = vn_dispatch_vkDestroyAccelerationStructureKHR, - [VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureKHR_EXT] = vn_dispatch_vkCmdCopyAccelerationStructureKHR, - [VK_COMMAND_TYPE_vkCopyAccelerationStructureKHR_EXT] = vn_dispatch_vkCopyAccelerationStructureKHR, - [VK_COMMAND_TYPE_vkCmdCopyAccelerationStructureToMemoryKHR_EXT] = vn_dispatch_vkCmdCopyAccelerationStructureToMemoryKHR, - [VK_COMMAND_TYPE_vkCmdCopyMemoryToAccelerationStructureKHR_EXT] = vn_dispatch_vkCmdCopyMemoryToAccelerationStructureKHR, - [VK_COMMAND_TYPE_vkCmdWriteAccelerationStructuresPropertiesKHR_EXT] = vn_dispatch_vkCmdWriteAccelerationStructuresPropertiesKHR, - [VK_COMMAND_TYPE_vkWriteAccelerationStructuresPropertiesKHR_EXT] = vn_dispatch_vkWriteAccelerationStructuresPropertiesKHR, - [VK_COMMAND_TYPE_vkCmdTraceRaysKHR_EXT] = vn_dispatch_vkCmdTraceRaysKHR, - [VK_COMMAND_TYPE_vkGetRayTracingShaderGroupHandlesKHR_EXT] = vn_dispatch_vkGetRayTracingShaderGroupHandlesKHR, - [VK_COMMAND_TYPE_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_EXT] = vn_dispatch_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, - [VK_COMMAND_TYPE_vkCreateRayTracingPipelinesKHR_EXT] = vn_dispatch_vkCreateRayTracingPipelinesKHR, - [VK_COMMAND_TYPE_vkCmdTraceRaysIndirectKHR_EXT] = vn_dispatch_vkCmdTraceRaysIndirectKHR, - [VK_COMMAND_TYPE_vkCmdTraceRaysIndirect2KHR_EXT] = vn_dispatch_vkCmdTraceRaysIndirect2KHR, - [VK_COMMAND_TYPE_vkGetDeviceAccelerationStructureCompatibilityKHR_EXT] = vn_dispatch_vkGetDeviceAccelerationStructureCompatibilityKHR, - [VK_COMMAND_TYPE_vkGetRayTracingShaderGroupStackSizeKHR_EXT] = vn_dispatch_vkGetRayTracingShaderGroupStackSizeKHR, - [VK_COMMAND_TYPE_vkCmdSetRayTracingPipelineStackSizeKHR_EXT] = vn_dispatch_vkCmdSetRayTracingPipelineStackSizeKHR, - [VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT] = vn_dispatch_vkGetImageDrmFormatModifierPropertiesEXT, - [VK_COMMAND_TYPE_vkGetBufferOpaqueCaptureAddress_EXT] = vn_dispatch_vkGetBufferOpaqueCaptureAddress, - [VK_COMMAND_TYPE_vkGetBufferDeviceAddress_EXT] = vn_dispatch_vkGetBufferDeviceAddress, - [VK_COMMAND_TYPE_vkGetDeviceMemoryOpaqueCaptureAddress_EXT] = vn_dispatch_vkGetDeviceMemoryOpaqueCaptureAddress, - [VK_COMMAND_TYPE_vkCmdSetLineStipple_EXT] = vn_dispatch_vkCmdSetLineStipple, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceToolProperties_EXT] = vn_dispatch_vkGetPhysicalDeviceToolProperties, - [VK_COMMAND_TYPE_vkCreateAccelerationStructureKHR_EXT] = vn_dispatch_vkCreateAccelerationStructureKHR, - [VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresKHR_EXT] = vn_dispatch_vkCmdBuildAccelerationStructuresKHR, - [VK_COMMAND_TYPE_vkCmdBuildAccelerationStructuresIndirectKHR_EXT] = vn_dispatch_vkCmdBuildAccelerationStructuresIndirectKHR, - [VK_COMMAND_TYPE_vkGetAccelerationStructureDeviceAddressKHR_EXT] = vn_dispatch_vkGetAccelerationStructureDeviceAddressKHR, - [VK_COMMAND_TYPE_vkCreateDeferredOperationKHR_EXT] = vn_dispatch_vkCreateDeferredOperationKHR, - [VK_COMMAND_TYPE_vkDestroyDeferredOperationKHR_EXT] = vn_dispatch_vkDestroyDeferredOperationKHR, - [VK_COMMAND_TYPE_vkGetDeferredOperationMaxConcurrencyKHR_EXT] = vn_dispatch_vkGetDeferredOperationMaxConcurrencyKHR, - [VK_COMMAND_TYPE_vkGetDeferredOperationResultKHR_EXT] = vn_dispatch_vkGetDeferredOperationResultKHR, - [VK_COMMAND_TYPE_vkDeferredOperationJoinKHR_EXT] = vn_dispatch_vkDeferredOperationJoinKHR, - [VK_COMMAND_TYPE_vkCmdSetCullMode_EXT] = vn_dispatch_vkCmdSetCullMode, - [VK_COMMAND_TYPE_vkCmdSetFrontFace_EXT] = vn_dispatch_vkCmdSetFrontFace, - [VK_COMMAND_TYPE_vkCmdSetPrimitiveTopology_EXT] = vn_dispatch_vkCmdSetPrimitiveTopology, - [VK_COMMAND_TYPE_vkCmdSetViewportWithCount_EXT] = vn_dispatch_vkCmdSetViewportWithCount, - [VK_COMMAND_TYPE_vkCmdSetScissorWithCount_EXT] = vn_dispatch_vkCmdSetScissorWithCount, - [VK_COMMAND_TYPE_vkCmdBindIndexBuffer2_EXT] = vn_dispatch_vkCmdBindIndexBuffer2, - [VK_COMMAND_TYPE_vkCmdBindVertexBuffers2_EXT] = vn_dispatch_vkCmdBindVertexBuffers2, - [VK_COMMAND_TYPE_vkCmdSetDepthTestEnable_EXT] = vn_dispatch_vkCmdSetDepthTestEnable, - [VK_COMMAND_TYPE_vkCmdSetDepthWriteEnable_EXT] = vn_dispatch_vkCmdSetDepthWriteEnable, - [VK_COMMAND_TYPE_vkCmdSetDepthCompareOp_EXT] = vn_dispatch_vkCmdSetDepthCompareOp, - [VK_COMMAND_TYPE_vkCmdSetDepthBoundsTestEnable_EXT] = vn_dispatch_vkCmdSetDepthBoundsTestEnable, - [VK_COMMAND_TYPE_vkCmdSetStencilTestEnable_EXT] = vn_dispatch_vkCmdSetStencilTestEnable, - [VK_COMMAND_TYPE_vkCmdSetStencilOp_EXT] = vn_dispatch_vkCmdSetStencilOp, - [VK_COMMAND_TYPE_vkCmdSetPatchControlPointsEXT_EXT] = vn_dispatch_vkCmdSetPatchControlPointsEXT, - [VK_COMMAND_TYPE_vkCmdSetRasterizerDiscardEnable_EXT] = vn_dispatch_vkCmdSetRasterizerDiscardEnable, - [VK_COMMAND_TYPE_vkCmdSetDepthBiasEnable_EXT] = vn_dispatch_vkCmdSetDepthBiasEnable, - [VK_COMMAND_TYPE_vkCmdSetLogicOpEXT_EXT] = vn_dispatch_vkCmdSetLogicOpEXT, - [VK_COMMAND_TYPE_vkCmdSetPrimitiveRestartEnable_EXT] = vn_dispatch_vkCmdSetPrimitiveRestartEnable, - [VK_COMMAND_TYPE_vkCmdSetTessellationDomainOriginEXT_EXT] = vn_dispatch_vkCmdSetTessellationDomainOriginEXT, - [VK_COMMAND_TYPE_vkCmdSetDepthClampEnableEXT_EXT] = vn_dispatch_vkCmdSetDepthClampEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetPolygonModeEXT_EXT] = vn_dispatch_vkCmdSetPolygonModeEXT, - [VK_COMMAND_TYPE_vkCmdSetRasterizationSamplesEXT_EXT] = vn_dispatch_vkCmdSetRasterizationSamplesEXT, - [VK_COMMAND_TYPE_vkCmdSetSampleMaskEXT_EXT] = vn_dispatch_vkCmdSetSampleMaskEXT, - [VK_COMMAND_TYPE_vkCmdSetAlphaToCoverageEnableEXT_EXT] = vn_dispatch_vkCmdSetAlphaToCoverageEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetAlphaToOneEnableEXT_EXT] = vn_dispatch_vkCmdSetAlphaToOneEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetLogicOpEnableEXT_EXT] = vn_dispatch_vkCmdSetLogicOpEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetColorBlendEnableEXT_EXT] = vn_dispatch_vkCmdSetColorBlendEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetColorBlendEquationEXT_EXT] = vn_dispatch_vkCmdSetColorBlendEquationEXT, - [VK_COMMAND_TYPE_vkCmdSetColorWriteMaskEXT_EXT] = vn_dispatch_vkCmdSetColorWriteMaskEXT, - [VK_COMMAND_TYPE_vkCmdSetRasterizationStreamEXT_EXT] = vn_dispatch_vkCmdSetRasterizationStreamEXT, - [VK_COMMAND_TYPE_vkCmdSetConservativeRasterizationModeEXT_EXT] = vn_dispatch_vkCmdSetConservativeRasterizationModeEXT, - [VK_COMMAND_TYPE_vkCmdSetExtraPrimitiveOverestimationSizeEXT_EXT] = vn_dispatch_vkCmdSetExtraPrimitiveOverestimationSizeEXT, - [VK_COMMAND_TYPE_vkCmdSetDepthClipEnableEXT_EXT] = vn_dispatch_vkCmdSetDepthClipEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetSampleLocationsEnableEXT_EXT] = vn_dispatch_vkCmdSetSampleLocationsEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetColorBlendAdvancedEXT_EXT] = vn_dispatch_vkCmdSetColorBlendAdvancedEXT, - [VK_COMMAND_TYPE_vkCmdSetProvokingVertexModeEXT_EXT] = vn_dispatch_vkCmdSetProvokingVertexModeEXT, - [VK_COMMAND_TYPE_vkCmdSetLineRasterizationModeEXT_EXT] = vn_dispatch_vkCmdSetLineRasterizationModeEXT, - [VK_COMMAND_TYPE_vkCmdSetLineStippleEnableEXT_EXT] = vn_dispatch_vkCmdSetLineStippleEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetDepthClipNegativeOneToOneEXT_EXT] = vn_dispatch_vkCmdSetDepthClipNegativeOneToOneEXT, - [VK_COMMAND_TYPE_vkCreatePrivateDataSlot_EXT] = vn_dispatch_vkCreatePrivateDataSlot, - [VK_COMMAND_TYPE_vkDestroyPrivateDataSlot_EXT] = vn_dispatch_vkDestroyPrivateDataSlot, - [VK_COMMAND_TYPE_vkSetPrivateData_EXT] = vn_dispatch_vkSetPrivateData, - [VK_COMMAND_TYPE_vkGetPrivateData_EXT] = vn_dispatch_vkGetPrivateData, - [VK_COMMAND_TYPE_vkCmdCopyBuffer2_EXT] = vn_dispatch_vkCmdCopyBuffer2, - [VK_COMMAND_TYPE_vkCmdCopyImage2_EXT] = vn_dispatch_vkCmdCopyImage2, - [VK_COMMAND_TYPE_vkCmdBlitImage2_EXT] = vn_dispatch_vkCmdBlitImage2, - [VK_COMMAND_TYPE_vkCmdCopyBufferToImage2_EXT] = vn_dispatch_vkCmdCopyBufferToImage2, - [VK_COMMAND_TYPE_vkCmdCopyImageToBuffer2_EXT] = vn_dispatch_vkCmdCopyImageToBuffer2, - [VK_COMMAND_TYPE_vkCmdResolveImage2_EXT] = vn_dispatch_vkCmdResolveImage2, - [VK_COMMAND_TYPE_vkCmdSetFragmentShadingRateKHR_EXT] = vn_dispatch_vkCmdSetFragmentShadingRateKHR, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceFragmentShadingRatesKHR_EXT] = vn_dispatch_vkGetPhysicalDeviceFragmentShadingRatesKHR, - [VK_COMMAND_TYPE_vkGetAccelerationStructureBuildSizesKHR_EXT] = vn_dispatch_vkGetAccelerationStructureBuildSizesKHR, - [VK_COMMAND_TYPE_vkCmdSetVertexInputEXT_EXT] = vn_dispatch_vkCmdSetVertexInputEXT, - [VK_COMMAND_TYPE_vkCmdSetColorWriteEnableEXT_EXT] = vn_dispatch_vkCmdSetColorWriteEnableEXT, - [VK_COMMAND_TYPE_vkCmdSetEvent2_EXT] = vn_dispatch_vkCmdSetEvent2, - [VK_COMMAND_TYPE_vkCmdResetEvent2_EXT] = vn_dispatch_vkCmdResetEvent2, - [VK_COMMAND_TYPE_vkCmdWaitEvents2_EXT] = vn_dispatch_vkCmdWaitEvents2, - [VK_COMMAND_TYPE_vkCmdPipelineBarrier2_EXT] = vn_dispatch_vkCmdPipelineBarrier2, - [VK_COMMAND_TYPE_vkQueueSubmit2_EXT] = vn_dispatch_vkQueueSubmit2, - [VK_COMMAND_TYPE_vkCmdWriteTimestamp2_EXT] = vn_dispatch_vkCmdWriteTimestamp2, - [VK_COMMAND_TYPE_vkCopyImageToImage_EXT] = vn_dispatch_vkCopyImageToImage, - [VK_COMMAND_TYPE_vkTransitionImageLayout_EXT] = vn_dispatch_vkTransitionImageLayout, - [VK_COMMAND_TYPE_vkCmdBeginRendering_EXT] = vn_dispatch_vkCmdBeginRendering, - [VK_COMMAND_TYPE_vkCmdEndRendering_EXT] = vn_dispatch_vkCmdEndRendering, - [VK_COMMAND_TYPE_vkGetImageSubresourceLayout2_EXT] = vn_dispatch_vkGetImageSubresourceLayout2, - [VK_COMMAND_TYPE_vkCmdSetDepthBias2EXT_EXT] = vn_dispatch_vkCmdSetDepthBias2EXT, - [VK_COMMAND_TYPE_vkGetDeviceImageSubresourceLayout_EXT] = vn_dispatch_vkGetDeviceImageSubresourceLayout, - [VK_COMMAND_TYPE_vkUnmapMemory2_EXT] = vn_dispatch_vkUnmapMemory2, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR_EXT] = vn_dispatch_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR, - [VK_COMMAND_TYPE_vkCmdBindDescriptorSets2_EXT] = vn_dispatch_vkCmdBindDescriptorSets2, - [VK_COMMAND_TYPE_vkCmdPushConstants2_EXT] = vn_dispatch_vkCmdPushConstants2, - [VK_COMMAND_TYPE_vkCmdPushDescriptorSet2_EXT] = vn_dispatch_vkCmdPushDescriptorSet2, - [VK_COMMAND_TYPE_vkCmdSetRenderingAttachmentLocations_EXT] = vn_dispatch_vkCmdSetRenderingAttachmentLocations, - [VK_COMMAND_TYPE_vkCmdSetRenderingInputAttachmentIndices_EXT] = vn_dispatch_vkCmdSetRenderingInputAttachmentIndices, - [VK_COMMAND_TYPE_vkCmdSetDepthClampRangeEXT_EXT] = vn_dispatch_vkCmdSetDepthClampRangeEXT, - [VK_COMMAND_TYPE_vkCmdBindSamplerHeapEXT_EXT] = vn_dispatch_vkCmdBindSamplerHeapEXT, - [VK_COMMAND_TYPE_vkCmdBindResourceHeapEXT_EXT] = vn_dispatch_vkCmdBindResourceHeapEXT, - [VK_COMMAND_TYPE_vkCmdPushDataEXT_EXT] = vn_dispatch_vkCmdPushDataEXT, - [VK_COMMAND_TYPE_vkRegisterCustomBorderColorEXT_EXT] = vn_dispatch_vkRegisterCustomBorderColorEXT, - [VK_COMMAND_TYPE_vkUnregisterCustomBorderColorEXT_EXT] = vn_dispatch_vkUnregisterCustomBorderColorEXT, - [VK_COMMAND_TYPE_vkGetImageOpaqueCaptureDataEXT_EXT] = vn_dispatch_vkGetImageOpaqueCaptureDataEXT, - [VK_COMMAND_TYPE_vkGetPhysicalDeviceDescriptorSizeEXT_EXT] = vn_dispatch_vkGetPhysicalDeviceDescriptorSizeEXT, - [VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT] = vn_dispatch_vkSetReplyCommandStreamMESA, - [VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT] = vn_dispatch_vkSeekReplyCommandStreamMESA, - [VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT] = vn_dispatch_vkExecuteCommandStreamsMESA, - [VK_COMMAND_TYPE_vkCreateRingMESA_EXT] = vn_dispatch_vkCreateRingMESA, - [VK_COMMAND_TYPE_vkDestroyRingMESA_EXT] = vn_dispatch_vkDestroyRingMESA, - [VK_COMMAND_TYPE_vkNotifyRingMESA_EXT] = vn_dispatch_vkNotifyRingMESA, - [VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT] = vn_dispatch_vkWriteRingExtraMESA, - [VK_COMMAND_TYPE_vkGetMemoryResourcePropertiesMESA_EXT] = vn_dispatch_vkGetMemoryResourcePropertiesMESA, - [VK_COMMAND_TYPE_vkResetFenceResourceMESA_EXT] = vn_dispatch_vkResetFenceResourceMESA, - [VK_COMMAND_TYPE_vkWaitSemaphoreResourceMESA_EXT] = vn_dispatch_vkWaitSemaphoreResourceMESA, - [VK_COMMAND_TYPE_vkImportSemaphoreResourceMESA_EXT] = vn_dispatch_vkImportSemaphoreResourceMESA, - [VK_COMMAND_TYPE_vkSubmitVirtqueueSeqnoMESA_EXT] = vn_dispatch_vkSubmitVirtqueueSeqnoMESA, - [VK_COMMAND_TYPE_vkWaitVirtqueueSeqnoMESA_EXT] = vn_dispatch_vkWaitVirtqueueSeqnoMESA, - [VK_COMMAND_TYPE_vkWaitRingSeqnoMESA_EXT] = vn_dispatch_vkWaitRingSeqnoMESA, - [VK_COMMAND_TYPE_vkCopyImageToMemoryMESA_EXT] = vn_dispatch_vkCopyImageToMemoryMESA, - [VK_COMMAND_TYPE_vkCopyMemoryToImageMESA_EXT] = vn_dispatch_vkCopyMemoryToImageMESA, - [VK_COMMAND_TYPE_vkWriteSamplerDescriptorMESA_EXT] = vn_dispatch_vkWriteSamplerDescriptorMESA, - [VK_COMMAND_TYPE_vkWriteResourceDescriptorMESA_EXT] = vn_dispatch_vkWriteResourceDescriptorMESA, -}; - -static inline void vn_dispatch_command(struct vn_dispatch_context *ctx) -{ - VkCommandTypeEXT cmd_type; - VkCommandFlagsEXT cmd_flags; - - vn_decode_VkCommandTypeEXT(ctx->decoder, &cmd_type); - vn_decode_VkFlags(ctx->decoder, &cmd_flags); - - { - if (cmd_type < 346 && vn_dispatch_table[cmd_type]) - vn_dispatch_table[cmd_type](ctx, cmd_flags); - else - vn_cs_decoder_set_fatal(ctx->decoder); - } - - if (vn_cs_decoder_get_fatal(ctx->decoder)) - vn_dispatch_debug_log(ctx, "%s resulted in CS error", vn_dispatch_command_name(cmd_type)); -} - -#endif /* VN_PROTOCOL_RENDERER_DISPATCHES_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_event.h b/src/venus/venus-protocol/vn_protocol_renderer_event.h deleted file mode 100644 index c4278204..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_event.h +++ /dev/null @@ -1,380 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_EVENT_H -#define VN_PROTOCOL_RENDERER_EVENT_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkEventCreateInfo chain */ - -static inline void * -vn_decode_VkEventCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkEventCreateInfo_self_temp(struct vn_cs_decoder *dec, VkEventCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkEventCreateInfo_temp(struct vn_cs_decoder *dec, VkEventCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkEventCreateInfo_pnext_temp(dec); - vn_decode_VkEventCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkEventCreateInfo_handle_self(VkEventCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkEventCreateInfo_handle(VkEventCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EVENT_CREATE_INFO: - vn_replace_VkEventCreateInfo_handle_self((VkEventCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateEvent_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateEvent *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkEventCreateInfo_temp(dec, (VkEventCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pEvent = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pEvent)); - if (!args->pEvent) return; - vn_decode_VkEvent(dec, args->pEvent); - } else { - args->pEvent = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateEvent_args_handle(struct vn_command_vkCreateEvent *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkEventCreateInfo_handle((VkEventCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pEvent */ -} - -static inline void vn_encode_vkCreateEvent_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateEvent *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateEvent_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pEvent)) - vn_encode_VkEvent(enc, args->pEvent); -} - -static inline void vn_decode_vkDestroyEvent_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyEvent *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkEvent_lookup(dec, &args->event); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyEvent_args_handle(struct vn_command_vkDestroyEvent *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkEvent_handle(&args->event); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyEvent_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyEvent *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyEvent_EXT}); - - /* skip args->device */ - /* skip args->event */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetEventStatus_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetEventStatus *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkEvent_lookup(dec, &args->event); -} - -static inline void vn_replace_vkGetEventStatus_args_handle(struct vn_command_vkGetEventStatus *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkEvent_handle(&args->event); -} - -static inline void vn_encode_vkGetEventStatus_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetEventStatus *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetEventStatus_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->event */ -} - -static inline void vn_decode_vkSetEvent_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSetEvent *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkEvent_lookup(dec, &args->event); -} - -static inline void vn_replace_vkSetEvent_args_handle(struct vn_command_vkSetEvent *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkEvent_handle(&args->event); -} - -static inline void vn_encode_vkSetEvent_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSetEvent *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSetEvent_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->event */ -} - -static inline void vn_decode_vkResetEvent_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetEvent *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkEvent_lookup(dec, &args->event); -} - -static inline void vn_replace_vkResetEvent_args_handle(struct vn_command_vkResetEvent *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkEvent_handle(&args->event); -} - -static inline void vn_encode_vkResetEvent_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetEvent *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetEvent_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->event */ -} - -static inline void vn_dispatch_vkCreateEvent(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateEvent args; - - if (!ctx->dispatch_vkCreateEvent) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateEvent_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateEvent(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateEvent returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateEvent_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyEvent(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyEvent args; - - if (!ctx->dispatch_vkDestroyEvent) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyEvent_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyEvent(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyEvent_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetEventStatus(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetEventStatus args; - - if (!ctx->dispatch_vkGetEventStatus) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetEventStatus_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetEventStatus(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetEventStatus returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetEventStatus_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkSetEvent(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkSetEvent args; - - if (!ctx->dispatch_vkSetEvent) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkSetEvent_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkSetEvent(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkSetEvent returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkSetEvent_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetEvent(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetEvent args; - - if (!ctx->dispatch_vkResetEvent) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetEvent_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetEvent(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkResetEvent returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetEvent_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_EVENT_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_fence.h b/src/venus/venus-protocol/vn_protocol_renderer_fence.h deleted file mode 100644 index 1f83341c..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_fence.h +++ /dev/null @@ -1,555 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_FENCE_H -#define VN_PROTOCOL_RENDERER_FENCE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkGetFenceFdKHR - * vkImportFenceFdKHR - */ - -/* struct VkExportFenceCreateInfo chain */ - -static inline void * -vn_decode_VkExportFenceCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExportFenceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkExportFenceCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->handleTypes); -} - -static inline void -vn_decode_VkExportFenceCreateInfo_temp(struct vn_cs_decoder *dec, VkExportFenceCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExportFenceCreateInfo_pnext_temp(dec); - vn_decode_VkExportFenceCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkExportFenceCreateInfo_handle_self(VkExportFenceCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleTypes */ -} - -static inline void -vn_replace_VkExportFenceCreateInfo_handle(VkExportFenceCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: - vn_replace_VkExportFenceCreateInfo_handle_self((VkExportFenceCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkFenceCreateInfo chain */ - -static inline void * -vn_decode_VkFenceCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExportFenceCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkExportFenceCreateInfo *)pnext)->pNext = vn_decode_VkFenceCreateInfo_pnext_temp(dec); - vn_decode_VkExportFenceCreateInfo_self_temp(dec, (VkExportFenceCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkFenceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkFenceCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkFenceCreateInfo_temp(struct vn_cs_decoder *dec, VkFenceCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFenceCreateInfo_pnext_temp(dec); - vn_decode_VkFenceCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkFenceCreateInfo_handle_self(VkFenceCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkFenceCreateInfo_handle(VkFenceCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_FENCE_CREATE_INFO: - vn_replace_VkFenceCreateInfo_handle_self((VkFenceCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: - vn_replace_VkExportFenceCreateInfo_handle_self((VkExportFenceCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateFence_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateFence *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkFenceCreateInfo_temp(dec, (VkFenceCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pFence = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFence)); - if (!args->pFence) return; - vn_decode_VkFence(dec, args->pFence); - } else { - args->pFence = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateFence_args_handle(struct vn_command_vkCreateFence *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkFenceCreateInfo_handle((VkFenceCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pFence */ -} - -static inline void vn_encode_vkCreateFence_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateFence *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateFence_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pFence)) - vn_encode_VkFence(enc, args->pFence); -} - -static inline void vn_decode_vkDestroyFence_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyFence *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkFence_lookup(dec, &args->fence); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyFence_args_handle(struct vn_command_vkDestroyFence *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkFence_handle(&args->fence); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyFence_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyFence *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyFence_EXT}); - - /* skip args->device */ - /* skip args->fence */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkResetFences_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetFences *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->fenceCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->fenceCount); - args->pFences = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pFences), iter_count); - if (!args->pFences) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkFence_lookup(dec, &((VkFence *)args->pFences)[i]); - } else { - vn_decode_array_size(dec, args->fenceCount); - args->pFences = NULL; - } -} - -static inline void vn_replace_vkResetFences_args_handle(struct vn_command_vkResetFences *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->fenceCount */ - if (args->pFences) { - for (uint32_t i = 0; i < args->fenceCount; i++) - vn_replace_VkFence_handle(&((VkFence *)args->pFences)[i]); - } -} - -static inline void vn_encode_vkResetFences_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetFences *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetFences_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->fenceCount */ - /* skip args->pFences */ -} - -static inline void vn_decode_vkGetFenceStatus_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetFenceStatus *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkFence_lookup(dec, &args->fence); -} - -static inline void vn_replace_vkGetFenceStatus_args_handle(struct vn_command_vkGetFenceStatus *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkFence_handle(&args->fence); -} - -static inline void vn_encode_vkGetFenceStatus_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetFenceStatus *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetFenceStatus_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->fence */ -} - -static inline void vn_decode_vkWaitForFences_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWaitForFences *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->fenceCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->fenceCount); - args->pFences = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pFences), iter_count); - if (!args->pFences) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkFence_lookup(dec, &((VkFence *)args->pFences)[i]); - } else { - vn_decode_array_size(dec, args->fenceCount); - args->pFences = NULL; - } - vn_decode_VkBool32(dec, &args->waitAll); - vn_decode_uint64_t(dec, &args->timeout); -} - -static inline void vn_replace_vkWaitForFences_args_handle(struct vn_command_vkWaitForFences *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->fenceCount */ - if (args->pFences) { - for (uint32_t i = 0; i < args->fenceCount; i++) - vn_replace_VkFence_handle(&((VkFence *)args->pFences)[i]); - } - /* skip args->waitAll */ - /* skip args->timeout */ -} - -static inline void vn_encode_vkWaitForFences_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWaitForFences *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWaitForFences_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->fenceCount */ - /* skip args->pFences */ - /* skip args->waitAll */ - /* skip args->timeout */ -} - -static inline void vn_decode_vkResetFenceResourceMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetFenceResourceMESA *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkFence_lookup(dec, &args->fence); -} - -static inline void vn_replace_vkResetFenceResourceMESA_args_handle(struct vn_command_vkResetFenceResourceMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkFence_handle(&args->fence); -} - -static inline void vn_encode_vkResetFenceResourceMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetFenceResourceMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetFenceResourceMESA_EXT}); - - /* skip args->device */ - /* skip args->fence */ -} - -static inline void vn_dispatch_vkCreateFence(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateFence args; - - if (!ctx->dispatch_vkCreateFence) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateFence_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateFence(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateFence returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateFence_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyFence(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyFence args; - - if (!ctx->dispatch_vkDestroyFence) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyFence_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyFence(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyFence_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetFences(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetFences args; - - if (!ctx->dispatch_vkResetFences) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetFences_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetFences(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkResetFences returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetFences_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetFenceStatus(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetFenceStatus args; - - if (!ctx->dispatch_vkGetFenceStatus) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetFenceStatus_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetFenceStatus(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetFenceStatus returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetFenceStatus_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWaitForFences(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWaitForFences args; - - if (!ctx->dispatch_vkWaitForFences) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkWaitForFences_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWaitForFences(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkWaitForFences returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkWaitForFences_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetFenceResourceMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetFenceResourceMESA args; - - if (!ctx->dispatch_vkResetFenceResourceMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetFenceResourceMESA_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetFenceResourceMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetFenceResourceMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_FENCE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_framebuffer.h b/src/venus/venus-protocol/vn_protocol_renderer_framebuffer.h deleted file mode 100644 index f5c83d7d..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_framebuffer.h +++ /dev/null @@ -1,409 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_FRAMEBUFFER_H -#define VN_PROTOCOL_RENDERER_FRAMEBUFFER_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkFramebufferAttachmentImageInfo chain */ - -static inline void * -vn_decode_VkFramebufferAttachmentImageInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkFramebufferAttachmentImageInfo_self_temp(struct vn_cs_decoder *dec, VkFramebufferAttachmentImageInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkFlags(dec, &val->usage); - vn_decode_uint32_t(dec, &val->width); - vn_decode_uint32_t(dec, &val->height); - vn_decode_uint32_t(dec, &val->layerCount); - vn_decode_uint32_t(dec, &val->viewFormatCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->viewFormatCount); - val->pViewFormats = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pViewFormats), array_size); - if (!val->pViewFormats) return; - vn_decode_VkFormat_array(dec, (VkFormat *)val->pViewFormats, array_size); - } else { - vn_decode_array_size(dec, val->viewFormatCount); - val->pViewFormats = NULL; - } -} - -static inline void -vn_decode_VkFramebufferAttachmentImageInfo_temp(struct vn_cs_decoder *dec, VkFramebufferAttachmentImageInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFramebufferAttachmentImageInfo_pnext_temp(dec); - vn_decode_VkFramebufferAttachmentImageInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkFramebufferAttachmentImageInfo_handle_self(VkFramebufferAttachmentImageInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->usage */ - /* skip val->width */ - /* skip val->height */ - /* skip val->layerCount */ - /* skip val->viewFormatCount */ - /* skip val->pViewFormats */ -} - -static inline void -vn_replace_VkFramebufferAttachmentImageInfo_handle(VkFramebufferAttachmentImageInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO: - vn_replace_VkFramebufferAttachmentImageInfo_handle_self((VkFramebufferAttachmentImageInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkFramebufferAttachmentsCreateInfo chain */ - -static inline void * -vn_decode_VkFramebufferAttachmentsCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkFramebufferAttachmentsCreateInfo_self_temp(struct vn_cs_decoder *dec, VkFramebufferAttachmentsCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->attachmentImageInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentImageInfoCount); - val->pAttachmentImageInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachmentImageInfos), iter_count); - if (!val->pAttachmentImageInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkFramebufferAttachmentImageInfo_temp(dec, &((VkFramebufferAttachmentImageInfo *)val->pAttachmentImageInfos)[i]); - } else { - vn_decode_array_size(dec, val->attachmentImageInfoCount); - val->pAttachmentImageInfos = NULL; - } -} - -static inline void -vn_decode_VkFramebufferAttachmentsCreateInfo_temp(struct vn_cs_decoder *dec, VkFramebufferAttachmentsCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFramebufferAttachmentsCreateInfo_pnext_temp(dec); - vn_decode_VkFramebufferAttachmentsCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkFramebufferAttachmentsCreateInfo_handle_self(VkFramebufferAttachmentsCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachmentImageInfoCount */ - if (val->pAttachmentImageInfos) { - for (uint32_t i = 0; i < val->attachmentImageInfoCount; i++) - vn_replace_VkFramebufferAttachmentImageInfo_handle(&((VkFramebufferAttachmentImageInfo *)val->pAttachmentImageInfos)[i]); - } -} - -static inline void -vn_replace_VkFramebufferAttachmentsCreateInfo_handle(VkFramebufferAttachmentsCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: - vn_replace_VkFramebufferAttachmentsCreateInfo_handle_self((VkFramebufferAttachmentsCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkFramebufferCreateInfo chain */ - -static inline void * -vn_decode_VkFramebufferCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkFramebufferAttachmentsCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkFramebufferAttachmentsCreateInfo *)pnext)->pNext = vn_decode_VkFramebufferCreateInfo_pnext_temp(dec); - vn_decode_VkFramebufferAttachmentsCreateInfo_self_temp(dec, (VkFramebufferAttachmentsCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkFramebufferCreateInfo_self_temp(struct vn_cs_decoder *dec, VkFramebufferCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkRenderPass_lookup(dec, &val->renderPass); - vn_decode_uint32_t(dec, &val->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachments), iter_count); - if (!val->pAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageView_lookup(dec, &((VkImageView *)val->pAttachments)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pAttachments = NULL; - } - vn_decode_uint32_t(dec, &val->width); - vn_decode_uint32_t(dec, &val->height); - vn_decode_uint32_t(dec, &val->layers); -} - -static inline void -vn_decode_VkFramebufferCreateInfo_temp(struct vn_cs_decoder *dec, VkFramebufferCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFramebufferCreateInfo_pnext_temp(dec); - vn_decode_VkFramebufferCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkFramebufferCreateInfo_handle_self(VkFramebufferCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkRenderPass_handle(&val->renderPass); - /* skip val->attachmentCount */ - if (val->pAttachments) { - for (uint32_t i = 0; i < val->attachmentCount; i++) - vn_replace_VkImageView_handle(&((VkImageView *)val->pAttachments)[i]); - } - /* skip val->width */ - /* skip val->height */ - /* skip val->layers */ -} - -static inline void -vn_replace_VkFramebufferCreateInfo_handle(VkFramebufferCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO: - vn_replace_VkFramebufferCreateInfo_handle_self((VkFramebufferCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: - vn_replace_VkFramebufferAttachmentsCreateInfo_handle_self((VkFramebufferAttachmentsCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateFramebuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateFramebuffer *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkFramebufferCreateInfo_temp(dec, (VkFramebufferCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pFramebuffer = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pFramebuffer)); - if (!args->pFramebuffer) return; - vn_decode_VkFramebuffer(dec, args->pFramebuffer); - } else { - args->pFramebuffer = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateFramebuffer_args_handle(struct vn_command_vkCreateFramebuffer *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkFramebufferCreateInfo_handle((VkFramebufferCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pFramebuffer */ -} - -static inline void vn_encode_vkCreateFramebuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateFramebuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateFramebuffer_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pFramebuffer)) - vn_encode_VkFramebuffer(enc, args->pFramebuffer); -} - -static inline void vn_decode_vkDestroyFramebuffer_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyFramebuffer *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkFramebuffer_lookup(dec, &args->framebuffer); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyFramebuffer_args_handle(struct vn_command_vkDestroyFramebuffer *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkFramebuffer_handle(&args->framebuffer); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyFramebuffer_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyFramebuffer *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyFramebuffer_EXT}); - - /* skip args->device */ - /* skip args->framebuffer */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateFramebuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateFramebuffer args; - - if (!ctx->dispatch_vkCreateFramebuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateFramebuffer_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateFramebuffer(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateFramebuffer returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateFramebuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyFramebuffer(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyFramebuffer args; - - if (!ctx->dispatch_vkDestroyFramebuffer) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyFramebuffer_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyFramebuffer(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyFramebuffer_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_FRAMEBUFFER_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_handles.h b/src/venus/venus-protocol/vn_protocol_renderer_handles.h deleted file mode 100644 index 53aeb03e..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_handles.h +++ /dev/null @@ -1,999 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_HANDLES_H -#define VN_PROTOCOL_RENDERER_HANDLES_H - -#include "vn_protocol_renderer_types.h" - -/* VK_DEFINE_HANDLE(VkInstance) */ - -static inline void -vn_encode_VkInstance(struct vn_cs_encoder *enc, const VkInstance *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_INSTANCE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkInstance_temp(struct vn_cs_decoder *dec, VkInstance *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_INSTANCE)) { - *val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); - if (!*val) - return; - } - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_INSTANCE); -} - -static inline void -vn_decode_VkInstance_lookup(struct vn_cs_decoder *dec, VkInstance *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkInstance)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_INSTANCE); -} - -static inline void -vn_replace_VkInstance_handle(VkInstance *val) -{ - *val = (VkInstance)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_INSTANCE); -} - -/* VK_DEFINE_HANDLE(VkPhysicalDevice) */ - -static inline void -vn_encode_VkPhysicalDevice(struct vn_cs_encoder *enc, const VkPhysicalDevice *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PHYSICAL_DEVICE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkPhysicalDevice_temp(struct vn_cs_decoder *dec, VkPhysicalDevice *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_PHYSICAL_DEVICE)) { - *val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); - if (!*val) - return; - } - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PHYSICAL_DEVICE); -} - -static inline void -vn_decode_VkPhysicalDevice_lookup(struct vn_cs_decoder *dec, VkPhysicalDevice *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkPhysicalDevice)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_PHYSICAL_DEVICE); -} - -static inline void -vn_replace_VkPhysicalDevice_handle(VkPhysicalDevice *val) -{ - *val = (VkPhysicalDevice)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PHYSICAL_DEVICE); -} - -/* VK_DEFINE_HANDLE(VkDevice) */ - -static inline void -vn_encode_VkDevice(struct vn_cs_encoder *enc, const VkDevice *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEVICE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDevice_temp(struct vn_cs_decoder *dec, VkDevice *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_DEVICE)) { - *val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); - if (!*val) - return; - } - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEVICE); -} - -static inline void -vn_decode_VkDevice_lookup(struct vn_cs_decoder *dec, VkDevice *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDevice)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DEVICE); -} - -static inline void -vn_replace_VkDevice_handle(VkDevice *val) -{ - *val = (VkDevice)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DEVICE); -} - -/* VK_DEFINE_HANDLE(VkQueue) */ - -static inline void -vn_encode_VkQueue(struct vn_cs_encoder *enc, const VkQueue *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_QUEUE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkQueue_temp(struct vn_cs_decoder *dec, VkQueue *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_QUEUE)) { - *val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); - if (!*val) - return; - } - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_QUEUE); -} - -static inline void -vn_decode_VkQueue_lookup(struct vn_cs_decoder *dec, VkQueue *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkQueue)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_QUEUE); -} - -static inline void -vn_replace_VkQueue_handle(VkQueue *val) -{ - *val = (VkQueue)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_QUEUE); -} - -/* VK_DEFINE_HANDLE(VkCommandBuffer) */ - -static inline void -vn_encode_VkCommandBuffer(struct vn_cs_encoder *enc, const VkCommandBuffer *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_COMMAND_BUFFER); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkCommandBuffer_temp(struct vn_cs_decoder *dec, VkCommandBuffer *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - if (vn_cs_handle_indirect_id(VK_OBJECT_TYPE_COMMAND_BUFFER)) { - *val = vn_cs_decoder_alloc_temp(dec, sizeof(vn_object_id)); - if (!*val) - return; - } - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_COMMAND_BUFFER); -} - -static inline void -vn_decode_VkCommandBuffer_lookup(struct vn_cs_decoder *dec, VkCommandBuffer *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkCommandBuffer)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_COMMAND_BUFFER); -} - -static inline void -vn_replace_VkCommandBuffer_handle(VkCommandBuffer *val) -{ - *val = (VkCommandBuffer)(uintptr_t)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_COMMAND_BUFFER); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) */ - -static inline void -vn_encode_VkDeviceMemory(struct vn_cs_encoder *enc, const VkDeviceMemory *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEVICE_MEMORY); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDeviceMemory(struct vn_cs_decoder *dec, VkDeviceMemory *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEVICE_MEMORY); -} - -static inline void -vn_decode_VkDeviceMemory_lookup(struct vn_cs_decoder *dec, VkDeviceMemory *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDeviceMemory)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DEVICE_MEMORY); -} - -static inline void -vn_replace_VkDeviceMemory_handle(VkDeviceMemory *val) -{ - *val = (VkDeviceMemory)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DEVICE_MEMORY); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) */ - -static inline void -vn_encode_VkCommandPool(struct vn_cs_encoder *enc, const VkCommandPool *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_COMMAND_POOL); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkCommandPool(struct vn_cs_decoder *dec, VkCommandPool *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_COMMAND_POOL); -} - -static inline void -vn_decode_VkCommandPool_lookup(struct vn_cs_decoder *dec, VkCommandPool *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkCommandPool)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_COMMAND_POOL); -} - -static inline void -vn_replace_VkCommandPool_handle(VkCommandPool *val) -{ - *val = (VkCommandPool)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_COMMAND_POOL); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) */ - -static inline void -vn_encode_VkBuffer(struct vn_cs_encoder *enc, const VkBuffer *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_BUFFER); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkBuffer(struct vn_cs_decoder *dec, VkBuffer *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_BUFFER); -} - -static inline void -vn_decode_VkBuffer_lookup(struct vn_cs_decoder *dec, VkBuffer *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkBuffer)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_BUFFER); -} - -static inline void -vn_replace_VkBuffer_handle(VkBuffer *val) -{ - *val = (VkBuffer)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_BUFFER); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) */ - -static inline void -vn_encode_VkBufferView(struct vn_cs_encoder *enc, const VkBufferView *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_BUFFER_VIEW); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkBufferView(struct vn_cs_decoder *dec, VkBufferView *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_BUFFER_VIEW); -} - -static inline void -vn_decode_VkBufferView_lookup(struct vn_cs_decoder *dec, VkBufferView *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkBufferView)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_BUFFER_VIEW); -} - -static inline void -vn_replace_VkBufferView_handle(VkBufferView *val) -{ - *val = (VkBufferView)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_BUFFER_VIEW); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) */ - -static inline void -vn_encode_VkImage(struct vn_cs_encoder *enc, const VkImage *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_IMAGE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkImage(struct vn_cs_decoder *dec, VkImage *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_IMAGE); -} - -static inline void -vn_decode_VkImage_lookup(struct vn_cs_decoder *dec, VkImage *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkImage)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_IMAGE); -} - -static inline void -vn_replace_VkImage_handle(VkImage *val) -{ - *val = (VkImage)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_IMAGE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) */ - -static inline void -vn_encode_VkImageView(struct vn_cs_encoder *enc, const VkImageView *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_IMAGE_VIEW); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkImageView(struct vn_cs_decoder *dec, VkImageView *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_IMAGE_VIEW); -} - -static inline void -vn_decode_VkImageView_lookup(struct vn_cs_decoder *dec, VkImageView *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkImageView)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_IMAGE_VIEW); -} - -static inline void -vn_replace_VkImageView_handle(VkImageView *val) -{ - *val = (VkImageView)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_IMAGE_VIEW); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) */ - -static inline void -vn_encode_VkShaderModule(struct vn_cs_encoder *enc, const VkShaderModule *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SHADER_MODULE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkShaderModule(struct vn_cs_decoder *dec, VkShaderModule *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SHADER_MODULE); -} - -static inline void -vn_decode_VkShaderModule_lookup(struct vn_cs_decoder *dec, VkShaderModule *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkShaderModule)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_SHADER_MODULE); -} - -static inline void -vn_replace_VkShaderModule_handle(VkShaderModule *val) -{ - *val = (VkShaderModule)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SHADER_MODULE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) */ - -static inline void -vn_encode_VkPipeline(struct vn_cs_encoder *enc, const VkPipeline *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkPipeline(struct vn_cs_decoder *dec, VkPipeline *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE); -} - -static inline void -vn_decode_VkPipeline_lookup(struct vn_cs_decoder *dec, VkPipeline *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkPipeline)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_PIPELINE); -} - -static inline void -vn_replace_VkPipeline_handle(VkPipeline *val) -{ - *val = (VkPipeline)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PIPELINE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) */ - -static inline void -vn_encode_VkPipelineLayout(struct vn_cs_encoder *enc, const VkPipelineLayout *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE_LAYOUT); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkPipelineLayout(struct vn_cs_decoder *dec, VkPipelineLayout *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE_LAYOUT); -} - -static inline void -vn_decode_VkPipelineLayout_lookup(struct vn_cs_decoder *dec, VkPipelineLayout *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkPipelineLayout)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_PIPELINE_LAYOUT); -} - -static inline void -vn_replace_VkPipelineLayout_handle(VkPipelineLayout *val) -{ - *val = (VkPipelineLayout)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PIPELINE_LAYOUT); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) */ - -static inline void -vn_encode_VkSampler(struct vn_cs_encoder *enc, const VkSampler *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SAMPLER); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkSampler(struct vn_cs_decoder *dec, VkSampler *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SAMPLER); -} - -static inline void -vn_decode_VkSampler_lookup(struct vn_cs_decoder *dec, VkSampler *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkSampler)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_SAMPLER); -} - -static inline void -vn_replace_VkSampler_handle(VkSampler *val) -{ - *val = (VkSampler)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SAMPLER); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) */ - -static inline void -vn_encode_VkDescriptorSet(struct vn_cs_encoder *enc, const VkDescriptorSet *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDescriptorSet(struct vn_cs_decoder *dec, VkDescriptorSet *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_SET); -} - -static inline void -vn_decode_VkDescriptorSet_lookup(struct vn_cs_decoder *dec, VkDescriptorSet *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDescriptorSet)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DESCRIPTOR_SET); -} - -static inline void -vn_replace_VkDescriptorSet_handle(VkDescriptorSet *val) -{ - *val = (VkDescriptorSet)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) */ - -static inline void -vn_encode_VkDescriptorSetLayout(struct vn_cs_encoder *enc, const VkDescriptorSetLayout *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDescriptorSetLayout(struct vn_cs_decoder *dec, VkDescriptorSetLayout *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); -} - -static inline void -vn_decode_VkDescriptorSetLayout_lookup(struct vn_cs_decoder *dec, VkDescriptorSetLayout *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDescriptorSetLayout)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); -} - -static inline void -vn_replace_VkDescriptorSetLayout_handle(VkDescriptorSetLayout *val) -{ - *val = (VkDescriptorSetLayout)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) */ - -static inline void -vn_encode_VkDescriptorPool(struct vn_cs_encoder *enc, const VkDescriptorPool *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_POOL); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDescriptorPool(struct vn_cs_decoder *dec, VkDescriptorPool *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_POOL); -} - -static inline void -vn_decode_VkDescriptorPool_lookup(struct vn_cs_decoder *dec, VkDescriptorPool *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDescriptorPool)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DESCRIPTOR_POOL); -} - -static inline void -vn_replace_VkDescriptorPool_handle(VkDescriptorPool *val) -{ - *val = (VkDescriptorPool)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_POOL); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) */ - -static inline void -vn_encode_VkFence(struct vn_cs_encoder *enc, const VkFence *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_FENCE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkFence(struct vn_cs_decoder *dec, VkFence *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_FENCE); -} - -static inline void -vn_decode_VkFence_lookup(struct vn_cs_decoder *dec, VkFence *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkFence)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_FENCE); -} - -static inline void -vn_replace_VkFence_handle(VkFence *val) -{ - *val = (VkFence)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_FENCE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) */ - -static inline void -vn_encode_VkSemaphore(struct vn_cs_encoder *enc, const VkSemaphore *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SEMAPHORE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkSemaphore(struct vn_cs_decoder *dec, VkSemaphore *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SEMAPHORE); -} - -static inline void -vn_decode_VkSemaphore_lookup(struct vn_cs_decoder *dec, VkSemaphore *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkSemaphore)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_SEMAPHORE); -} - -static inline void -vn_replace_VkSemaphore_handle(VkSemaphore *val) -{ - *val = (VkSemaphore)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SEMAPHORE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) */ - -static inline void -vn_encode_VkEvent(struct vn_cs_encoder *enc, const VkEvent *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_EVENT); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkEvent(struct vn_cs_decoder *dec, VkEvent *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_EVENT); -} - -static inline void -vn_decode_VkEvent_lookup(struct vn_cs_decoder *dec, VkEvent *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkEvent)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_EVENT); -} - -static inline void -vn_replace_VkEvent_handle(VkEvent *val) -{ - *val = (VkEvent)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_EVENT); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) */ - -static inline void -vn_encode_VkQueryPool(struct vn_cs_encoder *enc, const VkQueryPool *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_QUERY_POOL); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkQueryPool(struct vn_cs_decoder *dec, VkQueryPool *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_QUERY_POOL); -} - -static inline void -vn_decode_VkQueryPool_lookup(struct vn_cs_decoder *dec, VkQueryPool *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkQueryPool)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_QUERY_POOL); -} - -static inline void -vn_replace_VkQueryPool_handle(VkQueryPool *val) -{ - *val = (VkQueryPool)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_QUERY_POOL); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) */ - -static inline void -vn_encode_VkFramebuffer(struct vn_cs_encoder *enc, const VkFramebuffer *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_FRAMEBUFFER); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkFramebuffer(struct vn_cs_decoder *dec, VkFramebuffer *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_FRAMEBUFFER); -} - -static inline void -vn_decode_VkFramebuffer_lookup(struct vn_cs_decoder *dec, VkFramebuffer *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkFramebuffer)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_FRAMEBUFFER); -} - -static inline void -vn_replace_VkFramebuffer_handle(VkFramebuffer *val) -{ - *val = (VkFramebuffer)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_FRAMEBUFFER); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) */ - -static inline void -vn_encode_VkRenderPass(struct vn_cs_encoder *enc, const VkRenderPass *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_RENDER_PASS); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkRenderPass(struct vn_cs_decoder *dec, VkRenderPass *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_RENDER_PASS); -} - -static inline void -vn_decode_VkRenderPass_lookup(struct vn_cs_decoder *dec, VkRenderPass *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkRenderPass)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_RENDER_PASS); -} - -static inline void -vn_replace_VkRenderPass_handle(VkRenderPass *val) -{ - *val = (VkRenderPass)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_RENDER_PASS); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) */ - -static inline void -vn_encode_VkPipelineCache(struct vn_cs_encoder *enc, const VkPipelineCache *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PIPELINE_CACHE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkPipelineCache(struct vn_cs_decoder *dec, VkPipelineCache *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PIPELINE_CACHE); -} - -static inline void -vn_decode_VkPipelineCache_lookup(struct vn_cs_decoder *dec, VkPipelineCache *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkPipelineCache)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_PIPELINE_CACHE); -} - -static inline void -vn_replace_VkPipelineCache_handle(VkPipelineCache *val) -{ - *val = (VkPipelineCache)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PIPELINE_CACHE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) */ - -static inline void -vn_encode_VkDescriptorUpdateTemplate(struct vn_cs_encoder *enc, const VkDescriptorUpdateTemplate *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDescriptorUpdateTemplate(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplate *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); -} - -static inline void -vn_decode_VkDescriptorUpdateTemplate_lookup(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplate *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDescriptorUpdateTemplate)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); -} - -static inline void -vn_replace_VkDescriptorUpdateTemplate_handle(VkDescriptorUpdateTemplate *val) -{ - *val = (VkDescriptorUpdateTemplate)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) */ - -static inline void -vn_encode_VkSamplerYcbcrConversion(struct vn_cs_encoder *enc, const VkSamplerYcbcrConversion *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkSamplerYcbcrConversion(struct vn_cs_decoder *dec, VkSamplerYcbcrConversion *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); -} - -static inline void -vn_decode_VkSamplerYcbcrConversion_lookup(struct vn_cs_decoder *dec, VkSamplerYcbcrConversion *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkSamplerYcbcrConversion)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); -} - -static inline void -vn_replace_VkSamplerYcbcrConversion_handle(VkSamplerYcbcrConversion *val) -{ - *val = (VkSamplerYcbcrConversion)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) */ - -static inline void -vn_encode_VkAccelerationStructureKHR(struct vn_cs_encoder *enc, const VkAccelerationStructureKHR *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkAccelerationStructureKHR(struct vn_cs_decoder *dec, VkAccelerationStructureKHR *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); -} - -static inline void -vn_decode_VkAccelerationStructureKHR_lookup(struct vn_cs_decoder *dec, VkAccelerationStructureKHR *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkAccelerationStructureKHR)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); -} - -static inline void -vn_replace_VkAccelerationStructureKHR_handle(VkAccelerationStructureKHR *val) -{ - *val = (VkAccelerationStructureKHR)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR) */ - -static inline void -vn_encode_VkDeferredOperationKHR(struct vn_cs_encoder *enc, const VkDeferredOperationKHR *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkDeferredOperationKHR(struct vn_cs_decoder *dec, VkDeferredOperationKHR *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR); -} - -static inline void -vn_decode_VkDeferredOperationKHR_lookup(struct vn_cs_decoder *dec, VkDeferredOperationKHR *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkDeferredOperationKHR)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR); -} - -static inline void -vn_replace_VkDeferredOperationKHR_handle(VkDeferredOperationKHR *val) -{ - *val = (VkDeferredOperationKHR)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlot) */ - -static inline void -vn_encode_VkPrivateDataSlot(struct vn_cs_encoder *enc, const VkPrivateDataSlot *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkPrivateDataSlot(struct vn_cs_decoder *dec, VkPrivateDataSlot *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); -} - -static inline void -vn_decode_VkPrivateDataSlot_lookup(struct vn_cs_decoder *dec, VkPrivateDataSlot *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkPrivateDataSlot)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); -} - -static inline void -vn_replace_VkPrivateDataSlot_handle(VkPrivateDataSlot *val) -{ - *val = (VkPrivateDataSlot)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT); -} - -/* VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorARM) */ - -static inline void -vn_encode_VkTensorARM(struct vn_cs_encoder *enc, const VkTensorARM *val) -{ - const uint64_t id = vn_cs_handle_load_id((const void **)val, VK_OBJECT_TYPE_TENSOR_ARM); - vn_encode_uint64_t(enc, &id); -} - -static inline void -vn_decode_VkTensorARM(struct vn_cs_decoder *dec, VkTensorARM *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - vn_cs_handle_store_id((void **)val, id, VK_OBJECT_TYPE_TENSOR_ARM); -} - -static inline void -vn_decode_VkTensorARM_lookup(struct vn_cs_decoder *dec, VkTensorARM *val) -{ - uint64_t id; - vn_decode_uint64_t(dec, &id); - *val = (VkTensorARM)(uintptr_t)vn_cs_decoder_lookup_object(dec, id, VK_OBJECT_TYPE_TENSOR_ARM); -} - -static inline void -vn_replace_VkTensorARM_handle(VkTensorARM *val) -{ - *val = (VkTensorARM)vn_cs_get_object_handle((const void **)val, VK_OBJECT_TYPE_TENSOR_ARM); -} - -#endif /* VN_PROTOCOL_RENDERER_HANDLES_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_host_copy.h b/src/venus/venus-protocol/vn_protocol_renderer_host_copy.h deleted file mode 100644 index a94c2cce..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_host_copy.h +++ /dev/null @@ -1,681 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_HOST_COPY_H -#define VN_PROTOCOL_RENDERER_HOST_COPY_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkCopyMemoryToImage - * vkCopyImageToMemory - */ - -/* struct VkCopyImageToImageInfo chain */ - -static inline void * -vn_decode_VkCopyImageToImageInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyImageToImageInfo_self_temp(struct vn_cs_decoder *dec, VkCopyImageToImageInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkImage_lookup(dec, &val->srcImage); - vn_decode_VkImageLayout(dec, &val->srcImageLayout); - vn_decode_VkImage_lookup(dec, &val->dstImage); - vn_decode_VkImageLayout(dec, &val->dstImageLayout); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkImageCopy2_temp(dec, &((VkImageCopy2 *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkCopyImageToImageInfo_temp(struct vn_cs_decoder *dec, VkCopyImageToImageInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyImageToImageInfo_pnext_temp(dec); - vn_decode_VkCopyImageToImageInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyImageToImageInfo_handle_self(VkCopyImageToImageInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkImage_handle(&val->srcImage); - /* skip val->srcImageLayout */ - vn_replace_VkImage_handle(&val->dstImage); - /* skip val->dstImageLayout */ - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkImageCopy2_handle(&((VkImageCopy2 *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkCopyImageToImageInfo_handle(VkCopyImageToImageInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO: - vn_replace_VkCopyImageToImageInfo_handle_self((VkCopyImageToImageInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkHostImageLayoutTransitionInfo chain */ - -static inline void * -vn_decode_VkHostImageLayoutTransitionInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkHostImageLayoutTransitionInfo_self_temp(struct vn_cs_decoder *dec, VkHostImageLayoutTransitionInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_VkImageLayout(dec, &val->oldLayout); - vn_decode_VkImageLayout(dec, &val->newLayout); - vn_decode_VkImageSubresourceRange_temp(dec, &val->subresourceRange); -} - -static inline void -vn_decode_VkHostImageLayoutTransitionInfo_temp(struct vn_cs_decoder *dec, VkHostImageLayoutTransitionInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkHostImageLayoutTransitionInfo_pnext_temp(dec); - vn_decode_VkHostImageLayoutTransitionInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkHostImageLayoutTransitionInfo_handle_self(VkHostImageLayoutTransitionInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->image); - /* skip val->oldLayout */ - /* skip val->newLayout */ - vn_replace_VkImageSubresourceRange_handle(&val->subresourceRange); -} - -static inline void -vn_replace_VkHostImageLayoutTransitionInfo_handle(VkHostImageLayoutTransitionInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO: - vn_replace_VkHostImageLayoutTransitionInfo_handle_self((VkHostImageLayoutTransitionInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyImageToMemoryInfoMESA chain */ - -static inline void * -vn_decode_VkCopyImageToMemoryInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyImageToMemoryInfoMESA_self_temp(struct vn_cs_decoder *dec, VkCopyImageToMemoryInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkImage_lookup(dec, &val->srcImage); - vn_decode_VkImageLayout(dec, &val->srcImageLayout); - vn_decode_uint32_t(dec, &val->memoryRowLength); - vn_decode_uint32_t(dec, &val->memoryImageHeight); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->imageSubresource); - vn_decode_VkOffset3D_temp(dec, &val->imageOffset); - vn_decode_VkExtent3D_temp(dec, &val->imageExtent); -} - -static inline void -vn_decode_VkCopyImageToMemoryInfoMESA_temp(struct vn_cs_decoder *dec, VkCopyImageToMemoryInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyImageToMemoryInfoMESA_pnext_temp(dec); - vn_decode_VkCopyImageToMemoryInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyImageToMemoryInfoMESA_handle_self(VkCopyImageToMemoryInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkImage_handle(&val->srcImage); - /* skip val->srcImageLayout */ - /* skip val->memoryRowLength */ - /* skip val->memoryImageHeight */ - vn_replace_VkImageSubresourceLayers_handle(&val->imageSubresource); - vn_replace_VkOffset3D_handle(&val->imageOffset); - vn_replace_VkExtent3D_handle(&val->imageExtent); -} - -static inline void -vn_replace_VkCopyImageToMemoryInfoMESA_handle(VkCopyImageToMemoryInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_MESA: - vn_replace_VkCopyImageToMemoryInfoMESA_handle_self((VkCopyImageToMemoryInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryToImageCopyMESA chain */ - -static inline void * -vn_decode_VkMemoryToImageCopyMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryToImageCopyMESA_self_temp(struct vn_cs_decoder *dec, VkMemoryToImageCopyMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_size_t(dec, &val->dataSize); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->dataSize); - val->pData = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!val->pData) return; - vn_decode_blob_array(dec, (void *)val->pData, array_size); - } else { - vn_decode_array_size(dec, val->dataSize); - val->pData = NULL; - } - vn_decode_uint32_t(dec, &val->memoryRowLength); - vn_decode_uint32_t(dec, &val->memoryImageHeight); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->imageSubresource); - vn_decode_VkOffset3D_temp(dec, &val->imageOffset); - vn_decode_VkExtent3D_temp(dec, &val->imageExtent); -} - -static inline void -vn_decode_VkMemoryToImageCopyMESA_temp(struct vn_cs_decoder *dec, VkMemoryToImageCopyMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryToImageCopyMESA_pnext_temp(dec); - vn_decode_VkMemoryToImageCopyMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryToImageCopyMESA_handle_self(VkMemoryToImageCopyMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->dataSize */ - /* skip val->pData */ - /* skip val->memoryRowLength */ - /* skip val->memoryImageHeight */ - vn_replace_VkImageSubresourceLayers_handle(&val->imageSubresource); - vn_replace_VkOffset3D_handle(&val->imageOffset); - vn_replace_VkExtent3D_handle(&val->imageExtent); -} - -static inline void -vn_replace_VkMemoryToImageCopyMESA_handle(VkMemoryToImageCopyMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_MESA: - vn_replace_VkMemoryToImageCopyMESA_handle_self((VkMemoryToImageCopyMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyMemoryToImageInfoMESA chain */ - -static inline void * -vn_decode_VkCopyMemoryToImageInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyMemoryToImageInfoMESA_self_temp(struct vn_cs_decoder *dec, VkCopyMemoryToImageInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkImage_lookup(dec, &val->dstImage); - vn_decode_VkImageLayout(dec, &val->dstImageLayout); - vn_decode_uint32_t(dec, &val->regionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->regionCount); - val->pRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pRegions), iter_count); - if (!val->pRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMemoryToImageCopyMESA_temp(dec, &((VkMemoryToImageCopyMESA *)val->pRegions)[i]); - } else { - vn_decode_array_size(dec, val->regionCount); - val->pRegions = NULL; - } -} - -static inline void -vn_decode_VkCopyMemoryToImageInfoMESA_temp(struct vn_cs_decoder *dec, VkCopyMemoryToImageInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyMemoryToImageInfoMESA_pnext_temp(dec); - vn_decode_VkCopyMemoryToImageInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyMemoryToImageInfoMESA_handle_self(VkCopyMemoryToImageInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkImage_handle(&val->dstImage); - /* skip val->dstImageLayout */ - /* skip val->regionCount */ - if (val->pRegions) { - for (uint32_t i = 0; i < val->regionCount; i++) - vn_replace_VkMemoryToImageCopyMESA_handle(&((VkMemoryToImageCopyMESA *)val->pRegions)[i]); - } -} - -static inline void -vn_replace_VkCopyMemoryToImageInfoMESA_handle(VkCopyMemoryToImageInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_MESA: - vn_replace_VkCopyMemoryToImageInfoMESA_handle_self((VkCopyMemoryToImageInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCopyImageToImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCopyImageToImage *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCopyImageToImageInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyImageToImageInfo)); - if (!args->pCopyImageToImageInfo) return; - vn_decode_VkCopyImageToImageInfo_temp(dec, (VkCopyImageToImageInfo *)args->pCopyImageToImageInfo); - } else { - args->pCopyImageToImageInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCopyImageToImage_args_handle(struct vn_command_vkCopyImageToImage *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCopyImageToImageInfo) - vn_replace_VkCopyImageToImageInfo_handle((VkCopyImageToImageInfo *)args->pCopyImageToImageInfo); -} - -static inline void vn_encode_vkCopyImageToImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCopyImageToImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCopyImageToImage_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCopyImageToImageInfo */ -} - -static inline void vn_decode_vkTransitionImageLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkTransitionImageLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->transitionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->transitionCount); - args->pTransitions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pTransitions), iter_count); - if (!args->pTransitions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkHostImageLayoutTransitionInfo_temp(dec, &((VkHostImageLayoutTransitionInfo *)args->pTransitions)[i]); - } else { - vn_decode_array_size(dec, args->transitionCount); - args->pTransitions = NULL; - } -} - -static inline void vn_replace_vkTransitionImageLayout_args_handle(struct vn_command_vkTransitionImageLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->transitionCount */ - if (args->pTransitions) { - for (uint32_t i = 0; i < args->transitionCount; i++) - vn_replace_VkHostImageLayoutTransitionInfo_handle(&((VkHostImageLayoutTransitionInfo *)args->pTransitions)[i]); - } -} - -static inline void vn_encode_vkTransitionImageLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkTransitionImageLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkTransitionImageLayout_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->transitionCount */ - /* skip args->pTransitions */ -} - -static inline void vn_decode_vkCopyImageToMemoryMESA_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkCopyImageToMemoryMESA *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkCopyImageToMemoryMESA_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCopyImageToMemoryInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyImageToMemoryInfo)); - if (!args->pCopyImageToMemoryInfo) return; - vn_decode_VkCopyImageToMemoryInfoMESA_temp(dec, (VkCopyImageToMemoryInfoMESA *)args->pCopyImageToMemoryInfo); - } else { - args->pCopyImageToMemoryInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } -} - -static inline void vn_replace_vkCopyImageToMemoryMESA_args_handle(struct vn_command_vkCopyImageToMemoryMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCopyImageToMemoryInfo) - vn_replace_VkCopyImageToMemoryInfoMESA_handle((VkCopyImageToMemoryInfoMESA *)args->pCopyImageToMemoryInfo); - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkCopyImageToMemoryMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCopyImageToMemoryMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCopyImageToMemoryMESA_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCopyImageToMemoryInfo */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkCopyMemoryToImageMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCopyMemoryToImageMESA *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCopyMemoryToImageInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCopyMemoryToImageInfo)); - if (!args->pCopyMemoryToImageInfo) return; - vn_decode_VkCopyMemoryToImageInfoMESA_temp(dec, (VkCopyMemoryToImageInfoMESA *)args->pCopyMemoryToImageInfo); - } else { - args->pCopyMemoryToImageInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCopyMemoryToImageMESA_args_handle(struct vn_command_vkCopyMemoryToImageMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCopyMemoryToImageInfo) - vn_replace_VkCopyMemoryToImageInfoMESA_handle((VkCopyMemoryToImageInfoMESA *)args->pCopyMemoryToImageInfo); -} - -static inline void vn_encode_vkCopyMemoryToImageMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCopyMemoryToImageMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCopyMemoryToImageMESA_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCopyMemoryToImageInfo */ -} - -static inline void vn_dispatch_vkCopyImageToImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCopyImageToImage args; - - if (!ctx->dispatch_vkCopyImageToImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCopyImageToImage_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCopyImageToImage(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCopyImageToImage returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCopyImageToImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkTransitionImageLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkTransitionImageLayout args; - - if (!ctx->dispatch_vkTransitionImageLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkTransitionImageLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkTransitionImageLayout(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkTransitionImageLayout returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkTransitionImageLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCopyImageToMemoryMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCopyImageToMemoryMESA args; - - if (!ctx->dispatch_vkCopyImageToMemoryMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkCopyImageToMemoryMESA_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCopyImageToMemoryMESA(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCopyImageToMemoryMESA returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkCopyImageToMemoryMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCopyMemoryToImageMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCopyMemoryToImageMESA args; - - if (!ctx->dispatch_vkCopyMemoryToImageMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCopyMemoryToImageMESA_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCopyMemoryToImageMESA(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCopyMemoryToImageMESA returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCopyMemoryToImageMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_HOST_COPY_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_image.h b/src/venus/venus-protocol/vn_protocol_renderer_image.h deleted file mode 100644 index ee7dafae..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_image.h +++ /dev/null @@ -1,2381 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_IMAGE_H -#define VN_PROTOCOL_RENDERER_IMAGE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkSparseImageMemoryRequirements */ - -static inline void -vn_encode_VkSparseImageMemoryRequirements(struct vn_cs_encoder *enc, const VkSparseImageMemoryRequirements *val) -{ - vn_encode_VkSparseImageFormatProperties(enc, &val->formatProperties); - vn_encode_uint32_t(enc, &val->imageMipTailFirstLod); - vn_encode_VkDeviceSize(enc, &val->imageMipTailSize); - vn_encode_VkDeviceSize(enc, &val->imageMipTailOffset); - vn_encode_VkDeviceSize(enc, &val->imageMipTailStride); -} - -static inline void -vn_decode_VkSparseImageMemoryRequirements_partial_temp(struct vn_cs_decoder *dec, VkSparseImageMemoryRequirements *val) -{ - vn_decode_VkSparseImageFormatProperties_partial_temp(dec, &val->formatProperties); - /* skip val->imageMipTailFirstLod */ - /* skip val->imageMipTailSize */ - /* skip val->imageMipTailOffset */ - /* skip val->imageMipTailStride */ -} - -/* struct VkExternalMemoryImageCreateInfo chain */ - -static inline void * -vn_decode_VkExternalMemoryImageCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExternalMemoryImageCreateInfo_self_temp(struct vn_cs_decoder *dec, VkExternalMemoryImageCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->handleTypes); -} - -static inline void -vn_decode_VkExternalMemoryImageCreateInfo_temp(struct vn_cs_decoder *dec, VkExternalMemoryImageCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExternalMemoryImageCreateInfo_pnext_temp(dec); - vn_decode_VkExternalMemoryImageCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkExternalMemoryImageCreateInfo_handle_self(VkExternalMemoryImageCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleTypes */ -} - -static inline void -vn_replace_VkExternalMemoryImageCreateInfo_handle(VkExternalMemoryImageCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: - vn_replace_VkExternalMemoryImageCreateInfo_handle_self((VkExternalMemoryImageCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageDrmFormatModifierListCreateInfoEXT chain */ - -static inline void * -vn_decode_VkImageDrmFormatModifierListCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageDrmFormatModifierListCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkImageDrmFormatModifierListCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->drmFormatModifierCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->drmFormatModifierCount); - val->pDrmFormatModifiers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDrmFormatModifiers), array_size); - if (!val->pDrmFormatModifiers) return; - vn_decode_uint64_t_array(dec, (uint64_t *)val->pDrmFormatModifiers, array_size); - } else { - vn_decode_array_size(dec, val->drmFormatModifierCount); - val->pDrmFormatModifiers = NULL; - } -} - -static inline void -vn_decode_VkImageDrmFormatModifierListCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkImageDrmFormatModifierListCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageDrmFormatModifierListCreateInfoEXT_pnext_temp(dec); - vn_decode_VkImageDrmFormatModifierListCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageDrmFormatModifierListCreateInfoEXT_handle_self(VkImageDrmFormatModifierListCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->drmFormatModifierCount */ - /* skip val->pDrmFormatModifiers */ -} - -static inline void -vn_replace_VkImageDrmFormatModifierListCreateInfoEXT_handle(VkImageDrmFormatModifierListCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: - vn_replace_VkImageDrmFormatModifierListCreateInfoEXT_handle_self((VkImageDrmFormatModifierListCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubresourceLayout */ - -static inline void -vn_encode_VkSubresourceLayout(struct vn_cs_encoder *enc, const VkSubresourceLayout *val) -{ - vn_encode_VkDeviceSize(enc, &val->offset); - vn_encode_VkDeviceSize(enc, &val->size); - vn_encode_VkDeviceSize(enc, &val->rowPitch); - vn_encode_VkDeviceSize(enc, &val->arrayPitch); - vn_encode_VkDeviceSize(enc, &val->depthPitch); -} - -static inline void -vn_decode_VkSubresourceLayout_temp(struct vn_cs_decoder *dec, VkSubresourceLayout *val) -{ - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->size); - vn_decode_VkDeviceSize(dec, &val->rowPitch); - vn_decode_VkDeviceSize(dec, &val->arrayPitch); - vn_decode_VkDeviceSize(dec, &val->depthPitch); -} - -static inline void -vn_decode_VkSubresourceLayout_partial_temp(struct vn_cs_decoder *dec, VkSubresourceLayout *val) -{ - /* skip val->offset */ - /* skip val->size */ - /* skip val->rowPitch */ - /* skip val->arrayPitch */ - /* skip val->depthPitch */ -} - -static inline void -vn_replace_VkSubresourceLayout_handle(VkSubresourceLayout *val) -{ - /* skip val->offset */ - /* skip val->size */ - /* skip val->rowPitch */ - /* skip val->arrayPitch */ - /* skip val->depthPitch */ -} - -/* struct VkImageDrmFormatModifierExplicitCreateInfoEXT chain */ - -static inline void * -vn_decode_VkImageDrmFormatModifierExplicitCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageDrmFormatModifierExplicitCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkImageDrmFormatModifierExplicitCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint64_t(dec, &val->drmFormatModifier); - vn_decode_uint32_t(dec, &val->drmFormatModifierPlaneCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->drmFormatModifierPlaneCount); - val->pPlaneLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPlaneLayouts), iter_count); - if (!val->pPlaneLayouts) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubresourceLayout_temp(dec, &((VkSubresourceLayout *)val->pPlaneLayouts)[i]); - } else { - vn_decode_array_size(dec, val->drmFormatModifierPlaneCount); - val->pPlaneLayouts = NULL; - } -} - -static inline void -vn_decode_VkImageDrmFormatModifierExplicitCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkImageDrmFormatModifierExplicitCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageDrmFormatModifierExplicitCreateInfoEXT_pnext_temp(dec); - vn_decode_VkImageDrmFormatModifierExplicitCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageDrmFormatModifierExplicitCreateInfoEXT_handle_self(VkImageDrmFormatModifierExplicitCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->drmFormatModifier */ - /* skip val->drmFormatModifierPlaneCount */ - if (val->pPlaneLayouts) { - for (uint32_t i = 0; i < val->drmFormatModifierPlaneCount; i++) - vn_replace_VkSubresourceLayout_handle(&((VkSubresourceLayout *)val->pPlaneLayouts)[i]); - } -} - -static inline void -vn_replace_VkImageDrmFormatModifierExplicitCreateInfoEXT_handle(VkImageDrmFormatModifierExplicitCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: - vn_replace_VkImageDrmFormatModifierExplicitCreateInfoEXT_handle_self((VkImageDrmFormatModifierExplicitCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkOpaqueCaptureDataCreateInfoEXT chain */ - -static inline void * -vn_decode_VkOpaqueCaptureDataCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkOpaqueCaptureDataCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkOpaqueCaptureDataCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pData = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pData)); - if (!val->pData) return; - vn_decode_VkHostAddressRangeConstEXT_temp(dec, (VkHostAddressRangeConstEXT *)val->pData); - } else { - val->pData = NULL; - } -} - -static inline void -vn_decode_VkOpaqueCaptureDataCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkOpaqueCaptureDataCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkOpaqueCaptureDataCreateInfoEXT_pnext_temp(dec); - vn_decode_VkOpaqueCaptureDataCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkOpaqueCaptureDataCreateInfoEXT_handle_self(VkOpaqueCaptureDataCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pData) - vn_replace_VkHostAddressRangeConstEXT_handle((VkHostAddressRangeConstEXT *)val->pData); -} - -static inline void -vn_replace_VkOpaqueCaptureDataCreateInfoEXT_handle(VkOpaqueCaptureDataCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT: - vn_replace_VkOpaqueCaptureDataCreateInfoEXT_handle_self((VkOpaqueCaptureDataCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageCreateInfo chain */ - -static inline void * -vn_decode_VkImageCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExternalMemoryImageCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkExternalMemoryImageCreateInfo *)pnext)->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkExternalMemoryImageCreateInfo_self_temp(dec, (VkExternalMemoryImageCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageFormatListCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkImageFormatListCreateInfo *)pnext)->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkImageFormatListCreateInfo_self_temp(dec, (VkImageFormatListCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageDrmFormatModifierListCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkImageDrmFormatModifierListCreateInfoEXT *)pnext)->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkImageDrmFormatModifierListCreateInfoEXT_self_temp(dec, (VkImageDrmFormatModifierListCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageDrmFormatModifierExplicitCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkImageDrmFormatModifierExplicitCreateInfoEXT *)pnext)->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkImageDrmFormatModifierExplicitCreateInfoEXT_self_temp(dec, (VkImageDrmFormatModifierExplicitCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageStencilUsageCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkImageStencilUsageCreateInfo *)pnext)->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkImageStencilUsageCreateInfo_self_temp(dec, (VkImageStencilUsageCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkOpaqueCaptureDataCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkOpaqueCaptureDataCreateInfoEXT *)pnext)->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkOpaqueCaptureDataCreateInfoEXT_self_temp(dec, (VkOpaqueCaptureDataCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkImageCreateInfo_self_temp(struct vn_cs_decoder *dec, VkImageCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkImageType(dec, &val->imageType); - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkExtent3D_temp(dec, &val->extent); - vn_decode_uint32_t(dec, &val->mipLevels); - vn_decode_uint32_t(dec, &val->arrayLayers); - vn_decode_VkSampleCountFlagBits(dec, &val->samples); - vn_decode_VkImageTiling(dec, &val->tiling); - vn_decode_VkFlags(dec, &val->usage); - vn_decode_VkSharingMode(dec, &val->sharingMode); - vn_decode_uint32_t(dec, &val->queueFamilyIndexCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->queueFamilyIndexCount); - val->pQueueFamilyIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pQueueFamilyIndices), array_size); - if (!val->pQueueFamilyIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pQueueFamilyIndices, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pQueueFamilyIndices = NULL; - } - vn_decode_VkImageLayout(dec, &val->initialLayout); -} - -static inline void -vn_decode_VkImageCreateInfo_temp(struct vn_cs_decoder *dec, VkImageCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageCreateInfo_pnext_temp(dec); - vn_decode_VkImageCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageCreateInfo_handle_self(VkImageCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->imageType */ - /* skip val->format */ - vn_replace_VkExtent3D_handle(&val->extent); - /* skip val->mipLevels */ - /* skip val->arrayLayers */ - /* skip val->samples */ - /* skip val->tiling */ - /* skip val->usage */ - /* skip val->sharingMode */ - /* skip val->queueFamilyIndexCount */ - /* skip val->pQueueFamilyIndices */ - /* skip val->initialLayout */ -} - -static inline void -vn_replace_VkImageCreateInfo_handle(VkImageCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO: - vn_replace_VkImageCreateInfo_handle_self((VkImageCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: - vn_replace_VkExternalMemoryImageCreateInfo_handle_self((VkExternalMemoryImageCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: - vn_replace_VkImageFormatListCreateInfo_handle_self((VkImageFormatListCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: - vn_replace_VkImageDrmFormatModifierListCreateInfoEXT_handle_self((VkImageDrmFormatModifierListCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: - vn_replace_VkImageDrmFormatModifierExplicitCreateInfoEXT_handle_self((VkImageDrmFormatModifierExplicitCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: - vn_replace_VkImageStencilUsageCreateInfo_handle_self((VkImageStencilUsageCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT: - vn_replace_VkOpaqueCaptureDataCreateInfoEXT_handle_self((VkOpaqueCaptureDataCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindImageMemoryDeviceGroupInfo chain */ - -static inline void * -vn_decode_VkBindImageMemoryDeviceGroupInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBindImageMemoryDeviceGroupInfo_self_temp(struct vn_cs_decoder *dec, VkBindImageMemoryDeviceGroupInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->deviceIndexCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->deviceIndexCount); - val->pDeviceIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDeviceIndices), array_size); - if (!val->pDeviceIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pDeviceIndices, array_size); - } else { - vn_decode_array_size(dec, val->deviceIndexCount); - val->pDeviceIndices = NULL; - } - vn_decode_uint32_t(dec, &val->splitInstanceBindRegionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->splitInstanceBindRegionCount); - val->pSplitInstanceBindRegions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSplitInstanceBindRegions), iter_count); - if (!val->pSplitInstanceBindRegions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRect2D_temp(dec, &((VkRect2D *)val->pSplitInstanceBindRegions)[i]); - } else { - vn_decode_array_size(dec, val->splitInstanceBindRegionCount); - val->pSplitInstanceBindRegions = NULL; - } -} - -static inline void -vn_decode_VkBindImageMemoryDeviceGroupInfo_temp(struct vn_cs_decoder *dec, VkBindImageMemoryDeviceGroupInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindImageMemoryDeviceGroupInfo_pnext_temp(dec); - vn_decode_VkBindImageMemoryDeviceGroupInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindImageMemoryDeviceGroupInfo_handle_self(VkBindImageMemoryDeviceGroupInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->deviceIndexCount */ - /* skip val->pDeviceIndices */ - /* skip val->splitInstanceBindRegionCount */ - if (val->pSplitInstanceBindRegions) { - for (uint32_t i = 0; i < val->splitInstanceBindRegionCount; i++) - vn_replace_VkRect2D_handle(&((VkRect2D *)val->pSplitInstanceBindRegions)[i]); - } -} - -static inline void -vn_replace_VkBindImageMemoryDeviceGroupInfo_handle(VkBindImageMemoryDeviceGroupInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: - vn_replace_VkBindImageMemoryDeviceGroupInfo_handle_self((VkBindImageMemoryDeviceGroupInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindImagePlaneMemoryInfo chain */ - -static inline void * -vn_decode_VkBindImagePlaneMemoryInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBindImagePlaneMemoryInfo_self_temp(struct vn_cs_decoder *dec, VkBindImagePlaneMemoryInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageAspectFlagBits(dec, &val->planeAspect); -} - -static inline void -vn_decode_VkBindImagePlaneMemoryInfo_temp(struct vn_cs_decoder *dec, VkBindImagePlaneMemoryInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindImagePlaneMemoryInfo_pnext_temp(dec); - vn_decode_VkBindImagePlaneMemoryInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindImagePlaneMemoryInfo_handle_self(VkBindImagePlaneMemoryInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->planeAspect */ -} - -static inline void -vn_replace_VkBindImagePlaneMemoryInfo_handle(VkBindImagePlaneMemoryInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: - vn_replace_VkBindImagePlaneMemoryInfo_handle_self((VkBindImagePlaneMemoryInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindImageMemoryInfo chain */ - -static inline void * -vn_decode_VkBindImageMemoryInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBindImageMemoryDeviceGroupInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBindImageMemoryDeviceGroupInfo *)pnext)->pNext = vn_decode_VkBindImageMemoryInfo_pnext_temp(dec); - vn_decode_VkBindImageMemoryDeviceGroupInfo_self_temp(dec, (VkBindImageMemoryDeviceGroupInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBindImagePlaneMemoryInfo)); - if (pnext) { - pnext->sType = stype; - ((VkBindImagePlaneMemoryInfo *)pnext)->pNext = vn_decode_VkBindImageMemoryInfo_pnext_temp(dec); - vn_decode_VkBindImagePlaneMemoryInfo_self_temp(dec, (VkBindImagePlaneMemoryInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkBindMemoryStatus)); - if (pnext) { - pnext->sType = stype; - ((VkBindMemoryStatus *)pnext)->pNext = vn_decode_VkBindImageMemoryInfo_pnext_temp(dec); - vn_decode_VkBindMemoryStatus_self_temp(dec, (VkBindMemoryStatus *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBindImageMemoryInfo_self_temp(struct vn_cs_decoder *dec, VkBindImageMemoryInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); - vn_decode_VkDeviceSize(dec, &val->memoryOffset); -} - -static inline void -vn_decode_VkBindImageMemoryInfo_temp(struct vn_cs_decoder *dec, VkBindImageMemoryInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindImageMemoryInfo_pnext_temp(dec); - vn_decode_VkBindImageMemoryInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindImageMemoryInfo_handle_self(VkBindImageMemoryInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->image); - vn_replace_VkDeviceMemory_handle(&val->memory); - /* skip val->memoryOffset */ -} - -static inline void -vn_replace_VkBindImageMemoryInfo_handle(VkBindImageMemoryInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO: - vn_replace_VkBindImageMemoryInfo_handle_self((VkBindImageMemoryInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: - vn_replace_VkBindImageMemoryDeviceGroupInfo_handle_self((VkBindImageMemoryDeviceGroupInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: - vn_replace_VkBindImagePlaneMemoryInfo_handle_self((VkBindImagePlaneMemoryInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: - vn_replace_VkBindMemoryStatus_handle_self((VkBindMemoryStatus *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImagePlaneMemoryRequirementsInfo chain */ - -static inline void * -vn_decode_VkImagePlaneMemoryRequirementsInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImagePlaneMemoryRequirementsInfo_self_temp(struct vn_cs_decoder *dec, VkImagePlaneMemoryRequirementsInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageAspectFlagBits(dec, &val->planeAspect); -} - -static inline void -vn_decode_VkImagePlaneMemoryRequirementsInfo_temp(struct vn_cs_decoder *dec, VkImagePlaneMemoryRequirementsInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImagePlaneMemoryRequirementsInfo_pnext_temp(dec); - vn_decode_VkImagePlaneMemoryRequirementsInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkImagePlaneMemoryRequirementsInfo_handle_self(VkImagePlaneMemoryRequirementsInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->planeAspect */ -} - -static inline void -vn_replace_VkImagePlaneMemoryRequirementsInfo_handle(VkImagePlaneMemoryRequirementsInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: - vn_replace_VkImagePlaneMemoryRequirementsInfo_handle_self((VkImagePlaneMemoryRequirementsInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageMemoryRequirementsInfo2 chain */ - -static inline void * -vn_decode_VkImageMemoryRequirementsInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImagePlaneMemoryRequirementsInfo)); - if (pnext) { - pnext->sType = stype; - ((VkImagePlaneMemoryRequirementsInfo *)pnext)->pNext = vn_decode_VkImageMemoryRequirementsInfo2_pnext_temp(dec); - vn_decode_VkImagePlaneMemoryRequirementsInfo_self_temp(dec, (VkImagePlaneMemoryRequirementsInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkImageMemoryRequirementsInfo2_self_temp(struct vn_cs_decoder *dec, VkImageMemoryRequirementsInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->image); -} - -static inline void -vn_decode_VkImageMemoryRequirementsInfo2_temp(struct vn_cs_decoder *dec, VkImageMemoryRequirementsInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageMemoryRequirementsInfo2_pnext_temp(dec); - vn_decode_VkImageMemoryRequirementsInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageMemoryRequirementsInfo2_handle_self(VkImageMemoryRequirementsInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->image); -} - -static inline void -vn_replace_VkImageMemoryRequirementsInfo2_handle(VkImageMemoryRequirementsInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2: - vn_replace_VkImageMemoryRequirementsInfo2_handle_self((VkImageMemoryRequirementsInfo2 *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: - vn_replace_VkImagePlaneMemoryRequirementsInfo_handle_self((VkImagePlaneMemoryRequirementsInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageSparseMemoryRequirementsInfo2 chain */ - -static inline void * -vn_decode_VkImageSparseMemoryRequirementsInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageSparseMemoryRequirementsInfo2_self_temp(struct vn_cs_decoder *dec, VkImageSparseMemoryRequirementsInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImage_lookup(dec, &val->image); -} - -static inline void -vn_decode_VkImageSparseMemoryRequirementsInfo2_temp(struct vn_cs_decoder *dec, VkImageSparseMemoryRequirementsInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageSparseMemoryRequirementsInfo2_pnext_temp(dec); - vn_decode_VkImageSparseMemoryRequirementsInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageSparseMemoryRequirementsInfo2_handle_self(VkImageSparseMemoryRequirementsInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImage_handle(&val->image); -} - -static inline void -vn_replace_VkImageSparseMemoryRequirementsInfo2_handle(VkImageSparseMemoryRequirementsInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2: - vn_replace_VkImageSparseMemoryRequirementsInfo2_handle_self((VkImageSparseMemoryRequirementsInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSparseImageMemoryRequirements2 chain */ - -static inline void -vn_encode_VkSparseImageMemoryRequirements2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkSparseImageMemoryRequirements2_self(struct vn_cs_encoder *enc, const VkSparseImageMemoryRequirements2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkSparseImageMemoryRequirements(enc, &val->memoryRequirements); -} - -static inline void -vn_encode_VkSparseImageMemoryRequirements2(struct vn_cs_encoder *enc, const VkSparseImageMemoryRequirements2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 }); - vn_encode_VkSparseImageMemoryRequirements2_pnext(enc, val->pNext); - vn_encode_VkSparseImageMemoryRequirements2_self(enc, val); -} - -static inline void * -vn_decode_VkSparseImageMemoryRequirements2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSparseImageMemoryRequirements2_self_partial_temp(struct vn_cs_decoder *dec, VkSparseImageMemoryRequirements2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSparseImageMemoryRequirements_partial_temp(dec, &val->memoryRequirements); -} - -static inline void -vn_decode_VkSparseImageMemoryRequirements2_partial_temp(struct vn_cs_decoder *dec, VkSparseImageMemoryRequirements2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSparseImageMemoryRequirements2_pnext_partial_temp(dec); - vn_decode_VkSparseImageMemoryRequirements2_self_partial_temp(dec, val); -} - -/* struct VkDeviceImageMemoryRequirements chain */ - -static inline void * -vn_decode_VkDeviceImageMemoryRequirements_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceImageMemoryRequirements_self_temp(struct vn_cs_decoder *dec, VkDeviceImageMemoryRequirements *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pCreateInfo)); - if (!val->pCreateInfo) return; - vn_decode_VkImageCreateInfo_temp(dec, (VkImageCreateInfo *)val->pCreateInfo); - } else { - val->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_VkImageAspectFlagBits(dec, &val->planeAspect); -} - -static inline void -vn_decode_VkDeviceImageMemoryRequirements_temp(struct vn_cs_decoder *dec, VkDeviceImageMemoryRequirements *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceImageMemoryRequirements_pnext_temp(dec); - vn_decode_VkDeviceImageMemoryRequirements_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceImageMemoryRequirements_handle_self(VkDeviceImageMemoryRequirements *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pCreateInfo) - vn_replace_VkImageCreateInfo_handle((VkImageCreateInfo *)val->pCreateInfo); - /* skip val->planeAspect */ -} - -static inline void -vn_replace_VkDeviceImageMemoryRequirements_handle(VkDeviceImageMemoryRequirements *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS: - vn_replace_VkDeviceImageMemoryRequirements_handle_self((VkDeviceImageMemoryRequirements *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageDrmFormatModifierPropertiesEXT chain */ - -static inline void -vn_encode_VkImageDrmFormatModifierPropertiesEXT_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkImageDrmFormatModifierPropertiesEXT_self(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_uint64_t(enc, &val->drmFormatModifier); -} - -static inline void -vn_encode_VkImageDrmFormatModifierPropertiesEXT(struct vn_cs_encoder *enc, const VkImageDrmFormatModifierPropertiesEXT *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT }); - vn_encode_VkImageDrmFormatModifierPropertiesEXT_pnext(enc, val->pNext); - vn_encode_VkImageDrmFormatModifierPropertiesEXT_self(enc, val); -} - -static inline void * -vn_decode_VkImageDrmFormatModifierPropertiesEXT_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageDrmFormatModifierPropertiesEXT_self_partial_temp(struct vn_cs_decoder *dec, VkImageDrmFormatModifierPropertiesEXT *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->drmFormatModifier */ -} - -static inline void -vn_decode_VkImageDrmFormatModifierPropertiesEXT_partial_temp(struct vn_cs_decoder *dec, VkImageDrmFormatModifierPropertiesEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageDrmFormatModifierPropertiesEXT_pnext_partial_temp(dec); - vn_decode_VkImageDrmFormatModifierPropertiesEXT_self_partial_temp(dec, val); -} - -/* struct VkImageSubresource2 chain */ - -static inline void * -vn_decode_VkImageSubresource2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageSubresource2_self_temp(struct vn_cs_decoder *dec, VkImageSubresource2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageSubresource_temp(dec, &val->imageSubresource); -} - -static inline void -vn_decode_VkImageSubresource2_temp(struct vn_cs_decoder *dec, VkImageSubresource2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageSubresource2_pnext_temp(dec); - vn_decode_VkImageSubresource2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageSubresource2_handle_self(VkImageSubresource2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImageSubresource_handle(&val->imageSubresource); -} - -static inline void -vn_replace_VkImageSubresource2_handle(VkImageSubresource2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2: - vn_replace_VkImageSubresource2_handle_self((VkImageSubresource2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubresourceHostMemcpySize chain */ - -static inline void -vn_encode_VkSubresourceHostMemcpySize_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkSubresourceHostMemcpySize_self(struct vn_cs_encoder *enc, const VkSubresourceHostMemcpySize *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkDeviceSize(enc, &val->size); -} - -static inline void -vn_encode_VkSubresourceHostMemcpySize(struct vn_cs_encoder *enc, const VkSubresourceHostMemcpySize *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE }); - vn_encode_VkSubresourceHostMemcpySize_pnext(enc, val->pNext); - vn_encode_VkSubresourceHostMemcpySize_self(enc, val); -} - -static inline void * -vn_decode_VkSubresourceHostMemcpySize_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSubresourceHostMemcpySize_self_partial_temp(struct vn_cs_decoder *dec, VkSubresourceHostMemcpySize *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->size */ -} - -static inline void -vn_decode_VkSubresourceHostMemcpySize_partial_temp(struct vn_cs_decoder *dec, VkSubresourceHostMemcpySize *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubresourceHostMemcpySize_pnext_partial_temp(dec); - vn_decode_VkSubresourceHostMemcpySize_self_partial_temp(dec, val); -} - -/* struct VkSubresourceLayout2 chain */ - -static inline void -vn_encode_VkSubresourceLayout2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkSubresourceLayout2_pnext(enc, ((const VkSubresourceHostMemcpySize *)pnext)->pNext); - vn_encode_VkSubresourceHostMemcpySize_self(enc, (const VkSubresourceHostMemcpySize *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkSubresourceLayout2_self(struct vn_cs_encoder *enc, const VkSubresourceLayout2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkSubresourceLayout(enc, &val->subresourceLayout); -} - -static inline void -vn_encode_VkSubresourceLayout2(struct vn_cs_encoder *enc, const VkSubresourceLayout2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2 }); - vn_encode_VkSubresourceLayout2_pnext(enc, val->pNext); - vn_encode_VkSubresourceLayout2_self(enc, val); -} - -static inline void * -vn_decode_VkSubresourceLayout2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSubresourceHostMemcpySize)); - if (pnext) { - pnext->sType = stype; - ((VkSubresourceHostMemcpySize *)pnext)->pNext = vn_decode_VkSubresourceLayout2_pnext_partial_temp(dec); - vn_decode_VkSubresourceHostMemcpySize_self_partial_temp(dec, (VkSubresourceHostMemcpySize *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkSubresourceLayout2_self_partial_temp(struct vn_cs_decoder *dec, VkSubresourceLayout2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSubresourceLayout_partial_temp(dec, &val->subresourceLayout); -} - -static inline void -vn_decode_VkSubresourceLayout2_partial_temp(struct vn_cs_decoder *dec, VkSubresourceLayout2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubresourceLayout2_pnext_partial_temp(dec); - vn_decode_VkSubresourceLayout2_self_partial_temp(dec, val); -} - -/* struct VkDeviceImageSubresourceInfo chain */ - -static inline void * -vn_decode_VkDeviceImageSubresourceInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceImageSubresourceInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceImageSubresourceInfo *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pCreateInfo)); - if (!val->pCreateInfo) return; - vn_decode_VkImageCreateInfo_temp(dec, (VkImageCreateInfo *)val->pCreateInfo); - } else { - val->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - val->pSubresource = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pSubresource)); - if (!val->pSubresource) return; - vn_decode_VkImageSubresource2_temp(dec, (VkImageSubresource2 *)val->pSubresource); - } else { - val->pSubresource = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void -vn_decode_VkDeviceImageSubresourceInfo_temp(struct vn_cs_decoder *dec, VkDeviceImageSubresourceInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceImageSubresourceInfo_pnext_temp(dec); - vn_decode_VkDeviceImageSubresourceInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceImageSubresourceInfo_handle_self(VkDeviceImageSubresourceInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pCreateInfo) - vn_replace_VkImageCreateInfo_handle((VkImageCreateInfo *)val->pCreateInfo); - if (val->pSubresource) - vn_replace_VkImageSubresource2_handle((VkImageSubresource2 *)val->pSubresource); -} - -static inline void -vn_replace_VkDeviceImageSubresourceInfo_handle(VkDeviceImageSubresourceInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO: - vn_replace_VkDeviceImageSubresourceInfo_handle_self((VkDeviceImageSubresourceInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkGetImageMemoryRequirements_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageMemoryRequirements *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - if (vn_decode_simple_pointer(dec)) { - args->pMemoryRequirements = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryRequirements)); - if (!args->pMemoryRequirements) return; - vn_decode_VkMemoryRequirements_partial_temp(dec, args->pMemoryRequirements); - } else { - args->pMemoryRequirements = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetImageMemoryRequirements_args_handle(struct vn_command_vkGetImageMemoryRequirements *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - /* skip args->pMemoryRequirements */ -} - -static inline void vn_encode_vkGetImageMemoryRequirements_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageMemoryRequirements *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageMemoryRequirements_EXT}); - - /* skip args->device */ - /* skip args->image */ - if (vn_encode_simple_pointer(enc, args->pMemoryRequirements)) - vn_encode_VkMemoryRequirements(enc, args->pMemoryRequirements); -} - -static inline void vn_decode_vkBindImageMemory_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkBindImageMemory *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - vn_decode_VkDeviceMemory_lookup(dec, &args->memory); - vn_decode_VkDeviceSize(dec, &args->memoryOffset); -} - -static inline void vn_replace_vkBindImageMemory_args_handle(struct vn_command_vkBindImageMemory *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - vn_replace_VkDeviceMemory_handle(&args->memory); - /* skip args->memoryOffset */ -} - -static inline void vn_encode_vkBindImageMemory_reply(struct vn_cs_encoder *enc, const struct vn_command_vkBindImageMemory *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkBindImageMemory_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->image */ - /* skip args->memory */ - /* skip args->memoryOffset */ -} - -static inline void vn_decode_vkGetImageSparseMemoryRequirements_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageSparseMemoryRequirements *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - if (vn_decode_simple_pointer(dec)) { - args->pSparseMemoryRequirementCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSparseMemoryRequirementCount)); - if (!args->pSparseMemoryRequirementCount) return; - vn_decode_uint32_t(dec, args->pSparseMemoryRequirementCount); - } else { - args->pSparseMemoryRequirementCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0)); - args->pSparseMemoryRequirements = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSparseMemoryRequirements), iter_count); - if (!args->pSparseMemoryRequirements) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageMemoryRequirements_partial_temp(dec, &args->pSparseMemoryRequirements[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pSparseMemoryRequirements = NULL; - } -} - -static inline void vn_replace_vkGetImageSparseMemoryRequirements_args_handle(struct vn_command_vkGetImageSparseMemoryRequirements *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - /* skip args->pSparseMemoryRequirementCount */ - /* skip args->pSparseMemoryRequirements */ -} - -static inline void vn_encode_vkGetImageSparseMemoryRequirements_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageSparseMemoryRequirements *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements_EXT}); - - /* skip args->device */ - /* skip args->image */ - if (vn_encode_simple_pointer(enc, args->pSparseMemoryRequirementCount)) - vn_encode_uint32_t(enc, args->pSparseMemoryRequirementCount); - if (args->pSparseMemoryRequirements) { - vn_encode_array_size(enc, (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0)); - for (uint32_t i = 0; i < (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0); i++) - vn_encode_VkSparseImageMemoryRequirements(enc, &args->pSparseMemoryRequirements[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkCreateImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateImage *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkImageCreateInfo_temp(dec, (VkImageCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pImage = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pImage)); - if (!args->pImage) return; - vn_decode_VkImage(dec, args->pImage); - } else { - args->pImage = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateImage_args_handle(struct vn_command_vkCreateImage *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkImageCreateInfo_handle((VkImageCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pImage */ -} - -static inline void vn_encode_vkCreateImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateImage_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pImage)) - vn_encode_VkImage(enc, args->pImage); -} - -static inline void vn_decode_vkDestroyImage_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyImage *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyImage_args_handle(struct vn_command_vkDestroyImage *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyImage_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyImage *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyImage_EXT}); - - /* skip args->device */ - /* skip args->image */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetImageSubresourceLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageSubresourceLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - if (vn_decode_simple_pointer(dec)) { - args->pSubresource = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSubresource)); - if (!args->pSubresource) return; - vn_decode_VkImageSubresource_temp(dec, (VkImageSubresource *)args->pSubresource); - } else { - args->pSubresource = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pLayout = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pLayout)); - if (!args->pLayout) return; - vn_decode_VkSubresourceLayout_partial_temp(dec, args->pLayout); - } else { - args->pLayout = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetImageSubresourceLayout_args_handle(struct vn_command_vkGetImageSubresourceLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - if (args->pSubresource) - vn_replace_VkImageSubresource_handle((VkImageSubresource *)args->pSubresource); - /* skip args->pLayout */ -} - -static inline void vn_encode_vkGetImageSubresourceLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageSubresourceLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageSubresourceLayout_EXT}); - - /* skip args->device */ - /* skip args->image */ - /* skip args->pSubresource */ - if (vn_encode_simple_pointer(enc, args->pLayout)) - vn_encode_VkSubresourceLayout(enc, args->pLayout); -} - -static inline void vn_decode_vkBindImageMemory2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkBindImageMemory2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_uint32_t(dec, &args->bindInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bindInfoCount); - args->pBindInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBindInfos), iter_count); - if (!args->pBindInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBindImageMemoryInfo_temp(dec, &((VkBindImageMemoryInfo *)args->pBindInfos)[i]); - } else { - vn_decode_array_size(dec, args->bindInfoCount); - args->pBindInfos = NULL; - } -} - -static inline void vn_replace_vkBindImageMemory2_args_handle(struct vn_command_vkBindImageMemory2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->bindInfoCount */ - if (args->pBindInfos) { - for (uint32_t i = 0; i < args->bindInfoCount; i++) - vn_replace_VkBindImageMemoryInfo_handle(&((VkBindImageMemoryInfo *)args->pBindInfos)[i]); - } -} - -static inline void vn_encode_vkBindImageMemory2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkBindImageMemory2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkBindImageMemory2_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->bindInfoCount */ - /* skip args->pBindInfos */ -} - -static inline void vn_decode_vkGetImageMemoryRequirements2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageMemoryRequirements2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkImageMemoryRequirementsInfo2_temp(dec, (VkImageMemoryRequirementsInfo2 *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pMemoryRequirements = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryRequirements)); - if (!args->pMemoryRequirements) return; - vn_decode_VkMemoryRequirements2_partial_temp(dec, args->pMemoryRequirements); - } else { - args->pMemoryRequirements = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetImageMemoryRequirements2_args_handle(struct vn_command_vkGetImageMemoryRequirements2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkImageMemoryRequirementsInfo2_handle((VkImageMemoryRequirementsInfo2 *)args->pInfo); - /* skip args->pMemoryRequirements */ -} - -static inline void vn_encode_vkGetImageMemoryRequirements2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageMemoryRequirements2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageMemoryRequirements2_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pMemoryRequirements)) - vn_encode_VkMemoryRequirements2(enc, args->pMemoryRequirements); -} - -static inline void vn_decode_vkGetImageSparseMemoryRequirements2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageSparseMemoryRequirements2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkImageSparseMemoryRequirementsInfo2_temp(dec, (VkImageSparseMemoryRequirementsInfo2 *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pSparseMemoryRequirementCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSparseMemoryRequirementCount)); - if (!args->pSparseMemoryRequirementCount) return; - vn_decode_uint32_t(dec, args->pSparseMemoryRequirementCount); - } else { - args->pSparseMemoryRequirementCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0)); - args->pSparseMemoryRequirements = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSparseMemoryRequirements), iter_count); - if (!args->pSparseMemoryRequirements) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageMemoryRequirements2_partial_temp(dec, &args->pSparseMemoryRequirements[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pSparseMemoryRequirements = NULL; - } -} - -static inline void vn_replace_vkGetImageSparseMemoryRequirements2_args_handle(struct vn_command_vkGetImageSparseMemoryRequirements2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkImageSparseMemoryRequirementsInfo2_handle((VkImageSparseMemoryRequirementsInfo2 *)args->pInfo); - /* skip args->pSparseMemoryRequirementCount */ - /* skip args->pSparseMemoryRequirements */ -} - -static inline void vn_encode_vkGetImageSparseMemoryRequirements2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageSparseMemoryRequirements2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageSparseMemoryRequirements2_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pSparseMemoryRequirementCount)) - vn_encode_uint32_t(enc, args->pSparseMemoryRequirementCount); - if (args->pSparseMemoryRequirements) { - vn_encode_array_size(enc, (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0)); - for (uint32_t i = 0; i < (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0); i++) - vn_encode_VkSparseImageMemoryRequirements2(enc, &args->pSparseMemoryRequirements[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetDeviceImageMemoryRequirements_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceImageMemoryRequirements *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkDeviceImageMemoryRequirements_temp(dec, (VkDeviceImageMemoryRequirements *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pMemoryRequirements = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pMemoryRequirements)); - if (!args->pMemoryRequirements) return; - vn_decode_VkMemoryRequirements2_partial_temp(dec, args->pMemoryRequirements); - } else { - args->pMemoryRequirements = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceImageMemoryRequirements_args_handle(struct vn_command_vkGetDeviceImageMemoryRequirements *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkDeviceImageMemoryRequirements_handle((VkDeviceImageMemoryRequirements *)args->pInfo); - /* skip args->pMemoryRequirements */ -} - -static inline void vn_encode_vkGetDeviceImageMemoryRequirements_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceImageMemoryRequirements *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceImageMemoryRequirements_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pMemoryRequirements)) - vn_encode_VkMemoryRequirements2(enc, args->pMemoryRequirements); -} - -static inline void vn_decode_vkGetDeviceImageSparseMemoryRequirements_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceImageSparseMemoryRequirements *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkDeviceImageMemoryRequirements_temp(dec, (VkDeviceImageMemoryRequirements *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pSparseMemoryRequirementCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSparseMemoryRequirementCount)); - if (!args->pSparseMemoryRequirementCount) return; - vn_decode_uint32_t(dec, args->pSparseMemoryRequirementCount); - } else { - args->pSparseMemoryRequirementCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0)); - args->pSparseMemoryRequirements = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSparseMemoryRequirements), iter_count); - if (!args->pSparseMemoryRequirements) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageMemoryRequirements2_partial_temp(dec, &args->pSparseMemoryRequirements[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pSparseMemoryRequirements = NULL; - } -} - -static inline void vn_replace_vkGetDeviceImageSparseMemoryRequirements_args_handle(struct vn_command_vkGetDeviceImageSparseMemoryRequirements *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkDeviceImageMemoryRequirements_handle((VkDeviceImageMemoryRequirements *)args->pInfo); - /* skip args->pSparseMemoryRequirementCount */ - /* skip args->pSparseMemoryRequirements */ -} - -static inline void vn_encode_vkGetDeviceImageSparseMemoryRequirements_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceImageSparseMemoryRequirements *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceImageSparseMemoryRequirements_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pSparseMemoryRequirementCount)) - vn_encode_uint32_t(enc, args->pSparseMemoryRequirementCount); - if (args->pSparseMemoryRequirements) { - vn_encode_array_size(enc, (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0)); - for (uint32_t i = 0; i < (args->pSparseMemoryRequirementCount ? *args->pSparseMemoryRequirementCount : 0); i++) - vn_encode_VkSparseImageMemoryRequirements2(enc, &args->pSparseMemoryRequirements[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetImageDrmFormatModifierPropertiesEXT_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageDrmFormatModifierPropertiesEXT *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - if (vn_decode_simple_pointer(dec)) { - args->pProperties = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pProperties)); - if (!args->pProperties) return; - vn_decode_VkImageDrmFormatModifierPropertiesEXT_partial_temp(dec, args->pProperties); - } else { - args->pProperties = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetImageDrmFormatModifierPropertiesEXT_args_handle(struct vn_command_vkGetImageDrmFormatModifierPropertiesEXT *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - /* skip args->pProperties */ -} - -static inline void vn_encode_vkGetImageDrmFormatModifierPropertiesEXT_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageDrmFormatModifierPropertiesEXT *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageDrmFormatModifierPropertiesEXT_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->image */ - if (vn_encode_simple_pointer(enc, args->pProperties)) - vn_encode_VkImageDrmFormatModifierPropertiesEXT(enc, args->pProperties); -} - -static inline void vn_decode_vkGetImageSubresourceLayout2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetImageSubresourceLayout2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImage_lookup(dec, &args->image); - if (vn_decode_simple_pointer(dec)) { - args->pSubresource = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSubresource)); - if (!args->pSubresource) return; - vn_decode_VkImageSubresource2_temp(dec, (VkImageSubresource2 *)args->pSubresource); - } else { - args->pSubresource = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pLayout = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pLayout)); - if (!args->pLayout) return; - vn_decode_VkSubresourceLayout2_partial_temp(dec, args->pLayout); - } else { - args->pLayout = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetImageSubresourceLayout2_args_handle(struct vn_command_vkGetImageSubresourceLayout2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImage_handle(&args->image); - if (args->pSubresource) - vn_replace_VkImageSubresource2_handle((VkImageSubresource2 *)args->pSubresource); - /* skip args->pLayout */ -} - -static inline void vn_encode_vkGetImageSubresourceLayout2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetImageSubresourceLayout2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetImageSubresourceLayout2_EXT}); - - /* skip args->device */ - /* skip args->image */ - /* skip args->pSubresource */ - if (vn_encode_simple_pointer(enc, args->pLayout)) - vn_encode_VkSubresourceLayout2(enc, args->pLayout); -} - -static inline void vn_decode_vkGetDeviceImageSubresourceLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeviceImageSubresourceLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInfo)); - if (!args->pInfo) return; - vn_decode_VkDeviceImageSubresourceInfo_temp(dec, (VkDeviceImageSubresourceInfo *)args->pInfo); - } else { - args->pInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pLayout = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pLayout)); - if (!args->pLayout) return; - vn_decode_VkSubresourceLayout2_partial_temp(dec, args->pLayout); - } else { - args->pLayout = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetDeviceImageSubresourceLayout_args_handle(struct vn_command_vkGetDeviceImageSubresourceLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pInfo) - vn_replace_VkDeviceImageSubresourceInfo_handle((VkDeviceImageSubresourceInfo *)args->pInfo); - /* skip args->pLayout */ -} - -static inline void vn_encode_vkGetDeviceImageSubresourceLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeviceImageSubresourceLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeviceImageSubresourceLayout_EXT}); - - /* skip args->device */ - /* skip args->pInfo */ - if (vn_encode_simple_pointer(enc, args->pLayout)) - vn_encode_VkSubresourceLayout2(enc, args->pLayout); -} - -static inline void vn_dispatch_vkGetImageMemoryRequirements(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageMemoryRequirements args; - - if (!ctx->dispatch_vkGetImageMemoryRequirements) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageMemoryRequirements_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageMemoryRequirements(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageMemoryRequirements_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkBindImageMemory(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkBindImageMemory args; - - if (!ctx->dispatch_vkBindImageMemory) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkBindImageMemory_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkBindImageMemory(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkBindImageMemory returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkBindImageMemory_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageSparseMemoryRequirements(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageSparseMemoryRequirements args; - - if (!ctx->dispatch_vkGetImageSparseMemoryRequirements) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageSparseMemoryRequirements_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageSparseMemoryRequirements(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageSparseMemoryRequirements_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateImage args; - - if (!ctx->dispatch_vkCreateImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateImage_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateImage(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateImage returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyImage(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyImage args; - - if (!ctx->dispatch_vkDestroyImage) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyImage_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyImage(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyImage_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageSubresourceLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageSubresourceLayout args; - - if (!ctx->dispatch_vkGetImageSubresourceLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageSubresourceLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageSubresourceLayout(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageSubresourceLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkBindImageMemory2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkBindImageMemory2 args; - - if (!ctx->dispatch_vkBindImageMemory2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkBindImageMemory2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkBindImageMemory2(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkBindImageMemory2 returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkBindImageMemory2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageMemoryRequirements2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageMemoryRequirements2 args; - - if (!ctx->dispatch_vkGetImageMemoryRequirements2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageMemoryRequirements2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageMemoryRequirements2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageMemoryRequirements2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageSparseMemoryRequirements2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageSparseMemoryRequirements2 args; - - if (!ctx->dispatch_vkGetImageSparseMemoryRequirements2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageSparseMemoryRequirements2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageSparseMemoryRequirements2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageSparseMemoryRequirements2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceImageMemoryRequirements(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceImageMemoryRequirements args; - - if (!ctx->dispatch_vkGetDeviceImageMemoryRequirements) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceImageMemoryRequirements_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceImageMemoryRequirements(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceImageMemoryRequirements_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceImageSparseMemoryRequirements(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceImageSparseMemoryRequirements args; - - if (!ctx->dispatch_vkGetDeviceImageSparseMemoryRequirements) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceImageSparseMemoryRequirements_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceImageSparseMemoryRequirements(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceImageSparseMemoryRequirements_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageDrmFormatModifierPropertiesEXT(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageDrmFormatModifierPropertiesEXT args; - - if (!ctx->dispatch_vkGetImageDrmFormatModifierPropertiesEXT) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageDrmFormatModifierPropertiesEXT_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageDrmFormatModifierPropertiesEXT(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetImageDrmFormatModifierPropertiesEXT returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageDrmFormatModifierPropertiesEXT_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetImageSubresourceLayout2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetImageSubresourceLayout2 args; - - if (!ctx->dispatch_vkGetImageSubresourceLayout2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetImageSubresourceLayout2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetImageSubresourceLayout2(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetImageSubresourceLayout2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeviceImageSubresourceLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeviceImageSubresourceLayout args; - - if (!ctx->dispatch_vkGetDeviceImageSubresourceLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeviceImageSubresourceLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeviceImageSubresourceLayout(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeviceImageSubresourceLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_IMAGE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_image_view.h b/src/venus/venus-protocol/vn_protocol_renderer_image_view.h deleted file mode 100644 index eff78649..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_image_view.h +++ /dev/null @@ -1,157 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_IMAGE_VIEW_H -#define VN_PROTOCOL_RENDERER_IMAGE_VIEW_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -static inline void vn_decode_vkCreateImageView_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateImageView *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkImageViewCreateInfo_temp(dec, (VkImageViewCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pView = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pView)); - if (!args->pView) return; - vn_decode_VkImageView(dec, args->pView); - } else { - args->pView = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateImageView_args_handle(struct vn_command_vkCreateImageView *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkImageViewCreateInfo_handle((VkImageViewCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pView */ -} - -static inline void vn_encode_vkCreateImageView_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateImageView *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateImageView_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pView)) - vn_encode_VkImageView(enc, args->pView); -} - -static inline void vn_decode_vkDestroyImageView_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyImageView *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkImageView_lookup(dec, &args->imageView); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyImageView_args_handle(struct vn_command_vkDestroyImageView *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkImageView_handle(&args->imageView); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyImageView_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyImageView *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyImageView_EXT}); - - /* skip args->device */ - /* skip args->imageView */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateImageView(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateImageView args; - - if (!ctx->dispatch_vkCreateImageView) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateImageView_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateImageView(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateImageView returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateImageView_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyImageView(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyImageView args; - - if (!ctx->dispatch_vkDestroyImageView) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyImageView_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyImageView(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyImageView_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_IMAGE_VIEW_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_info.h b/src/venus/venus-protocol/vn_protocol_renderer_info.h deleted file mode 100644 index b32f2e90..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_info.h +++ /dev/null @@ -1,450 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_INFO_H -#define VN_PROTOCOL_RENDERER_INFO_H - -#include "vn_protocol_renderer_defines.h" - -struct vn_info_extension_table { - union { - bool enabled[187]; - struct { - bool ARM_rasterization_order_attachment_access; - bool EXT_4444_formats; - bool EXT_attachment_feedback_loop_dynamic_state; - bool EXT_attachment_feedback_loop_layout; - bool EXT_blend_operation_advanced; - bool EXT_border_color_swizzle; - bool EXT_buffer_device_address; - bool EXT_calibrated_timestamps; - bool EXT_color_write_enable; - bool EXT_command_serialization; - bool EXT_conditional_rendering; - bool EXT_conservative_rasterization; - bool EXT_custom_border_color; - bool EXT_depth_bias_control; - bool EXT_depth_clamp_control; - bool EXT_depth_clamp_zero_one; - bool EXT_depth_clip_control; - bool EXT_depth_clip_enable; - bool EXT_depth_range_unrestricted; - bool EXT_descriptor_heap; - bool EXT_descriptor_indexing; - bool EXT_dynamic_rendering_unused_attachments; - bool EXT_extended_dynamic_state; - bool EXT_extended_dynamic_state2; - bool EXT_extended_dynamic_state3; - bool EXT_external_memory_acquire_unmodified; - bool EXT_external_memory_dma_buf; - bool EXT_filter_cubic; - bool EXT_fragment_shader_interlock; - bool EXT_global_priority; - bool EXT_global_priority_query; - bool EXT_graphics_pipeline_library; - bool EXT_host_image_copy; - bool EXT_host_query_reset; - bool EXT_image_2d_view_of_3d; - bool EXT_image_drm_format_modifier; - bool EXT_image_robustness; - bool EXT_image_sliced_view_of_3d; - bool EXT_image_view_min_lod; - bool EXT_index_type_uint8; - bool EXT_inline_uniform_block; - bool EXT_legacy_dithering; - bool EXT_legacy_vertex_attributes; - bool EXT_line_rasterization; - bool EXT_load_store_op_none; - bool EXT_memory_budget; - bool EXT_mesh_shader; - bool EXT_multi_draw; - bool EXT_multisampled_render_to_single_sampled; - bool EXT_mutable_descriptor_type; - bool EXT_nested_command_buffer; - bool EXT_non_seamless_cube_map; - bool EXT_pci_bus_info; - bool EXT_pipeline_creation_cache_control; - bool EXT_pipeline_creation_feedback; - bool EXT_pipeline_library_group_handles; - bool EXT_pipeline_protected_access; - bool EXT_pipeline_robustness; - bool EXT_post_depth_coverage; - bool EXT_primitive_topology_list_restart; - bool EXT_primitives_generated_query; - bool EXT_private_data; - bool EXT_provoking_vertex; - bool EXT_queue_family_foreign; - bool EXT_rasterization_order_attachment_access; - bool EXT_robustness2; - bool EXT_sample_locations; - bool EXT_sampler_filter_minmax; - bool EXT_scalar_block_layout; - bool EXT_separate_stencil_usage; - bool EXT_shader_atomic_float; - bool EXT_shader_atomic_float2; - bool EXT_shader_demote_to_helper_invocation; - bool EXT_shader_float8; - bool EXT_shader_image_atomic_int64; - bool EXT_shader_replicated_composites; - bool EXT_shader_stencil_export; - bool EXT_shader_subgroup_ballot; - bool EXT_shader_subgroup_vote; - bool EXT_shader_uniform_buffer_unsized_array; - bool EXT_shader_viewport_index_layer; - bool EXT_subgroup_size_control; - bool EXT_texel_buffer_alignment; - bool EXT_texture_compression_astc_hdr; - bool EXT_tooling_info; - bool EXT_transform_feedback; - bool EXT_vertex_attribute_divisor; - bool EXT_vertex_input_dynamic_state; - bool EXT_ycbcr_2plane_444_formats; - bool EXT_ycbcr_image_arrays; - bool GOOGLE_decorate_string; - bool GOOGLE_hlsl_functionality1; - bool GOOGLE_user_type; - bool IMG_filter_cubic; - bool KHR_16bit_storage; - bool KHR_8bit_storage; - bool KHR_acceleration_structure; - bool KHR_bind_memory2; - bool KHR_buffer_device_address; - bool KHR_calibrated_timestamps; - bool KHR_compute_shader_derivatives; - bool KHR_cooperative_matrix; - bool KHR_copy_commands2; - bool KHR_create_renderpass2; - bool KHR_dedicated_allocation; - bool KHR_deferred_host_operations; - bool KHR_depth_clamp_zero_one; - bool KHR_depth_stencil_resolve; - bool KHR_descriptor_update_template; - bool KHR_device_group; - bool KHR_device_group_creation; - bool KHR_draw_indirect_count; - bool KHR_driver_properties; - bool KHR_dynamic_rendering; - bool KHR_dynamic_rendering_local_read; - bool KHR_external_fence; - bool KHR_external_fence_capabilities; - bool KHR_external_fence_fd; - bool KHR_external_memory; - bool KHR_external_memory_capabilities; - bool KHR_external_memory_fd; - bool KHR_external_semaphore; - bool KHR_external_semaphore_capabilities; - bool KHR_external_semaphore_fd; - bool KHR_format_feature_flags2; - bool KHR_fragment_shader_barycentric; - bool KHR_fragment_shading_rate; - bool KHR_get_memory_requirements2; - bool KHR_get_physical_device_properties2; - bool KHR_global_priority; - bool KHR_image_format_list; - bool KHR_imageless_framebuffer; - bool KHR_index_type_uint8; - bool KHR_line_rasterization; - bool KHR_load_store_op_none; - bool KHR_maintenance1; - bool KHR_maintenance2; - bool KHR_maintenance3; - bool KHR_maintenance4; - bool KHR_maintenance5; - bool KHR_maintenance6; - bool KHR_maintenance7; - bool KHR_map_memory2; - bool KHR_multiview; - bool KHR_pipeline_library; - bool KHR_push_descriptor; - bool KHR_ray_query; - bool KHR_ray_tracing_maintenance1; - bool KHR_ray_tracing_pipeline; - bool KHR_ray_tracing_position_fetch; - bool KHR_relaxed_block_layout; - bool KHR_robustness2; - bool KHR_sampler_mirror_clamp_to_edge; - bool KHR_sampler_ycbcr_conversion; - bool KHR_separate_depth_stencil_layouts; - bool KHR_shader_atomic_int64; - bool KHR_shader_bfloat16; - bool KHR_shader_clock; - bool KHR_shader_draw_parameters; - bool KHR_shader_expect_assume; - bool KHR_shader_float16_int8; - bool KHR_shader_float_controls; - bool KHR_shader_float_controls2; - bool KHR_shader_fma; - bool KHR_shader_integer_dot_product; - bool KHR_shader_maximal_reconvergence; - bool KHR_shader_non_semantic_info; - bool KHR_shader_quad_control; - bool KHR_shader_relaxed_extended_instruction; - bool KHR_shader_subgroup_extended_types; - bool KHR_shader_subgroup_rotate; - bool KHR_shader_subgroup_uniform_control_flow; - bool KHR_shader_terminate_invocation; - bool KHR_shader_untyped_pointers; - bool KHR_spirv_1_4; - bool KHR_storage_buffer_storage_class; - bool KHR_synchronization2; - bool KHR_timeline_semaphore; - bool KHR_uniform_buffer_standard_layout; - bool KHR_variable_pointers; - bool KHR_vertex_attribute_divisor; - bool KHR_vulkan_memory_model; - bool KHR_workgroup_memory_explicit_layout; - bool KHR_zero_initialize_workgroup_memory; - bool MESA_venus_protocol; - bool NV_compute_shader_derivatives; - bool VALVE_mutable_descriptor_type; - }; - }; -}; - -#define VN_INFO_EXTENSION_MAX_NUMBER (643) - -struct vn_info_extension { - const char *name; - uint32_t number; - uint32_t spec_version; -}; - -/* sorted by extension names for bsearch */ -static const uint32_t _vn_info_extension_count = 187; -static const struct vn_info_extension _vn_info_extensions[187] = { - { "VK_ARM_rasterization_order_attachment_access", 343, 1 }, - { "VK_EXT_4444_formats", 341, 1 }, - { "VK_EXT_attachment_feedback_loop_dynamic_state", 525, 1 }, - { "VK_EXT_attachment_feedback_loop_layout", 340, 2 }, - { "VK_EXT_blend_operation_advanced", 149, 2 }, - { "VK_EXT_border_color_swizzle", 412, 1 }, - { "VK_EXT_buffer_device_address", 245, 2 }, - { "VK_EXT_calibrated_timestamps", 185, 2 }, - { "VK_EXT_color_write_enable", 382, 1 }, - { "VK_EXT_command_serialization", 384, 1 }, - { "VK_EXT_conditional_rendering", 82, 2 }, - { "VK_EXT_conservative_rasterization", 102, 1 }, - { "VK_EXT_custom_border_color", 288, 12 }, - { "VK_EXT_depth_bias_control", 284, 1 }, - { "VK_EXT_depth_clamp_control", 583, 1 }, - { "VK_EXT_depth_clamp_zero_one", 422, 1 }, - { "VK_EXT_depth_clip_control", 356, 1 }, - { "VK_EXT_depth_clip_enable", 103, 1 }, - { "VK_EXT_depth_range_unrestricted", 14, 1 }, - { "VK_EXT_descriptor_heap", 136, 1 }, - { "VK_EXT_descriptor_indexing", 162, 2 }, - { "VK_EXT_dynamic_rendering_unused_attachments", 500, 1 }, - { "VK_EXT_extended_dynamic_state", 268, 1 }, - { "VK_EXT_extended_dynamic_state2", 378, 1 }, - { "VK_EXT_extended_dynamic_state3", 456, 2 }, - { "VK_EXT_external_memory_acquire_unmodified", 454, 1 }, - { "VK_EXT_external_memory_dma_buf", 126, 1 }, - { "VK_EXT_filter_cubic", 171, 3 }, - { "VK_EXT_fragment_shader_interlock", 252, 1 }, - { "VK_EXT_global_priority", 175, 2 }, - { "VK_EXT_global_priority_query", 389, 1 }, - { "VK_EXT_graphics_pipeline_library", 321, 1 }, - { "VK_EXT_host_image_copy", 271, 1 }, - { "VK_EXT_host_query_reset", 262, 1 }, - { "VK_EXT_image_2d_view_of_3d", 394, 1 }, - { "VK_EXT_image_drm_format_modifier", 159, 2 }, - { "VK_EXT_image_robustness", 336, 1 }, - { "VK_EXT_image_sliced_view_of_3d", 419, 1 }, - { "VK_EXT_image_view_min_lod", 392, 1 }, - { "VK_EXT_index_type_uint8", 266, 1 }, - { "VK_EXT_inline_uniform_block", 139, 1 }, - { "VK_EXT_legacy_dithering", 466, 2 }, - { "VK_EXT_legacy_vertex_attributes", 496, 1 }, - { "VK_EXT_line_rasterization", 260, 1 }, - { "VK_EXT_load_store_op_none", 401, 1 }, - { "VK_EXT_memory_budget", 238, 1 }, - { "VK_EXT_mesh_shader", 329, 1 }, - { "VK_EXT_multi_draw", 393, 1 }, - { "VK_EXT_multisampled_render_to_single_sampled", 377, 1 }, - { "VK_EXT_mutable_descriptor_type", 495, 1 }, - { "VK_EXT_nested_command_buffer", 452, 1 }, - { "VK_EXT_non_seamless_cube_map", 423, 1 }, - { "VK_EXT_pci_bus_info", 213, 2 }, - { "VK_EXT_pipeline_creation_cache_control", 298, 3 }, - { "VK_EXT_pipeline_creation_feedback", 193, 1 }, - { "VK_EXT_pipeline_library_group_handles", 499, 1 }, - { "VK_EXT_pipeline_protected_access", 467, 1 }, - { "VK_EXT_pipeline_robustness", 69, 1 }, - { "VK_EXT_post_depth_coverage", 156, 1 }, - { "VK_EXT_primitive_topology_list_restart", 357, 1 }, - { "VK_EXT_primitives_generated_query", 383, 1 }, - { "VK_EXT_private_data", 296, 1 }, - { "VK_EXT_provoking_vertex", 255, 1 }, - { "VK_EXT_queue_family_foreign", 127, 1 }, - { "VK_EXT_rasterization_order_attachment_access", 464, 1 }, - { "VK_EXT_robustness2", 287, 1 }, - { "VK_EXT_sample_locations", 144, 1 }, - { "VK_EXT_sampler_filter_minmax", 131, 2 }, - { "VK_EXT_scalar_block_layout", 222, 1 }, - { "VK_EXT_separate_stencil_usage", 247, 1 }, - { "VK_EXT_shader_atomic_float", 261, 1 }, - { "VK_EXT_shader_atomic_float2", 274, 1 }, - { "VK_EXT_shader_demote_to_helper_invocation", 277, 1 }, - { "VK_EXT_shader_float8", 568, 1 }, - { "VK_EXT_shader_image_atomic_int64", 235, 1 }, - { "VK_EXT_shader_replicated_composites", 565, 1 }, - { "VK_EXT_shader_stencil_export", 141, 1 }, - { "VK_EXT_shader_subgroup_ballot", 65, 1 }, - { "VK_EXT_shader_subgroup_vote", 66, 1 }, - { "VK_EXT_shader_uniform_buffer_unsized_array", 643, 1 }, - { "VK_EXT_shader_viewport_index_layer", 163, 1 }, - { "VK_EXT_subgroup_size_control", 226, 2 }, - { "VK_EXT_texel_buffer_alignment", 282, 1 }, - { "VK_EXT_texture_compression_astc_hdr", 67, 1 }, - { "VK_EXT_tooling_info", 246, 1 }, - { "VK_EXT_transform_feedback", 29, 1 }, - { "VK_EXT_vertex_attribute_divisor", 191, 3 }, - { "VK_EXT_vertex_input_dynamic_state", 353, 2 }, - { "VK_EXT_ycbcr_2plane_444_formats", 331, 1 }, - { "VK_EXT_ycbcr_image_arrays", 253, 1 }, - { "VK_GOOGLE_decorate_string", 225, 1 }, - { "VK_GOOGLE_hlsl_functionality1", 224, 1 }, - { "VK_GOOGLE_user_type", 290, 1 }, - { "VK_IMG_filter_cubic", 16, 1 }, - { "VK_KHR_16bit_storage", 84, 1 }, - { "VK_KHR_8bit_storage", 178, 1 }, - { "VK_KHR_acceleration_structure", 151, 13 }, - { "VK_KHR_bind_memory2", 158, 1 }, - { "VK_KHR_buffer_device_address", 258, 1 }, - { "VK_KHR_calibrated_timestamps", 544, 1 }, - { "VK_KHR_compute_shader_derivatives", 512, 1 }, - { "VK_KHR_cooperative_matrix", 507, 2 }, - { "VK_KHR_copy_commands2", 338, 1 }, - { "VK_KHR_create_renderpass2", 110, 1 }, - { "VK_KHR_dedicated_allocation", 128, 3 }, - { "VK_KHR_deferred_host_operations", 269, 4 }, - { "VK_KHR_depth_clamp_zero_one", 605, 1 }, - { "VK_KHR_depth_stencil_resolve", 200, 1 }, - { "VK_KHR_descriptor_update_template", 86, 1 }, - { "VK_KHR_device_group", 61, 4 }, - { "VK_KHR_device_group_creation", 71, 1 }, - { "VK_KHR_draw_indirect_count", 170, 1 }, - { "VK_KHR_driver_properties", 197, 1 }, - { "VK_KHR_dynamic_rendering", 45, 1 }, - { "VK_KHR_dynamic_rendering_local_read", 233, 1 }, - { "VK_KHR_external_fence", 114, 1 }, - { "VK_KHR_external_fence_capabilities", 113, 1 }, - { "VK_KHR_external_fence_fd", 116, 1 }, - { "VK_KHR_external_memory", 73, 1 }, - { "VK_KHR_external_memory_capabilities", 72, 1 }, - { "VK_KHR_external_memory_fd", 75, 1 }, - { "VK_KHR_external_semaphore", 78, 1 }, - { "VK_KHR_external_semaphore_capabilities", 77, 1 }, - { "VK_KHR_external_semaphore_fd", 80, 1 }, - { "VK_KHR_format_feature_flags2", 361, 2 }, - { "VK_KHR_fragment_shader_barycentric", 323, 1 }, - { "VK_KHR_fragment_shading_rate", 227, 2 }, - { "VK_KHR_get_memory_requirements2", 147, 1 }, - { "VK_KHR_get_physical_device_properties2", 60, 2 }, - { "VK_KHR_global_priority", 189, 1 }, - { "VK_KHR_image_format_list", 148, 1 }, - { "VK_KHR_imageless_framebuffer", 109, 1 }, - { "VK_KHR_index_type_uint8", 534, 1 }, - { "VK_KHR_line_rasterization", 535, 1 }, - { "VK_KHR_load_store_op_none", 527, 1 }, - { "VK_KHR_maintenance1", 70, 2 }, - { "VK_KHR_maintenance2", 118, 1 }, - { "VK_KHR_maintenance3", 169, 1 }, - { "VK_KHR_maintenance4", 414, 2 }, - { "VK_KHR_maintenance5", 471, 1 }, - { "VK_KHR_maintenance6", 546, 1 }, - { "VK_KHR_maintenance7", 563, 1 }, - { "VK_KHR_map_memory2", 272, 1 }, - { "VK_KHR_multiview", 54, 1 }, - { "VK_KHR_pipeline_library", 291, 1 }, - { "VK_KHR_push_descriptor", 81, 2 }, - { "VK_KHR_ray_query", 349, 1 }, - { "VK_KHR_ray_tracing_maintenance1", 387, 1 }, - { "VK_KHR_ray_tracing_pipeline", 348, 1 }, - { "VK_KHR_ray_tracing_position_fetch", 482, 1 }, - { "VK_KHR_relaxed_block_layout", 145, 1 }, - { "VK_KHR_robustness2", 613, 1 }, - { "VK_KHR_sampler_mirror_clamp_to_edge", 15, 3 }, - { "VK_KHR_sampler_ycbcr_conversion", 157, 14 }, - { "VK_KHR_separate_depth_stencil_layouts", 242, 1 }, - { "VK_KHR_shader_atomic_int64", 181, 1 }, - { "VK_KHR_shader_bfloat16", 142, 1 }, - { "VK_KHR_shader_clock", 182, 1 }, - { "VK_KHR_shader_draw_parameters", 64, 1 }, - { "VK_KHR_shader_expect_assume", 545, 1 }, - { "VK_KHR_shader_float16_int8", 83, 1 }, - { "VK_KHR_shader_float_controls", 198, 4 }, - { "VK_KHR_shader_float_controls2", 529, 1 }, - { "VK_KHR_shader_fma", 580, 1 }, - { "VK_KHR_shader_integer_dot_product", 281, 1 }, - { "VK_KHR_shader_maximal_reconvergence", 435, 1 }, - { "VK_KHR_shader_non_semantic_info", 294, 1 }, - { "VK_KHR_shader_quad_control", 236, 1 }, - { "VK_KHR_shader_relaxed_extended_instruction", 559, 1 }, - { "VK_KHR_shader_subgroup_extended_types", 176, 1 }, - { "VK_KHR_shader_subgroup_rotate", 417, 2 }, - { "VK_KHR_shader_subgroup_uniform_control_flow", 324, 1 }, - { "VK_KHR_shader_terminate_invocation", 216, 1 }, - { "VK_KHR_shader_untyped_pointers", 388, 1 }, - { "VK_KHR_spirv_1_4", 237, 1 }, - { "VK_KHR_storage_buffer_storage_class", 132, 1 }, - { "VK_KHR_synchronization2", 315, 1 }, - { "VK_KHR_timeline_semaphore", 208, 2 }, - { "VK_KHR_uniform_buffer_standard_layout", 254, 1 }, - { "VK_KHR_variable_pointers", 121, 1 }, - { "VK_KHR_vertex_attribute_divisor", 526, 1 }, - { "VK_KHR_vulkan_memory_model", 212, 3 }, - { "VK_KHR_workgroup_memory_explicit_layout", 337, 1 }, - { "VK_KHR_zero_initialize_workgroup_memory", 326, 1 }, - { "VK_MESA_venus_protocol", 385, 4 }, - { "VK_NV_compute_shader_derivatives", 202, 1 }, - { "VK_VALVE_mutable_descriptor_type", 352, 1 }, -}; - -static inline uint32_t -vn_info_wire_format_version(void) -{ - return 1; -} - -static inline uint32_t -vn_info_vk_xml_version(void) -{ - return VK_MAKE_API_VERSION(0, 1, 4, 343); -} - -static inline int -vn_info_extension_compare(const void *name, const void *ext) -{ - return strcmp(name, ((const struct vn_info_extension *)ext)->name); -} - -static inline int32_t -vn_info_extension_index(const char *name) -{ - const struct vn_info_extension *ext = bsearch(name, _vn_info_extensions, - _vn_info_extension_count, sizeof(*_vn_info_extensions), - vn_info_extension_compare); - return ext ? ext - _vn_info_extensions : -1; -} - -static inline const struct vn_info_extension * -vn_info_extension_get(int32_t index) -{ - assert(index >= 0 && (uint32_t)index < _vn_info_extension_count); - return &_vn_info_extensions[index]; -} - -static inline void -vn_info_extension_mask_init(uint32_t *out_mask) -{ - for (uint32_t i = 0; i < _vn_info_extension_count; i++) { - out_mask[_vn_info_extensions[i].number / 32] |= 1 << (_vn_info_extensions[i].number % 32); - } -} - -#endif /* VN_PROTOCOL_RENDERER_INFO_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_instance.h b/src/venus/venus-protocol/vn_protocol_renderer_instance.h deleted file mode 100644 index 12e10409..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_instance.h +++ /dev/null @@ -1,545 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_INSTANCE_H -#define VN_PROTOCOL_RENDERER_INSTANCE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkGetInstanceProcAddr - */ - -/* struct VkApplicationInfo chain */ - -static inline void * -vn_decode_VkApplicationInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkApplicationInfo_self_temp(struct vn_cs_decoder *dec, VkApplicationInfo *val) -{ - /* skip val->{sType,pNext} */ - if (vn_peek_array_size(dec)) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - val->pApplicationName = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pApplicationName), string_size); - if (!val->pApplicationName) return; - vn_decode_char_array(dec, (char *)val->pApplicationName, string_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pApplicationName = NULL; - } - vn_decode_uint32_t(dec, &val->applicationVersion); - if (vn_peek_array_size(dec)) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - val->pEngineName = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pEngineName), string_size); - if (!val->pEngineName) return; - vn_decode_char_array(dec, (char *)val->pEngineName, string_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pEngineName = NULL; - } - vn_decode_uint32_t(dec, &val->engineVersion); - vn_decode_uint32_t(dec, &val->apiVersion); -} - -static inline void -vn_decode_VkApplicationInfo_temp(struct vn_cs_decoder *dec, VkApplicationInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_APPLICATION_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkApplicationInfo_pnext_temp(dec); - vn_decode_VkApplicationInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkApplicationInfo_handle_self(VkApplicationInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pApplicationName */ - /* skip val->applicationVersion */ - /* skip val->pEngineName */ - /* skip val->engineVersion */ - /* skip val->apiVersion */ -} - -static inline void -vn_replace_VkApplicationInfo_handle(VkApplicationInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_APPLICATION_INFO: - vn_replace_VkApplicationInfo_handle_self((VkApplicationInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkInstanceCreateInfo chain */ - -static inline void * -vn_decode_VkInstanceCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkInstanceCreateInfo_self_temp(struct vn_cs_decoder *dec, VkInstanceCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - if (vn_decode_simple_pointer(dec)) { - val->pApplicationInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pApplicationInfo)); - if (!val->pApplicationInfo) return; - vn_decode_VkApplicationInfo_temp(dec, (VkApplicationInfo *)val->pApplicationInfo); - } else { - val->pApplicationInfo = NULL; - } - vn_decode_uint32_t(dec, &val->enabledLayerCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->enabledLayerCount); - val->ppEnabledLayerNames = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledLayerNames), iter_count); - if (!val->ppEnabledLayerNames) return; - for (uint32_t i = 0; i < iter_count; i++) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - ((char **)val->ppEnabledLayerNames)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledLayerNames[i]), string_size); - if (!val->ppEnabledLayerNames[i]) return; - vn_decode_char_array(dec, ((char **)val->ppEnabledLayerNames)[i], string_size); - } - } else { - vn_decode_array_size(dec, val->enabledLayerCount); - val->ppEnabledLayerNames = NULL; - } - vn_decode_uint32_t(dec, &val->enabledExtensionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->enabledExtensionCount); - val->ppEnabledExtensionNames = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledExtensionNames), iter_count); - if (!val->ppEnabledExtensionNames) return; - for (uint32_t i = 0; i < iter_count; i++) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - ((char **)val->ppEnabledExtensionNames)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppEnabledExtensionNames[i]), string_size); - if (!val->ppEnabledExtensionNames[i]) return; - vn_decode_char_array(dec, ((char **)val->ppEnabledExtensionNames)[i], string_size); - } - } else { - vn_decode_array_size(dec, val->enabledExtensionCount); - val->ppEnabledExtensionNames = NULL; - } -} - -static inline void -vn_decode_VkInstanceCreateInfo_temp(struct vn_cs_decoder *dec, VkInstanceCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkInstanceCreateInfo_pnext_temp(dec); - vn_decode_VkInstanceCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkInstanceCreateInfo_handle_self(VkInstanceCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - if (val->pApplicationInfo) - vn_replace_VkApplicationInfo_handle((VkApplicationInfo *)val->pApplicationInfo); - /* skip val->enabledLayerCount */ - /* skip val->ppEnabledLayerNames */ - /* skip val->enabledExtensionCount */ - /* skip val->ppEnabledExtensionNames */ -} - -static inline void -vn_replace_VkInstanceCreateInfo_handle(VkInstanceCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO: - vn_replace_VkInstanceCreateInfo_handle_self((VkInstanceCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateInstance_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateInstance *args) -{ - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkInstanceCreateInfo_temp(dec, (VkInstanceCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pInstance = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pInstance)); - if (!args->pInstance) return; - vn_decode_VkInstance_temp(dec, args->pInstance); - } else { - args->pInstance = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateInstance_args_handle(struct vn_command_vkCreateInstance *args) -{ - if (args->pCreateInfo) - vn_replace_VkInstanceCreateInfo_handle((VkInstanceCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pInstance */ -} - -static inline void vn_encode_vkCreateInstance_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateInstance *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateInstance_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pInstance)) - vn_encode_VkInstance(enc, args->pInstance); -} - -static inline void vn_decode_vkDestroyInstance_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyInstance *args) -{ - vn_decode_VkInstance_lookup(dec, &args->instance); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyInstance_args_handle(struct vn_command_vkDestroyInstance *args) -{ - vn_replace_VkInstance_handle(&args->instance); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyInstance_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyInstance *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyInstance_EXT}); - - /* skip args->instance */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkEnumerateInstanceVersion_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumerateInstanceVersion *args) -{ - if (vn_decode_simple_pointer(dec)) { - args->pApiVersion = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pApiVersion)); - if (!args->pApiVersion) return; - } else { - args->pApiVersion = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkEnumerateInstanceVersion_args_handle(struct vn_command_vkEnumerateInstanceVersion *args) -{ - /* skip args->pApiVersion */ -} - -static inline void vn_encode_vkEnumerateInstanceVersion_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumerateInstanceVersion *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumerateInstanceVersion_EXT}); - - vn_encode_VkResult(enc, &args->ret); - if (vn_encode_simple_pointer(enc, args->pApiVersion)) - vn_encode_uint32_t(enc, args->pApiVersion); -} - -static inline void vn_decode_vkEnumerateInstanceLayerProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumerateInstanceLayerProperties *args) -{ - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkLayerProperties_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkEnumerateInstanceLayerProperties_args_handle(struct vn_command_vkEnumerateInstanceLayerProperties *args) -{ - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkEnumerateInstanceLayerProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumerateInstanceLayerProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumerateInstanceLayerProperties_EXT}); - - vn_encode_VkResult(enc, &args->ret); - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkLayerProperties(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkEnumerateInstanceExtensionProperties_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkEnumerateInstanceExtensionProperties *args) -{ - if (vn_peek_array_size(dec)) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - args->pLayerName = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pLayerName), string_size); - if (!args->pLayerName) return; - vn_decode_char_array(dec, (char *)args->pLayerName, string_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pLayerName = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pPropertyCount = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPropertyCount)); - if (!args->pPropertyCount) return; - vn_decode_uint32_t(dec, args->pPropertyCount); - } else { - args->pPropertyCount = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, (args->pPropertyCount ? *args->pPropertyCount : 0)); - args->pProperties = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pProperties), iter_count); - if (!args->pProperties) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkExtensionProperties_partial_temp(dec, &args->pProperties[i]); - } else { - vn_decode_array_size_unchecked(dec); - args->pProperties = NULL; - } -} - -static inline void vn_replace_vkEnumerateInstanceExtensionProperties_args_handle(struct vn_command_vkEnumerateInstanceExtensionProperties *args) -{ - /* skip args->pLayerName */ - /* skip args->pPropertyCount */ - /* skip args->pProperties */ -} - -static inline void vn_encode_vkEnumerateInstanceExtensionProperties_reply(struct vn_cs_encoder *enc, const struct vn_command_vkEnumerateInstanceExtensionProperties *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkEnumerateInstanceExtensionProperties_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->pLayerName */ - if (vn_encode_simple_pointer(enc, args->pPropertyCount)) - vn_encode_uint32_t(enc, args->pPropertyCount); - if (args->pProperties) { - vn_encode_array_size(enc, (args->pPropertyCount ? *args->pPropertyCount : 0)); - for (uint32_t i = 0; i < (args->pPropertyCount ? *args->pPropertyCount : 0); i++) - vn_encode_VkExtensionProperties(enc, &args->pProperties[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_dispatch_vkCreateInstance(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateInstance args; - - if (!ctx->dispatch_vkCreateInstance) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateInstance_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateInstance(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateInstance returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateInstance_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyInstance(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyInstance args; - - if (!ctx->dispatch_vkDestroyInstance) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyInstance_args_temp(ctx->decoder, &args); - if (!args.instance) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyInstance(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyInstance_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEnumerateInstanceVersion(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumerateInstanceVersion args; - - if (!ctx->dispatch_vkEnumerateInstanceVersion) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumerateInstanceVersion_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumerateInstanceVersion(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumerateInstanceVersion returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumerateInstanceVersion_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEnumerateInstanceLayerProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumerateInstanceLayerProperties args; - - if (!ctx->dispatch_vkEnumerateInstanceLayerProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumerateInstanceLayerProperties_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumerateInstanceLayerProperties(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumerateInstanceLayerProperties returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumerateInstanceLayerProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkEnumerateInstanceExtensionProperties(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkEnumerateInstanceExtensionProperties args; - - if (!ctx->dispatch_vkEnumerateInstanceExtensionProperties) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkEnumerateInstanceExtensionProperties_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkEnumerateInstanceExtensionProperties(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkEnumerateInstanceExtensionProperties returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkEnumerateInstanceExtensionProperties_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_INSTANCE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h b/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h deleted file mode 100644 index dc4b3afb..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h +++ /dev/null @@ -1,4204 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_PIPELINE_H -#define VN_PROTOCOL_RENDERER_PIPELINE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkSpecializationMapEntry */ - -static inline void -vn_decode_VkSpecializationMapEntry_temp(struct vn_cs_decoder *dec, VkSpecializationMapEntry *val) -{ - vn_decode_uint32_t(dec, &val->constantID); - vn_decode_uint32_t(dec, &val->offset); - vn_decode_size_t(dec, &val->size); -} - -static inline void -vn_replace_VkSpecializationMapEntry_handle(VkSpecializationMapEntry *val) -{ - /* skip val->constantID */ - /* skip val->offset */ - /* skip val->size */ -} - -/* struct VkSpecializationInfo */ - -static inline void -vn_decode_VkSpecializationInfo_temp(struct vn_cs_decoder *dec, VkSpecializationInfo *val) -{ - vn_decode_uint32_t(dec, &val->mapEntryCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->mapEntryCount); - val->pMapEntries = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pMapEntries), iter_count); - if (!val->pMapEntries) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSpecializationMapEntry_temp(dec, &((VkSpecializationMapEntry *)val->pMapEntries)[i]); - } else { - vn_decode_array_size(dec, val->mapEntryCount); - val->pMapEntries = NULL; - } - vn_decode_size_t(dec, &val->dataSize); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->dataSize); - val->pData = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!val->pData) return; - vn_decode_blob_array(dec, (void *)val->pData, array_size); - } else { - vn_decode_array_size(dec, val->dataSize); - val->pData = NULL; - } -} - -static inline void -vn_replace_VkSpecializationInfo_handle(VkSpecializationInfo *val) -{ - /* skip val->mapEntryCount */ - if (val->pMapEntries) { - for (uint32_t i = 0; i < val->mapEntryCount; i++) - vn_replace_VkSpecializationMapEntry_handle(&((VkSpecializationMapEntry *)val->pMapEntries)[i]); - } - /* skip val->dataSize */ - /* skip val->pData */ -} - -/* struct VkPipelineShaderStageRequiredSubgroupSizeCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->requiredSubgroupSize); -} - -static inline void -vn_decode_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_handle_self(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->requiredSubgroupSize */ -} - -static inline void -vn_replace_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_handle(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: - vn_replace_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_handle_self((VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRobustnessCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineRobustnessCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRobustnessCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineRobustnessCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkPipelineRobustnessBufferBehavior(dec, &val->storageBuffers); - vn_decode_VkPipelineRobustnessBufferBehavior(dec, &val->uniformBuffers); - vn_decode_VkPipelineRobustnessBufferBehavior(dec, &val->vertexInputs); - vn_decode_VkPipelineRobustnessImageBehavior(dec, &val->images); -} - -static inline void -vn_decode_VkPipelineRobustnessCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineRobustnessCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRobustnessCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRobustnessCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRobustnessCreateInfo_handle_self(VkPipelineRobustnessCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->storageBuffers */ - /* skip val->uniformBuffers */ - /* skip val->vertexInputs */ - /* skip val->images */ -} - -static inline void -vn_replace_VkPipelineRobustnessCreateInfo_handle(VkPipelineRobustnessCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - vn_replace_VkPipelineRobustnessCreateInfo_handle_self((VkPipelineRobustnessCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDescriptorMappingSourceConstantOffsetEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceConstantOffsetEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceConstantOffsetEXT *val) -{ - vn_decode_uint32_t(dec, &val->heapOffset); - vn_decode_uint32_t(dec, &val->heapArrayStride); - if (vn_decode_simple_pointer(dec)) { - val->pEmbeddedSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pEmbeddedSampler)); - if (!val->pEmbeddedSampler) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)val->pEmbeddedSampler); - } else { - val->pEmbeddedSampler = NULL; - } - vn_decode_uint32_t(dec, &val->samplerHeapOffset); - vn_decode_uint32_t(dec, &val->samplerHeapArrayStride); -} - -static inline void -vn_replace_VkDescriptorMappingSourceConstantOffsetEXT_handle(VkDescriptorMappingSourceConstantOffsetEXT *val) -{ - /* skip val->heapOffset */ - /* skip val->heapArrayStride */ - if (val->pEmbeddedSampler) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)val->pEmbeddedSampler); - /* skip val->samplerHeapOffset */ - /* skip val->samplerHeapArrayStride */ -} - -/* struct VkDescriptorMappingSourcePushIndexEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourcePushIndexEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourcePushIndexEXT *val) -{ - vn_decode_uint32_t(dec, &val->heapOffset); - vn_decode_uint32_t(dec, &val->pushOffset); - vn_decode_uint32_t(dec, &val->heapIndexStride); - vn_decode_uint32_t(dec, &val->heapArrayStride); - if (vn_decode_simple_pointer(dec)) { - val->pEmbeddedSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pEmbeddedSampler)); - if (!val->pEmbeddedSampler) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)val->pEmbeddedSampler); - } else { - val->pEmbeddedSampler = NULL; - } - vn_decode_VkBool32(dec, &val->useCombinedImageSamplerIndex); - vn_decode_uint32_t(dec, &val->samplerHeapOffset); - vn_decode_uint32_t(dec, &val->samplerPushOffset); - vn_decode_uint32_t(dec, &val->samplerHeapIndexStride); - vn_decode_uint32_t(dec, &val->samplerHeapArrayStride); -} - -static inline void -vn_replace_VkDescriptorMappingSourcePushIndexEXT_handle(VkDescriptorMappingSourcePushIndexEXT *val) -{ - /* skip val->heapOffset */ - /* skip val->pushOffset */ - /* skip val->heapIndexStride */ - /* skip val->heapArrayStride */ - if (val->pEmbeddedSampler) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)val->pEmbeddedSampler); - /* skip val->useCombinedImageSamplerIndex */ - /* skip val->samplerHeapOffset */ - /* skip val->samplerPushOffset */ - /* skip val->samplerHeapIndexStride */ - /* skip val->samplerHeapArrayStride */ -} - -/* struct VkDescriptorMappingSourceIndirectIndexEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceIndirectIndexEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceIndirectIndexEXT *val) -{ - vn_decode_uint32_t(dec, &val->heapOffset); - vn_decode_uint32_t(dec, &val->pushOffset); - vn_decode_uint32_t(dec, &val->addressOffset); - vn_decode_uint32_t(dec, &val->heapIndexStride); - vn_decode_uint32_t(dec, &val->heapArrayStride); - if (vn_decode_simple_pointer(dec)) { - val->pEmbeddedSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pEmbeddedSampler)); - if (!val->pEmbeddedSampler) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)val->pEmbeddedSampler); - } else { - val->pEmbeddedSampler = NULL; - } - vn_decode_VkBool32(dec, &val->useCombinedImageSamplerIndex); - vn_decode_uint32_t(dec, &val->samplerHeapOffset); - vn_decode_uint32_t(dec, &val->samplerPushOffset); - vn_decode_uint32_t(dec, &val->samplerAddressOffset); - vn_decode_uint32_t(dec, &val->samplerHeapIndexStride); - vn_decode_uint32_t(dec, &val->samplerHeapArrayStride); -} - -static inline void -vn_replace_VkDescriptorMappingSourceIndirectIndexEXT_handle(VkDescriptorMappingSourceIndirectIndexEXT *val) -{ - /* skip val->heapOffset */ - /* skip val->pushOffset */ - /* skip val->addressOffset */ - /* skip val->heapIndexStride */ - /* skip val->heapArrayStride */ - if (val->pEmbeddedSampler) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)val->pEmbeddedSampler); - /* skip val->useCombinedImageSamplerIndex */ - /* skip val->samplerHeapOffset */ - /* skip val->samplerPushOffset */ - /* skip val->samplerAddressOffset */ - /* skip val->samplerHeapIndexStride */ - /* skip val->samplerHeapArrayStride */ -} - -/* struct VkDescriptorMappingSourceIndirectIndexArrayEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceIndirectIndexArrayEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceIndirectIndexArrayEXT *val) -{ - vn_decode_uint32_t(dec, &val->heapOffset); - vn_decode_uint32_t(dec, &val->pushOffset); - vn_decode_uint32_t(dec, &val->addressOffset); - vn_decode_uint32_t(dec, &val->heapIndexStride); - if (vn_decode_simple_pointer(dec)) { - val->pEmbeddedSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pEmbeddedSampler)); - if (!val->pEmbeddedSampler) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)val->pEmbeddedSampler); - } else { - val->pEmbeddedSampler = NULL; - } - vn_decode_VkBool32(dec, &val->useCombinedImageSamplerIndex); - vn_decode_uint32_t(dec, &val->samplerHeapOffset); - vn_decode_uint32_t(dec, &val->samplerPushOffset); - vn_decode_uint32_t(dec, &val->samplerAddressOffset); - vn_decode_uint32_t(dec, &val->samplerHeapIndexStride); -} - -static inline void -vn_replace_VkDescriptorMappingSourceIndirectIndexArrayEXT_handle(VkDescriptorMappingSourceIndirectIndexArrayEXT *val) -{ - /* skip val->heapOffset */ - /* skip val->pushOffset */ - /* skip val->addressOffset */ - /* skip val->heapIndexStride */ - if (val->pEmbeddedSampler) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)val->pEmbeddedSampler); - /* skip val->useCombinedImageSamplerIndex */ - /* skip val->samplerHeapOffset */ - /* skip val->samplerPushOffset */ - /* skip val->samplerAddressOffset */ - /* skip val->samplerHeapIndexStride */ -} - -/* struct VkDescriptorMappingSourceHeapDataEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceHeapDataEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceHeapDataEXT *val) -{ - vn_decode_uint32_t(dec, &val->heapOffset); - vn_decode_uint32_t(dec, &val->pushOffset); -} - -static inline void -vn_replace_VkDescriptorMappingSourceHeapDataEXT_handle(VkDescriptorMappingSourceHeapDataEXT *val) -{ - /* skip val->heapOffset */ - /* skip val->pushOffset */ -} - -/* struct VkDescriptorMappingSourceIndirectAddressEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceIndirectAddressEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceIndirectAddressEXT *val) -{ - vn_decode_uint32_t(dec, &val->pushOffset); - vn_decode_uint32_t(dec, &val->addressOffset); -} - -static inline void -vn_replace_VkDescriptorMappingSourceIndirectAddressEXT_handle(VkDescriptorMappingSourceIndirectAddressEXT *val) -{ - /* skip val->pushOffset */ - /* skip val->addressOffset */ -} - -/* struct VkDescriptorMappingSourceShaderRecordIndexEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceShaderRecordIndexEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceShaderRecordIndexEXT *val) -{ - vn_decode_uint32_t(dec, &val->heapOffset); - vn_decode_uint32_t(dec, &val->shaderRecordOffset); - vn_decode_uint32_t(dec, &val->heapIndexStride); - vn_decode_uint32_t(dec, &val->heapArrayStride); - if (vn_decode_simple_pointer(dec)) { - val->pEmbeddedSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pEmbeddedSampler)); - if (!val->pEmbeddedSampler) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)val->pEmbeddedSampler); - } else { - val->pEmbeddedSampler = NULL; - } - vn_decode_VkBool32(dec, &val->useCombinedImageSamplerIndex); - vn_decode_uint32_t(dec, &val->samplerHeapOffset); - vn_decode_uint32_t(dec, &val->samplerShaderRecordOffset); - vn_decode_uint32_t(dec, &val->samplerHeapIndexStride); - vn_decode_uint32_t(dec, &val->samplerHeapArrayStride); -} - -static inline void -vn_replace_VkDescriptorMappingSourceShaderRecordIndexEXT_handle(VkDescriptorMappingSourceShaderRecordIndexEXT *val) -{ - /* skip val->heapOffset */ - /* skip val->shaderRecordOffset */ - /* skip val->heapIndexStride */ - /* skip val->heapArrayStride */ - if (val->pEmbeddedSampler) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)val->pEmbeddedSampler); - /* skip val->useCombinedImageSamplerIndex */ - /* skip val->samplerHeapOffset */ - /* skip val->samplerShaderRecordOffset */ - /* skip val->samplerHeapIndexStride */ - /* skip val->samplerHeapArrayStride */ -} - -/* union VkDescriptorMappingSourceDataEXT */ - -static inline void -vn_decode_VkDescriptorMappingSourceDataEXT_temp(struct vn_cs_decoder *dec, VkDescriptorMappingSourceDataEXT *val) -{ - VkDescriptorMappingSourceEXT tag; - vn_decode_VkDescriptorMappingSourceEXT(dec, &tag); - switch (tag) { - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT: - vn_decode_VkDescriptorMappingSourceConstantOffsetEXT_temp(dec, &val->constantOffset); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT: - vn_decode_VkDescriptorMappingSourcePushIndexEXT_temp(dec, &val->pushIndex); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT: - vn_decode_VkDescriptorMappingSourceIndirectIndexEXT_temp(dec, &val->indirectIndex); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT: - vn_decode_VkDescriptorMappingSourceIndirectIndexArrayEXT_temp(dec, &val->indirectIndexArray); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT: - vn_decode_VkDescriptorMappingSourceHeapDataEXT_temp(dec, &val->heapData); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT: - vn_decode_uint32_t(dec, &val->pushDataOffset); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT: - vn_decode_uint32_t(dec, &val->pushAddressOffset); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT: - vn_decode_VkDescriptorMappingSourceIndirectAddressEXT_temp(dec, &val->indirectAddress); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT: - vn_decode_VkDescriptorMappingSourceShaderRecordIndexEXT_temp(dec, &val->shaderRecordIndex); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT: - vn_decode_uint32_t(dec, &val->shaderRecordDataOffset); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT: - vn_decode_uint32_t(dec, &val->shaderRecordAddressOffset); - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -static inline void -vn_replace_VkDescriptorMappingSourceDataEXT_handle(VkDescriptorMappingSourceDataEXT *val, VkDescriptorMappingSourceEXT tag) -{ - switch (tag) { - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT: - vn_replace_VkDescriptorMappingSourceConstantOffsetEXT_handle(&val->constantOffset); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT: - vn_replace_VkDescriptorMappingSourcePushIndexEXT_handle(&val->pushIndex); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT: - vn_replace_VkDescriptorMappingSourceIndirectIndexEXT_handle(&val->indirectIndex); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT: - vn_replace_VkDescriptorMappingSourceIndirectIndexArrayEXT_handle(&val->indirectIndexArray); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT: - vn_replace_VkDescriptorMappingSourceHeapDataEXT_handle(&val->heapData); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT: - /* skip val->pushDataOffset */ - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT: - /* skip val->pushAddressOffset */ - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT: - vn_replace_VkDescriptorMappingSourceIndirectAddressEXT_handle(&val->indirectAddress); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT: - vn_replace_VkDescriptorMappingSourceShaderRecordIndexEXT_handle(&val->shaderRecordIndex); - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT: - /* skip val->shaderRecordDataOffset */ - break; - case VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT: - /* skip val->shaderRecordAddressOffset */ - break; - default: - assert(false); - break; - } -} - -/* struct VkDescriptorSetAndBindingMappingEXT chain */ - -static inline void * -vn_decode_VkDescriptorSetAndBindingMappingEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDescriptorSetAndBindingMappingEXT_self_temp(struct vn_cs_decoder *dec, VkDescriptorSetAndBindingMappingEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->descriptorSet); - vn_decode_uint32_t(dec, &val->firstBinding); - vn_decode_uint32_t(dec, &val->bindingCount); - vn_decode_VkFlags(dec, &val->resourceMask); - vn_decode_VkDescriptorMappingSourceEXT(dec, &val->source); - vn_decode_VkDescriptorMappingSourceDataEXT_temp(dec, &val->sourceData); -} - -static inline void -vn_decode_VkDescriptorSetAndBindingMappingEXT_temp(struct vn_cs_decoder *dec, VkDescriptorSetAndBindingMappingEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DESCRIPTOR_SET_AND_BINDING_MAPPING_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDescriptorSetAndBindingMappingEXT_pnext_temp(dec); - vn_decode_VkDescriptorSetAndBindingMappingEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkDescriptorSetAndBindingMappingEXT_handle_self(VkDescriptorSetAndBindingMappingEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->descriptorSet */ - /* skip val->firstBinding */ - /* skip val->bindingCount */ - /* skip val->resourceMask */ - /* skip val->source */ - vn_replace_VkDescriptorMappingSourceDataEXT_handle(&val->sourceData, val->source); -} - -static inline void -vn_replace_VkDescriptorSetAndBindingMappingEXT_handle(VkDescriptorSetAndBindingMappingEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_AND_BINDING_MAPPING_EXT: - vn_replace_VkDescriptorSetAndBindingMappingEXT_handle_self((VkDescriptorSetAndBindingMappingEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkShaderDescriptorSetAndBindingMappingInfoEXT chain */ - -static inline void * -vn_decode_VkShaderDescriptorSetAndBindingMappingInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkShaderDescriptorSetAndBindingMappingInfoEXT_self_temp(struct vn_cs_decoder *dec, VkShaderDescriptorSetAndBindingMappingInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->mappingCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->mappingCount); - val->pMappings = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pMappings), iter_count); - if (!val->pMappings) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSetAndBindingMappingEXT_temp(dec, &((VkDescriptorSetAndBindingMappingEXT *)val->pMappings)[i]); - } else { - vn_decode_array_size(dec, val->mappingCount); - val->pMappings = NULL; - } -} - -static inline void -vn_decode_VkShaderDescriptorSetAndBindingMappingInfoEXT_temp(struct vn_cs_decoder *dec, VkShaderDescriptorSetAndBindingMappingInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkShaderDescriptorSetAndBindingMappingInfoEXT_pnext_temp(dec); - vn_decode_VkShaderDescriptorSetAndBindingMappingInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkShaderDescriptorSetAndBindingMappingInfoEXT_handle_self(VkShaderDescriptorSetAndBindingMappingInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->mappingCount */ - if (val->pMappings) { - for (uint32_t i = 0; i < val->mappingCount; i++) - vn_replace_VkDescriptorSetAndBindingMappingEXT_handle(&((VkDescriptorSetAndBindingMappingEXT *)val->pMappings)[i]); - } -} - -static inline void -vn_replace_VkShaderDescriptorSetAndBindingMappingInfoEXT_handle(VkShaderDescriptorSetAndBindingMappingInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT: - vn_replace_VkShaderDescriptorSetAndBindingMappingInfoEXT_handle_self((VkShaderDescriptorSetAndBindingMappingInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineShaderStageCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineShaderStageCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkShaderModuleCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkShaderModuleCreateInfo *)pnext)->pNext = vn_decode_VkPipelineShaderStageCreateInfo_pnext_temp(dec); - vn_decode_VkShaderModuleCreateInfo_self_temp(dec, (VkShaderModuleCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *)pnext)->pNext = vn_decode_VkPipelineShaderStageCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_self_temp(dec, (VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRobustnessCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRobustnessCreateInfo *)pnext)->pNext = vn_decode_VkPipelineShaderStageCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRobustnessCreateInfo_self_temp(dec, (VkPipelineRobustnessCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkShaderDescriptorSetAndBindingMappingInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkShaderDescriptorSetAndBindingMappingInfoEXT *)pnext)->pNext = vn_decode_VkPipelineShaderStageCreateInfo_pnext_temp(dec); - vn_decode_VkShaderDescriptorSetAndBindingMappingInfoEXT_self_temp(dec, (VkShaderDescriptorSetAndBindingMappingInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineShaderStageCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineShaderStageCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkShaderStageFlagBits(dec, &val->stage); - vn_decode_VkShaderModule_lookup(dec, &val->module); - if (vn_peek_array_size(dec)) { - const size_t string_size = vn_decode_array_size_unchecked(dec); - val->pName = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pName), string_size); - if (!val->pName) return; - vn_decode_char_array(dec, (char *)val->pName, string_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pName = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pSpecializationInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pSpecializationInfo)); - if (!val->pSpecializationInfo) return; - vn_decode_VkSpecializationInfo_temp(dec, (VkSpecializationInfo *)val->pSpecializationInfo); - } else { - val->pSpecializationInfo = NULL; - } -} - -static inline void -vn_decode_VkPipelineShaderStageCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineShaderStageCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineShaderStageCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineShaderStageCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineShaderStageCreateInfo_handle_self(VkPipelineShaderStageCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->stage */ - vn_replace_VkShaderModule_handle(&val->module); - /* skip val->pName */ - if (val->pSpecializationInfo) - vn_replace_VkSpecializationInfo_handle((VkSpecializationInfo *)val->pSpecializationInfo); -} - -static inline void -vn_replace_VkPipelineShaderStageCreateInfo_handle(VkPipelineShaderStageCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO: - vn_replace_VkPipelineShaderStageCreateInfo_handle_self((VkPipelineShaderStageCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: - vn_replace_VkShaderModuleCreateInfo_handle_self((VkShaderModuleCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: - vn_replace_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo_handle_self((VkPipelineShaderStageRequiredSubgroupSizeCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - vn_replace_VkPipelineRobustnessCreateInfo_handle_self((VkPipelineRobustnessCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT: - vn_replace_VkShaderDescriptorSetAndBindingMappingInfoEXT_handle_self((VkShaderDescriptorSetAndBindingMappingInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkVertexInputBindingDescription */ - -static inline void -vn_decode_VkVertexInputBindingDescription_temp(struct vn_cs_decoder *dec, VkVertexInputBindingDescription *val) -{ - vn_decode_uint32_t(dec, &val->binding); - vn_decode_uint32_t(dec, &val->stride); - vn_decode_VkVertexInputRate(dec, &val->inputRate); -} - -static inline void -vn_replace_VkVertexInputBindingDescription_handle(VkVertexInputBindingDescription *val) -{ - /* skip val->binding */ - /* skip val->stride */ - /* skip val->inputRate */ -} - -/* struct VkVertexInputAttributeDescription */ - -static inline void -vn_decode_VkVertexInputAttributeDescription_temp(struct vn_cs_decoder *dec, VkVertexInputAttributeDescription *val) -{ - vn_decode_uint32_t(dec, &val->location); - vn_decode_uint32_t(dec, &val->binding); - vn_decode_VkFormat(dec, &val->format); - vn_decode_uint32_t(dec, &val->offset); -} - -static inline void -vn_replace_VkVertexInputAttributeDescription_handle(VkVertexInputAttributeDescription *val) -{ - /* skip val->location */ - /* skip val->binding */ - /* skip val->format */ - /* skip val->offset */ -} - -/* struct VkVertexInputBindingDivisorDescription */ - -static inline void -vn_decode_VkVertexInputBindingDivisorDescription_temp(struct vn_cs_decoder *dec, VkVertexInputBindingDivisorDescription *val) -{ - vn_decode_uint32_t(dec, &val->binding); - vn_decode_uint32_t(dec, &val->divisor); -} - -static inline void -vn_replace_VkVertexInputBindingDivisorDescription_handle(VkVertexInputBindingDivisorDescription *val) -{ - /* skip val->binding */ - /* skip val->divisor */ -} - -/* struct VkPipelineVertexInputDivisorStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineVertexInputDivisorStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineVertexInputDivisorStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineVertexInputDivisorStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->vertexBindingDivisorCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->vertexBindingDivisorCount); - val->pVertexBindingDivisors = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pVertexBindingDivisors), iter_count); - if (!val->pVertexBindingDivisors) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkVertexInputBindingDivisorDescription_temp(dec, &((VkVertexInputBindingDivisorDescription *)val->pVertexBindingDivisors)[i]); - } else { - vn_decode_array_size(dec, val->vertexBindingDivisorCount); - val->pVertexBindingDivisors = NULL; - } -} - -static inline void -vn_decode_VkPipelineVertexInputDivisorStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineVertexInputDivisorStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineVertexInputDivisorStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineVertexInputDivisorStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineVertexInputDivisorStateCreateInfo_handle_self(VkPipelineVertexInputDivisorStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->vertexBindingDivisorCount */ - if (val->pVertexBindingDivisors) { - for (uint32_t i = 0; i < val->vertexBindingDivisorCount; i++) - vn_replace_VkVertexInputBindingDivisorDescription_handle(&((VkVertexInputBindingDivisorDescription *)val->pVertexBindingDivisors)[i]); - } -} - -static inline void -vn_replace_VkPipelineVertexInputDivisorStateCreateInfo_handle(VkPipelineVertexInputDivisorStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO: - vn_replace_VkPipelineVertexInputDivisorStateCreateInfo_handle_self((VkPipelineVertexInputDivisorStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineVertexInputStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineVertexInputStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineVertexInputDivisorStateCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineVertexInputDivisorStateCreateInfo *)pnext)->pNext = vn_decode_VkPipelineVertexInputStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineVertexInputDivisorStateCreateInfo_self_temp(dec, (VkPipelineVertexInputDivisorStateCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineVertexInputStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineVertexInputStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->vertexBindingDescriptionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->vertexBindingDescriptionCount); - val->pVertexBindingDescriptions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pVertexBindingDescriptions), iter_count); - if (!val->pVertexBindingDescriptions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkVertexInputBindingDescription_temp(dec, &((VkVertexInputBindingDescription *)val->pVertexBindingDescriptions)[i]); - } else { - vn_decode_array_size(dec, val->vertexBindingDescriptionCount); - val->pVertexBindingDescriptions = NULL; - } - vn_decode_uint32_t(dec, &val->vertexAttributeDescriptionCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->vertexAttributeDescriptionCount); - val->pVertexAttributeDescriptions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pVertexAttributeDescriptions), iter_count); - if (!val->pVertexAttributeDescriptions) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkVertexInputAttributeDescription_temp(dec, &((VkVertexInputAttributeDescription *)val->pVertexAttributeDescriptions)[i]); - } else { - vn_decode_array_size(dec, val->vertexAttributeDescriptionCount); - val->pVertexAttributeDescriptions = NULL; - } -} - -static inline void -vn_decode_VkPipelineVertexInputStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineVertexInputStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineVertexInputStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineVertexInputStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineVertexInputStateCreateInfo_handle_self(VkPipelineVertexInputStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->vertexBindingDescriptionCount */ - if (val->pVertexBindingDescriptions) { - for (uint32_t i = 0; i < val->vertexBindingDescriptionCount; i++) - vn_replace_VkVertexInputBindingDescription_handle(&((VkVertexInputBindingDescription *)val->pVertexBindingDescriptions)[i]); - } - /* skip val->vertexAttributeDescriptionCount */ - if (val->pVertexAttributeDescriptions) { - for (uint32_t i = 0; i < val->vertexAttributeDescriptionCount; i++) - vn_replace_VkVertexInputAttributeDescription_handle(&((VkVertexInputAttributeDescription *)val->pVertexAttributeDescriptions)[i]); - } -} - -static inline void -vn_replace_VkPipelineVertexInputStateCreateInfo_handle(VkPipelineVertexInputStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO: - vn_replace_VkPipelineVertexInputStateCreateInfo_handle_self((VkPipelineVertexInputStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO: - vn_replace_VkPipelineVertexInputDivisorStateCreateInfo_handle_self((VkPipelineVertexInputDivisorStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineInputAssemblyStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineInputAssemblyStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineInputAssemblyStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineInputAssemblyStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkPrimitiveTopology(dec, &val->topology); - vn_decode_VkBool32(dec, &val->primitiveRestartEnable); -} - -static inline void -vn_decode_VkPipelineInputAssemblyStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineInputAssemblyStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineInputAssemblyStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineInputAssemblyStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineInputAssemblyStateCreateInfo_handle_self(VkPipelineInputAssemblyStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->topology */ - /* skip val->primitiveRestartEnable */ -} - -static inline void -vn_replace_VkPipelineInputAssemblyStateCreateInfo_handle(VkPipelineInputAssemblyStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO: - vn_replace_VkPipelineInputAssemblyStateCreateInfo_handle_self((VkPipelineInputAssemblyStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineTessellationDomainOriginStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineTessellationDomainOriginStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineTessellationDomainOriginStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineTessellationDomainOriginStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkTessellationDomainOrigin(dec, &val->domainOrigin); -} - -static inline void -vn_decode_VkPipelineTessellationDomainOriginStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineTessellationDomainOriginStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineTessellationDomainOriginStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineTessellationDomainOriginStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineTessellationDomainOriginStateCreateInfo_handle_self(VkPipelineTessellationDomainOriginStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->domainOrigin */ -} - -static inline void -vn_replace_VkPipelineTessellationDomainOriginStateCreateInfo_handle(VkPipelineTessellationDomainOriginStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: - vn_replace_VkPipelineTessellationDomainOriginStateCreateInfo_handle_self((VkPipelineTessellationDomainOriginStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineTessellationStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineTessellationStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineTessellationDomainOriginStateCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineTessellationDomainOriginStateCreateInfo *)pnext)->pNext = vn_decode_VkPipelineTessellationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineTessellationDomainOriginStateCreateInfo_self_temp(dec, (VkPipelineTessellationDomainOriginStateCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineTessellationStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineTessellationStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->patchControlPoints); -} - -static inline void -vn_decode_VkPipelineTessellationStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineTessellationStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineTessellationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineTessellationStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineTessellationStateCreateInfo_handle_self(VkPipelineTessellationStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->patchControlPoints */ -} - -static inline void -vn_replace_VkPipelineTessellationStateCreateInfo_handle(VkPipelineTessellationStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO: - vn_replace_VkPipelineTessellationStateCreateInfo_handle_self((VkPipelineTessellationStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: - vn_replace_VkPipelineTessellationDomainOriginStateCreateInfo_handle_self((VkPipelineTessellationDomainOriginStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineViewportDepthClipControlCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineViewportDepthClipControlCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineViewportDepthClipControlCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineViewportDepthClipControlCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->negativeOneToOne); -} - -static inline void -vn_decode_VkPipelineViewportDepthClipControlCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineViewportDepthClipControlCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineViewportDepthClipControlCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineViewportDepthClipControlCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineViewportDepthClipControlCreateInfoEXT_handle_self(VkPipelineViewportDepthClipControlCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->negativeOneToOne */ -} - -static inline void -vn_replace_VkPipelineViewportDepthClipControlCreateInfoEXT_handle(VkPipelineViewportDepthClipControlCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT: - vn_replace_VkPipelineViewportDepthClipControlCreateInfoEXT_handle_self((VkPipelineViewportDepthClipControlCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineViewportDepthClampControlCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineViewportDepthClampControlCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineViewportDepthClampControlCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineViewportDepthClampControlCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDepthClampModeEXT(dec, &val->depthClampMode); - if (vn_decode_simple_pointer(dec)) { - val->pDepthClampRange = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthClampRange)); - if (!val->pDepthClampRange) return; - vn_decode_VkDepthClampRangeEXT_temp(dec, (VkDepthClampRangeEXT *)val->pDepthClampRange); - } else { - val->pDepthClampRange = NULL; - } -} - -static inline void -vn_decode_VkPipelineViewportDepthClampControlCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineViewportDepthClampControlCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineViewportDepthClampControlCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineViewportDepthClampControlCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineViewportDepthClampControlCreateInfoEXT_handle_self(VkPipelineViewportDepthClampControlCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthClampMode */ - if (val->pDepthClampRange) - vn_replace_VkDepthClampRangeEXT_handle((VkDepthClampRangeEXT *)val->pDepthClampRange); -} - -static inline void -vn_replace_VkPipelineViewportDepthClampControlCreateInfoEXT_handle(VkPipelineViewportDepthClampControlCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT: - vn_replace_VkPipelineViewportDepthClampControlCreateInfoEXT_handle_self((VkPipelineViewportDepthClampControlCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineViewportStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineViewportStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineViewportDepthClipControlCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineViewportDepthClipControlCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineViewportStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineViewportDepthClipControlCreateInfoEXT_self_temp(dec, (VkPipelineViewportDepthClipControlCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineViewportDepthClampControlCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineViewportDepthClampControlCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineViewportStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineViewportDepthClampControlCreateInfoEXT_self_temp(dec, (VkPipelineViewportDepthClampControlCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineViewportStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineViewportStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->viewportCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->viewportCount); - val->pViewports = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pViewports), iter_count); - if (!val->pViewports) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkViewport_temp(dec, &((VkViewport *)val->pViewports)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pViewports = NULL; - } - vn_decode_uint32_t(dec, &val->scissorCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->scissorCount); - val->pScissors = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pScissors), iter_count); - if (!val->pScissors) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRect2D_temp(dec, &((VkRect2D *)val->pScissors)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pScissors = NULL; - } -} - -static inline void -vn_decode_VkPipelineViewportStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineViewportStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineViewportStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineViewportStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineViewportStateCreateInfo_handle_self(VkPipelineViewportStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->viewportCount */ - if (val->pViewports) { - for (uint32_t i = 0; i < val->viewportCount; i++) - vn_replace_VkViewport_handle(&((VkViewport *)val->pViewports)[i]); - } - /* skip val->scissorCount */ - if (val->pScissors) { - for (uint32_t i = 0; i < val->scissorCount; i++) - vn_replace_VkRect2D_handle(&((VkRect2D *)val->pScissors)[i]); - } -} - -static inline void -vn_replace_VkPipelineViewportStateCreateInfo_handle(VkPipelineViewportStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO: - vn_replace_VkPipelineViewportStateCreateInfo_handle_self((VkPipelineViewportStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT: - vn_replace_VkPipelineViewportDepthClipControlCreateInfoEXT_handle_self((VkPipelineViewportDepthClipControlCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT: - vn_replace_VkPipelineViewportDepthClampControlCreateInfoEXT_handle_self((VkPipelineViewportDepthClampControlCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRasterizationConservativeStateCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineRasterizationConservativeStateCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRasterizationConservativeStateCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationConservativeStateCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkConservativeRasterizationModeEXT(dec, &val->conservativeRasterizationMode); - vn_decode_float(dec, &val->extraPrimitiveOverestimationSize); -} - -static inline void -vn_decode_VkPipelineRasterizationConservativeStateCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationConservativeStateCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRasterizationConservativeStateCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineRasterizationConservativeStateCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRasterizationConservativeStateCreateInfoEXT_handle_self(VkPipelineRasterizationConservativeStateCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->conservativeRasterizationMode */ - /* skip val->extraPrimitiveOverestimationSize */ -} - -static inline void -vn_replace_VkPipelineRasterizationConservativeStateCreateInfoEXT_handle(VkPipelineRasterizationConservativeStateCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationConservativeStateCreateInfoEXT_handle_self((VkPipelineRasterizationConservativeStateCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRasterizationStateStreamCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineRasterizationStateStreamCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRasterizationStateStreamCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationStateStreamCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->rasterizationStream); -} - -static inline void -vn_decode_VkPipelineRasterizationStateStreamCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationStateStreamCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRasterizationStateStreamCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineRasterizationStateStreamCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRasterizationStateStreamCreateInfoEXT_handle_self(VkPipelineRasterizationStateStreamCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->rasterizationStream */ -} - -static inline void -vn_replace_VkPipelineRasterizationStateStreamCreateInfoEXT_handle(VkPipelineRasterizationStateStreamCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationStateStreamCreateInfoEXT_handle_self((VkPipelineRasterizationStateStreamCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRasterizationDepthClipStateCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineRasterizationDepthClipStateCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRasterizationDepthClipStateCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationDepthClipStateCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkBool32(dec, &val->depthClipEnable); -} - -static inline void -vn_decode_VkPipelineRasterizationDepthClipStateCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationDepthClipStateCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRasterizationDepthClipStateCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineRasterizationDepthClipStateCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRasterizationDepthClipStateCreateInfoEXT_handle_self(VkPipelineRasterizationDepthClipStateCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->depthClipEnable */ -} - -static inline void -vn_replace_VkPipelineRasterizationDepthClipStateCreateInfoEXT_handle(VkPipelineRasterizationDepthClipStateCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationDepthClipStateCreateInfoEXT_handle_self((VkPipelineRasterizationDepthClipStateCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRasterizationLineStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineRasterizationLineStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRasterizationLineStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationLineStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkLineRasterizationMode(dec, &val->lineRasterizationMode); - vn_decode_VkBool32(dec, &val->stippledLineEnable); - vn_decode_uint32_t(dec, &val->lineStippleFactor); - vn_decode_uint16_t(dec, &val->lineStipplePattern); -} - -static inline void -vn_decode_VkPipelineRasterizationLineStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationLineStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRasterizationLineStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationLineStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRasterizationLineStateCreateInfo_handle_self(VkPipelineRasterizationLineStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->lineRasterizationMode */ - /* skip val->stippledLineEnable */ - /* skip val->lineStippleFactor */ - /* skip val->lineStipplePattern */ -} - -static inline void -vn_replace_VkPipelineRasterizationLineStateCreateInfo_handle(VkPipelineRasterizationLineStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO: - vn_replace_VkPipelineRasterizationLineStateCreateInfo_handle_self((VkPipelineRasterizationLineStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkProvokingVertexModeEXT(dec, &val->provokingVertexMode); -} - -static inline void -vn_decode_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_handle_self(VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->provokingVertexMode */ -} - -static inline void -vn_replace_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_handle(VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_handle_self((VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRasterizationStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRasterizationConservativeStateCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRasterizationConservativeStateCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationConservativeStateCreateInfoEXT_self_temp(dec, (VkPipelineRasterizationConservativeStateCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRasterizationStateStreamCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRasterizationStateStreamCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationStateStreamCreateInfoEXT_self_temp(dec, (VkPipelineRasterizationStateStreamCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRasterizationDepthClipStateCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRasterizationDepthClipStateCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationDepthClipStateCreateInfoEXT_self_temp(dec, (VkPipelineRasterizationDepthClipStateCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRasterizationLineStateCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRasterizationLineStateCreateInfo *)pnext)->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationLineStateCreateInfo_self_temp(dec, (VkPipelineRasterizationLineStateCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRasterizationProvokingVertexStateCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_self_temp(dec, (VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDepthBiasRepresentationInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkDepthBiasRepresentationInfoEXT *)pnext)->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkDepthBiasRepresentationInfoEXT_self_temp(dec, (VkDepthBiasRepresentationInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineRasterizationStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkBool32(dec, &val->depthClampEnable); - vn_decode_VkBool32(dec, &val->rasterizerDiscardEnable); - vn_decode_VkPolygonMode(dec, &val->polygonMode); - vn_decode_VkFlags(dec, &val->cullMode); - vn_decode_VkFrontFace(dec, &val->frontFace); - vn_decode_VkBool32(dec, &val->depthBiasEnable); - vn_decode_float(dec, &val->depthBiasConstantFactor); - vn_decode_float(dec, &val->depthBiasClamp); - vn_decode_float(dec, &val->depthBiasSlopeFactor); - vn_decode_float(dec, &val->lineWidth); -} - -static inline void -vn_decode_VkPipelineRasterizationStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineRasterizationStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRasterizationStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRasterizationStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRasterizationStateCreateInfo_handle_self(VkPipelineRasterizationStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->depthClampEnable */ - /* skip val->rasterizerDiscardEnable */ - /* skip val->polygonMode */ - /* skip val->cullMode */ - /* skip val->frontFace */ - /* skip val->depthBiasEnable */ - /* skip val->depthBiasConstantFactor */ - /* skip val->depthBiasClamp */ - /* skip val->depthBiasSlopeFactor */ - /* skip val->lineWidth */ -} - -static inline void -vn_replace_VkPipelineRasterizationStateCreateInfo_handle(VkPipelineRasterizationStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO: - vn_replace_VkPipelineRasterizationStateCreateInfo_handle_self((VkPipelineRasterizationStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationConservativeStateCreateInfoEXT_handle_self((VkPipelineRasterizationConservativeStateCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationStateStreamCreateInfoEXT_handle_self((VkPipelineRasterizationStateStreamCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationDepthClipStateCreateInfoEXT_handle_self((VkPipelineRasterizationDepthClipStateCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO: - vn_replace_VkPipelineRasterizationLineStateCreateInfo_handle_self((VkPipelineRasterizationLineStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT_handle_self((VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: - vn_replace_VkDepthBiasRepresentationInfoEXT_handle_self((VkDepthBiasRepresentationInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineSampleLocationsStateCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineSampleLocationsStateCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineSampleLocationsStateCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineSampleLocationsStateCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->sampleLocationsEnable); - vn_decode_VkSampleLocationsInfoEXT_temp(dec, &val->sampleLocationsInfo); -} - -static inline void -vn_decode_VkPipelineSampleLocationsStateCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineSampleLocationsStateCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineSampleLocationsStateCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineSampleLocationsStateCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineSampleLocationsStateCreateInfoEXT_handle_self(VkPipelineSampleLocationsStateCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->sampleLocationsEnable */ - vn_replace_VkSampleLocationsInfoEXT_handle(&val->sampleLocationsInfo); -} - -static inline void -vn_replace_VkPipelineSampleLocationsStateCreateInfoEXT_handle(VkPipelineSampleLocationsStateCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineSampleLocationsStateCreateInfoEXT_handle_self((VkPipelineSampleLocationsStateCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineMultisampleStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineMultisampleStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineSampleLocationsStateCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineSampleLocationsStateCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineMultisampleStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineSampleLocationsStateCreateInfoEXT_self_temp(dec, (VkPipelineSampleLocationsStateCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineMultisampleStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineMultisampleStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkSampleCountFlagBits(dec, &val->rasterizationSamples); - vn_decode_VkBool32(dec, &val->sampleShadingEnable); - vn_decode_float(dec, &val->minSampleShading); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, (val->rasterizationSamples + 31) / 32); - val->pSampleMask = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSampleMask), array_size); - if (!val->pSampleMask) return; - vn_decode_VkSampleMask_array(dec, (VkSampleMask *)val->pSampleMask, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pSampleMask = NULL; - } - vn_decode_VkBool32(dec, &val->alphaToCoverageEnable); - vn_decode_VkBool32(dec, &val->alphaToOneEnable); -} - -static inline void -vn_decode_VkPipelineMultisampleStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineMultisampleStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineMultisampleStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineMultisampleStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineMultisampleStateCreateInfo_handle_self(VkPipelineMultisampleStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->rasterizationSamples */ - /* skip val->sampleShadingEnable */ - /* skip val->minSampleShading */ - /* skip val->pSampleMask */ - /* skip val->alphaToCoverageEnable */ - /* skip val->alphaToOneEnable */ -} - -static inline void -vn_replace_VkPipelineMultisampleStateCreateInfo_handle(VkPipelineMultisampleStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO: - vn_replace_VkPipelineMultisampleStateCreateInfo_handle_self((VkPipelineMultisampleStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineSampleLocationsStateCreateInfoEXT_handle_self((VkPipelineSampleLocationsStateCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkStencilOpState */ - -static inline void -vn_decode_VkStencilOpState_temp(struct vn_cs_decoder *dec, VkStencilOpState *val) -{ - vn_decode_VkStencilOp(dec, &val->failOp); - vn_decode_VkStencilOp(dec, &val->passOp); - vn_decode_VkStencilOp(dec, &val->depthFailOp); - vn_decode_VkCompareOp(dec, &val->compareOp); - vn_decode_uint32_t(dec, &val->compareMask); - vn_decode_uint32_t(dec, &val->writeMask); - vn_decode_uint32_t(dec, &val->reference); -} - -static inline void -vn_replace_VkStencilOpState_handle(VkStencilOpState *val) -{ - /* skip val->failOp */ - /* skip val->passOp */ - /* skip val->depthFailOp */ - /* skip val->compareOp */ - /* skip val->compareMask */ - /* skip val->writeMask */ - /* skip val->reference */ -} - -/* struct VkPipelineDepthStencilStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineDepthStencilStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineDepthStencilStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineDepthStencilStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkBool32(dec, &val->depthTestEnable); - vn_decode_VkBool32(dec, &val->depthWriteEnable); - vn_decode_VkCompareOp(dec, &val->depthCompareOp); - vn_decode_VkBool32(dec, &val->depthBoundsTestEnable); - vn_decode_VkBool32(dec, &val->stencilTestEnable); - vn_decode_VkStencilOpState_temp(dec, &val->front); - vn_decode_VkStencilOpState_temp(dec, &val->back); - vn_decode_float(dec, &val->minDepthBounds); - vn_decode_float(dec, &val->maxDepthBounds); -} - -static inline void -vn_decode_VkPipelineDepthStencilStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineDepthStencilStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineDepthStencilStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineDepthStencilStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineDepthStencilStateCreateInfo_handle_self(VkPipelineDepthStencilStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->depthTestEnable */ - /* skip val->depthWriteEnable */ - /* skip val->depthCompareOp */ - /* skip val->depthBoundsTestEnable */ - /* skip val->stencilTestEnable */ - vn_replace_VkStencilOpState_handle(&val->front); - vn_replace_VkStencilOpState_handle(&val->back); - /* skip val->minDepthBounds */ - /* skip val->maxDepthBounds */ -} - -static inline void -vn_replace_VkPipelineDepthStencilStateCreateInfo_handle(VkPipelineDepthStencilStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO: - vn_replace_VkPipelineDepthStencilStateCreateInfo_handle_self((VkPipelineDepthStencilStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineColorBlendAttachmentState */ - -static inline void -vn_decode_VkPipelineColorBlendAttachmentState_temp(struct vn_cs_decoder *dec, VkPipelineColorBlendAttachmentState *val) -{ - vn_decode_VkBool32(dec, &val->blendEnable); - vn_decode_VkBlendFactor(dec, &val->srcColorBlendFactor); - vn_decode_VkBlendFactor(dec, &val->dstColorBlendFactor); - vn_decode_VkBlendOp(dec, &val->colorBlendOp); - vn_decode_VkBlendFactor(dec, &val->srcAlphaBlendFactor); - vn_decode_VkBlendFactor(dec, &val->dstAlphaBlendFactor); - vn_decode_VkBlendOp(dec, &val->alphaBlendOp); - vn_decode_VkFlags(dec, &val->colorWriteMask); -} - -static inline void -vn_replace_VkPipelineColorBlendAttachmentState_handle(VkPipelineColorBlendAttachmentState *val) -{ - /* skip val->blendEnable */ - /* skip val->srcColorBlendFactor */ - /* skip val->dstColorBlendFactor */ - /* skip val->colorBlendOp */ - /* skip val->srcAlphaBlendFactor */ - /* skip val->dstAlphaBlendFactor */ - /* skip val->alphaBlendOp */ - /* skip val->colorWriteMask */ -} - -/* struct VkPipelineColorBlendAdvancedStateCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineColorBlendAdvancedStateCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineColorBlendAdvancedStateCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineColorBlendAdvancedStateCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->srcPremultiplied); - vn_decode_VkBool32(dec, &val->dstPremultiplied); - vn_decode_VkBlendOverlapEXT(dec, &val->blendOverlap); -} - -static inline void -vn_decode_VkPipelineColorBlendAdvancedStateCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineColorBlendAdvancedStateCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineColorBlendAdvancedStateCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineColorBlendAdvancedStateCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineColorBlendAdvancedStateCreateInfoEXT_handle_self(VkPipelineColorBlendAdvancedStateCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcPremultiplied */ - /* skip val->dstPremultiplied */ - /* skip val->blendOverlap */ -} - -static inline void -vn_replace_VkPipelineColorBlendAdvancedStateCreateInfoEXT_handle(VkPipelineColorBlendAdvancedStateCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineColorBlendAdvancedStateCreateInfoEXT_handle_self((VkPipelineColorBlendAdvancedStateCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineColorWriteCreateInfoEXT chain */ - -static inline void * -vn_decode_VkPipelineColorWriteCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineColorWriteCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkPipelineColorWriteCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->attachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->attachmentCount); - val->pColorWriteEnables = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorWriteEnables), array_size); - if (!val->pColorWriteEnables) return; - vn_decode_VkBool32_array(dec, (VkBool32 *)val->pColorWriteEnables, array_size); - } else { - vn_decode_array_size(dec, val->attachmentCount); - val->pColorWriteEnables = NULL; - } -} - -static inline void -vn_decode_VkPipelineColorWriteCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkPipelineColorWriteCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineColorWriteCreateInfoEXT_pnext_temp(dec); - vn_decode_VkPipelineColorWriteCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineColorWriteCreateInfoEXT_handle_self(VkPipelineColorWriteCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachmentCount */ - /* skip val->pColorWriteEnables */ -} - -static inline void -vn_replace_VkPipelineColorWriteCreateInfoEXT_handle(VkPipelineColorWriteCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: - vn_replace_VkPipelineColorWriteCreateInfoEXT_handle_self((VkPipelineColorWriteCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineColorBlendStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineColorBlendStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineColorBlendAdvancedStateCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineColorBlendAdvancedStateCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineColorBlendStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineColorBlendAdvancedStateCreateInfoEXT_self_temp(dec, (VkPipelineColorBlendAdvancedStateCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineColorWriteCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineColorWriteCreateInfoEXT *)pnext)->pNext = vn_decode_VkPipelineColorBlendStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineColorWriteCreateInfoEXT_self_temp(dec, (VkPipelineColorWriteCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkPipelineColorBlendStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineColorBlendStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkBool32(dec, &val->logicOpEnable); - vn_decode_VkLogicOp(dec, &val->logicOp); - vn_decode_uint32_t(dec, &val->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachments), iter_count); - if (!val->pAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipelineColorBlendAttachmentState_temp(dec, &((VkPipelineColorBlendAttachmentState *)val->pAttachments)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pAttachments = NULL; - } - { - const size_t array_size = vn_decode_array_size(dec, 4); - vn_decode_float_array(dec, val->blendConstants, array_size); - } -} - -static inline void -vn_decode_VkPipelineColorBlendStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineColorBlendStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineColorBlendStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineColorBlendStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineColorBlendStateCreateInfo_handle_self(VkPipelineColorBlendStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->logicOpEnable */ - /* skip val->logicOp */ - /* skip val->attachmentCount */ - if (val->pAttachments) { - for (uint32_t i = 0; i < val->attachmentCount; i++) - vn_replace_VkPipelineColorBlendAttachmentState_handle(&((VkPipelineColorBlendAttachmentState *)val->pAttachments)[i]); - } - /* skip val->blendConstants */ -} - -static inline void -vn_replace_VkPipelineColorBlendStateCreateInfo_handle(VkPipelineColorBlendStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO: - vn_replace_VkPipelineColorBlendStateCreateInfo_handle_self((VkPipelineColorBlendStateCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: - vn_replace_VkPipelineColorBlendAdvancedStateCreateInfoEXT_handle_self((VkPipelineColorBlendAdvancedStateCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: - vn_replace_VkPipelineColorWriteCreateInfoEXT_handle_self((VkPipelineColorWriteCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineDynamicStateCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineDynamicStateCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineDynamicStateCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineDynamicStateCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->dynamicStateCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->dynamicStateCount); - val->pDynamicStates = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDynamicStates), array_size); - if (!val->pDynamicStates) return; - vn_decode_VkDynamicState_array(dec, (VkDynamicState *)val->pDynamicStates, array_size); - } else { - vn_decode_array_size(dec, val->dynamicStateCount); - val->pDynamicStates = NULL; - } -} - -static inline void -vn_decode_VkPipelineDynamicStateCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineDynamicStateCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineDynamicStateCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineDynamicStateCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineDynamicStateCreateInfo_handle_self(VkPipelineDynamicStateCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->dynamicStateCount */ - /* skip val->pDynamicStates */ -} - -static inline void -vn_replace_VkPipelineDynamicStateCreateInfo_handle(VkPipelineDynamicStateCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO: - vn_replace_VkPipelineDynamicStateCreateInfo_handle_self((VkPipelineDynamicStateCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineCreateFlags2CreateInfo chain */ - -static inline void * -vn_decode_VkPipelineCreateFlags2CreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineCreateFlags2CreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineCreateFlags2CreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags64(dec, &val->flags); -} - -static inline void -vn_decode_VkPipelineCreateFlags2CreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineCreateFlags2CreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineCreateFlags2CreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCreateFlags2CreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineCreateFlags2CreateInfo_handle_self(VkPipelineCreateFlags2CreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkPipelineCreateFlags2CreateInfo_handle(VkPipelineCreateFlags2CreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - vn_replace_VkPipelineCreateFlags2CreateInfo_handle_self((VkPipelineCreateFlags2CreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineLibraryCreateInfoKHR chain */ - -static inline void * -vn_decode_VkPipelineLibraryCreateInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineLibraryCreateInfoKHR_self_temp(struct vn_cs_decoder *dec, VkPipelineLibraryCreateInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->libraryCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->libraryCount); - val->pLibraries = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pLibraries), iter_count); - if (!val->pLibraries) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipeline_lookup(dec, &((VkPipeline *)val->pLibraries)[i]); - } else { - vn_decode_array_size(dec, val->libraryCount); - val->pLibraries = NULL; - } -} - -static inline void -vn_decode_VkPipelineLibraryCreateInfoKHR_temp(struct vn_cs_decoder *dec, VkPipelineLibraryCreateInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineLibraryCreateInfoKHR_pnext_temp(dec); - vn_decode_VkPipelineLibraryCreateInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineLibraryCreateInfoKHR_handle_self(VkPipelineLibraryCreateInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->libraryCount */ - if (val->pLibraries) { - for (uint32_t i = 0; i < val->libraryCount; i++) - vn_replace_VkPipeline_handle(&((VkPipeline *)val->pLibraries)[i]); - } -} - -static inline void -vn_replace_VkPipelineLibraryCreateInfoKHR_handle(VkPipelineLibraryCreateInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: - vn_replace_VkPipelineLibraryCreateInfoKHR_handle_self((VkPipelineLibraryCreateInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineCreationFeedback */ - -static inline void -vn_decode_VkPipelineCreationFeedback_temp(struct vn_cs_decoder *dec, VkPipelineCreationFeedback *val) -{ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint64_t(dec, &val->duration); -} - -static inline void -vn_replace_VkPipelineCreationFeedback_handle(VkPipelineCreationFeedback *val) -{ - /* skip val->flags */ - /* skip val->duration */ -} - -/* struct VkPipelineCreationFeedbackCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineCreationFeedbackCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineCreationFeedbackCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineCreationFeedbackCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pPipelineCreationFeedback = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pPipelineCreationFeedback)); - if (!val->pPipelineCreationFeedback) return; - vn_decode_VkPipelineCreationFeedback_temp(dec, val->pPipelineCreationFeedback); - } else { - val->pPipelineCreationFeedback = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_uint32_t(dec, &val->pipelineStageCreationFeedbackCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->pipelineStageCreationFeedbackCount); - val->pPipelineStageCreationFeedbacks = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPipelineStageCreationFeedbacks), iter_count); - if (!val->pPipelineStageCreationFeedbacks) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipelineCreationFeedback_temp(dec, &val->pPipelineStageCreationFeedbacks[i]); - } else { - vn_decode_array_size(dec, val->pipelineStageCreationFeedbackCount); - val->pPipelineStageCreationFeedbacks = NULL; - } -} - -static inline void -vn_decode_VkPipelineCreationFeedbackCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineCreationFeedbackCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineCreationFeedbackCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCreationFeedbackCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineCreationFeedbackCreateInfo_handle_self(VkPipelineCreationFeedbackCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pPipelineCreationFeedback) - vn_replace_VkPipelineCreationFeedback_handle(val->pPipelineCreationFeedback); - /* skip val->pipelineStageCreationFeedbackCount */ - if (val->pPipelineStageCreationFeedbacks) { - for (uint32_t i = 0; i < val->pipelineStageCreationFeedbackCount; i++) - vn_replace_VkPipelineCreationFeedback_handle(&val->pPipelineStageCreationFeedbacks[i]); - } -} - -static inline void -vn_replace_VkPipelineCreationFeedbackCreateInfo_handle(VkPipelineCreationFeedbackCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - vn_replace_VkPipelineCreationFeedbackCreateInfo_handle_self((VkPipelineCreationFeedbackCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineFragmentShadingRateStateCreateInfoKHR chain */ - -static inline void * -vn_decode_VkPipelineFragmentShadingRateStateCreateInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineFragmentShadingRateStateCreateInfoKHR_self_temp(struct vn_cs_decoder *dec, VkPipelineFragmentShadingRateStateCreateInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkExtent2D_temp(dec, &val->fragmentSize); - { - const size_t array_size = vn_decode_array_size(dec, 2); - vn_decode_VkFragmentShadingRateCombinerOpKHR_array(dec, val->combinerOps, array_size); - } -} - -static inline void -vn_decode_VkPipelineFragmentShadingRateStateCreateInfoKHR_temp(struct vn_cs_decoder *dec, VkPipelineFragmentShadingRateStateCreateInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineFragmentShadingRateStateCreateInfoKHR_pnext_temp(dec); - vn_decode_VkPipelineFragmentShadingRateStateCreateInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineFragmentShadingRateStateCreateInfoKHR_handle_self(VkPipelineFragmentShadingRateStateCreateInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkExtent2D_handle(&val->fragmentSize); - /* skip val->combinerOps */ -} - -static inline void -vn_replace_VkPipelineFragmentShadingRateStateCreateInfoKHR_handle(VkPipelineFragmentShadingRateStateCreateInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR: - vn_replace_VkPipelineFragmentShadingRateStateCreateInfoKHR_handle_self((VkPipelineFragmentShadingRateStateCreateInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPipelineRenderingCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineRenderingCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineRenderingCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineRenderingCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->viewMask); - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachmentFormats = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachmentFormats), array_size); - if (!val->pColorAttachmentFormats) return; - vn_decode_VkFormat_array(dec, (VkFormat *)val->pColorAttachmentFormats, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pColorAttachmentFormats = NULL; - } - vn_decode_VkFormat(dec, &val->depthAttachmentFormat); - vn_decode_VkFormat(dec, &val->stencilAttachmentFormat); -} - -static inline void -vn_decode_VkPipelineRenderingCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineRenderingCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineRenderingCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRenderingCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineRenderingCreateInfo_handle_self(VkPipelineRenderingCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->viewMask */ - /* skip val->colorAttachmentCount */ - /* skip val->pColorAttachmentFormats */ - /* skip val->depthAttachmentFormat */ - /* skip val->stencilAttachmentFormat */ -} - -static inline void -vn_replace_VkPipelineRenderingCreateInfo_handle(VkPipelineRenderingCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: - vn_replace_VkPipelineRenderingCreateInfo_handle_self((VkPipelineRenderingCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkGraphicsPipelineLibraryCreateInfoEXT chain */ - -static inline void * -vn_decode_VkGraphicsPipelineLibraryCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkGraphicsPipelineLibraryCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkGraphicsPipelineLibraryCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkGraphicsPipelineLibraryCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkGraphicsPipelineLibraryCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkGraphicsPipelineLibraryCreateInfoEXT_pnext_temp(dec); - vn_decode_VkGraphicsPipelineLibraryCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkGraphicsPipelineLibraryCreateInfoEXT_handle_self(VkGraphicsPipelineLibraryCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkGraphicsPipelineLibraryCreateInfoEXT_handle(VkGraphicsPipelineLibraryCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: - vn_replace_VkGraphicsPipelineLibraryCreateInfoEXT_handle_self((VkGraphicsPipelineLibraryCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkGraphicsPipelineCreateInfo chain */ - -static inline void * -vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineCreateFlags2CreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineCreateFlags2CreateInfo *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCreateFlags2CreateInfo_self_temp(dec, (VkPipelineCreateFlags2CreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineLibraryCreateInfoKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineLibraryCreateInfoKHR *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineLibraryCreateInfoKHR_self_temp(dec, (VkPipelineLibraryCreateInfoKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineCreationFeedbackCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineCreationFeedbackCreateInfo *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCreationFeedbackCreateInfo_self_temp(dec, (VkPipelineCreationFeedbackCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineFragmentShadingRateStateCreateInfoKHR)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineFragmentShadingRateStateCreateInfoKHR *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineFragmentShadingRateStateCreateInfoKHR_self_temp(dec, (VkPipelineFragmentShadingRateStateCreateInfoKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRenderingCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRenderingCreateInfo *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRenderingCreateInfo_self_temp(dec, (VkPipelineRenderingCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkGraphicsPipelineLibraryCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkGraphicsPipelineLibraryCreateInfoEXT *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkGraphicsPipelineLibraryCreateInfoEXT_self_temp(dec, (VkGraphicsPipelineLibraryCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRobustnessCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRobustnessCreateInfo *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRobustnessCreateInfo_self_temp(dec, (VkPipelineRobustnessCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderingAttachmentLocationInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderingAttachmentLocationInfo *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkRenderingAttachmentLocationInfo_self_temp(dec, (VkRenderingAttachmentLocationInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderingInputAttachmentIndexInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderingInputAttachmentIndexInfo *)pnext)->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkRenderingInputAttachmentIndexInfo_self_temp(dec, (VkRenderingInputAttachmentIndexInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkGraphicsPipelineCreateInfo_self_temp(struct vn_cs_decoder *dec, VkGraphicsPipelineCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->stageCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->stageCount); - val->pStages = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pStages), iter_count); - if (!val->pStages) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipelineShaderStageCreateInfo_temp(dec, &((VkPipelineShaderStageCreateInfo *)val->pStages)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pStages = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pVertexInputState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pVertexInputState)); - if (!val->pVertexInputState) return; - vn_decode_VkPipelineVertexInputStateCreateInfo_temp(dec, (VkPipelineVertexInputStateCreateInfo *)val->pVertexInputState); - } else { - val->pVertexInputState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pInputAssemblyState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pInputAssemblyState)); - if (!val->pInputAssemblyState) return; - vn_decode_VkPipelineInputAssemblyStateCreateInfo_temp(dec, (VkPipelineInputAssemblyStateCreateInfo *)val->pInputAssemblyState); - } else { - val->pInputAssemblyState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pTessellationState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pTessellationState)); - if (!val->pTessellationState) return; - vn_decode_VkPipelineTessellationStateCreateInfo_temp(dec, (VkPipelineTessellationStateCreateInfo *)val->pTessellationState); - } else { - val->pTessellationState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pViewportState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pViewportState)); - if (!val->pViewportState) return; - vn_decode_VkPipelineViewportStateCreateInfo_temp(dec, (VkPipelineViewportStateCreateInfo *)val->pViewportState); - } else { - val->pViewportState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pRasterizationState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pRasterizationState)); - if (!val->pRasterizationState) return; - vn_decode_VkPipelineRasterizationStateCreateInfo_temp(dec, (VkPipelineRasterizationStateCreateInfo *)val->pRasterizationState); - } else { - val->pRasterizationState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pMultisampleState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pMultisampleState)); - if (!val->pMultisampleState) return; - vn_decode_VkPipelineMultisampleStateCreateInfo_temp(dec, (VkPipelineMultisampleStateCreateInfo *)val->pMultisampleState); - } else { - val->pMultisampleState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDepthStencilState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthStencilState)); - if (!val->pDepthStencilState) return; - vn_decode_VkPipelineDepthStencilStateCreateInfo_temp(dec, (VkPipelineDepthStencilStateCreateInfo *)val->pDepthStencilState); - } else { - val->pDepthStencilState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pColorBlendState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pColorBlendState)); - if (!val->pColorBlendState) return; - vn_decode_VkPipelineColorBlendStateCreateInfo_temp(dec, (VkPipelineColorBlendStateCreateInfo *)val->pColorBlendState); - } else { - val->pColorBlendState = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDynamicState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDynamicState)); - if (!val->pDynamicState) return; - vn_decode_VkPipelineDynamicStateCreateInfo_temp(dec, (VkPipelineDynamicStateCreateInfo *)val->pDynamicState); - } else { - val->pDynamicState = NULL; - } - vn_decode_VkPipelineLayout_lookup(dec, &val->layout); - vn_decode_VkRenderPass_lookup(dec, &val->renderPass); - vn_decode_uint32_t(dec, &val->subpass); - vn_decode_VkPipeline_lookup(dec, &val->basePipelineHandle); - vn_decode_int32_t(dec, &val->basePipelineIndex); -} - -static inline void -vn_decode_VkGraphicsPipelineCreateInfo_temp(struct vn_cs_decoder *dec, VkGraphicsPipelineCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkGraphicsPipelineCreateInfo_pnext_temp(dec); - vn_decode_VkGraphicsPipelineCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkGraphicsPipelineCreateInfo_handle_self(VkGraphicsPipelineCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->stageCount */ - if (val->pStages) { - for (uint32_t i = 0; i < val->stageCount; i++) - vn_replace_VkPipelineShaderStageCreateInfo_handle(&((VkPipelineShaderStageCreateInfo *)val->pStages)[i]); - } - if (val->pVertexInputState) - vn_replace_VkPipelineVertexInputStateCreateInfo_handle((VkPipelineVertexInputStateCreateInfo *)val->pVertexInputState); - if (val->pInputAssemblyState) - vn_replace_VkPipelineInputAssemblyStateCreateInfo_handle((VkPipelineInputAssemblyStateCreateInfo *)val->pInputAssemblyState); - if (val->pTessellationState) - vn_replace_VkPipelineTessellationStateCreateInfo_handle((VkPipelineTessellationStateCreateInfo *)val->pTessellationState); - if (val->pViewportState) - vn_replace_VkPipelineViewportStateCreateInfo_handle((VkPipelineViewportStateCreateInfo *)val->pViewportState); - if (val->pRasterizationState) - vn_replace_VkPipelineRasterizationStateCreateInfo_handle((VkPipelineRasterizationStateCreateInfo *)val->pRasterizationState); - if (val->pMultisampleState) - vn_replace_VkPipelineMultisampleStateCreateInfo_handle((VkPipelineMultisampleStateCreateInfo *)val->pMultisampleState); - if (val->pDepthStencilState) - vn_replace_VkPipelineDepthStencilStateCreateInfo_handle((VkPipelineDepthStencilStateCreateInfo *)val->pDepthStencilState); - if (val->pColorBlendState) - vn_replace_VkPipelineColorBlendStateCreateInfo_handle((VkPipelineColorBlendStateCreateInfo *)val->pColorBlendState); - if (val->pDynamicState) - vn_replace_VkPipelineDynamicStateCreateInfo_handle((VkPipelineDynamicStateCreateInfo *)val->pDynamicState); - vn_replace_VkPipelineLayout_handle(&val->layout); - vn_replace_VkRenderPass_handle(&val->renderPass); - /* skip val->subpass */ - vn_replace_VkPipeline_handle(&val->basePipelineHandle); - /* skip val->basePipelineIndex */ -} - -static inline void -vn_replace_VkGraphicsPipelineCreateInfo_handle(VkGraphicsPipelineCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: - vn_replace_VkGraphicsPipelineCreateInfo_handle_self((VkGraphicsPipelineCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - vn_replace_VkPipelineCreateFlags2CreateInfo_handle_self((VkPipelineCreateFlags2CreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: - vn_replace_VkPipelineLibraryCreateInfoKHR_handle_self((VkPipelineLibraryCreateInfoKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - vn_replace_VkPipelineCreationFeedbackCreateInfo_handle_self((VkPipelineCreationFeedbackCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR: - vn_replace_VkPipelineFragmentShadingRateStateCreateInfoKHR_handle_self((VkPipelineFragmentShadingRateStateCreateInfoKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: - vn_replace_VkPipelineRenderingCreateInfo_handle_self((VkPipelineRenderingCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: - vn_replace_VkGraphicsPipelineLibraryCreateInfoEXT_handle_self((VkGraphicsPipelineLibraryCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - vn_replace_VkPipelineRobustnessCreateInfo_handle_self((VkPipelineRobustnessCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO: - vn_replace_VkRenderingAttachmentLocationInfo_handle_self((VkRenderingAttachmentLocationInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO: - vn_replace_VkRenderingInputAttachmentIndexInfo_handle_self((VkRenderingInputAttachmentIndexInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkComputePipelineCreateInfo chain */ - -static inline void * -vn_decode_VkComputePipelineCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineCreateFlags2CreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineCreateFlags2CreateInfo *)pnext)->pNext = vn_decode_VkComputePipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCreateFlags2CreateInfo_self_temp(dec, (VkPipelineCreateFlags2CreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineCreationFeedbackCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineCreationFeedbackCreateInfo *)pnext)->pNext = vn_decode_VkComputePipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCreationFeedbackCreateInfo_self_temp(dec, (VkPipelineCreationFeedbackCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRobustnessCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRobustnessCreateInfo *)pnext)->pNext = vn_decode_VkComputePipelineCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineRobustnessCreateInfo_self_temp(dec, (VkPipelineRobustnessCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkComputePipelineCreateInfo_self_temp(struct vn_cs_decoder *dec, VkComputePipelineCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkPipelineShaderStageCreateInfo_temp(dec, &val->stage); - vn_decode_VkPipelineLayout_lookup(dec, &val->layout); - vn_decode_VkPipeline_lookup(dec, &val->basePipelineHandle); - vn_decode_int32_t(dec, &val->basePipelineIndex); -} - -static inline void -vn_decode_VkComputePipelineCreateInfo_temp(struct vn_cs_decoder *dec, VkComputePipelineCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkComputePipelineCreateInfo_pnext_temp(dec); - vn_decode_VkComputePipelineCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkComputePipelineCreateInfo_handle_self(VkComputePipelineCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkPipelineShaderStageCreateInfo_handle(&val->stage); - vn_replace_VkPipelineLayout_handle(&val->layout); - vn_replace_VkPipeline_handle(&val->basePipelineHandle); - /* skip val->basePipelineIndex */ -} - -static inline void -vn_replace_VkComputePipelineCreateInfo_handle(VkComputePipelineCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: - vn_replace_VkComputePipelineCreateInfo_handle_self((VkComputePipelineCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - vn_replace_VkPipelineCreateFlags2CreateInfo_handle_self((VkPipelineCreateFlags2CreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - vn_replace_VkPipelineCreationFeedbackCreateInfo_handle_self((VkPipelineCreationFeedbackCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - vn_replace_VkPipelineRobustnessCreateInfo_handle_self((VkPipelineRobustnessCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRayTracingShaderGroupCreateInfoKHR chain */ - -static inline void * -vn_decode_VkRayTracingShaderGroupCreateInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRayTracingShaderGroupCreateInfoKHR_self_temp(struct vn_cs_decoder *dec, VkRayTracingShaderGroupCreateInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkRayTracingShaderGroupTypeKHR(dec, &val->type); - vn_decode_uint32_t(dec, &val->generalShader); - vn_decode_uint32_t(dec, &val->closestHitShader); - vn_decode_uint32_t(dec, &val->anyHitShader); - vn_decode_uint32_t(dec, &val->intersectionShader); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - val->pShaderGroupCaptureReplayHandle = NULL; - } -} - -static inline void -vn_decode_VkRayTracingShaderGroupCreateInfoKHR_temp(struct vn_cs_decoder *dec, VkRayTracingShaderGroupCreateInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRayTracingShaderGroupCreateInfoKHR_pnext_temp(dec); - vn_decode_VkRayTracingShaderGroupCreateInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkRayTracingShaderGroupCreateInfoKHR_handle_self(VkRayTracingShaderGroupCreateInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->type */ - /* skip val->generalShader */ - /* skip val->closestHitShader */ - /* skip val->anyHitShader */ - /* skip val->intersectionShader */ - /* skip val->pShaderGroupCaptureReplayHandle */ -} - -static inline void -vn_replace_VkRayTracingShaderGroupCreateInfoKHR_handle(VkRayTracingShaderGroupCreateInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR: - vn_replace_VkRayTracingShaderGroupCreateInfoKHR_handle_self((VkRayTracingShaderGroupCreateInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRayTracingPipelineInterfaceCreateInfoKHR chain */ - -static inline void * -vn_decode_VkRayTracingPipelineInterfaceCreateInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRayTracingPipelineInterfaceCreateInfoKHR_self_temp(struct vn_cs_decoder *dec, VkRayTracingPipelineInterfaceCreateInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->maxPipelineRayPayloadSize); - vn_decode_uint32_t(dec, &val->maxPipelineRayHitAttributeSize); -} - -static inline void -vn_decode_VkRayTracingPipelineInterfaceCreateInfoKHR_temp(struct vn_cs_decoder *dec, VkRayTracingPipelineInterfaceCreateInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRayTracingPipelineInterfaceCreateInfoKHR_pnext_temp(dec); - vn_decode_VkRayTracingPipelineInterfaceCreateInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkRayTracingPipelineInterfaceCreateInfoKHR_handle_self(VkRayTracingPipelineInterfaceCreateInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maxPipelineRayPayloadSize */ - /* skip val->maxPipelineRayHitAttributeSize */ -} - -static inline void -vn_replace_VkRayTracingPipelineInterfaceCreateInfoKHR_handle(VkRayTracingPipelineInterfaceCreateInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR: - vn_replace_VkRayTracingPipelineInterfaceCreateInfoKHR_handle_self((VkRayTracingPipelineInterfaceCreateInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRayTracingPipelineCreateInfoKHR chain */ - -static inline void * -vn_decode_VkRayTracingPipelineCreateInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineCreateFlags2CreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineCreateFlags2CreateInfo *)pnext)->pNext = vn_decode_VkRayTracingPipelineCreateInfoKHR_pnext_temp(dec); - vn_decode_VkPipelineCreateFlags2CreateInfo_self_temp(dec, (VkPipelineCreateFlags2CreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineCreationFeedbackCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineCreationFeedbackCreateInfo *)pnext)->pNext = vn_decode_VkRayTracingPipelineCreateInfoKHR_pnext_temp(dec); - vn_decode_VkPipelineCreationFeedbackCreateInfo_self_temp(dec, (VkPipelineCreationFeedbackCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPipelineRobustnessCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkPipelineRobustnessCreateInfo *)pnext)->pNext = vn_decode_VkRayTracingPipelineCreateInfoKHR_pnext_temp(dec); - vn_decode_VkPipelineRobustnessCreateInfo_self_temp(dec, (VkPipelineRobustnessCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkRayTracingPipelineCreateInfoKHR_self_temp(struct vn_cs_decoder *dec, VkRayTracingPipelineCreateInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->stageCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->stageCount); - val->pStages = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pStages), iter_count); - if (!val->pStages) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipelineShaderStageCreateInfo_temp(dec, &((VkPipelineShaderStageCreateInfo *)val->pStages)[i]); - } else { - vn_decode_array_size(dec, val->stageCount); - val->pStages = NULL; - } - vn_decode_uint32_t(dec, &val->groupCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->groupCount); - val->pGroups = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pGroups), iter_count); - if (!val->pGroups) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRayTracingShaderGroupCreateInfoKHR_temp(dec, &((VkRayTracingShaderGroupCreateInfoKHR *)val->pGroups)[i]); - } else { - vn_decode_array_size(dec, val->groupCount); - val->pGroups = NULL; - } - vn_decode_uint32_t(dec, &val->maxPipelineRayRecursionDepth); - if (vn_decode_simple_pointer(dec)) { - val->pLibraryInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pLibraryInfo)); - if (!val->pLibraryInfo) return; - vn_decode_VkPipelineLibraryCreateInfoKHR_temp(dec, (VkPipelineLibraryCreateInfoKHR *)val->pLibraryInfo); - } else { - val->pLibraryInfo = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pLibraryInterface = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pLibraryInterface)); - if (!val->pLibraryInterface) return; - vn_decode_VkRayTracingPipelineInterfaceCreateInfoKHR_temp(dec, (VkRayTracingPipelineInterfaceCreateInfoKHR *)val->pLibraryInterface); - } else { - val->pLibraryInterface = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDynamicState = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDynamicState)); - if (!val->pDynamicState) return; - vn_decode_VkPipelineDynamicStateCreateInfo_temp(dec, (VkPipelineDynamicStateCreateInfo *)val->pDynamicState); - } else { - val->pDynamicState = NULL; - } - vn_decode_VkPipelineLayout_lookup(dec, &val->layout); - vn_decode_VkPipeline_lookup(dec, &val->basePipelineHandle); - vn_decode_int32_t(dec, &val->basePipelineIndex); -} - -static inline void -vn_decode_VkRayTracingPipelineCreateInfoKHR_temp(struct vn_cs_decoder *dec, VkRayTracingPipelineCreateInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRayTracingPipelineCreateInfoKHR_pnext_temp(dec); - vn_decode_VkRayTracingPipelineCreateInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkRayTracingPipelineCreateInfoKHR_handle_self(VkRayTracingPipelineCreateInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->stageCount */ - if (val->pStages) { - for (uint32_t i = 0; i < val->stageCount; i++) - vn_replace_VkPipelineShaderStageCreateInfo_handle(&((VkPipelineShaderStageCreateInfo *)val->pStages)[i]); - } - /* skip val->groupCount */ - if (val->pGroups) { - for (uint32_t i = 0; i < val->groupCount; i++) - vn_replace_VkRayTracingShaderGroupCreateInfoKHR_handle(&((VkRayTracingShaderGroupCreateInfoKHR *)val->pGroups)[i]); - } - /* skip val->maxPipelineRayRecursionDepth */ - if (val->pLibraryInfo) - vn_replace_VkPipelineLibraryCreateInfoKHR_handle((VkPipelineLibraryCreateInfoKHR *)val->pLibraryInfo); - if (val->pLibraryInterface) - vn_replace_VkRayTracingPipelineInterfaceCreateInfoKHR_handle((VkRayTracingPipelineInterfaceCreateInfoKHR *)val->pLibraryInterface); - if (val->pDynamicState) - vn_replace_VkPipelineDynamicStateCreateInfo_handle((VkPipelineDynamicStateCreateInfo *)val->pDynamicState); - vn_replace_VkPipelineLayout_handle(&val->layout); - vn_replace_VkPipeline_handle(&val->basePipelineHandle); - /* skip val->basePipelineIndex */ -} - -static inline void -vn_replace_VkRayTracingPipelineCreateInfoKHR_handle(VkRayTracingPipelineCreateInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR: - vn_replace_VkRayTracingPipelineCreateInfoKHR_handle_self((VkRayTracingPipelineCreateInfoKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO: - vn_replace_VkPipelineCreateFlags2CreateInfo_handle_self((VkPipelineCreateFlags2CreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: - vn_replace_VkPipelineCreationFeedbackCreateInfo_handle_self((VkPipelineCreationFeedbackCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO: - vn_replace_VkPipelineRobustnessCreateInfo_handle_self((VkPipelineRobustnessCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateGraphicsPipelines_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateGraphicsPipelines *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipelineCache_lookup(dec, &args->pipelineCache); - vn_decode_uint32_t(dec, &args->createInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->createInfoCount); - args->pCreateInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCreateInfos), iter_count); - if (!args->pCreateInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkGraphicsPipelineCreateInfo_temp(dec, &((VkGraphicsPipelineCreateInfo *)args->pCreateInfos)[i]); - } else { - vn_decode_array_size(dec, args->createInfoCount); - args->pCreateInfos = NULL; - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->createInfoCount); - args->pPipelines = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pPipelines), iter_count); - if (!args->pPipelines) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipeline(dec, &args->pPipelines[i]); - } else { - vn_decode_array_size(dec, args->createInfoCount); - args->pPipelines = NULL; - } -} - -static inline void vn_replace_vkCreateGraphicsPipelines_args_handle(struct vn_command_vkCreateGraphicsPipelines *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipelineCache_handle(&args->pipelineCache); - /* skip args->createInfoCount */ - if (args->pCreateInfos) { - for (uint32_t i = 0; i < args->createInfoCount; i++) - vn_replace_VkGraphicsPipelineCreateInfo_handle(&((VkGraphicsPipelineCreateInfo *)args->pCreateInfos)[i]); - } - /* skip args->pAllocator */ - /* skip args->pPipelines */ -} - -static inline void vn_encode_vkCreateGraphicsPipelines_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateGraphicsPipelines *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateGraphicsPipelines_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pipelineCache */ - /* skip args->createInfoCount */ - /* skip args->pCreateInfos */ - /* skip args->pAllocator */ - if (args->pPipelines) { - vn_encode_array_size(enc, args->createInfoCount); - for (uint32_t i = 0; i < args->createInfoCount; i++) - vn_encode_VkPipeline(enc, &args->pPipelines[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkCreateComputePipelines_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateComputePipelines *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipelineCache_lookup(dec, &args->pipelineCache); - vn_decode_uint32_t(dec, &args->createInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->createInfoCount); - args->pCreateInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCreateInfos), iter_count); - if (!args->pCreateInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkComputePipelineCreateInfo_temp(dec, &((VkComputePipelineCreateInfo *)args->pCreateInfos)[i]); - } else { - vn_decode_array_size(dec, args->createInfoCount); - args->pCreateInfos = NULL; - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->createInfoCount); - args->pPipelines = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pPipelines), iter_count); - if (!args->pPipelines) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipeline(dec, &args->pPipelines[i]); - } else { - vn_decode_array_size(dec, args->createInfoCount); - args->pPipelines = NULL; - } -} - -static inline void vn_replace_vkCreateComputePipelines_args_handle(struct vn_command_vkCreateComputePipelines *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipelineCache_handle(&args->pipelineCache); - /* skip args->createInfoCount */ - if (args->pCreateInfos) { - for (uint32_t i = 0; i < args->createInfoCount; i++) - vn_replace_VkComputePipelineCreateInfo_handle(&((VkComputePipelineCreateInfo *)args->pCreateInfos)[i]); - } - /* skip args->pAllocator */ - /* skip args->pPipelines */ -} - -static inline void vn_encode_vkCreateComputePipelines_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateComputePipelines *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateComputePipelines_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pipelineCache */ - /* skip args->createInfoCount */ - /* skip args->pCreateInfos */ - /* skip args->pAllocator */ - if (args->pPipelines) { - vn_encode_array_size(enc, args->createInfoCount); - for (uint32_t i = 0; i < args->createInfoCount; i++) - vn_encode_VkPipeline(enc, &args->pPipelines[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkDestroyPipeline_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyPipeline *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipeline_lookup(dec, &args->pipeline); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyPipeline_args_handle(struct vn_command_vkDestroyPipeline *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipeline_handle(&args->pipeline); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyPipeline_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyPipeline *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyPipeline_EXT}); - - /* skip args->device */ - /* skip args->pipeline */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetRayTracingShaderGroupHandlesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkGetRayTracingShaderGroupHandlesKHR *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetRayTracingShaderGroupHandlesKHR_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipeline_lookup(dec, &args->pipeline); - vn_decode_uint32_t(dec, &args->firstGroup); - vn_decode_uint32_t(dec, &args->groupCount); - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } -} - -static inline void vn_replace_vkGetRayTracingShaderGroupHandlesKHR_args_handle(struct vn_command_vkGetRayTracingShaderGroupHandlesKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipeline_handle(&args->pipeline); - /* skip args->firstGroup */ - /* skip args->groupCount */ - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkGetRayTracingShaderGroupHandlesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetRayTracingShaderGroupHandlesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetRayTracingShaderGroupHandlesKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pipeline */ - /* skip args->firstGroup */ - /* skip args->groupCount */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipeline_lookup(dec, &args->pipeline); - vn_decode_uint32_t(dec, &args->firstGroup); - vn_decode_uint32_t(dec, &args->groupCount); - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } -} - -static inline void vn_replace_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_args_handle(struct vn_command_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipeline_handle(&args->pipeline); - /* skip args->firstGroup */ - /* skip args->groupCount */ - /* skip args->dataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pipeline */ - /* skip args->firstGroup */ - /* skip args->groupCount */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkCreateRayTracingPipelinesKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateRayTracingPipelinesKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeferredOperationKHR_lookup(dec, &args->deferredOperation); - vn_decode_VkPipelineCache_lookup(dec, &args->pipelineCache); - vn_decode_uint32_t(dec, &args->createInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->createInfoCount); - args->pCreateInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pCreateInfos), iter_count); - if (!args->pCreateInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkRayTracingPipelineCreateInfoKHR_temp(dec, &((VkRayTracingPipelineCreateInfoKHR *)args->pCreateInfos)[i]); - } else { - vn_decode_array_size(dec, args->createInfoCount); - args->pCreateInfos = NULL; - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->createInfoCount); - args->pPipelines = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pPipelines), iter_count); - if (!args->pPipelines) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipeline(dec, &args->pPipelines[i]); - } else { - vn_decode_array_size(dec, args->createInfoCount); - args->pPipelines = NULL; - } -} - -static inline void vn_replace_vkCreateRayTracingPipelinesKHR_args_handle(struct vn_command_vkCreateRayTracingPipelinesKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeferredOperationKHR_handle(&args->deferredOperation); - vn_replace_VkPipelineCache_handle(&args->pipelineCache); - /* skip args->createInfoCount */ - if (args->pCreateInfos) { - for (uint32_t i = 0; i < args->createInfoCount; i++) - vn_replace_VkRayTracingPipelineCreateInfoKHR_handle(&((VkRayTracingPipelineCreateInfoKHR *)args->pCreateInfos)[i]); - } - /* skip args->pAllocator */ - /* skip args->pPipelines */ -} - -static inline void vn_encode_vkCreateRayTracingPipelinesKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateRayTracingPipelinesKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateRayTracingPipelinesKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->deferredOperation */ - /* skip args->pipelineCache */ - /* skip args->createInfoCount */ - /* skip args->pCreateInfos */ - /* skip args->pAllocator */ - if (args->pPipelines) { - vn_encode_array_size(enc, args->createInfoCount); - for (uint32_t i = 0; i < args->createInfoCount; i++) - vn_encode_VkPipeline(enc, &args->pPipelines[i]); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkGetRayTracingShaderGroupStackSizeKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetRayTracingShaderGroupStackSizeKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipeline_lookup(dec, &args->pipeline); - vn_decode_uint32_t(dec, &args->group); - vn_decode_VkShaderGroupShaderKHR(dec, &args->groupShader); -} - -static inline void vn_replace_vkGetRayTracingShaderGroupStackSizeKHR_args_handle(struct vn_command_vkGetRayTracingShaderGroupStackSizeKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipeline_handle(&args->pipeline); - /* skip args->group */ - /* skip args->groupShader */ -} - -static inline void vn_encode_vkGetRayTracingShaderGroupStackSizeKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetRayTracingShaderGroupStackSizeKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetRayTracingShaderGroupStackSizeKHR_EXT}); - - vn_encode_VkDeviceSize(enc, &args->ret); - /* skip args->device */ - /* skip args->pipeline */ - /* skip args->group */ - /* skip args->groupShader */ -} - -static inline void vn_dispatch_vkCreateGraphicsPipelines(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateGraphicsPipelines args; - - if (!ctx->dispatch_vkCreateGraphicsPipelines) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateGraphicsPipelines_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateGraphicsPipelines(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateGraphicsPipelines returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateGraphicsPipelines_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateComputePipelines(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateComputePipelines args; - - if (!ctx->dispatch_vkCreateComputePipelines) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateComputePipelines_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateComputePipelines(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateComputePipelines returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateComputePipelines_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyPipeline(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyPipeline args; - - if (!ctx->dispatch_vkDestroyPipeline) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyPipeline_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyPipeline(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyPipeline_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetRayTracingShaderGroupHandlesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetRayTracingShaderGroupHandlesKHR args; - - if (!ctx->dispatch_vkGetRayTracingShaderGroupHandlesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkGetRayTracingShaderGroupHandlesKHR_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetRayTracingShaderGroupHandlesKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetRayTracingShaderGroupHandlesKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkGetRayTracingShaderGroupHandlesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR args; - - if (!ctx->dispatch_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateRayTracingPipelinesKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateRayTracingPipelinesKHR args; - - if (!ctx->dispatch_vkCreateRayTracingPipelinesKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateRayTracingPipelinesKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateRayTracingPipelinesKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateRayTracingPipelinesKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateRayTracingPipelinesKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetRayTracingShaderGroupStackSizeKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetRayTracingShaderGroupStackSizeKHR args; - - if (!ctx->dispatch_vkGetRayTracingShaderGroupStackSizeKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetRayTracingShaderGroupStackSizeKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetRayTracingShaderGroupStackSizeKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetRayTracingShaderGroupStackSizeKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_PIPELINE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_pipeline_cache.h b/src/venus/venus-protocol/vn_protocol_renderer_pipeline_cache.h deleted file mode 100644 index 426fd49c..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_pipeline_cache.h +++ /dev/null @@ -1,390 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_PIPELINE_CACHE_H -#define VN_PROTOCOL_RENDERER_PIPELINE_CACHE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkPipelineCacheCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineCacheCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineCacheCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineCacheCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_size_t(dec, &val->initialDataSize); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->initialDataSize); - val->pInitialData = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!val->pInitialData) return; - vn_decode_blob_array(dec, (void *)val->pInitialData, array_size); - } else { - vn_decode_array_size(dec, val->initialDataSize); - val->pInitialData = NULL; - } -} - -static inline void -vn_decode_VkPipelineCacheCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineCacheCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineCacheCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineCacheCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineCacheCreateInfo_handle_self(VkPipelineCacheCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->initialDataSize */ - /* skip val->pInitialData */ -} - -static inline void -vn_replace_VkPipelineCacheCreateInfo_handle(VkPipelineCacheCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO: - vn_replace_VkPipelineCacheCreateInfo_handle_self((VkPipelineCacheCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreatePipelineCache_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreatePipelineCache *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkPipelineCacheCreateInfo_temp(dec, (VkPipelineCacheCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pPipelineCache = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPipelineCache)); - if (!args->pPipelineCache) return; - vn_decode_VkPipelineCache(dec, args->pPipelineCache); - } else { - args->pPipelineCache = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreatePipelineCache_args_handle(struct vn_command_vkCreatePipelineCache *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkPipelineCacheCreateInfo_handle((VkPipelineCacheCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pPipelineCache */ -} - -static inline void vn_encode_vkCreatePipelineCache_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreatePipelineCache *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreatePipelineCache_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pPipelineCache)) - vn_encode_VkPipelineCache(enc, args->pPipelineCache); -} - -static inline void vn_decode_vkDestroyPipelineCache_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyPipelineCache *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipelineCache_lookup(dec, &args->pipelineCache); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyPipelineCache_args_handle(struct vn_command_vkDestroyPipelineCache *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipelineCache_handle(&args->pipelineCache); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyPipelineCache_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyPipelineCache *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyPipelineCache_EXT}); - - /* skip args->device */ - /* skip args->pipelineCache */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetPipelineCacheData_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkGetPipelineCacheData *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetPipelineCacheData_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipelineCache_lookup(dec, &args->pipelineCache); - if (vn_decode_simple_pointer(dec)) { - offset += vn_sizeof_simple_pointer(args->pDataSize); - args->pDataSize = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDataSize)); - if (!args->pDataSize) return; - vn_decode_size_t(dec, args->pDataSize); - offset += vn_sizeof_size_t(args->pDataSize); - } else { - args->pDataSize = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size((args->pDataSize ? *args->pDataSize : 0)); - const size_t array_size = vn_decode_array_size(dec, (args->pDataSize ? *args->pDataSize : 0)); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pData = NULL; - } -} - -static inline void vn_replace_vkGetPipelineCacheData_args_handle(struct vn_command_vkGetPipelineCacheData *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipelineCache_handle(&args->pipelineCache); - /* skip args->pDataSize */ - /* skip args->pData */ -} - -static inline void vn_encode_vkGetPipelineCacheData_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPipelineCacheData *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPipelineCacheData_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pipelineCache */ - if (vn_encode_simple_pointer(enc, args->pDataSize)) - vn_encode_size_t(enc, args->pDataSize); - if (args->pData) { - vn_encode_array_size(enc, (args->pDataSize ? *args->pDataSize : 0)); - vn_encode_blob_array(enc, args->pData, (args->pDataSize ? *args->pDataSize : 0)); - } else { - vn_encode_array_size(enc, 0); - } -} - -static inline void vn_decode_vkMergePipelineCaches_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkMergePipelineCaches *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipelineCache_lookup(dec, &args->dstCache); - vn_decode_uint32_t(dec, &args->srcCacheCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->srcCacheCount); - args->pSrcCaches = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSrcCaches), iter_count); - if (!args->pSrcCaches) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPipelineCache_lookup(dec, &((VkPipelineCache *)args->pSrcCaches)[i]); - } else { - vn_decode_array_size(dec, args->srcCacheCount); - args->pSrcCaches = NULL; - } -} - -static inline void vn_replace_vkMergePipelineCaches_args_handle(struct vn_command_vkMergePipelineCaches *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipelineCache_handle(&args->dstCache); - /* skip args->srcCacheCount */ - if (args->pSrcCaches) { - for (uint32_t i = 0; i < args->srcCacheCount; i++) - vn_replace_VkPipelineCache_handle(&((VkPipelineCache *)args->pSrcCaches)[i]); - } -} - -static inline void vn_encode_vkMergePipelineCaches_reply(struct vn_cs_encoder *enc, const struct vn_command_vkMergePipelineCaches *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkMergePipelineCaches_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->dstCache */ - /* skip args->srcCacheCount */ - /* skip args->pSrcCaches */ -} - -static inline void vn_dispatch_vkCreatePipelineCache(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreatePipelineCache args; - - if (!ctx->dispatch_vkCreatePipelineCache) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreatePipelineCache_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreatePipelineCache(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreatePipelineCache returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreatePipelineCache_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyPipelineCache(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyPipelineCache args; - - if (!ctx->dispatch_vkDestroyPipelineCache) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyPipelineCache_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyPipelineCache(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyPipelineCache_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPipelineCacheData(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPipelineCacheData args; - - if (!ctx->dispatch_vkGetPipelineCacheData) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkGetPipelineCacheData_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPipelineCacheData(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetPipelineCacheData returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkGetPipelineCacheData_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkMergePipelineCaches(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkMergePipelineCaches args; - - if (!ctx->dispatch_vkMergePipelineCaches) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkMergePipelineCaches_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkMergePipelineCaches(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkMergePipelineCaches returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkMergePipelineCaches_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_PIPELINE_CACHE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_pipeline_layout.h b/src/venus/venus-protocol/vn_protocol_renderer_pipeline_layout.h deleted file mode 100644 index e768c66b..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_pipeline_layout.h +++ /dev/null @@ -1,157 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_PIPELINE_LAYOUT_H -#define VN_PROTOCOL_RENDERER_PIPELINE_LAYOUT_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -static inline void vn_decode_vkCreatePipelineLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreatePipelineLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkPipelineLayoutCreateInfo_temp(dec, (VkPipelineLayoutCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pPipelineLayout = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPipelineLayout)); - if (!args->pPipelineLayout) return; - vn_decode_VkPipelineLayout(dec, args->pPipelineLayout); - } else { - args->pPipelineLayout = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreatePipelineLayout_args_handle(struct vn_command_vkCreatePipelineLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkPipelineLayoutCreateInfo_handle((VkPipelineLayoutCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pPipelineLayout */ -} - -static inline void vn_encode_vkCreatePipelineLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreatePipelineLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreatePipelineLayout_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pPipelineLayout)) - vn_encode_VkPipelineLayout(enc, args->pPipelineLayout); -} - -static inline void vn_decode_vkDestroyPipelineLayout_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyPipelineLayout *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPipelineLayout_lookup(dec, &args->pipelineLayout); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyPipelineLayout_args_handle(struct vn_command_vkDestroyPipelineLayout *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPipelineLayout_handle(&args->pipelineLayout); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyPipelineLayout_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyPipelineLayout *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyPipelineLayout_EXT}); - - /* skip args->device */ - /* skip args->pipelineLayout */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreatePipelineLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreatePipelineLayout args; - - if (!ctx->dispatch_vkCreatePipelineLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreatePipelineLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreatePipelineLayout(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreatePipelineLayout returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreatePipelineLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyPipelineLayout(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyPipelineLayout args; - - if (!ctx->dispatch_vkDestroyPipelineLayout) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyPipelineLayout_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyPipelineLayout(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyPipelineLayout_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_PIPELINE_LAYOUT_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_private_data_slot.h b/src/venus/venus-protocol/vn_protocol_renderer_private_data_slot.h deleted file mode 100644 index 38176e3e..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_private_data_slot.h +++ /dev/null @@ -1,341 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_PRIVATE_DATA_SLOT_H -#define VN_PROTOCOL_RENDERER_PRIVATE_DATA_SLOT_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkPrivateDataSlotCreateInfo chain */ - -static inline void * -vn_decode_VkPrivateDataSlotCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPrivateDataSlotCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPrivateDataSlotCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkPrivateDataSlotCreateInfo_temp(struct vn_cs_decoder *dec, VkPrivateDataSlotCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPrivateDataSlotCreateInfo_pnext_temp(dec); - vn_decode_VkPrivateDataSlotCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPrivateDataSlotCreateInfo_handle_self(VkPrivateDataSlotCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkPrivateDataSlotCreateInfo_handle(VkPrivateDataSlotCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO: - vn_replace_VkPrivateDataSlotCreateInfo_handle_self((VkPrivateDataSlotCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreatePrivateDataSlot_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreatePrivateDataSlot *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkPrivateDataSlotCreateInfo_temp(dec, (VkPrivateDataSlotCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pPrivateDataSlot = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pPrivateDataSlot)); - if (!args->pPrivateDataSlot) return; - vn_decode_VkPrivateDataSlot(dec, args->pPrivateDataSlot); - } else { - args->pPrivateDataSlot = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreatePrivateDataSlot_args_handle(struct vn_command_vkCreatePrivateDataSlot *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkPrivateDataSlotCreateInfo_handle((VkPrivateDataSlotCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pPrivateDataSlot */ -} - -static inline void vn_encode_vkCreatePrivateDataSlot_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreatePrivateDataSlot *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreatePrivateDataSlot_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pPrivateDataSlot)) - vn_encode_VkPrivateDataSlot(enc, args->pPrivateDataSlot); -} - -static inline void vn_decode_vkDestroyPrivateDataSlot_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyPrivateDataSlot *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkPrivateDataSlot_lookup(dec, &args->privateDataSlot); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyPrivateDataSlot_args_handle(struct vn_command_vkDestroyPrivateDataSlot *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkPrivateDataSlot_handle(&args->privateDataSlot); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyPrivateDataSlot_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyPrivateDataSlot *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyPrivateDataSlot_EXT}); - - /* skip args->device */ - /* skip args->privateDataSlot */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkSetPrivateData_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSetPrivateData *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkObjectType(dec, &args->objectType); - vn_decode_uint64_t(dec, &args->objectHandle); - vn_decode_VkPrivateDataSlot_lookup(dec, &args->privateDataSlot); - vn_decode_uint64_t(dec, &args->data); -} - -static inline void vn_replace_vkSetPrivateData_args_handle(struct vn_command_vkSetPrivateData *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->objectType */ - /* skip args->objectHandle */ - vn_replace_VkPrivateDataSlot_handle(&args->privateDataSlot); - /* skip args->data */ -} - -static inline void vn_encode_vkSetPrivateData_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSetPrivateData *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSetPrivateData_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->objectType */ - /* skip args->objectHandle */ - /* skip args->privateDataSlot */ - /* skip args->data */ -} - -static inline void vn_decode_vkGetPrivateData_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetPrivateData *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkObjectType(dec, &args->objectType); - vn_decode_uint64_t(dec, &args->objectHandle); - vn_decode_VkPrivateDataSlot_lookup(dec, &args->privateDataSlot); - if (vn_decode_simple_pointer(dec)) { - args->pData = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pData)); - if (!args->pData) return; - } else { - args->pData = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetPrivateData_args_handle(struct vn_command_vkGetPrivateData *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->objectType */ - /* skip args->objectHandle */ - vn_replace_VkPrivateDataSlot_handle(&args->privateDataSlot); - /* skip args->pData */ -} - -static inline void vn_encode_vkGetPrivateData_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetPrivateData *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetPrivateData_EXT}); - - /* skip args->device */ - /* skip args->objectType */ - /* skip args->objectHandle */ - /* skip args->privateDataSlot */ - if (vn_encode_simple_pointer(enc, args->pData)) - vn_encode_uint64_t(enc, args->pData); -} - -static inline void vn_dispatch_vkCreatePrivateDataSlot(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreatePrivateDataSlot args; - - if (!ctx->dispatch_vkCreatePrivateDataSlot) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreatePrivateDataSlot_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreatePrivateDataSlot(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreatePrivateDataSlot returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreatePrivateDataSlot_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyPrivateDataSlot(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyPrivateDataSlot args; - - if (!ctx->dispatch_vkDestroyPrivateDataSlot) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyPrivateDataSlot_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyPrivateDataSlot(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyPrivateDataSlot_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkSetPrivateData(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkSetPrivateData args; - - if (!ctx->dispatch_vkSetPrivateData) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkSetPrivateData_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkSetPrivateData(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkSetPrivateData returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkSetPrivateData_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetPrivateData(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetPrivateData args; - - if (!ctx->dispatch_vkGetPrivateData) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetPrivateData_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetPrivateData(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetPrivateData_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_PRIVATE_DATA_SLOT_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_query_pool.h b/src/venus/venus-protocol/vn_protocol_renderer_query_pool.h deleted file mode 100644 index 6ededd8d..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_query_pool.h +++ /dev/null @@ -1,372 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_QUERY_POOL_H -#define VN_PROTOCOL_RENDERER_QUERY_POOL_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkQueryPoolCreateInfo chain */ - -static inline void * -vn_decode_VkQueryPoolCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkQueryPoolCreateInfo_self_temp(struct vn_cs_decoder *dec, VkQueryPoolCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkQueryType(dec, &val->queryType); - vn_decode_uint32_t(dec, &val->queryCount); - vn_decode_VkFlags(dec, &val->pipelineStatistics); -} - -static inline void -vn_decode_VkQueryPoolCreateInfo_temp(struct vn_cs_decoder *dec, VkQueryPoolCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkQueryPoolCreateInfo_pnext_temp(dec); - vn_decode_VkQueryPoolCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkQueryPoolCreateInfo_handle_self(VkQueryPoolCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->queryType */ - /* skip val->queryCount */ - /* skip val->pipelineStatistics */ -} - -static inline void -vn_replace_VkQueryPoolCreateInfo_handle(VkQueryPoolCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO: - vn_replace_VkQueryPoolCreateInfo_handle_self((VkQueryPoolCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateQueryPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateQueryPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkQueryPoolCreateInfo_temp(dec, (VkQueryPoolCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pQueryPool = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pQueryPool)); - if (!args->pQueryPool) return; - vn_decode_VkQueryPool(dec, args->pQueryPool); - } else { - args->pQueryPool = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateQueryPool_args_handle(struct vn_command_vkCreateQueryPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkQueryPoolCreateInfo_handle((VkQueryPoolCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pQueryPool */ -} - -static inline void vn_encode_vkCreateQueryPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateQueryPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateQueryPool_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pQueryPool)) - vn_encode_VkQueryPool(enc, args->pQueryPool); -} - -static inline void vn_decode_vkDestroyQueryPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyQueryPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyQueryPool_args_handle(struct vn_command_vkDestroyQueryPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyQueryPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyQueryPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyQueryPool_EXT}); - - /* skip args->device */ - /* skip args->queryPool */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetQueryPoolResults_args_temp(struct vn_cs_decoder *dec, struct vn_cs_encoder *enc, struct vn_command_vkGetQueryPoolResults *args) -{ - const VkCommandTypeEXT cmd_type = VK_COMMAND_TYPE_vkGetQueryPoolResults_EXT; - size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); - - VkResult ret; - offset += vn_sizeof_VkResult(&ret); - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->firstQuery); - vn_decode_uint32_t(dec, &args->queryCount); - vn_decode_size_t(dec, &args->dataSize); - if (vn_peek_array_size(dec)) { - offset += vn_sizeof_array_size(args->dataSize); - const size_t array_size = vn_decode_array_size(dec, args->dataSize); - args->pData = vn_cs_encoder_get_blob_storage(enc, offset, array_size); - if (!args->pData) return; - offset += vn_sizeof_blob_array(args->pData, array_size); - } else { - vn_decode_array_size(dec, args->dataSize); - args->pData = NULL; - } - vn_decode_VkDeviceSize(dec, &args->stride); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkGetQueryPoolResults_args_handle(struct vn_command_vkGetQueryPoolResults *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->firstQuery */ - /* skip args->queryCount */ - /* skip args->dataSize */ - /* skip args->pData */ - /* skip args->stride */ - /* skip args->flags */ -} - -static inline void vn_encode_vkGetQueryPoolResults_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetQueryPoolResults *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetQueryPoolResults_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->queryPool */ - /* skip args->firstQuery */ - /* skip args->queryCount */ - /* skip args->dataSize */ - if (args->pData) { - vn_encode_array_size(enc, args->dataSize); - vn_encode_blob_array(enc, args->pData, args->dataSize); - } else { - vn_encode_array_size(enc, 0); - } - /* skip args->stride */ - /* skip args->flags */ -} - -static inline void vn_decode_vkResetQueryPool_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkResetQueryPool *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkQueryPool_lookup(dec, &args->queryPool); - vn_decode_uint32_t(dec, &args->firstQuery); - vn_decode_uint32_t(dec, &args->queryCount); -} - -static inline void vn_replace_vkResetQueryPool_args_handle(struct vn_command_vkResetQueryPool *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkQueryPool_handle(&args->queryPool); - /* skip args->firstQuery */ - /* skip args->queryCount */ -} - -static inline void vn_encode_vkResetQueryPool_reply(struct vn_cs_encoder *enc, const struct vn_command_vkResetQueryPool *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkResetQueryPool_EXT}); - - /* skip args->device */ - /* skip args->queryPool */ - /* skip args->firstQuery */ - /* skip args->queryCount */ -} - -static inline void vn_dispatch_vkCreateQueryPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateQueryPool args; - - if (!ctx->dispatch_vkCreateQueryPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateQueryPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateQueryPool(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateQueryPool returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateQueryPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyQueryPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyQueryPool args; - - if (!ctx->dispatch_vkDestroyQueryPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyQueryPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyQueryPool(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyQueryPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetQueryPoolResults(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetQueryPoolResults args; - - if (!ctx->dispatch_vkGetQueryPoolResults) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_encoder_acquire(ctx->encoder)) - return; - } - - vn_decode_vkGetQueryPoolResults_args_temp(ctx->decoder, ctx->encoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetQueryPoolResults(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetQueryPoolResults returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - vn_encode_vkGetQueryPoolResults_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkResetQueryPool(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkResetQueryPool args; - - if (!ctx->dispatch_vkResetQueryPool) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkResetQueryPool_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkResetQueryPool(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkResetQueryPool_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_QUERY_POOL_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_queue.h b/src/venus/venus-protocol/vn_protocol_renderer_queue.h deleted file mode 100644 index d5373f56..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_queue.h +++ /dev/null @@ -1,1282 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_QUEUE_H -#define VN_PROTOCOL_RENDERER_QUEUE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkDeviceGroupSubmitInfo chain */ - -static inline void * -vn_decode_VkDeviceGroupSubmitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceGroupSubmitInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceGroupSubmitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->waitSemaphoreCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitSemaphoreDeviceIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pWaitSemaphoreDeviceIndices), array_size); - if (!val->pWaitSemaphoreDeviceIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pWaitSemaphoreDeviceIndices, array_size); - } else { - vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitSemaphoreDeviceIndices = NULL; - } - vn_decode_uint32_t(dec, &val->commandBufferCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->commandBufferCount); - val->pCommandBufferDeviceMasks = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCommandBufferDeviceMasks), array_size); - if (!val->pCommandBufferDeviceMasks) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pCommandBufferDeviceMasks, array_size); - } else { - vn_decode_array_size(dec, val->commandBufferCount); - val->pCommandBufferDeviceMasks = NULL; - } - vn_decode_uint32_t(dec, &val->signalSemaphoreCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->signalSemaphoreCount); - val->pSignalSemaphoreDeviceIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSignalSemaphoreDeviceIndices), array_size); - if (!val->pSignalSemaphoreDeviceIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pSignalSemaphoreDeviceIndices, array_size); - } else { - vn_decode_array_size(dec, val->signalSemaphoreCount); - val->pSignalSemaphoreDeviceIndices = NULL; - } -} - -static inline void -vn_decode_VkDeviceGroupSubmitInfo_temp(struct vn_cs_decoder *dec, VkDeviceGroupSubmitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceGroupSubmitInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupSubmitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceGroupSubmitInfo_handle_self(VkDeviceGroupSubmitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->waitSemaphoreCount */ - /* skip val->pWaitSemaphoreDeviceIndices */ - /* skip val->commandBufferCount */ - /* skip val->pCommandBufferDeviceMasks */ - /* skip val->signalSemaphoreCount */ - /* skip val->pSignalSemaphoreDeviceIndices */ -} - -static inline void -vn_replace_VkDeviceGroupSubmitInfo_handle(VkDeviceGroupSubmitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: - vn_replace_VkDeviceGroupSubmitInfo_handle_self((VkDeviceGroupSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkProtectedSubmitInfo chain */ - -static inline void * -vn_decode_VkProtectedSubmitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkProtectedSubmitInfo_self_temp(struct vn_cs_decoder *dec, VkProtectedSubmitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->protectedSubmit); -} - -static inline void -vn_decode_VkProtectedSubmitInfo_temp(struct vn_cs_decoder *dec, VkProtectedSubmitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkProtectedSubmitInfo_pnext_temp(dec); - vn_decode_VkProtectedSubmitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkProtectedSubmitInfo_handle_self(VkProtectedSubmitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->protectedSubmit */ -} - -static inline void -vn_replace_VkProtectedSubmitInfo_handle(VkProtectedSubmitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: - vn_replace_VkProtectedSubmitInfo_handle_self((VkProtectedSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkTimelineSemaphoreSubmitInfo chain */ - -static inline void * -vn_decode_VkTimelineSemaphoreSubmitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkTimelineSemaphoreSubmitInfo_self_temp(struct vn_cs_decoder *dec, VkTimelineSemaphoreSubmitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->waitSemaphoreValueCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->waitSemaphoreValueCount); - val->pWaitSemaphoreValues = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pWaitSemaphoreValues), array_size); - if (!val->pWaitSemaphoreValues) return; - vn_decode_uint64_t_array(dec, (uint64_t *)val->pWaitSemaphoreValues, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pWaitSemaphoreValues = NULL; - } - vn_decode_uint32_t(dec, &val->signalSemaphoreValueCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->signalSemaphoreValueCount); - val->pSignalSemaphoreValues = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSignalSemaphoreValues), array_size); - if (!val->pSignalSemaphoreValues) return; - vn_decode_uint64_t_array(dec, (uint64_t *)val->pSignalSemaphoreValues, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pSignalSemaphoreValues = NULL; - } -} - -static inline void -vn_decode_VkTimelineSemaphoreSubmitInfo_temp(struct vn_cs_decoder *dec, VkTimelineSemaphoreSubmitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkTimelineSemaphoreSubmitInfo_pnext_temp(dec); - vn_decode_VkTimelineSemaphoreSubmitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkTimelineSemaphoreSubmitInfo_handle_self(VkTimelineSemaphoreSubmitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->waitSemaphoreValueCount */ - /* skip val->pWaitSemaphoreValues */ - /* skip val->signalSemaphoreValueCount */ - /* skip val->pSignalSemaphoreValues */ -} - -static inline void -vn_replace_VkTimelineSemaphoreSubmitInfo_handle(VkTimelineSemaphoreSubmitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: - vn_replace_VkTimelineSemaphoreSubmitInfo_handle_self((VkTimelineSemaphoreSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubmitInfo chain */ - -static inline void * -vn_decode_VkSubmitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceGroupSubmitInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceGroupSubmitInfo *)pnext)->pNext = vn_decode_VkSubmitInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupSubmitInfo_self_temp(dec, (VkDeviceGroupSubmitInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkProtectedSubmitInfo)); - if (pnext) { - pnext->sType = stype; - ((VkProtectedSubmitInfo *)pnext)->pNext = vn_decode_VkSubmitInfo_pnext_temp(dec); - vn_decode_VkProtectedSubmitInfo_self_temp(dec, (VkProtectedSubmitInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkTimelineSemaphoreSubmitInfo)); - if (pnext) { - pnext->sType = stype; - ((VkTimelineSemaphoreSubmitInfo *)pnext)->pNext = vn_decode_VkSubmitInfo_pnext_temp(dec); - vn_decode_VkTimelineSemaphoreSubmitInfo_self_temp(dec, (VkTimelineSemaphoreSubmitInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkSubmitInfo_self_temp(struct vn_cs_decoder *dec, VkSubmitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->waitSemaphoreCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitSemaphores = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pWaitSemaphores), iter_count); - if (!val->pWaitSemaphores) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphore_lookup(dec, &((VkSemaphore *)val->pWaitSemaphores)[i]); - } else { - vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitSemaphores = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitDstStageMask = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pWaitDstStageMask), iter_count); - if (!val->pWaitDstStageMask) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkFlags(dec, &((VkPipelineStageFlags *)val->pWaitDstStageMask)[i]); - } else { - vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitDstStageMask = NULL; - } - vn_decode_uint32_t(dec, &val->commandBufferCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->commandBufferCount); - val->pCommandBuffers = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCommandBuffers), iter_count); - if (!val->pCommandBuffers) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandBuffer_lookup(dec, &((VkCommandBuffer *)val->pCommandBuffers)[i]); - } else { - vn_decode_array_size(dec, val->commandBufferCount); - val->pCommandBuffers = NULL; - } - vn_decode_uint32_t(dec, &val->signalSemaphoreCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->signalSemaphoreCount); - val->pSignalSemaphores = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSignalSemaphores), iter_count); - if (!val->pSignalSemaphores) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphore_lookup(dec, &((VkSemaphore *)val->pSignalSemaphores)[i]); - } else { - vn_decode_array_size(dec, val->signalSemaphoreCount); - val->pSignalSemaphores = NULL; - } -} - -static inline void -vn_decode_VkSubmitInfo_temp(struct vn_cs_decoder *dec, VkSubmitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBMIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubmitInfo_pnext_temp(dec); - vn_decode_VkSubmitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubmitInfo_handle_self(VkSubmitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->waitSemaphoreCount */ - if (val->pWaitSemaphores) { - for (uint32_t i = 0; i < val->waitSemaphoreCount; i++) - vn_replace_VkSemaphore_handle(&((VkSemaphore *)val->pWaitSemaphores)[i]); - } - /* skip val->pWaitDstStageMask */ - /* skip val->commandBufferCount */ - if (val->pCommandBuffers) { - for (uint32_t i = 0; i < val->commandBufferCount; i++) - vn_replace_VkCommandBuffer_handle(&((VkCommandBuffer *)val->pCommandBuffers)[i]); - } - /* skip val->signalSemaphoreCount */ - if (val->pSignalSemaphores) { - for (uint32_t i = 0; i < val->signalSemaphoreCount; i++) - vn_replace_VkSemaphore_handle(&((VkSemaphore *)val->pSignalSemaphores)[i]); - } -} - -static inline void -vn_replace_VkSubmitInfo_handle(VkSubmitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBMIT_INFO: - vn_replace_VkSubmitInfo_handle_self((VkSubmitInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: - vn_replace_VkDeviceGroupSubmitInfo_handle_self((VkDeviceGroupSubmitInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: - vn_replace_VkProtectedSubmitInfo_handle_self((VkProtectedSubmitInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: - vn_replace_VkTimelineSemaphoreSubmitInfo_handle_self((VkTimelineSemaphoreSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSparseMemoryBind */ - -static inline void -vn_decode_VkSparseMemoryBind_temp(struct vn_cs_decoder *dec, VkSparseMemoryBind *val) -{ - vn_decode_VkDeviceSize(dec, &val->resourceOffset); - vn_decode_VkDeviceSize(dec, &val->size); - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); - vn_decode_VkDeviceSize(dec, &val->memoryOffset); - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_replace_VkSparseMemoryBind_handle(VkSparseMemoryBind *val) -{ - /* skip val->resourceOffset */ - /* skip val->size */ - vn_replace_VkDeviceMemory_handle(&val->memory); - /* skip val->memoryOffset */ - /* skip val->flags */ -} - -/* struct VkSparseBufferMemoryBindInfo */ - -static inline void -vn_decode_VkSparseBufferMemoryBindInfo_temp(struct vn_cs_decoder *dec, VkSparseBufferMemoryBindInfo *val) -{ - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_uint32_t(dec, &val->bindCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bindCount); - val->pBinds = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBinds), iter_count); - if (!val->pBinds) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseMemoryBind_temp(dec, &((VkSparseMemoryBind *)val->pBinds)[i]); - } else { - vn_decode_array_size(dec, val->bindCount); - val->pBinds = NULL; - } -} - -static inline void -vn_replace_VkSparseBufferMemoryBindInfo_handle(VkSparseBufferMemoryBindInfo *val) -{ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->bindCount */ - if (val->pBinds) { - for (uint32_t i = 0; i < val->bindCount; i++) - vn_replace_VkSparseMemoryBind_handle(&((VkSparseMemoryBind *)val->pBinds)[i]); - } -} - -/* struct VkSparseImageOpaqueMemoryBindInfo */ - -static inline void -vn_decode_VkSparseImageOpaqueMemoryBindInfo_temp(struct vn_cs_decoder *dec, VkSparseImageOpaqueMemoryBindInfo *val) -{ - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_uint32_t(dec, &val->bindCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bindCount); - val->pBinds = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBinds), iter_count); - if (!val->pBinds) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseMemoryBind_temp(dec, &((VkSparseMemoryBind *)val->pBinds)[i]); - } else { - vn_decode_array_size(dec, val->bindCount); - val->pBinds = NULL; - } -} - -static inline void -vn_replace_VkSparseImageOpaqueMemoryBindInfo_handle(VkSparseImageOpaqueMemoryBindInfo *val) -{ - vn_replace_VkImage_handle(&val->image); - /* skip val->bindCount */ - if (val->pBinds) { - for (uint32_t i = 0; i < val->bindCount; i++) - vn_replace_VkSparseMemoryBind_handle(&((VkSparseMemoryBind *)val->pBinds)[i]); - } -} - -/* struct VkSparseImageMemoryBind */ - -static inline void -vn_decode_VkSparseImageMemoryBind_temp(struct vn_cs_decoder *dec, VkSparseImageMemoryBind *val) -{ - vn_decode_VkImageSubresource_temp(dec, &val->subresource); - vn_decode_VkOffset3D_temp(dec, &val->offset); - vn_decode_VkExtent3D_temp(dec, &val->extent); - vn_decode_VkDeviceMemory_lookup(dec, &val->memory); - vn_decode_VkDeviceSize(dec, &val->memoryOffset); - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_replace_VkSparseImageMemoryBind_handle(VkSparseImageMemoryBind *val) -{ - vn_replace_VkImageSubresource_handle(&val->subresource); - vn_replace_VkOffset3D_handle(&val->offset); - vn_replace_VkExtent3D_handle(&val->extent); - vn_replace_VkDeviceMemory_handle(&val->memory); - /* skip val->memoryOffset */ - /* skip val->flags */ -} - -/* struct VkSparseImageMemoryBindInfo */ - -static inline void -vn_decode_VkSparseImageMemoryBindInfo_temp(struct vn_cs_decoder *dec, VkSparseImageMemoryBindInfo *val) -{ - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_uint32_t(dec, &val->bindCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bindCount); - val->pBinds = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBinds), iter_count); - if (!val->pBinds) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageMemoryBind_temp(dec, &((VkSparseImageMemoryBind *)val->pBinds)[i]); - } else { - vn_decode_array_size(dec, val->bindCount); - val->pBinds = NULL; - } -} - -static inline void -vn_replace_VkSparseImageMemoryBindInfo_handle(VkSparseImageMemoryBindInfo *val) -{ - vn_replace_VkImage_handle(&val->image); - /* skip val->bindCount */ - if (val->pBinds) { - for (uint32_t i = 0; i < val->bindCount; i++) - vn_replace_VkSparseImageMemoryBind_handle(&((VkSparseImageMemoryBind *)val->pBinds)[i]); - } -} - -/* struct VkDeviceGroupBindSparseInfo chain */ - -static inline void * -vn_decode_VkDeviceGroupBindSparseInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDeviceGroupBindSparseInfo_self_temp(struct vn_cs_decoder *dec, VkDeviceGroupBindSparseInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->resourceDeviceIndex); - vn_decode_uint32_t(dec, &val->memoryDeviceIndex); -} - -static inline void -vn_decode_VkDeviceGroupBindSparseInfo_temp(struct vn_cs_decoder *dec, VkDeviceGroupBindSparseInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDeviceGroupBindSparseInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupBindSparseInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkDeviceGroupBindSparseInfo_handle_self(VkDeviceGroupBindSparseInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->resourceDeviceIndex */ - /* skip val->memoryDeviceIndex */ -} - -static inline void -vn_replace_VkDeviceGroupBindSparseInfo_handle(VkDeviceGroupBindSparseInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: - vn_replace_VkDeviceGroupBindSparseInfo_handle_self((VkDeviceGroupBindSparseInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBindSparseInfo chain */ - -static inline void * -vn_decode_VkBindSparseInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceGroupBindSparseInfo)); - if (pnext) { - pnext->sType = stype; - ((VkDeviceGroupBindSparseInfo *)pnext)->pNext = vn_decode_VkBindSparseInfo_pnext_temp(dec); - vn_decode_VkDeviceGroupBindSparseInfo_self_temp(dec, (VkDeviceGroupBindSparseInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkTimelineSemaphoreSubmitInfo)); - if (pnext) { - pnext->sType = stype; - ((VkTimelineSemaphoreSubmitInfo *)pnext)->pNext = vn_decode_VkBindSparseInfo_pnext_temp(dec); - vn_decode_VkTimelineSemaphoreSubmitInfo_self_temp(dec, (VkTimelineSemaphoreSubmitInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkBindSparseInfo_self_temp(struct vn_cs_decoder *dec, VkBindSparseInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->waitSemaphoreCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitSemaphores = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pWaitSemaphores), iter_count); - if (!val->pWaitSemaphores) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphore_lookup(dec, &((VkSemaphore *)val->pWaitSemaphores)[i]); - } else { - vn_decode_array_size(dec, val->waitSemaphoreCount); - val->pWaitSemaphores = NULL; - } - vn_decode_uint32_t(dec, &val->bufferBindCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->bufferBindCount); - val->pBufferBinds = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBufferBinds), iter_count); - if (!val->pBufferBinds) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseBufferMemoryBindInfo_temp(dec, &((VkSparseBufferMemoryBindInfo *)val->pBufferBinds)[i]); - } else { - vn_decode_array_size(dec, val->bufferBindCount); - val->pBufferBinds = NULL; - } - vn_decode_uint32_t(dec, &val->imageOpaqueBindCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->imageOpaqueBindCount); - val->pImageOpaqueBinds = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pImageOpaqueBinds), iter_count); - if (!val->pImageOpaqueBinds) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageOpaqueMemoryBindInfo_temp(dec, &((VkSparseImageOpaqueMemoryBindInfo *)val->pImageOpaqueBinds)[i]); - } else { - vn_decode_array_size(dec, val->imageOpaqueBindCount); - val->pImageOpaqueBinds = NULL; - } - vn_decode_uint32_t(dec, &val->imageBindCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->imageBindCount); - val->pImageBinds = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pImageBinds), iter_count); - if (!val->pImageBinds) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSparseImageMemoryBindInfo_temp(dec, &((VkSparseImageMemoryBindInfo *)val->pImageBinds)[i]); - } else { - vn_decode_array_size(dec, val->imageBindCount); - val->pImageBinds = NULL; - } - vn_decode_uint32_t(dec, &val->signalSemaphoreCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->signalSemaphoreCount); - val->pSignalSemaphores = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSignalSemaphores), iter_count); - if (!val->pSignalSemaphores) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphore_lookup(dec, &((VkSemaphore *)val->pSignalSemaphores)[i]); - } else { - vn_decode_array_size(dec, val->signalSemaphoreCount); - val->pSignalSemaphores = NULL; - } -} - -static inline void -vn_decode_VkBindSparseInfo_temp(struct vn_cs_decoder *dec, VkBindSparseInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_SPARSE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindSparseInfo_pnext_temp(dec); - vn_decode_VkBindSparseInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindSparseInfo_handle_self(VkBindSparseInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->waitSemaphoreCount */ - if (val->pWaitSemaphores) { - for (uint32_t i = 0; i < val->waitSemaphoreCount; i++) - vn_replace_VkSemaphore_handle(&((VkSemaphore *)val->pWaitSemaphores)[i]); - } - /* skip val->bufferBindCount */ - if (val->pBufferBinds) { - for (uint32_t i = 0; i < val->bufferBindCount; i++) - vn_replace_VkSparseBufferMemoryBindInfo_handle(&((VkSparseBufferMemoryBindInfo *)val->pBufferBinds)[i]); - } - /* skip val->imageOpaqueBindCount */ - if (val->pImageOpaqueBinds) { - for (uint32_t i = 0; i < val->imageOpaqueBindCount; i++) - vn_replace_VkSparseImageOpaqueMemoryBindInfo_handle(&((VkSparseImageOpaqueMemoryBindInfo *)val->pImageOpaqueBinds)[i]); - } - /* skip val->imageBindCount */ - if (val->pImageBinds) { - for (uint32_t i = 0; i < val->imageBindCount; i++) - vn_replace_VkSparseImageMemoryBindInfo_handle(&((VkSparseImageMemoryBindInfo *)val->pImageBinds)[i]); - } - /* skip val->signalSemaphoreCount */ - if (val->pSignalSemaphores) { - for (uint32_t i = 0; i < val->signalSemaphoreCount; i++) - vn_replace_VkSemaphore_handle(&((VkSemaphore *)val->pSignalSemaphores)[i]); - } -} - -static inline void -vn_replace_VkBindSparseInfo_handle(VkBindSparseInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: - vn_replace_VkBindSparseInfo_handle_self((VkBindSparseInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: - vn_replace_VkDeviceGroupBindSparseInfo_handle_self((VkDeviceGroupBindSparseInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: - vn_replace_VkTimelineSemaphoreSubmitInfo_handle_self((VkTimelineSemaphoreSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSemaphoreSubmitInfo chain */ - -static inline void * -vn_decode_VkSemaphoreSubmitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSemaphoreSubmitInfo_self_temp(struct vn_cs_decoder *dec, VkSemaphoreSubmitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSemaphore_lookup(dec, &val->semaphore); - vn_decode_uint64_t(dec, &val->value); - vn_decode_VkFlags64(dec, &val->stageMask); - vn_decode_uint32_t(dec, &val->deviceIndex); -} - -static inline void -vn_decode_VkSemaphoreSubmitInfo_temp(struct vn_cs_decoder *dec, VkSemaphoreSubmitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSemaphoreSubmitInfo_pnext_temp(dec); - vn_decode_VkSemaphoreSubmitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSemaphoreSubmitInfo_handle_self(VkSemaphoreSubmitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkSemaphore_handle(&val->semaphore); - /* skip val->value */ - /* skip val->stageMask */ - /* skip val->deviceIndex */ -} - -static inline void -vn_replace_VkSemaphoreSubmitInfo_handle(VkSemaphoreSubmitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO: - vn_replace_VkSemaphoreSubmitInfo_handle_self((VkSemaphoreSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCommandBufferSubmitInfo chain */ - -static inline void * -vn_decode_VkCommandBufferSubmitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCommandBufferSubmitInfo_self_temp(struct vn_cs_decoder *dec, VkCommandBufferSubmitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkCommandBuffer_lookup(dec, &val->commandBuffer); - vn_decode_uint32_t(dec, &val->deviceMask); -} - -static inline void -vn_decode_VkCommandBufferSubmitInfo_temp(struct vn_cs_decoder *dec, VkCommandBufferSubmitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCommandBufferSubmitInfo_pnext_temp(dec); - vn_decode_VkCommandBufferSubmitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkCommandBufferSubmitInfo_handle_self(VkCommandBufferSubmitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkCommandBuffer_handle(&val->commandBuffer); - /* skip val->deviceMask */ -} - -static inline void -vn_replace_VkCommandBufferSubmitInfo_handle(VkCommandBufferSubmitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO: - vn_replace_VkCommandBufferSubmitInfo_handle_self((VkCommandBufferSubmitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubmitInfo2 chain */ - -static inline void * -vn_decode_VkSubmitInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSubmitInfo2_self_temp(struct vn_cs_decoder *dec, VkSubmitInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->waitSemaphoreInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->waitSemaphoreInfoCount); - val->pWaitSemaphoreInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pWaitSemaphoreInfos), iter_count); - if (!val->pWaitSemaphoreInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphoreSubmitInfo_temp(dec, &((VkSemaphoreSubmitInfo *)val->pWaitSemaphoreInfos)[i]); - } else { - vn_decode_array_size(dec, val->waitSemaphoreInfoCount); - val->pWaitSemaphoreInfos = NULL; - } - vn_decode_uint32_t(dec, &val->commandBufferInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->commandBufferInfoCount); - val->pCommandBufferInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCommandBufferInfos), iter_count); - if (!val->pCommandBufferInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandBufferSubmitInfo_temp(dec, &((VkCommandBufferSubmitInfo *)val->pCommandBufferInfos)[i]); - } else { - vn_decode_array_size(dec, val->commandBufferInfoCount); - val->pCommandBufferInfos = NULL; - } - vn_decode_uint32_t(dec, &val->signalSemaphoreInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->signalSemaphoreInfoCount); - val->pSignalSemaphoreInfos = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSignalSemaphoreInfos), iter_count); - if (!val->pSignalSemaphoreInfos) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphoreSubmitInfo_temp(dec, &((VkSemaphoreSubmitInfo *)val->pSignalSemaphoreInfos)[i]); - } else { - vn_decode_array_size(dec, val->signalSemaphoreInfoCount); - val->pSignalSemaphoreInfos = NULL; - } -} - -static inline void -vn_decode_VkSubmitInfo2_temp(struct vn_cs_decoder *dec, VkSubmitInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBMIT_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubmitInfo2_pnext_temp(dec); - vn_decode_VkSubmitInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubmitInfo2_handle_self(VkSubmitInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->waitSemaphoreInfoCount */ - if (val->pWaitSemaphoreInfos) { - for (uint32_t i = 0; i < val->waitSemaphoreInfoCount; i++) - vn_replace_VkSemaphoreSubmitInfo_handle(&((VkSemaphoreSubmitInfo *)val->pWaitSemaphoreInfos)[i]); - } - /* skip val->commandBufferInfoCount */ - if (val->pCommandBufferInfos) { - for (uint32_t i = 0; i < val->commandBufferInfoCount; i++) - vn_replace_VkCommandBufferSubmitInfo_handle(&((VkCommandBufferSubmitInfo *)val->pCommandBufferInfos)[i]); - } - /* skip val->signalSemaphoreInfoCount */ - if (val->pSignalSemaphoreInfos) { - for (uint32_t i = 0; i < val->signalSemaphoreInfoCount; i++) - vn_replace_VkSemaphoreSubmitInfo_handle(&((VkSemaphoreSubmitInfo *)val->pSignalSemaphoreInfos)[i]); - } -} - -static inline void -vn_replace_VkSubmitInfo2_handle(VkSubmitInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBMIT_INFO_2: - vn_replace_VkSubmitInfo2_handle_self((VkSubmitInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkQueueSubmit_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkQueueSubmit *args) -{ - vn_decode_VkQueue_lookup(dec, &args->queue); - vn_decode_uint32_t(dec, &args->submitCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->submitCount); - args->pSubmits = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSubmits), iter_count); - if (!args->pSubmits) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubmitInfo_temp(dec, &((VkSubmitInfo *)args->pSubmits)[i]); - } else { - vn_decode_array_size(dec, args->submitCount); - args->pSubmits = NULL; - } - vn_decode_VkFence_lookup(dec, &args->fence); -} - -static inline void vn_replace_vkQueueSubmit_args_handle(struct vn_command_vkQueueSubmit *args) -{ - vn_replace_VkQueue_handle(&args->queue); - /* skip args->submitCount */ - if (args->pSubmits) { - for (uint32_t i = 0; i < args->submitCount; i++) - vn_replace_VkSubmitInfo_handle(&((VkSubmitInfo *)args->pSubmits)[i]); - } - vn_replace_VkFence_handle(&args->fence); -} - -static inline void vn_encode_vkQueueSubmit_reply(struct vn_cs_encoder *enc, const struct vn_command_vkQueueSubmit *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkQueueSubmit_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->queue */ - /* skip args->submitCount */ - /* skip args->pSubmits */ - /* skip args->fence */ -} - -static inline void vn_decode_vkQueueWaitIdle_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkQueueWaitIdle *args) -{ - vn_decode_VkQueue_lookup(dec, &args->queue); -} - -static inline void vn_replace_vkQueueWaitIdle_args_handle(struct vn_command_vkQueueWaitIdle *args) -{ - vn_replace_VkQueue_handle(&args->queue); -} - -static inline void vn_encode_vkQueueWaitIdle_reply(struct vn_cs_encoder *enc, const struct vn_command_vkQueueWaitIdle *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkQueueWaitIdle_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->queue */ -} - -static inline void vn_decode_vkQueueBindSparse_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkQueueBindSparse *args) -{ - vn_decode_VkQueue_lookup(dec, &args->queue); - vn_decode_uint32_t(dec, &args->bindInfoCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->bindInfoCount); - args->pBindInfo = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pBindInfo), iter_count); - if (!args->pBindInfo) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBindSparseInfo_temp(dec, &((VkBindSparseInfo *)args->pBindInfo)[i]); - } else { - vn_decode_array_size(dec, args->bindInfoCount); - args->pBindInfo = NULL; - } - vn_decode_VkFence_lookup(dec, &args->fence); -} - -static inline void vn_replace_vkQueueBindSparse_args_handle(struct vn_command_vkQueueBindSparse *args) -{ - vn_replace_VkQueue_handle(&args->queue); - /* skip args->bindInfoCount */ - if (args->pBindInfo) { - for (uint32_t i = 0; i < args->bindInfoCount; i++) - vn_replace_VkBindSparseInfo_handle(&((VkBindSparseInfo *)args->pBindInfo)[i]); - } - vn_replace_VkFence_handle(&args->fence); -} - -static inline void vn_encode_vkQueueBindSparse_reply(struct vn_cs_encoder *enc, const struct vn_command_vkQueueBindSparse *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkQueueBindSparse_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->queue */ - /* skip args->bindInfoCount */ - /* skip args->pBindInfo */ - /* skip args->fence */ -} - -static inline void vn_decode_vkQueueSubmit2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkQueueSubmit2 *args) -{ - vn_decode_VkQueue_lookup(dec, &args->queue); - vn_decode_uint32_t(dec, &args->submitCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->submitCount); - args->pSubmits = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pSubmits), iter_count); - if (!args->pSubmits) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubmitInfo2_temp(dec, &((VkSubmitInfo2 *)args->pSubmits)[i]); - } else { - vn_decode_array_size(dec, args->submitCount); - args->pSubmits = NULL; - } - vn_decode_VkFence_lookup(dec, &args->fence); -} - -static inline void vn_replace_vkQueueSubmit2_args_handle(struct vn_command_vkQueueSubmit2 *args) -{ - vn_replace_VkQueue_handle(&args->queue); - /* skip args->submitCount */ - if (args->pSubmits) { - for (uint32_t i = 0; i < args->submitCount; i++) - vn_replace_VkSubmitInfo2_handle(&((VkSubmitInfo2 *)args->pSubmits)[i]); - } - vn_replace_VkFence_handle(&args->fence); -} - -static inline void vn_encode_vkQueueSubmit2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkQueueSubmit2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkQueueSubmit2_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->queue */ - /* skip args->submitCount */ - /* skip args->pSubmits */ - /* skip args->fence */ -} - -static inline void vn_dispatch_vkQueueSubmit(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkQueueSubmit args; - - if (!ctx->dispatch_vkQueueSubmit) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkQueueSubmit_args_temp(ctx->decoder, &args); - if (!args.queue) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkQueueSubmit(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkQueueSubmit returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkQueueSubmit_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkQueueWaitIdle(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkQueueWaitIdle args; - - if (!ctx->dispatch_vkQueueWaitIdle) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkQueueWaitIdle_args_temp(ctx->decoder, &args); - if (!args.queue) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkQueueWaitIdle(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkQueueWaitIdle returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkQueueWaitIdle_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkQueueBindSparse(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkQueueBindSparse args; - - if (!ctx->dispatch_vkQueueBindSparse) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkQueueBindSparse_args_temp(ctx->decoder, &args); - if (!args.queue) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkQueueBindSparse(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkQueueBindSparse returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkQueueBindSparse_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkQueueSubmit2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkQueueSubmit2 args; - - if (!ctx->dispatch_vkQueueSubmit2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkQueueSubmit2_args_temp(ctx->decoder, &args); - if (!args.queue) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkQueueSubmit2(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkQueueSubmit2 returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkQueueSubmit2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_QUEUE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_render_pass.h b/src/venus/venus-protocol/vn_protocol_renderer_render_pass.h deleted file mode 100644 index 871c18a0..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_render_pass.h +++ /dev/null @@ -1,1724 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_RENDER_PASS_H -#define VN_PROTOCOL_RENDERER_RENDER_PASS_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkAttachmentDescription */ - -static inline void -vn_decode_VkAttachmentDescription_temp(struct vn_cs_decoder *dec, VkAttachmentDescription *val) -{ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkSampleCountFlagBits(dec, &val->samples); - vn_decode_VkAttachmentLoadOp(dec, &val->loadOp); - vn_decode_VkAttachmentStoreOp(dec, &val->storeOp); - vn_decode_VkAttachmentLoadOp(dec, &val->stencilLoadOp); - vn_decode_VkAttachmentStoreOp(dec, &val->stencilStoreOp); - vn_decode_VkImageLayout(dec, &val->initialLayout); - vn_decode_VkImageLayout(dec, &val->finalLayout); -} - -static inline void -vn_replace_VkAttachmentDescription_handle(VkAttachmentDescription *val) -{ - /* skip val->flags */ - /* skip val->format */ - /* skip val->samples */ - /* skip val->loadOp */ - /* skip val->storeOp */ - /* skip val->stencilLoadOp */ - /* skip val->stencilStoreOp */ - /* skip val->initialLayout */ - /* skip val->finalLayout */ -} - -/* struct VkAttachmentReference */ - -static inline void -vn_decode_VkAttachmentReference_temp(struct vn_cs_decoder *dec, VkAttachmentReference *val) -{ - vn_decode_uint32_t(dec, &val->attachment); - vn_decode_VkImageLayout(dec, &val->layout); -} - -static inline void -vn_replace_VkAttachmentReference_handle(VkAttachmentReference *val) -{ - /* skip val->attachment */ - /* skip val->layout */ -} - -/* struct VkSubpassDescription */ - -static inline void -vn_decode_VkSubpassDescription_temp(struct vn_cs_decoder *dec, VkSubpassDescription *val) -{ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkPipelineBindPoint(dec, &val->pipelineBindPoint); - vn_decode_uint32_t(dec, &val->inputAttachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->inputAttachmentCount); - val->pInputAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pInputAttachments), iter_count); - if (!val->pInputAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentReference_temp(dec, &((VkAttachmentReference *)val->pInputAttachments)[i]); - } else { - vn_decode_array_size(dec, val->inputAttachmentCount); - val->pInputAttachments = NULL; - } - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachments), iter_count); - if (!val->pColorAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentReference_temp(dec, &((VkAttachmentReference *)val->pColorAttachments)[i]); - } else { - vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachments = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pResolveAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pResolveAttachments), iter_count); - if (!val->pResolveAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentReference_temp(dec, &((VkAttachmentReference *)val->pResolveAttachments)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pResolveAttachments = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDepthStencilAttachment = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthStencilAttachment)); - if (!val->pDepthStencilAttachment) return; - vn_decode_VkAttachmentReference_temp(dec, (VkAttachmentReference *)val->pDepthStencilAttachment); - } else { - val->pDepthStencilAttachment = NULL; - } - vn_decode_uint32_t(dec, &val->preserveAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->preserveAttachmentCount); - val->pPreserveAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPreserveAttachments), array_size); - if (!val->pPreserveAttachments) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pPreserveAttachments, array_size); - } else { - vn_decode_array_size(dec, val->preserveAttachmentCount); - val->pPreserveAttachments = NULL; - } -} - -static inline void -vn_replace_VkSubpassDescription_handle(VkSubpassDescription *val) -{ - /* skip val->flags */ - /* skip val->pipelineBindPoint */ - /* skip val->inputAttachmentCount */ - if (val->pInputAttachments) { - for (uint32_t i = 0; i < val->inputAttachmentCount; i++) - vn_replace_VkAttachmentReference_handle(&((VkAttachmentReference *)val->pInputAttachments)[i]); - } - /* skip val->colorAttachmentCount */ - if (val->pColorAttachments) { - for (uint32_t i = 0; i < val->colorAttachmentCount; i++) - vn_replace_VkAttachmentReference_handle(&((VkAttachmentReference *)val->pColorAttachments)[i]); - } - if (val->pResolveAttachments) { - for (uint32_t i = 0; i < val->colorAttachmentCount; i++) - vn_replace_VkAttachmentReference_handle(&((VkAttachmentReference *)val->pResolveAttachments)[i]); - } - if (val->pDepthStencilAttachment) - vn_replace_VkAttachmentReference_handle((VkAttachmentReference *)val->pDepthStencilAttachment); - /* skip val->preserveAttachmentCount */ - /* skip val->pPreserveAttachments */ -} - -/* struct VkSubpassDependency */ - -static inline void -vn_decode_VkSubpassDependency_temp(struct vn_cs_decoder *dec, VkSubpassDependency *val) -{ - vn_decode_uint32_t(dec, &val->srcSubpass); - vn_decode_uint32_t(dec, &val->dstSubpass); - vn_decode_VkFlags(dec, &val->srcStageMask); - vn_decode_VkFlags(dec, &val->dstStageMask); - vn_decode_VkFlags(dec, &val->srcAccessMask); - vn_decode_VkFlags(dec, &val->dstAccessMask); - vn_decode_VkFlags(dec, &val->dependencyFlags); -} - -static inline void -vn_replace_VkSubpassDependency_handle(VkSubpassDependency *val) -{ - /* skip val->srcSubpass */ - /* skip val->dstSubpass */ - /* skip val->srcStageMask */ - /* skip val->dstStageMask */ - /* skip val->srcAccessMask */ - /* skip val->dstAccessMask */ - /* skip val->dependencyFlags */ -} - -/* struct VkRenderPassMultiviewCreateInfo chain */ - -static inline void * -vn_decode_VkRenderPassMultiviewCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderPassMultiviewCreateInfo_self_temp(struct vn_cs_decoder *dec, VkRenderPassMultiviewCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->subpassCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->subpassCount); - val->pViewMasks = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pViewMasks), array_size); - if (!val->pViewMasks) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pViewMasks, array_size); - } else { - vn_decode_array_size(dec, val->subpassCount); - val->pViewMasks = NULL; - } - vn_decode_uint32_t(dec, &val->dependencyCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->dependencyCount); - val->pViewOffsets = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pViewOffsets), array_size); - if (!val->pViewOffsets) return; - vn_decode_int32_t_array(dec, (int32_t *)val->pViewOffsets, array_size); - } else { - vn_decode_array_size(dec, val->dependencyCount); - val->pViewOffsets = NULL; - } - vn_decode_uint32_t(dec, &val->correlationMaskCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->correlationMaskCount); - val->pCorrelationMasks = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCorrelationMasks), array_size); - if (!val->pCorrelationMasks) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pCorrelationMasks, array_size); - } else { - vn_decode_array_size(dec, val->correlationMaskCount); - val->pCorrelationMasks = NULL; - } -} - -static inline void -vn_decode_VkRenderPassMultiviewCreateInfo_temp(struct vn_cs_decoder *dec, VkRenderPassMultiviewCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassMultiviewCreateInfo_pnext_temp(dec); - vn_decode_VkRenderPassMultiviewCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassMultiviewCreateInfo_handle_self(VkRenderPassMultiviewCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->subpassCount */ - /* skip val->pViewMasks */ - /* skip val->dependencyCount */ - /* skip val->pViewOffsets */ - /* skip val->correlationMaskCount */ - /* skip val->pCorrelationMasks */ -} - -static inline void -vn_replace_VkRenderPassMultiviewCreateInfo_handle(VkRenderPassMultiviewCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: - vn_replace_VkRenderPassMultiviewCreateInfo_handle_self((VkRenderPassMultiviewCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkInputAttachmentAspectReference */ - -static inline void -vn_decode_VkInputAttachmentAspectReference_temp(struct vn_cs_decoder *dec, VkInputAttachmentAspectReference *val) -{ - vn_decode_uint32_t(dec, &val->subpass); - vn_decode_uint32_t(dec, &val->inputAttachmentIndex); - vn_decode_VkFlags(dec, &val->aspectMask); -} - -static inline void -vn_replace_VkInputAttachmentAspectReference_handle(VkInputAttachmentAspectReference *val) -{ - /* skip val->subpass */ - /* skip val->inputAttachmentIndex */ - /* skip val->aspectMask */ -} - -/* struct VkRenderPassInputAttachmentAspectCreateInfo chain */ - -static inline void * -vn_decode_VkRenderPassInputAttachmentAspectCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderPassInputAttachmentAspectCreateInfo_self_temp(struct vn_cs_decoder *dec, VkRenderPassInputAttachmentAspectCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->aspectReferenceCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->aspectReferenceCount); - val->pAspectReferences = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAspectReferences), iter_count); - if (!val->pAspectReferences) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkInputAttachmentAspectReference_temp(dec, &((VkInputAttachmentAspectReference *)val->pAspectReferences)[i]); - } else { - vn_decode_array_size(dec, val->aspectReferenceCount); - val->pAspectReferences = NULL; - } -} - -static inline void -vn_decode_VkRenderPassInputAttachmentAspectCreateInfo_temp(struct vn_cs_decoder *dec, VkRenderPassInputAttachmentAspectCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassInputAttachmentAspectCreateInfo_pnext_temp(dec); - vn_decode_VkRenderPassInputAttachmentAspectCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassInputAttachmentAspectCreateInfo_handle_self(VkRenderPassInputAttachmentAspectCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->aspectReferenceCount */ - if (val->pAspectReferences) { - for (uint32_t i = 0; i < val->aspectReferenceCount; i++) - vn_replace_VkInputAttachmentAspectReference_handle(&((VkInputAttachmentAspectReference *)val->pAspectReferences)[i]); - } -} - -static inline void -vn_replace_VkRenderPassInputAttachmentAspectCreateInfo_handle(VkRenderPassInputAttachmentAspectCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: - vn_replace_VkRenderPassInputAttachmentAspectCreateInfo_handle_self((VkRenderPassInputAttachmentAspectCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderPassCreateInfo chain */ - -static inline void * -vn_decode_VkRenderPassCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderPassMultiviewCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderPassMultiviewCreateInfo *)pnext)->pNext = vn_decode_VkRenderPassCreateInfo_pnext_temp(dec); - vn_decode_VkRenderPassMultiviewCreateInfo_self_temp(dec, (VkRenderPassMultiviewCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRenderPassInputAttachmentAspectCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkRenderPassInputAttachmentAspectCreateInfo *)pnext)->pNext = vn_decode_VkRenderPassCreateInfo_pnext_temp(dec); - vn_decode_VkRenderPassInputAttachmentAspectCreateInfo_self_temp(dec, (VkRenderPassInputAttachmentAspectCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkRenderPassCreateInfo_self_temp(struct vn_cs_decoder *dec, VkRenderPassCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachments), iter_count); - if (!val->pAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentDescription_temp(dec, &((VkAttachmentDescription *)val->pAttachments)[i]); - } else { - vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = NULL; - } - vn_decode_uint32_t(dec, &val->subpassCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->subpassCount); - val->pSubpasses = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSubpasses), iter_count); - if (!val->pSubpasses) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubpassDescription_temp(dec, &((VkSubpassDescription *)val->pSubpasses)[i]); - } else { - vn_decode_array_size(dec, val->subpassCount); - val->pSubpasses = NULL; - } - vn_decode_uint32_t(dec, &val->dependencyCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->dependencyCount); - val->pDependencies = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDependencies), iter_count); - if (!val->pDependencies) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubpassDependency_temp(dec, &((VkSubpassDependency *)val->pDependencies)[i]); - } else { - vn_decode_array_size(dec, val->dependencyCount); - val->pDependencies = NULL; - } -} - -static inline void -vn_decode_VkRenderPassCreateInfo_temp(struct vn_cs_decoder *dec, VkRenderPassCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassCreateInfo_pnext_temp(dec); - vn_decode_VkRenderPassCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassCreateInfo_handle_self(VkRenderPassCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->attachmentCount */ - if (val->pAttachments) { - for (uint32_t i = 0; i < val->attachmentCount; i++) - vn_replace_VkAttachmentDescription_handle(&((VkAttachmentDescription *)val->pAttachments)[i]); - } - /* skip val->subpassCount */ - if (val->pSubpasses) { - for (uint32_t i = 0; i < val->subpassCount; i++) - vn_replace_VkSubpassDescription_handle(&((VkSubpassDescription *)val->pSubpasses)[i]); - } - /* skip val->dependencyCount */ - if (val->pDependencies) { - for (uint32_t i = 0; i < val->dependencyCount; i++) - vn_replace_VkSubpassDependency_handle(&((VkSubpassDependency *)val->pDependencies)[i]); - } -} - -static inline void -vn_replace_VkRenderPassCreateInfo_handle(VkRenderPassCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: - vn_replace_VkRenderPassCreateInfo_handle_self((VkRenderPassCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: - vn_replace_VkRenderPassMultiviewCreateInfo_handle_self((VkRenderPassMultiviewCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: - vn_replace_VkRenderPassInputAttachmentAspectCreateInfo_handle_self((VkRenderPassInputAttachmentAspectCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderingAreaInfo chain */ - -static inline void * -vn_decode_VkRenderingAreaInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderingAreaInfo_self_temp(struct vn_cs_decoder *dec, VkRenderingAreaInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->viewMask); - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachmentFormats = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachmentFormats), array_size); - if (!val->pColorAttachmentFormats) return; - vn_decode_VkFormat_array(dec, (VkFormat *)val->pColorAttachmentFormats, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pColorAttachmentFormats = NULL; - } - vn_decode_VkFormat(dec, &val->depthAttachmentFormat); - vn_decode_VkFormat(dec, &val->stencilAttachmentFormat); -} - -static inline void -vn_decode_VkRenderingAreaInfo_temp(struct vn_cs_decoder *dec, VkRenderingAreaInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDERING_AREA_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderingAreaInfo_pnext_temp(dec); - vn_decode_VkRenderingAreaInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderingAreaInfo_handle_self(VkRenderingAreaInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->viewMask */ - /* skip val->colorAttachmentCount */ - /* skip val->pColorAttachmentFormats */ - /* skip val->depthAttachmentFormat */ - /* skip val->stencilAttachmentFormat */ -} - -static inline void -vn_replace_VkRenderingAreaInfo_handle(VkRenderingAreaInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDERING_AREA_INFO: - vn_replace_VkRenderingAreaInfo_handle_self((VkRenderingAreaInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAttachmentDescriptionStencilLayout chain */ - -static inline void * -vn_decode_VkAttachmentDescriptionStencilLayout_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAttachmentDescriptionStencilLayout_self_temp(struct vn_cs_decoder *dec, VkAttachmentDescriptionStencilLayout *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageLayout(dec, &val->stencilInitialLayout); - vn_decode_VkImageLayout(dec, &val->stencilFinalLayout); -} - -static inline void -vn_decode_VkAttachmentDescriptionStencilLayout_temp(struct vn_cs_decoder *dec, VkAttachmentDescriptionStencilLayout *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAttachmentDescriptionStencilLayout_pnext_temp(dec); - vn_decode_VkAttachmentDescriptionStencilLayout_self_temp(dec, val); -} - -static inline void -vn_replace_VkAttachmentDescriptionStencilLayout_handle_self(VkAttachmentDescriptionStencilLayout *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->stencilInitialLayout */ - /* skip val->stencilFinalLayout */ -} - -static inline void -vn_replace_VkAttachmentDescriptionStencilLayout_handle(VkAttachmentDescriptionStencilLayout *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: - vn_replace_VkAttachmentDescriptionStencilLayout_handle_self((VkAttachmentDescriptionStencilLayout *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAttachmentDescription2 chain */ - -static inline void * -vn_decode_VkAttachmentDescription2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkAttachmentDescriptionStencilLayout)); - if (pnext) { - pnext->sType = stype; - ((VkAttachmentDescriptionStencilLayout *)pnext)->pNext = vn_decode_VkAttachmentDescription2_pnext_temp(dec); - vn_decode_VkAttachmentDescriptionStencilLayout_self_temp(dec, (VkAttachmentDescriptionStencilLayout *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkAttachmentDescription2_self_temp(struct vn_cs_decoder *dec, VkAttachmentDescription2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkSampleCountFlagBits(dec, &val->samples); - vn_decode_VkAttachmentLoadOp(dec, &val->loadOp); - vn_decode_VkAttachmentStoreOp(dec, &val->storeOp); - vn_decode_VkAttachmentLoadOp(dec, &val->stencilLoadOp); - vn_decode_VkAttachmentStoreOp(dec, &val->stencilStoreOp); - vn_decode_VkImageLayout(dec, &val->initialLayout); - vn_decode_VkImageLayout(dec, &val->finalLayout); -} - -static inline void -vn_decode_VkAttachmentDescription2_temp(struct vn_cs_decoder *dec, VkAttachmentDescription2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAttachmentDescription2_pnext_temp(dec); - vn_decode_VkAttachmentDescription2_self_temp(dec, val); -} - -static inline void -vn_replace_VkAttachmentDescription2_handle_self(VkAttachmentDescription2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->format */ - /* skip val->samples */ - /* skip val->loadOp */ - /* skip val->storeOp */ - /* skip val->stencilLoadOp */ - /* skip val->stencilStoreOp */ - /* skip val->initialLayout */ - /* skip val->finalLayout */ -} - -static inline void -vn_replace_VkAttachmentDescription2_handle(VkAttachmentDescription2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2: - vn_replace_VkAttachmentDescription2_handle_self((VkAttachmentDescription2 *)pnext); - break; - case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: - vn_replace_VkAttachmentDescriptionStencilLayout_handle_self((VkAttachmentDescriptionStencilLayout *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAttachmentReferenceStencilLayout chain */ - -static inline void * -vn_decode_VkAttachmentReferenceStencilLayout_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAttachmentReferenceStencilLayout_self_temp(struct vn_cs_decoder *dec, VkAttachmentReferenceStencilLayout *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageLayout(dec, &val->stencilLayout); -} - -static inline void -vn_decode_VkAttachmentReferenceStencilLayout_temp(struct vn_cs_decoder *dec, VkAttachmentReferenceStencilLayout *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAttachmentReferenceStencilLayout_pnext_temp(dec); - vn_decode_VkAttachmentReferenceStencilLayout_self_temp(dec, val); -} - -static inline void -vn_replace_VkAttachmentReferenceStencilLayout_handle_self(VkAttachmentReferenceStencilLayout *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->stencilLayout */ -} - -static inline void -vn_replace_VkAttachmentReferenceStencilLayout_handle(VkAttachmentReferenceStencilLayout *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: - vn_replace_VkAttachmentReferenceStencilLayout_handle_self((VkAttachmentReferenceStencilLayout *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAttachmentReference2 chain */ - -static inline void * -vn_decode_VkAttachmentReference2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkAttachmentReferenceStencilLayout)); - if (pnext) { - pnext->sType = stype; - ((VkAttachmentReferenceStencilLayout *)pnext)->pNext = vn_decode_VkAttachmentReference2_pnext_temp(dec); - vn_decode_VkAttachmentReferenceStencilLayout_self_temp(dec, (VkAttachmentReferenceStencilLayout *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkAttachmentReference2_self_temp(struct vn_cs_decoder *dec, VkAttachmentReference2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->attachment); - vn_decode_VkImageLayout(dec, &val->layout); - vn_decode_VkFlags(dec, &val->aspectMask); -} - -static inline void -vn_decode_VkAttachmentReference2_temp(struct vn_cs_decoder *dec, VkAttachmentReference2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAttachmentReference2_pnext_temp(dec); - vn_decode_VkAttachmentReference2_self_temp(dec, val); -} - -static inline void -vn_replace_VkAttachmentReference2_handle_self(VkAttachmentReference2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->attachment */ - /* skip val->layout */ - /* skip val->aspectMask */ -} - -static inline void -vn_replace_VkAttachmentReference2_handle(VkAttachmentReference2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2: - vn_replace_VkAttachmentReference2_handle_self((VkAttachmentReference2 *)pnext); - break; - case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: - vn_replace_VkAttachmentReferenceStencilLayout_handle_self((VkAttachmentReferenceStencilLayout *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubpassDescriptionDepthStencilResolve chain */ - -static inline void * -vn_decode_VkSubpassDescriptionDepthStencilResolve_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSubpassDescriptionDepthStencilResolve_self_temp(struct vn_cs_decoder *dec, VkSubpassDescriptionDepthStencilResolve *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkResolveModeFlagBits(dec, &val->depthResolveMode); - vn_decode_VkResolveModeFlagBits(dec, &val->stencilResolveMode); - if (vn_decode_simple_pointer(dec)) { - val->pDepthStencilResolveAttachment = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthStencilResolveAttachment)); - if (!val->pDepthStencilResolveAttachment) return; - vn_decode_VkAttachmentReference2_temp(dec, (VkAttachmentReference2 *)val->pDepthStencilResolveAttachment); - } else { - val->pDepthStencilResolveAttachment = NULL; - } -} - -static inline void -vn_decode_VkSubpassDescriptionDepthStencilResolve_temp(struct vn_cs_decoder *dec, VkSubpassDescriptionDepthStencilResolve *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubpassDescriptionDepthStencilResolve_pnext_temp(dec); - vn_decode_VkSubpassDescriptionDepthStencilResolve_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubpassDescriptionDepthStencilResolve_handle_self(VkSubpassDescriptionDepthStencilResolve *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthResolveMode */ - /* skip val->stencilResolveMode */ - if (val->pDepthStencilResolveAttachment) - vn_replace_VkAttachmentReference2_handle((VkAttachmentReference2 *)val->pDepthStencilResolveAttachment); -} - -static inline void -vn_replace_VkSubpassDescriptionDepthStencilResolve_handle(VkSubpassDescriptionDepthStencilResolve *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: - vn_replace_VkSubpassDescriptionDepthStencilResolve_handle_self((VkSubpassDescriptionDepthStencilResolve *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkFragmentShadingRateAttachmentInfoKHR chain */ - -static inline void * -vn_decode_VkFragmentShadingRateAttachmentInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkFragmentShadingRateAttachmentInfoKHR_self_temp(struct vn_cs_decoder *dec, VkFragmentShadingRateAttachmentInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pFragmentShadingRateAttachment = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pFragmentShadingRateAttachment)); - if (!val->pFragmentShadingRateAttachment) return; - vn_decode_VkAttachmentReference2_temp(dec, (VkAttachmentReference2 *)val->pFragmentShadingRateAttachment); - } else { - val->pFragmentShadingRateAttachment = NULL; - } - vn_decode_VkExtent2D_temp(dec, &val->shadingRateAttachmentTexelSize); -} - -static inline void -vn_decode_VkFragmentShadingRateAttachmentInfoKHR_temp(struct vn_cs_decoder *dec, VkFragmentShadingRateAttachmentInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkFragmentShadingRateAttachmentInfoKHR_pnext_temp(dec); - vn_decode_VkFragmentShadingRateAttachmentInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkFragmentShadingRateAttachmentInfoKHR_handle_self(VkFragmentShadingRateAttachmentInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - if (val->pFragmentShadingRateAttachment) - vn_replace_VkAttachmentReference2_handle((VkAttachmentReference2 *)val->pFragmentShadingRateAttachment); - vn_replace_VkExtent2D_handle(&val->shadingRateAttachmentTexelSize); -} - -static inline void -vn_replace_VkFragmentShadingRateAttachmentInfoKHR_handle(VkFragmentShadingRateAttachmentInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: - vn_replace_VkFragmentShadingRateAttachmentInfoKHR_handle_self((VkFragmentShadingRateAttachmentInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubpassDescription2 chain */ - -static inline void * -vn_decode_VkSubpassDescription2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSubpassDescriptionDepthStencilResolve)); - if (pnext) { - pnext->sType = stype; - ((VkSubpassDescriptionDepthStencilResolve *)pnext)->pNext = vn_decode_VkSubpassDescription2_pnext_temp(dec); - vn_decode_VkSubpassDescriptionDepthStencilResolve_self_temp(dec, (VkSubpassDescriptionDepthStencilResolve *)pnext); - } - break; - case VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkFragmentShadingRateAttachmentInfoKHR)); - if (pnext) { - pnext->sType = stype; - ((VkFragmentShadingRateAttachmentInfoKHR *)pnext)->pNext = vn_decode_VkSubpassDescription2_pnext_temp(dec); - vn_decode_VkFragmentShadingRateAttachmentInfoKHR_self_temp(dec, (VkFragmentShadingRateAttachmentInfoKHR *)pnext); - } - break; - case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMultisampledRenderToSingleSampledInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkMultisampledRenderToSingleSampledInfoEXT *)pnext)->pNext = vn_decode_VkSubpassDescription2_pnext_temp(dec); - vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_self_temp(dec, (VkMultisampledRenderToSingleSampledInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkSubpassDescription2_self_temp(struct vn_cs_decoder *dec, VkSubpassDescription2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkPipelineBindPoint(dec, &val->pipelineBindPoint); - vn_decode_uint32_t(dec, &val->viewMask); - vn_decode_uint32_t(dec, &val->inputAttachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->inputAttachmentCount); - val->pInputAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pInputAttachments), iter_count); - if (!val->pInputAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentReference2_temp(dec, &((VkAttachmentReference2 *)val->pInputAttachments)[i]); - } else { - vn_decode_array_size(dec, val->inputAttachmentCount); - val->pInputAttachments = NULL; - } - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachments), iter_count); - if (!val->pColorAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentReference2_temp(dec, &((VkAttachmentReference2 *)val->pColorAttachments)[i]); - } else { - vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachments = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pResolveAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pResolveAttachments), iter_count); - if (!val->pResolveAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentReference2_temp(dec, &((VkAttachmentReference2 *)val->pResolveAttachments)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pResolveAttachments = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDepthStencilAttachment = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthStencilAttachment)); - if (!val->pDepthStencilAttachment) return; - vn_decode_VkAttachmentReference2_temp(dec, (VkAttachmentReference2 *)val->pDepthStencilAttachment); - } else { - val->pDepthStencilAttachment = NULL; - } - vn_decode_uint32_t(dec, &val->preserveAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->preserveAttachmentCount); - val->pPreserveAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPreserveAttachments), array_size); - if (!val->pPreserveAttachments) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pPreserveAttachments, array_size); - } else { - vn_decode_array_size(dec, val->preserveAttachmentCount); - val->pPreserveAttachments = NULL; - } -} - -static inline void -vn_decode_VkSubpassDescription2_temp(struct vn_cs_decoder *dec, VkSubpassDescription2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubpassDescription2_pnext_temp(dec); - vn_decode_VkSubpassDescription2_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubpassDescription2_handle_self(VkSubpassDescription2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->pipelineBindPoint */ - /* skip val->viewMask */ - /* skip val->inputAttachmentCount */ - if (val->pInputAttachments) { - for (uint32_t i = 0; i < val->inputAttachmentCount; i++) - vn_replace_VkAttachmentReference2_handle(&((VkAttachmentReference2 *)val->pInputAttachments)[i]); - } - /* skip val->colorAttachmentCount */ - if (val->pColorAttachments) { - for (uint32_t i = 0; i < val->colorAttachmentCount; i++) - vn_replace_VkAttachmentReference2_handle(&((VkAttachmentReference2 *)val->pColorAttachments)[i]); - } - if (val->pResolveAttachments) { - for (uint32_t i = 0; i < val->colorAttachmentCount; i++) - vn_replace_VkAttachmentReference2_handle(&((VkAttachmentReference2 *)val->pResolveAttachments)[i]); - } - if (val->pDepthStencilAttachment) - vn_replace_VkAttachmentReference2_handle((VkAttachmentReference2 *)val->pDepthStencilAttachment); - /* skip val->preserveAttachmentCount */ - /* skip val->pPreserveAttachments */ -} - -static inline void -vn_replace_VkSubpassDescription2_handle(VkSubpassDescription2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2: - vn_replace_VkSubpassDescription2_handle_self((VkSubpassDescription2 *)pnext); - break; - case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: - vn_replace_VkSubpassDescriptionDepthStencilResolve_handle_self((VkSubpassDescriptionDepthStencilResolve *)pnext); - break; - case VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: - vn_replace_VkFragmentShadingRateAttachmentInfoKHR_handle_self((VkFragmentShadingRateAttachmentInfoKHR *)pnext); - break; - case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: - vn_replace_VkMultisampledRenderToSingleSampledInfoEXT_handle_self((VkMultisampledRenderToSingleSampledInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSubpassDependency2 chain */ - -static inline void * -vn_decode_VkSubpassDependency2_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryBarrier2)); - if (pnext) { - pnext->sType = stype; - ((VkMemoryBarrier2 *)pnext)->pNext = vn_decode_VkSubpassDependency2_pnext_temp(dec); - vn_decode_VkMemoryBarrier2_self_temp(dec, (VkMemoryBarrier2 *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkSubpassDependency2_self_temp(struct vn_cs_decoder *dec, VkSubpassDependency2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->srcSubpass); - vn_decode_uint32_t(dec, &val->dstSubpass); - vn_decode_VkFlags(dec, &val->srcStageMask); - vn_decode_VkFlags(dec, &val->dstStageMask); - vn_decode_VkFlags(dec, &val->srcAccessMask); - vn_decode_VkFlags(dec, &val->dstAccessMask); - vn_decode_VkFlags(dec, &val->dependencyFlags); - vn_decode_int32_t(dec, &val->viewOffset); -} - -static inline void -vn_decode_VkSubpassDependency2_temp(struct vn_cs_decoder *dec, VkSubpassDependency2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSubpassDependency2_pnext_temp(dec); - vn_decode_VkSubpassDependency2_self_temp(dec, val); -} - -static inline void -vn_replace_VkSubpassDependency2_handle_self(VkSubpassDependency2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcSubpass */ - /* skip val->dstSubpass */ - /* skip val->srcStageMask */ - /* skip val->dstStageMask */ - /* skip val->srcAccessMask */ - /* skip val->dstAccessMask */ - /* skip val->dependencyFlags */ - /* skip val->viewOffset */ -} - -static inline void -vn_replace_VkSubpassDependency2_handle(VkSubpassDependency2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2: - vn_replace_VkSubpassDependency2_handle_self((VkSubpassDependency2 *)pnext); - break; - case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: - vn_replace_VkMemoryBarrier2_handle_self((VkMemoryBarrier2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderPassCreateInfo2 chain */ - -static inline void * -vn_decode_VkRenderPassCreateInfo2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderPassCreateInfo2_self_temp(struct vn_cs_decoder *dec, VkRenderPassCreateInfo2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->attachmentCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAttachments), iter_count); - if (!val->pAttachments) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAttachmentDescription2_temp(dec, &((VkAttachmentDescription2 *)val->pAttachments)[i]); - } else { - vn_decode_array_size(dec, val->attachmentCount); - val->pAttachments = NULL; - } - vn_decode_uint32_t(dec, &val->subpassCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->subpassCount); - val->pSubpasses = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSubpasses), iter_count); - if (!val->pSubpasses) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubpassDescription2_temp(dec, &((VkSubpassDescription2 *)val->pSubpasses)[i]); - } else { - vn_decode_array_size(dec, val->subpassCount); - val->pSubpasses = NULL; - } - vn_decode_uint32_t(dec, &val->dependencyCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->dependencyCount); - val->pDependencies = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDependencies), iter_count); - if (!val->pDependencies) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSubpassDependency2_temp(dec, &((VkSubpassDependency2 *)val->pDependencies)[i]); - } else { - vn_decode_array_size(dec, val->dependencyCount); - val->pDependencies = NULL; - } - vn_decode_uint32_t(dec, &val->correlatedViewMaskCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->correlatedViewMaskCount); - val->pCorrelatedViewMasks = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCorrelatedViewMasks), array_size); - if (!val->pCorrelatedViewMasks) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pCorrelatedViewMasks, array_size); - } else { - vn_decode_array_size(dec, val->correlatedViewMaskCount); - val->pCorrelatedViewMasks = NULL; - } -} - -static inline void -vn_decode_VkRenderPassCreateInfo2_temp(struct vn_cs_decoder *dec, VkRenderPassCreateInfo2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderPassCreateInfo2_pnext_temp(dec); - vn_decode_VkRenderPassCreateInfo2_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderPassCreateInfo2_handle_self(VkRenderPassCreateInfo2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->attachmentCount */ - if (val->pAttachments) { - for (uint32_t i = 0; i < val->attachmentCount; i++) - vn_replace_VkAttachmentDescription2_handle(&((VkAttachmentDescription2 *)val->pAttachments)[i]); - } - /* skip val->subpassCount */ - if (val->pSubpasses) { - for (uint32_t i = 0; i < val->subpassCount; i++) - vn_replace_VkSubpassDescription2_handle(&((VkSubpassDescription2 *)val->pSubpasses)[i]); - } - /* skip val->dependencyCount */ - if (val->pDependencies) { - for (uint32_t i = 0; i < val->dependencyCount; i++) - vn_replace_VkSubpassDependency2_handle(&((VkSubpassDependency2 *)val->pDependencies)[i]); - } - /* skip val->correlatedViewMaskCount */ - /* skip val->pCorrelatedViewMasks */ -} - -static inline void -vn_replace_VkRenderPassCreateInfo2_handle(VkRenderPassCreateInfo2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2: - vn_replace_VkRenderPassCreateInfo2_handle_self((VkRenderPassCreateInfo2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateRenderPass_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateRenderPass *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkRenderPassCreateInfo_temp(dec, (VkRenderPassCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pRenderPass = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRenderPass)); - if (!args->pRenderPass) return; - vn_decode_VkRenderPass(dec, args->pRenderPass); - } else { - args->pRenderPass = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateRenderPass_args_handle(struct vn_command_vkCreateRenderPass *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkRenderPassCreateInfo_handle((VkRenderPassCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pRenderPass */ -} - -static inline void vn_encode_vkCreateRenderPass_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateRenderPass *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateRenderPass_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pRenderPass)) - vn_encode_VkRenderPass(enc, args->pRenderPass); -} - -static inline void vn_decode_vkDestroyRenderPass_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyRenderPass *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkRenderPass_lookup(dec, &args->renderPass); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyRenderPass_args_handle(struct vn_command_vkDestroyRenderPass *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkRenderPass_handle(&args->renderPass); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyRenderPass_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyRenderPass *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyRenderPass_EXT}); - - /* skip args->device */ - /* skip args->renderPass */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetRenderAreaGranularity_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetRenderAreaGranularity *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkRenderPass_lookup(dec, &args->renderPass); - if (vn_decode_simple_pointer(dec)) { - args->pGranularity = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pGranularity)); - if (!args->pGranularity) return; - vn_decode_VkExtent2D_partial_temp(dec, args->pGranularity); - } else { - args->pGranularity = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetRenderAreaGranularity_args_handle(struct vn_command_vkGetRenderAreaGranularity *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkRenderPass_handle(&args->renderPass); - /* skip args->pGranularity */ -} - -static inline void vn_encode_vkGetRenderAreaGranularity_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetRenderAreaGranularity *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetRenderAreaGranularity_EXT}); - - /* skip args->device */ - /* skip args->renderPass */ - if (vn_encode_simple_pointer(enc, args->pGranularity)) - vn_encode_VkExtent2D(enc, args->pGranularity); -} - -static inline void vn_decode_vkGetRenderingAreaGranularity_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetRenderingAreaGranularity *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pRenderingAreaInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRenderingAreaInfo)); - if (!args->pRenderingAreaInfo) return; - vn_decode_VkRenderingAreaInfo_temp(dec, (VkRenderingAreaInfo *)args->pRenderingAreaInfo); - } else { - args->pRenderingAreaInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - args->pGranularity = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pGranularity)); - if (!args->pGranularity) return; - vn_decode_VkExtent2D_partial_temp(dec, args->pGranularity); - } else { - args->pGranularity = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetRenderingAreaGranularity_args_handle(struct vn_command_vkGetRenderingAreaGranularity *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pRenderingAreaInfo) - vn_replace_VkRenderingAreaInfo_handle((VkRenderingAreaInfo *)args->pRenderingAreaInfo); - /* skip args->pGranularity */ -} - -static inline void vn_encode_vkGetRenderingAreaGranularity_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetRenderingAreaGranularity *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetRenderingAreaGranularity_EXT}); - - /* skip args->device */ - /* skip args->pRenderingAreaInfo */ - if (vn_encode_simple_pointer(enc, args->pGranularity)) - vn_encode_VkExtent2D(enc, args->pGranularity); -} - -static inline void vn_decode_vkCreateRenderPass2_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateRenderPass2 *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkRenderPassCreateInfo2_temp(dec, (VkRenderPassCreateInfo2 *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pRenderPass = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pRenderPass)); - if (!args->pRenderPass) return; - vn_decode_VkRenderPass(dec, args->pRenderPass); - } else { - args->pRenderPass = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateRenderPass2_args_handle(struct vn_command_vkCreateRenderPass2 *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkRenderPassCreateInfo2_handle((VkRenderPassCreateInfo2 *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pRenderPass */ -} - -static inline void vn_encode_vkCreateRenderPass2_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateRenderPass2 *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateRenderPass2_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pRenderPass)) - vn_encode_VkRenderPass(enc, args->pRenderPass); -} - -static inline void vn_dispatch_vkCreateRenderPass(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateRenderPass args; - - if (!ctx->dispatch_vkCreateRenderPass) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateRenderPass_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateRenderPass(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateRenderPass returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateRenderPass_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyRenderPass(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyRenderPass args; - - if (!ctx->dispatch_vkDestroyRenderPass) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyRenderPass_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyRenderPass(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyRenderPass_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetRenderAreaGranularity(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetRenderAreaGranularity args; - - if (!ctx->dispatch_vkGetRenderAreaGranularity) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetRenderAreaGranularity_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetRenderAreaGranularity(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetRenderAreaGranularity_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetRenderingAreaGranularity(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetRenderingAreaGranularity args; - - if (!ctx->dispatch_vkGetRenderingAreaGranularity) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetRenderingAreaGranularity_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetRenderingAreaGranularity(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetRenderingAreaGranularity_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateRenderPass2(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateRenderPass2 args; - - if (!ctx->dispatch_vkCreateRenderPass2) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateRenderPass2_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateRenderPass2(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateRenderPass2 returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateRenderPass2_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_RENDER_PASS_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_sampler.h b/src/venus/venus-protocol/vn_protocol_renderer_sampler.h deleted file mode 100644 index 62d8842a..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_sampler.h +++ /dev/null @@ -1,157 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_SAMPLER_H -#define VN_PROTOCOL_RENDERER_SAMPLER_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -static inline void vn_decode_vkCreateSampler_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateSampler *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkSamplerCreateInfo_temp(dec, (VkSamplerCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pSampler = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSampler)); - if (!args->pSampler) return; - vn_decode_VkSampler(dec, args->pSampler); - } else { - args->pSampler = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateSampler_args_handle(struct vn_command_vkCreateSampler *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkSamplerCreateInfo_handle((VkSamplerCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pSampler */ -} - -static inline void vn_encode_vkCreateSampler_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateSampler *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateSampler_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pSampler)) - vn_encode_VkSampler(enc, args->pSampler); -} - -static inline void vn_decode_vkDestroySampler_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroySampler *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkSampler_lookup(dec, &args->sampler); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroySampler_args_handle(struct vn_command_vkDestroySampler *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkSampler_handle(&args->sampler); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroySampler_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroySampler *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroySampler_EXT}); - - /* skip args->device */ - /* skip args->sampler */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateSampler(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateSampler args; - - if (!ctx->dispatch_vkCreateSampler) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateSampler_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateSampler(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateSampler returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateSampler_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroySampler(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroySampler args; - - if (!ctx->dispatch_vkDestroySampler) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroySampler_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroySampler(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroySampler_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_SAMPLER_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_sampler_ycbcr_conversion.h b/src/venus/venus-protocol/vn_protocol_renderer_sampler_ycbcr_conversion.h deleted file mode 100644 index 64ea6359..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_sampler_ycbcr_conversion.h +++ /dev/null @@ -1,228 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_SAMPLER_YCBCR_CONVERSION_H -#define VN_PROTOCOL_RENDERER_SAMPLER_YCBCR_CONVERSION_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkSamplerYcbcrConversionCreateInfo chain */ - -static inline void * -vn_decode_VkSamplerYcbcrConversionCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerYcbcrConversionCreateInfo_self_temp(struct vn_cs_decoder *dec, VkSamplerYcbcrConversionCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkSamplerYcbcrModelConversion(dec, &val->ycbcrModel); - vn_decode_VkSamplerYcbcrRange(dec, &val->ycbcrRange); - vn_decode_VkComponentMapping_temp(dec, &val->components); - vn_decode_VkChromaLocation(dec, &val->xChromaOffset); - vn_decode_VkChromaLocation(dec, &val->yChromaOffset); - vn_decode_VkFilter(dec, &val->chromaFilter); - vn_decode_VkBool32(dec, &val->forceExplicitReconstruction); -} - -static inline void -vn_decode_VkSamplerYcbcrConversionCreateInfo_temp(struct vn_cs_decoder *dec, VkSamplerYcbcrConversionCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerYcbcrConversionCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerYcbcrConversionCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerYcbcrConversionCreateInfo_handle_self(VkSamplerYcbcrConversionCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->format */ - /* skip val->ycbcrModel */ - /* skip val->ycbcrRange */ - vn_replace_VkComponentMapping_handle(&val->components); - /* skip val->xChromaOffset */ - /* skip val->yChromaOffset */ - /* skip val->chromaFilter */ - /* skip val->forceExplicitReconstruction */ -} - -static inline void -vn_replace_VkSamplerYcbcrConversionCreateInfo_handle(VkSamplerYcbcrConversionCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO: - vn_replace_VkSamplerYcbcrConversionCreateInfo_handle_self((VkSamplerYcbcrConversionCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateSamplerYcbcrConversion_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateSamplerYcbcrConversion *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkSamplerYcbcrConversionCreateInfo_temp(dec, (VkSamplerYcbcrConversionCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pYcbcrConversion = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pYcbcrConversion)); - if (!args->pYcbcrConversion) return; - vn_decode_VkSamplerYcbcrConversion(dec, args->pYcbcrConversion); - } else { - args->pYcbcrConversion = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateSamplerYcbcrConversion_args_handle(struct vn_command_vkCreateSamplerYcbcrConversion *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkSamplerYcbcrConversionCreateInfo_handle((VkSamplerYcbcrConversionCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pYcbcrConversion */ -} - -static inline void vn_encode_vkCreateSamplerYcbcrConversion_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateSamplerYcbcrConversion *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateSamplerYcbcrConversion_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pYcbcrConversion)) - vn_encode_VkSamplerYcbcrConversion(enc, args->pYcbcrConversion); -} - -static inline void vn_decode_vkDestroySamplerYcbcrConversion_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroySamplerYcbcrConversion *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkSamplerYcbcrConversion_lookup(dec, &args->ycbcrConversion); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroySamplerYcbcrConversion_args_handle(struct vn_command_vkDestroySamplerYcbcrConversion *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkSamplerYcbcrConversion_handle(&args->ycbcrConversion); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroySamplerYcbcrConversion_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroySamplerYcbcrConversion *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroySamplerYcbcrConversion_EXT}); - - /* skip args->device */ - /* skip args->ycbcrConversion */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateSamplerYcbcrConversion(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateSamplerYcbcrConversion args; - - if (!ctx->dispatch_vkCreateSamplerYcbcrConversion) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateSamplerYcbcrConversion_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateSamplerYcbcrConversion(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateSamplerYcbcrConversion returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateSamplerYcbcrConversion_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroySamplerYcbcrConversion(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroySamplerYcbcrConversion args; - - if (!ctx->dispatch_vkDestroySamplerYcbcrConversion) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroySamplerYcbcrConversion_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroySamplerYcbcrConversion(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroySamplerYcbcrConversion_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_SAMPLER_YCBCR_CONVERSION_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_semaphore.h b/src/venus/venus-protocol/vn_protocol_renderer_semaphore.h deleted file mode 100644 index ffe61add..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_semaphore.h +++ /dev/null @@ -1,816 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_SEMAPHORE_H -#define VN_PROTOCOL_RENDERER_SEMAPHORE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * vkGetSemaphoreFdKHR - * vkImportSemaphoreFdKHR - */ - -/* struct VkExportSemaphoreCreateInfo chain */ - -static inline void * -vn_decode_VkExportSemaphoreCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkExportSemaphoreCreateInfo_self_temp(struct vn_cs_decoder *dec, VkExportSemaphoreCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->handleTypes); -} - -static inline void -vn_decode_VkExportSemaphoreCreateInfo_temp(struct vn_cs_decoder *dec, VkExportSemaphoreCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkExportSemaphoreCreateInfo_pnext_temp(dec); - vn_decode_VkExportSemaphoreCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkExportSemaphoreCreateInfo_handle_self(VkExportSemaphoreCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->handleTypes */ -} - -static inline void -vn_replace_VkExportSemaphoreCreateInfo_handle(VkExportSemaphoreCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: - vn_replace_VkExportSemaphoreCreateInfo_handle_self((VkExportSemaphoreCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSemaphoreCreateInfo chain */ - -static inline void * -vn_decode_VkSemaphoreCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkExportSemaphoreCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkExportSemaphoreCreateInfo *)pnext)->pNext = vn_decode_VkSemaphoreCreateInfo_pnext_temp(dec); - vn_decode_VkExportSemaphoreCreateInfo_self_temp(dec, (VkExportSemaphoreCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSemaphoreTypeCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkSemaphoreTypeCreateInfo *)pnext)->pNext = vn_decode_VkSemaphoreCreateInfo_pnext_temp(dec); - vn_decode_VkSemaphoreTypeCreateInfo_self_temp(dec, (VkSemaphoreTypeCreateInfo *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkSemaphoreCreateInfo_self_temp(struct vn_cs_decoder *dec, VkSemaphoreCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkSemaphoreCreateInfo_temp(struct vn_cs_decoder *dec, VkSemaphoreCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSemaphoreCreateInfo_pnext_temp(dec); - vn_decode_VkSemaphoreCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSemaphoreCreateInfo_handle_self(VkSemaphoreCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ -} - -static inline void -vn_replace_VkSemaphoreCreateInfo_handle(VkSemaphoreCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO: - vn_replace_VkSemaphoreCreateInfo_handle_self((VkSemaphoreCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: - vn_replace_VkExportSemaphoreCreateInfo_handle_self((VkExportSemaphoreCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: - vn_replace_VkSemaphoreTypeCreateInfo_handle_self((VkSemaphoreTypeCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSemaphoreWaitInfo chain */ - -static inline void * -vn_decode_VkSemaphoreWaitInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSemaphoreWaitInfo_self_temp(struct vn_cs_decoder *dec, VkSemaphoreWaitInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->semaphoreCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->semaphoreCount); - val->pSemaphores = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSemaphores), iter_count); - if (!val->pSemaphores) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSemaphore_lookup(dec, &((VkSemaphore *)val->pSemaphores)[i]); - } else { - vn_decode_array_size(dec, val->semaphoreCount); - val->pSemaphores = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->semaphoreCount); - val->pValues = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pValues), array_size); - if (!val->pValues) return; - vn_decode_uint64_t_array(dec, (uint64_t *)val->pValues, array_size); - } else { - vn_decode_array_size(dec, val->semaphoreCount); - val->pValues = NULL; - } -} - -static inline void -vn_decode_VkSemaphoreWaitInfo_temp(struct vn_cs_decoder *dec, VkSemaphoreWaitInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSemaphoreWaitInfo_pnext_temp(dec); - vn_decode_VkSemaphoreWaitInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSemaphoreWaitInfo_handle_self(VkSemaphoreWaitInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->semaphoreCount */ - if (val->pSemaphores) { - for (uint32_t i = 0; i < val->semaphoreCount; i++) - vn_replace_VkSemaphore_handle(&((VkSemaphore *)val->pSemaphores)[i]); - } - /* skip val->pValues */ -} - -static inline void -vn_replace_VkSemaphoreWaitInfo_handle(VkSemaphoreWaitInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO: - vn_replace_VkSemaphoreWaitInfo_handle_self((VkSemaphoreWaitInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSemaphoreSignalInfo chain */ - -static inline void * -vn_decode_VkSemaphoreSignalInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSemaphoreSignalInfo_self_temp(struct vn_cs_decoder *dec, VkSemaphoreSignalInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSemaphore_lookup(dec, &val->semaphore); - vn_decode_uint64_t(dec, &val->value); -} - -static inline void -vn_decode_VkSemaphoreSignalInfo_temp(struct vn_cs_decoder *dec, VkSemaphoreSignalInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSemaphoreSignalInfo_pnext_temp(dec); - vn_decode_VkSemaphoreSignalInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSemaphoreSignalInfo_handle_self(VkSemaphoreSignalInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkSemaphore_handle(&val->semaphore); - /* skip val->value */ -} - -static inline void -vn_replace_VkSemaphoreSignalInfo_handle(VkSemaphoreSignalInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO: - vn_replace_VkSemaphoreSignalInfo_handle_self((VkSemaphoreSignalInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImportSemaphoreResourceInfoMESA chain */ - -static inline void * -vn_decode_VkImportSemaphoreResourceInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImportSemaphoreResourceInfoMESA_self_temp(struct vn_cs_decoder *dec, VkImportSemaphoreResourceInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSemaphore_lookup(dec, &val->semaphore); - vn_decode_uint32_t(dec, &val->resourceId); -} - -static inline void -vn_decode_VkImportSemaphoreResourceInfoMESA_temp(struct vn_cs_decoder *dec, VkImportSemaphoreResourceInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_RESOURCE_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImportSemaphoreResourceInfoMESA_pnext_temp(dec); - vn_decode_VkImportSemaphoreResourceInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkImportSemaphoreResourceInfoMESA_handle_self(VkImportSemaphoreResourceInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkSemaphore_handle(&val->semaphore); - /* skip val->resourceId */ -} - -static inline void -vn_replace_VkImportSemaphoreResourceInfoMESA_handle(VkImportSemaphoreResourceInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_RESOURCE_INFO_MESA: - vn_replace_VkImportSemaphoreResourceInfoMESA_handle_self((VkImportSemaphoreResourceInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateSemaphore_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateSemaphore *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkSemaphoreCreateInfo_temp(dec, (VkSemaphoreCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pSemaphore = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSemaphore)); - if (!args->pSemaphore) return; - vn_decode_VkSemaphore(dec, args->pSemaphore); - } else { - args->pSemaphore = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateSemaphore_args_handle(struct vn_command_vkCreateSemaphore *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkSemaphoreCreateInfo_handle((VkSemaphoreCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pSemaphore */ -} - -static inline void vn_encode_vkCreateSemaphore_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateSemaphore *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateSemaphore_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pSemaphore)) - vn_encode_VkSemaphore(enc, args->pSemaphore); -} - -static inline void vn_decode_vkDestroySemaphore_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroySemaphore *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkSemaphore_lookup(dec, &args->semaphore); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroySemaphore_args_handle(struct vn_command_vkDestroySemaphore *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkSemaphore_handle(&args->semaphore); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroySemaphore_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroySemaphore *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroySemaphore_EXT}); - - /* skip args->device */ - /* skip args->semaphore */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetSemaphoreCounterValue_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetSemaphoreCounterValue *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkSemaphore_lookup(dec, &args->semaphore); - if (vn_decode_simple_pointer(dec)) { - args->pValue = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pValue)); - if (!args->pValue) return; - } else { - args->pValue = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkGetSemaphoreCounterValue_args_handle(struct vn_command_vkGetSemaphoreCounterValue *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkSemaphore_handle(&args->semaphore); - /* skip args->pValue */ -} - -static inline void vn_encode_vkGetSemaphoreCounterValue_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetSemaphoreCounterValue *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetSemaphoreCounterValue_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->semaphore */ - if (vn_encode_simple_pointer(enc, args->pValue)) - vn_encode_uint64_t(enc, args->pValue); -} - -static inline void vn_decode_vkWaitSemaphores_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWaitSemaphores *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pWaitInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pWaitInfo)); - if (!args->pWaitInfo) return; - vn_decode_VkSemaphoreWaitInfo_temp(dec, (VkSemaphoreWaitInfo *)args->pWaitInfo); - } else { - args->pWaitInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - vn_decode_uint64_t(dec, &args->timeout); -} - -static inline void vn_replace_vkWaitSemaphores_args_handle(struct vn_command_vkWaitSemaphores *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pWaitInfo) - vn_replace_VkSemaphoreWaitInfo_handle((VkSemaphoreWaitInfo *)args->pWaitInfo); - /* skip args->timeout */ -} - -static inline void vn_encode_vkWaitSemaphores_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWaitSemaphores *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWaitSemaphores_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pWaitInfo */ - /* skip args->timeout */ -} - -static inline void vn_decode_vkSignalSemaphore_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSignalSemaphore *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pSignalInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pSignalInfo)); - if (!args->pSignalInfo) return; - vn_decode_VkSemaphoreSignalInfo_temp(dec, (VkSemaphoreSignalInfo *)args->pSignalInfo); - } else { - args->pSignalInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkSignalSemaphore_args_handle(struct vn_command_vkSignalSemaphore *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pSignalInfo) - vn_replace_VkSemaphoreSignalInfo_handle((VkSemaphoreSignalInfo *)args->pSignalInfo); -} - -static inline void vn_encode_vkSignalSemaphore_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSignalSemaphore *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSignalSemaphore_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pSignalInfo */ -} - -static inline void vn_decode_vkWaitSemaphoreResourceMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWaitSemaphoreResourceMESA *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkSemaphore_lookup(dec, &args->semaphore); -} - -static inline void vn_replace_vkWaitSemaphoreResourceMESA_args_handle(struct vn_command_vkWaitSemaphoreResourceMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkSemaphore_handle(&args->semaphore); -} - -static inline void vn_encode_vkWaitSemaphoreResourceMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWaitSemaphoreResourceMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWaitSemaphoreResourceMESA_EXT}); - - /* skip args->device */ - /* skip args->semaphore */ -} - -static inline void vn_decode_vkImportSemaphoreResourceMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkImportSemaphoreResourceMESA *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pImportSemaphoreResourceInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pImportSemaphoreResourceInfo)); - if (!args->pImportSemaphoreResourceInfo) return; - vn_decode_VkImportSemaphoreResourceInfoMESA_temp(dec, (VkImportSemaphoreResourceInfoMESA *)args->pImportSemaphoreResourceInfo); - } else { - args->pImportSemaphoreResourceInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkImportSemaphoreResourceMESA_args_handle(struct vn_command_vkImportSemaphoreResourceMESA *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pImportSemaphoreResourceInfo) - vn_replace_VkImportSemaphoreResourceInfoMESA_handle((VkImportSemaphoreResourceInfoMESA *)args->pImportSemaphoreResourceInfo); -} - -static inline void vn_encode_vkImportSemaphoreResourceMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkImportSemaphoreResourceMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkImportSemaphoreResourceMESA_EXT}); - - /* skip args->device */ - /* skip args->pImportSemaphoreResourceInfo */ -} - -static inline void vn_dispatch_vkCreateSemaphore(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateSemaphore args; - - if (!ctx->dispatch_vkCreateSemaphore) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateSemaphore_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateSemaphore(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateSemaphore returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateSemaphore_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroySemaphore(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroySemaphore args; - - if (!ctx->dispatch_vkDestroySemaphore) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroySemaphore_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroySemaphore(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroySemaphore_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetSemaphoreCounterValue(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetSemaphoreCounterValue args; - - if (!ctx->dispatch_vkGetSemaphoreCounterValue) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetSemaphoreCounterValue_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetSemaphoreCounterValue(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetSemaphoreCounterValue returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetSemaphoreCounterValue_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWaitSemaphores(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWaitSemaphores args; - - if (!ctx->dispatch_vkWaitSemaphores) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkWaitSemaphores_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWaitSemaphores(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkWaitSemaphores returned %d", args.ret); -#endif - - if (flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) { - if (!vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkWaitSemaphores_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - } else if (args.ret == VK_ERROR_DEVICE_LOST) { - vn_cs_decoder_set_fatal(ctx->decoder); - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkSignalSemaphore(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkSignalSemaphore args; - - if (!ctx->dispatch_vkSignalSemaphore) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkSignalSemaphore_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkSignalSemaphore(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkSignalSemaphore returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkSignalSemaphore_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWaitSemaphoreResourceMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWaitSemaphoreResourceMESA args; - - if (!ctx->dispatch_vkWaitSemaphoreResourceMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkWaitSemaphoreResourceMESA_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWaitSemaphoreResourceMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkWaitSemaphoreResourceMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkImportSemaphoreResourceMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkImportSemaphoreResourceMESA args; - - if (!ctx->dispatch_vkImportSemaphoreResourceMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkImportSemaphoreResourceMESA_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkImportSemaphoreResourceMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkImportSemaphoreResourceMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_SEMAPHORE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_shader_module.h b/src/venus/venus-protocol/vn_protocol_renderer_shader_module.h deleted file mode 100644 index fe02221c..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_shader_module.h +++ /dev/null @@ -1,157 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_SHADER_MODULE_H -#define VN_PROTOCOL_RENDERER_SHADER_MODULE_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -static inline void vn_decode_vkCreateShaderModule_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateShaderModule *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkShaderModuleCreateInfo_temp(dec, (VkShaderModuleCreateInfo *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pShaderModule = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pShaderModule)); - if (!args->pShaderModule) return; - vn_decode_VkShaderModule(dec, args->pShaderModule); - } else { - args->pShaderModule = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateShaderModule_args_handle(struct vn_command_vkCreateShaderModule *args) -{ - vn_replace_VkDevice_handle(&args->device); - if (args->pCreateInfo) - vn_replace_VkShaderModuleCreateInfo_handle((VkShaderModuleCreateInfo *)args->pCreateInfo); - /* skip args->pAllocator */ - /* skip args->pShaderModule */ -} - -static inline void vn_encode_vkCreateShaderModule_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateShaderModule *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateShaderModule_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pCreateInfo */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pShaderModule)) - vn_encode_VkShaderModule(enc, args->pShaderModule); -} - -static inline void vn_decode_vkDestroyShaderModule_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyShaderModule *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkShaderModule_lookup(dec, &args->shaderModule); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyShaderModule_args_handle(struct vn_command_vkDestroyShaderModule *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkShaderModule_handle(&args->shaderModule); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyShaderModule_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyShaderModule *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyShaderModule_EXT}); - - /* skip args->device */ - /* skip args->shaderModule */ - /* skip args->pAllocator */ -} - -static inline void vn_dispatch_vkCreateShaderModule(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateShaderModule args; - - if (!ctx->dispatch_vkCreateShaderModule) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateShaderModule_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateShaderModule(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateShaderModule returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateShaderModule_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyShaderModule(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyShaderModule args; - - if (!ctx->dispatch_vkDestroyShaderModule) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyShaderModule_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyShaderModule(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyShaderModule_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_SHADER_MODULE_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_structs.h b/src/venus/venus-protocol/vn_protocol_renderer_structs.h deleted file mode 100644 index d748ce52..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_structs.h +++ /dev/null @@ -1,3379 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_STRUCTS_H -#define VN_PROTOCOL_RENDERER_STRUCTS_H - -#include "vn_protocol_renderer_handles.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* - * These structs/unions/commands are not included - * - * VkAllocationCallbacks - */ - -/* struct VkExtent3D */ - -static inline void -vn_encode_VkExtent3D(struct vn_cs_encoder *enc, const VkExtent3D *val) -{ - vn_encode_uint32_t(enc, &val->width); - vn_encode_uint32_t(enc, &val->height); - vn_encode_uint32_t(enc, &val->depth); -} - -static inline void -vn_decode_VkExtent3D_temp(struct vn_cs_decoder *dec, VkExtent3D *val) -{ - vn_decode_uint32_t(dec, &val->width); - vn_decode_uint32_t(dec, &val->height); - vn_decode_uint32_t(dec, &val->depth); -} - -static inline void -vn_decode_VkExtent3D_partial_temp(struct vn_cs_decoder *dec, VkExtent3D *val) -{ - /* skip val->width */ - /* skip val->height */ - /* skip val->depth */ -} - -static inline void -vn_replace_VkExtent3D_handle(VkExtent3D *val) -{ - /* skip val->width */ - /* skip val->height */ - /* skip val->depth */ -} - -/* struct VkLayerProperties */ - -static inline void -vn_encode_VkLayerProperties(struct vn_cs_encoder *enc, const VkLayerProperties *val) -{ - vn_encode_array_size(enc, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_char_array(enc, val->layerName, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_uint32_t(enc, &val->specVersion); - vn_encode_uint32_t(enc, &val->implementationVersion); - vn_encode_array_size(enc, VK_MAX_DESCRIPTION_SIZE); - vn_encode_char_array(enc, val->description, VK_MAX_DESCRIPTION_SIZE); -} - -static inline void -vn_decode_VkLayerProperties_partial_temp(struct vn_cs_decoder *dec, VkLayerProperties *val) -{ - /* skip val->layerName */ - /* skip val->specVersion */ - /* skip val->implementationVersion */ - /* skip val->description */ -} - -/* struct VkExtensionProperties */ - -static inline void -vn_encode_VkExtensionProperties(struct vn_cs_encoder *enc, const VkExtensionProperties *val) -{ - vn_encode_array_size(enc, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_char_array(enc, val->extensionName, VK_MAX_EXTENSION_NAME_SIZE); - vn_encode_uint32_t(enc, &val->specVersion); -} - -static inline void -vn_decode_VkExtensionProperties_temp(struct vn_cs_decoder *dec, VkExtensionProperties *val) -{ - { - const size_t array_size = vn_decode_array_size(dec, VK_MAX_EXTENSION_NAME_SIZE); - vn_decode_char_array(dec, val->extensionName, array_size); - } - vn_decode_uint32_t(dec, &val->specVersion); -} - -static inline void -vn_decode_VkExtensionProperties_partial_temp(struct vn_cs_decoder *dec, VkExtensionProperties *val) -{ - /* skip val->extensionName */ - /* skip val->specVersion */ -} - -static inline void -vn_replace_VkExtensionProperties_handle(VkExtensionProperties *val) -{ - /* skip val->extensionName */ - /* skip val->specVersion */ -} - -/* struct VkMemoryRequirements */ - -static inline void -vn_encode_VkMemoryRequirements(struct vn_cs_encoder *enc, const VkMemoryRequirements *val) -{ - vn_encode_VkDeviceSize(enc, &val->size); - vn_encode_VkDeviceSize(enc, &val->alignment); - vn_encode_uint32_t(enc, &val->memoryTypeBits); -} - -static inline void -vn_decode_VkMemoryRequirements_partial_temp(struct vn_cs_decoder *dec, VkMemoryRequirements *val) -{ - /* skip val->size */ - /* skip val->alignment */ - /* skip val->memoryTypeBits */ -} - -/* struct VkSparseImageFormatProperties */ - -static inline void -vn_encode_VkSparseImageFormatProperties(struct vn_cs_encoder *enc, const VkSparseImageFormatProperties *val) -{ - vn_encode_VkFlags(enc, &val->aspectMask); - vn_encode_VkExtent3D(enc, &val->imageGranularity); - vn_encode_VkFlags(enc, &val->flags); -} - -static inline void -vn_decode_VkSparseImageFormatProperties_partial_temp(struct vn_cs_decoder *dec, VkSparseImageFormatProperties *val) -{ - /* skip val->aspectMask */ - vn_decode_VkExtent3D_partial_temp(dec, &val->imageGranularity); - /* skip val->flags */ -} - -/* struct VkImageSubresource */ - -static inline void -vn_decode_VkImageSubresource_temp(struct vn_cs_decoder *dec, VkImageSubresource *val) -{ - vn_decode_VkFlags(dec, &val->aspectMask); - vn_decode_uint32_t(dec, &val->mipLevel); - vn_decode_uint32_t(dec, &val->arrayLayer); -} - -static inline void -vn_replace_VkImageSubresource_handle(VkImageSubresource *val) -{ - /* skip val->aspectMask */ - /* skip val->mipLevel */ - /* skip val->arrayLayer */ -} - -/* struct VkOffset3D */ - -static inline void -vn_decode_VkOffset3D_temp(struct vn_cs_decoder *dec, VkOffset3D *val) -{ - vn_decode_int32_t(dec, &val->x); - vn_decode_int32_t(dec, &val->y); - vn_decode_int32_t(dec, &val->z); -} - -static inline void -vn_replace_VkOffset3D_handle(VkOffset3D *val) -{ - /* skip val->x */ - /* skip val->y */ - /* skip val->z */ -} - -/* struct VkSemaphoreTypeCreateInfo chain */ - -static inline void * -vn_decode_VkSemaphoreTypeCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSemaphoreTypeCreateInfo_self_temp(struct vn_cs_decoder *dec, VkSemaphoreTypeCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSemaphoreType(dec, &val->semaphoreType); - vn_decode_uint64_t(dec, &val->initialValue); -} - -static inline void -vn_decode_VkSemaphoreTypeCreateInfo_temp(struct vn_cs_decoder *dec, VkSemaphoreTypeCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSemaphoreTypeCreateInfo_pnext_temp(dec); - vn_decode_VkSemaphoreTypeCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSemaphoreTypeCreateInfo_handle_self(VkSemaphoreTypeCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->semaphoreType */ - /* skip val->initialValue */ -} - -static inline void -vn_replace_VkSemaphoreTypeCreateInfo_handle(VkSemaphoreTypeCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: - vn_replace_VkSemaphoreTypeCreateInfo_handle_self((VkSemaphoreTypeCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkBufferUsageFlags2CreateInfo chain */ - -static inline void * -vn_decode_VkBufferUsageFlags2CreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBufferUsageFlags2CreateInfo_self_temp(struct vn_cs_decoder *dec, VkBufferUsageFlags2CreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags64(dec, &val->usage); -} - -static inline void -vn_decode_VkBufferUsageFlags2CreateInfo_temp(struct vn_cs_decoder *dec, VkBufferUsageFlags2CreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBufferUsageFlags2CreateInfo_pnext_temp(dec); - vn_decode_VkBufferUsageFlags2CreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkBufferUsageFlags2CreateInfo_handle_self(VkBufferUsageFlags2CreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->usage */ -} - -static inline void -vn_replace_VkBufferUsageFlags2CreateInfo_handle(VkBufferUsageFlags2CreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO: - vn_replace_VkBufferUsageFlags2CreateInfo_handle_self((VkBufferUsageFlags2CreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageFormatListCreateInfo chain */ - -static inline void * -vn_decode_VkImageFormatListCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageFormatListCreateInfo_self_temp(struct vn_cs_decoder *dec, VkImageFormatListCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->viewFormatCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->viewFormatCount); - val->pViewFormats = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pViewFormats), array_size); - if (!val->pViewFormats) return; - vn_decode_VkFormat_array(dec, (VkFormat *)val->pViewFormats, array_size); - } else { - vn_decode_array_size(dec, val->viewFormatCount); - val->pViewFormats = NULL; - } -} - -static inline void -vn_decode_VkImageFormatListCreateInfo_temp(struct vn_cs_decoder *dec, VkImageFormatListCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageFormatListCreateInfo_pnext_temp(dec); - vn_decode_VkImageFormatListCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageFormatListCreateInfo_handle_self(VkImageFormatListCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->viewFormatCount */ - /* skip val->pViewFormats */ -} - -static inline void -vn_replace_VkImageFormatListCreateInfo_handle(VkImageFormatListCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: - vn_replace_VkImageFormatListCreateInfo_handle_self((VkImageFormatListCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageStencilUsageCreateInfo chain */ - -static inline void * -vn_decode_VkImageStencilUsageCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageStencilUsageCreateInfo_self_temp(struct vn_cs_decoder *dec, VkImageStencilUsageCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->stencilUsage); -} - -static inline void -vn_decode_VkImageStencilUsageCreateInfo_temp(struct vn_cs_decoder *dec, VkImageStencilUsageCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageStencilUsageCreateInfo_pnext_temp(dec); - vn_decode_VkImageStencilUsageCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageStencilUsageCreateInfo_handle_self(VkImageStencilUsageCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->stencilUsage */ -} - -static inline void -vn_replace_VkImageStencilUsageCreateInfo_handle(VkImageStencilUsageCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: - vn_replace_VkImageStencilUsageCreateInfo_handle_self((VkImageStencilUsageCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkHostAddressRangeConstEXT */ - -static inline void -vn_decode_VkHostAddressRangeConstEXT_temp(struct vn_cs_decoder *dec, VkHostAddressRangeConstEXT *val) -{ - vn_decode_size_t(dec, &val->size); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->size); - val->address = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!val->address) return; - vn_decode_blob_array(dec, (void *)val->address, array_size); - } else { - vn_decode_array_size(dec, val->size); - val->address = NULL; - } -} - -static inline void -vn_replace_VkHostAddressRangeConstEXT_handle(VkHostAddressRangeConstEXT *val) -{ - /* skip val->size */ - /* skip val->address */ -} - -/* struct VkComponentMapping */ - -static inline void -vn_encode_VkComponentMapping(struct vn_cs_encoder *enc, const VkComponentMapping *val) -{ - vn_encode_VkComponentSwizzle(enc, &val->r); - vn_encode_VkComponentSwizzle(enc, &val->g); - vn_encode_VkComponentSwizzle(enc, &val->b); - vn_encode_VkComponentSwizzle(enc, &val->a); -} - -static inline void -vn_decode_VkComponentMapping_temp(struct vn_cs_decoder *dec, VkComponentMapping *val) -{ - vn_decode_VkComponentSwizzle(dec, &val->r); - vn_decode_VkComponentSwizzle(dec, &val->g); - vn_decode_VkComponentSwizzle(dec, &val->b); - vn_decode_VkComponentSwizzle(dec, &val->a); -} - -static inline void -vn_decode_VkComponentMapping_partial_temp(struct vn_cs_decoder *dec, VkComponentMapping *val) -{ - /* skip val->r */ - /* skip val->g */ - /* skip val->b */ - /* skip val->a */ -} - -static inline void -vn_replace_VkComponentMapping_handle(VkComponentMapping *val) -{ - /* skip val->r */ - /* skip val->g */ - /* skip val->b */ - /* skip val->a */ -} - -/* struct VkImageSubresourceRange */ - -static inline void -vn_decode_VkImageSubresourceRange_temp(struct vn_cs_decoder *dec, VkImageSubresourceRange *val) -{ - vn_decode_VkFlags(dec, &val->aspectMask); - vn_decode_uint32_t(dec, &val->baseMipLevel); - vn_decode_uint32_t(dec, &val->levelCount); - vn_decode_uint32_t(dec, &val->baseArrayLayer); - vn_decode_uint32_t(dec, &val->layerCount); -} - -static inline void -vn_replace_VkImageSubresourceRange_handle(VkImageSubresourceRange *val) -{ - /* skip val->aspectMask */ - /* skip val->baseMipLevel */ - /* skip val->levelCount */ - /* skip val->baseArrayLayer */ - /* skip val->layerCount */ -} - -/* struct VkImageViewUsageCreateInfo chain */ - -static inline void * -vn_decode_VkImageViewUsageCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageViewUsageCreateInfo_self_temp(struct vn_cs_decoder *dec, VkImageViewUsageCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->usage); -} - -static inline void -vn_decode_VkImageViewUsageCreateInfo_temp(struct vn_cs_decoder *dec, VkImageViewUsageCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageViewUsageCreateInfo_pnext_temp(dec); - vn_decode_VkImageViewUsageCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageViewUsageCreateInfo_handle_self(VkImageViewUsageCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->usage */ -} - -static inline void -vn_replace_VkImageViewUsageCreateInfo_handle(VkImageViewUsageCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: - vn_replace_VkImageViewUsageCreateInfo_handle_self((VkImageViewUsageCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageViewSlicedCreateInfoEXT chain */ - -static inline void * -vn_decode_VkImageViewSlicedCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageViewSlicedCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkImageViewSlicedCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->sliceOffset); - vn_decode_uint32_t(dec, &val->sliceCount); -} - -static inline void -vn_decode_VkImageViewSlicedCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkImageViewSlicedCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageViewSlicedCreateInfoEXT_pnext_temp(dec); - vn_decode_VkImageViewSlicedCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageViewSlicedCreateInfoEXT_handle_self(VkImageViewSlicedCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->sliceOffset */ - /* skip val->sliceCount */ -} - -static inline void -vn_replace_VkImageViewSlicedCreateInfoEXT_handle(VkImageViewSlicedCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT: - vn_replace_VkImageViewSlicedCreateInfoEXT_handle_self((VkImageViewSlicedCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSamplerYcbcrConversionInfo chain */ - -static inline void * -vn_decode_VkSamplerYcbcrConversionInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerYcbcrConversionInfo_self_temp(struct vn_cs_decoder *dec, VkSamplerYcbcrConversionInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSamplerYcbcrConversion_lookup(dec, &val->conversion); -} - -static inline void -vn_decode_VkSamplerYcbcrConversionInfo_temp(struct vn_cs_decoder *dec, VkSamplerYcbcrConversionInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerYcbcrConversionInfo_pnext_temp(dec); - vn_decode_VkSamplerYcbcrConversionInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerYcbcrConversionInfo_handle_self(VkSamplerYcbcrConversionInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkSamplerYcbcrConversion_handle(&val->conversion); -} - -static inline void -vn_replace_VkSamplerYcbcrConversionInfo_handle(VkSamplerYcbcrConversionInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: - vn_replace_VkSamplerYcbcrConversionInfo_handle_self((VkSamplerYcbcrConversionInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageViewMinLodCreateInfoEXT chain */ - -static inline void * -vn_decode_VkImageViewMinLodCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageViewMinLodCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkImageViewMinLodCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_float(dec, &val->minLod); -} - -static inline void -vn_decode_VkImageViewMinLodCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkImageViewMinLodCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageViewMinLodCreateInfoEXT_pnext_temp(dec); - vn_decode_VkImageViewMinLodCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageViewMinLodCreateInfoEXT_handle_self(VkImageViewMinLodCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->minLod */ -} - -static inline void -vn_replace_VkImageViewMinLodCreateInfoEXT_handle(VkImageViewMinLodCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT: - vn_replace_VkImageViewMinLodCreateInfoEXT_handle_self((VkImageViewMinLodCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkImageViewCreateInfo chain */ - -static inline void * -vn_decode_VkImageViewCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageViewUsageCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkImageViewUsageCreateInfo *)pnext)->pNext = vn_decode_VkImageViewCreateInfo_pnext_temp(dec); - vn_decode_VkImageViewUsageCreateInfo_self_temp(dec, (VkImageViewUsageCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageViewSlicedCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkImageViewSlicedCreateInfoEXT *)pnext)->pNext = vn_decode_VkImageViewCreateInfo_pnext_temp(dec); - vn_decode_VkImageViewSlicedCreateInfoEXT_self_temp(dec, (VkImageViewSlicedCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerYcbcrConversionInfo)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerYcbcrConversionInfo *)pnext)->pNext = vn_decode_VkImageViewCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerYcbcrConversionInfo_self_temp(dec, (VkSamplerYcbcrConversionInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkImageViewMinLodCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkImageViewMinLodCreateInfoEXT *)pnext)->pNext = vn_decode_VkImageViewCreateInfo_pnext_temp(dec); - vn_decode_VkImageViewMinLodCreateInfoEXT_self_temp(dec, (VkImageViewMinLodCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkImageViewCreateInfo_self_temp(struct vn_cs_decoder *dec, VkImageViewCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkImage_lookup(dec, &val->image); - vn_decode_VkImageViewType(dec, &val->viewType); - vn_decode_VkFormat(dec, &val->format); - vn_decode_VkComponentMapping_temp(dec, &val->components); - vn_decode_VkImageSubresourceRange_temp(dec, &val->subresourceRange); -} - -static inline void -vn_decode_VkImageViewCreateInfo_temp(struct vn_cs_decoder *dec, VkImageViewCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageViewCreateInfo_pnext_temp(dec); - vn_decode_VkImageViewCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageViewCreateInfo_handle_self(VkImageViewCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - vn_replace_VkImage_handle(&val->image); - /* skip val->viewType */ - /* skip val->format */ - vn_replace_VkComponentMapping_handle(&val->components); - vn_replace_VkImageSubresourceRange_handle(&val->subresourceRange); -} - -static inline void -vn_replace_VkImageViewCreateInfo_handle(VkImageViewCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO: - vn_replace_VkImageViewCreateInfo_handle_self((VkImageViewCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: - vn_replace_VkImageViewUsageCreateInfo_handle_self((VkImageViewUsageCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT: - vn_replace_VkImageViewSlicedCreateInfoEXT_handle_self((VkImageViewSlicedCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: - vn_replace_VkSamplerYcbcrConversionInfo_handle_self((VkSamplerYcbcrConversionInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT: - vn_replace_VkImageViewMinLodCreateInfoEXT_handle_self((VkImageViewMinLodCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkShaderModuleCreateInfo chain */ - -static inline void * -vn_decode_VkShaderModuleCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkShaderModuleCreateInfo_self_temp(struct vn_cs_decoder *dec, VkShaderModuleCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_size_t(dec, &val->codeSize); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->codeSize / 4); - val->pCode = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pCode), array_size); - if (!val->pCode) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pCode, array_size); - } else { - vn_decode_array_size(dec, val->codeSize / 4); - val->pCode = NULL; - } -} - -static inline void -vn_decode_VkShaderModuleCreateInfo_temp(struct vn_cs_decoder *dec, VkShaderModuleCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkShaderModuleCreateInfo_pnext_temp(dec); - vn_decode_VkShaderModuleCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkShaderModuleCreateInfo_handle_self(VkShaderModuleCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->codeSize */ - /* skip val->pCode */ -} - -static inline void -vn_replace_VkShaderModuleCreateInfo_handle(VkShaderModuleCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: - vn_replace_VkShaderModuleCreateInfo_handle_self((VkShaderModuleCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSamplerReductionModeCreateInfo chain */ - -static inline void * -vn_decode_VkSamplerReductionModeCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerReductionModeCreateInfo_self_temp(struct vn_cs_decoder *dec, VkSamplerReductionModeCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSamplerReductionMode(dec, &val->reductionMode); -} - -static inline void -vn_decode_VkSamplerReductionModeCreateInfo_temp(struct vn_cs_decoder *dec, VkSamplerReductionModeCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerReductionModeCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerReductionModeCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerReductionModeCreateInfo_handle_self(VkSamplerReductionModeCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->reductionMode */ -} - -static inline void -vn_replace_VkSamplerReductionModeCreateInfo_handle(VkSamplerReductionModeCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: - vn_replace_VkSamplerReductionModeCreateInfo_handle_self((VkSamplerReductionModeCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* union VkClearColorValue */ - -static inline void -vn_decode_VkClearColorValue_temp(struct vn_cs_decoder *dec, VkClearColorValue *val) -{ - uint32_t tag; - vn_decode_uint32_t(dec, &tag); - switch (tag) { - case 0: - { - const size_t array_size = vn_decode_array_size(dec, 4); - vn_decode_float_array(dec, val->float32, array_size); - } - break; - case 1: - { - const size_t array_size = vn_decode_array_size(dec, 4); - vn_decode_int32_t_array(dec, val->int32, array_size); - } - break; - case 2: - { - const size_t array_size = vn_decode_array_size(dec, 4); - vn_decode_uint32_t_array(dec, val->uint32, array_size); - } - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -/* struct VkSamplerCustomBorderColorCreateInfoEXT chain */ - -static inline void * -vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkSamplerCustomBorderColorCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkClearColorValue_temp(dec, &val->customBorderColor); - vn_decode_VkFormat(dec, &val->format); -} - -static inline void -vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkSamplerCustomBorderColorCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_pnext_temp(dec); - vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerCustomBorderColorCreateInfoEXT_handle_self(VkSamplerCustomBorderColorCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->customBorderColor */ - /* skip val->format */ -} - -static inline void -vn_replace_VkSamplerCustomBorderColorCreateInfoEXT_handle(VkSamplerCustomBorderColorCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: - vn_replace_VkSamplerCustomBorderColorCreateInfoEXT_handle_self((VkSamplerCustomBorderColorCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSamplerBorderColorComponentMappingCreateInfoEXT chain */ - -static inline void * -vn_decode_VkSamplerBorderColorComponentMappingCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerBorderColorComponentMappingCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkSamplerBorderColorComponentMappingCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkComponentMapping_temp(dec, &val->components); - vn_decode_VkBool32(dec, &val->srgb); -} - -static inline void -vn_decode_VkSamplerBorderColorComponentMappingCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkSamplerBorderColorComponentMappingCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerBorderColorComponentMappingCreateInfoEXT_pnext_temp(dec); - vn_decode_VkSamplerBorderColorComponentMappingCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerBorderColorComponentMappingCreateInfoEXT_handle_self(VkSamplerBorderColorComponentMappingCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkComponentMapping_handle(&val->components); - /* skip val->srgb */ -} - -static inline void -vn_replace_VkSamplerBorderColorComponentMappingCreateInfoEXT_handle(VkSamplerBorderColorComponentMappingCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT: - vn_replace_VkSamplerBorderColorComponentMappingCreateInfoEXT_handle_self((VkSamplerBorderColorComponentMappingCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSamplerCustomBorderColorIndexCreateInfoEXT chain */ - -static inline void * -vn_decode_VkSamplerCustomBorderColorIndexCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSamplerCustomBorderColorIndexCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkSamplerCustomBorderColorIndexCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->index); -} - -static inline void -vn_decode_VkSamplerCustomBorderColorIndexCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkSamplerCustomBorderColorIndexCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerCustomBorderColorIndexCreateInfoEXT_pnext_temp(dec); - vn_decode_VkSamplerCustomBorderColorIndexCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerCustomBorderColorIndexCreateInfoEXT_handle_self(VkSamplerCustomBorderColorIndexCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->index */ -} - -static inline void -vn_replace_VkSamplerCustomBorderColorIndexCreateInfoEXT_handle(VkSamplerCustomBorderColorIndexCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT: - vn_replace_VkSamplerCustomBorderColorIndexCreateInfoEXT_handle_self((VkSamplerCustomBorderColorIndexCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSamplerCreateInfo chain */ - -static inline void * -vn_decode_VkSamplerCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerYcbcrConversionInfo)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerYcbcrConversionInfo *)pnext)->pNext = vn_decode_VkSamplerCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerYcbcrConversionInfo_self_temp(dec, (VkSamplerYcbcrConversionInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerReductionModeCreateInfo)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerReductionModeCreateInfo *)pnext)->pNext = vn_decode_VkSamplerCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerReductionModeCreateInfo_self_temp(dec, (VkSamplerReductionModeCreateInfo *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerCustomBorderColorCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerCustomBorderColorCreateInfoEXT *)pnext)->pNext = vn_decode_VkSamplerCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerCustomBorderColorCreateInfoEXT_self_temp(dec, (VkSamplerCustomBorderColorCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerBorderColorComponentMappingCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerBorderColorComponentMappingCreateInfoEXT *)pnext)->pNext = vn_decode_VkSamplerCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerBorderColorComponentMappingCreateInfoEXT_self_temp(dec, (VkSamplerBorderColorComponentMappingCreateInfoEXT *)pnext); - } - break; - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkSamplerCustomBorderColorIndexCreateInfoEXT)); - if (pnext) { - pnext->sType = stype; - ((VkSamplerCustomBorderColorIndexCreateInfoEXT *)pnext)->pNext = vn_decode_VkSamplerCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerCustomBorderColorIndexCreateInfoEXT_self_temp(dec, (VkSamplerCustomBorderColorIndexCreateInfoEXT *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkSamplerCreateInfo_self_temp(struct vn_cs_decoder *dec, VkSamplerCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkFilter(dec, &val->magFilter); - vn_decode_VkFilter(dec, &val->minFilter); - vn_decode_VkSamplerMipmapMode(dec, &val->mipmapMode); - vn_decode_VkSamplerAddressMode(dec, &val->addressModeU); - vn_decode_VkSamplerAddressMode(dec, &val->addressModeV); - vn_decode_VkSamplerAddressMode(dec, &val->addressModeW); - vn_decode_float(dec, &val->mipLodBias); - vn_decode_VkBool32(dec, &val->anisotropyEnable); - vn_decode_float(dec, &val->maxAnisotropy); - vn_decode_VkBool32(dec, &val->compareEnable); - vn_decode_VkCompareOp(dec, &val->compareOp); - vn_decode_float(dec, &val->minLod); - vn_decode_float(dec, &val->maxLod); - vn_decode_VkBorderColor(dec, &val->borderColor); - vn_decode_VkBool32(dec, &val->unnormalizedCoordinates); -} - -static inline void -vn_decode_VkSamplerCreateInfo_temp(struct vn_cs_decoder *dec, VkSamplerCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSamplerCreateInfo_pnext_temp(dec); - vn_decode_VkSamplerCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkSamplerCreateInfo_handle_self(VkSamplerCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->magFilter */ - /* skip val->minFilter */ - /* skip val->mipmapMode */ - /* skip val->addressModeU */ - /* skip val->addressModeV */ - /* skip val->addressModeW */ - /* skip val->mipLodBias */ - /* skip val->anisotropyEnable */ - /* skip val->maxAnisotropy */ - /* skip val->compareEnable */ - /* skip val->compareOp */ - /* skip val->minLod */ - /* skip val->maxLod */ - /* skip val->borderColor */ - /* skip val->unnormalizedCoordinates */ -} - -static inline void -vn_replace_VkSamplerCreateInfo_handle(VkSamplerCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO: - vn_replace_VkSamplerCreateInfo_handle_self((VkSamplerCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: - vn_replace_VkSamplerYcbcrConversionInfo_handle_self((VkSamplerYcbcrConversionInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: - vn_replace_VkSamplerReductionModeCreateInfo_handle_self((VkSamplerReductionModeCreateInfo *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: - vn_replace_VkSamplerCustomBorderColorCreateInfoEXT_handle_self((VkSamplerCustomBorderColorCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT: - vn_replace_VkSamplerBorderColorComponentMappingCreateInfoEXT_handle_self((VkSamplerBorderColorComponentMappingCreateInfoEXT *)pnext); - break; - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT: - vn_replace_VkSamplerCustomBorderColorIndexCreateInfoEXT_handle_self((VkSamplerCustomBorderColorIndexCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkViewport */ - -static inline void -vn_decode_VkViewport_temp(struct vn_cs_decoder *dec, VkViewport *val) -{ - vn_decode_float(dec, &val->x); - vn_decode_float(dec, &val->y); - vn_decode_float(dec, &val->width); - vn_decode_float(dec, &val->height); - vn_decode_float(dec, &val->minDepth); - vn_decode_float(dec, &val->maxDepth); -} - -static inline void -vn_replace_VkViewport_handle(VkViewport *val) -{ - /* skip val->x */ - /* skip val->y */ - /* skip val->width */ - /* skip val->height */ - /* skip val->minDepth */ - /* skip val->maxDepth */ -} - -/* struct VkOffset2D */ - -static inline void -vn_encode_VkOffset2D(struct vn_cs_encoder *enc, const VkOffset2D *val) -{ - vn_encode_int32_t(enc, &val->x); - vn_encode_int32_t(enc, &val->y); -} - -static inline void -vn_decode_VkOffset2D_temp(struct vn_cs_decoder *dec, VkOffset2D *val) -{ - vn_decode_int32_t(dec, &val->x); - vn_decode_int32_t(dec, &val->y); -} - -static inline void -vn_decode_VkOffset2D_partial_temp(struct vn_cs_decoder *dec, VkOffset2D *val) -{ - /* skip val->x */ - /* skip val->y */ -} - -static inline void -vn_replace_VkOffset2D_handle(VkOffset2D *val) -{ - /* skip val->x */ - /* skip val->y */ -} - -/* struct VkExtent2D */ - -static inline void -vn_encode_VkExtent2D(struct vn_cs_encoder *enc, const VkExtent2D *val) -{ - vn_encode_uint32_t(enc, &val->width); - vn_encode_uint32_t(enc, &val->height); -} - -static inline void -vn_decode_VkExtent2D_temp(struct vn_cs_decoder *dec, VkExtent2D *val) -{ - vn_decode_uint32_t(dec, &val->width); - vn_decode_uint32_t(dec, &val->height); -} - -static inline void -vn_decode_VkExtent2D_partial_temp(struct vn_cs_decoder *dec, VkExtent2D *val) -{ - /* skip val->width */ - /* skip val->height */ -} - -static inline void -vn_replace_VkExtent2D_handle(VkExtent2D *val) -{ - /* skip val->width */ - /* skip val->height */ -} - -/* struct VkRect2D */ - -static inline void -vn_encode_VkRect2D(struct vn_cs_encoder *enc, const VkRect2D *val) -{ - vn_encode_VkOffset2D(enc, &val->offset); - vn_encode_VkExtent2D(enc, &val->extent); -} - -static inline void -vn_decode_VkRect2D_temp(struct vn_cs_decoder *dec, VkRect2D *val) -{ - vn_decode_VkOffset2D_temp(dec, &val->offset); - vn_decode_VkExtent2D_temp(dec, &val->extent); -} - -static inline void -vn_decode_VkRect2D_partial_temp(struct vn_cs_decoder *dec, VkRect2D *val) -{ - vn_decode_VkOffset2D_partial_temp(dec, &val->offset); - vn_decode_VkExtent2D_partial_temp(dec, &val->extent); -} - -static inline void -vn_replace_VkRect2D_handle(VkRect2D *val) -{ - vn_replace_VkOffset2D_handle(&val->offset); - vn_replace_VkExtent2D_handle(&val->extent); -} - -/* struct VkDepthClampRangeEXT */ - -static inline void -vn_decode_VkDepthClampRangeEXT_temp(struct vn_cs_decoder *dec, VkDepthClampRangeEXT *val) -{ - vn_decode_float(dec, &val->minDepthClamp); - vn_decode_float(dec, &val->maxDepthClamp); -} - -static inline void -vn_replace_VkDepthClampRangeEXT_handle(VkDepthClampRangeEXT *val) -{ - /* skip val->minDepthClamp */ - /* skip val->maxDepthClamp */ -} - -/* struct VkDepthBiasRepresentationInfoEXT chain */ - -static inline void * -vn_decode_VkDepthBiasRepresentationInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkDepthBiasRepresentationInfoEXT_self_temp(struct vn_cs_decoder *dec, VkDepthBiasRepresentationInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDepthBiasRepresentationEXT(dec, &val->depthBiasRepresentation); - vn_decode_VkBool32(dec, &val->depthBiasExact); -} - -static inline void -vn_decode_VkDepthBiasRepresentationInfoEXT_temp(struct vn_cs_decoder *dec, VkDepthBiasRepresentationInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkDepthBiasRepresentationInfoEXT_pnext_temp(dec); - vn_decode_VkDepthBiasRepresentationInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkDepthBiasRepresentationInfoEXT_handle_self(VkDepthBiasRepresentationInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->depthBiasRepresentation */ - /* skip val->depthBiasExact */ -} - -static inline void -vn_replace_VkDepthBiasRepresentationInfoEXT_handle(VkDepthBiasRepresentationInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: - vn_replace_VkDepthBiasRepresentationInfoEXT_handle_self((VkDepthBiasRepresentationInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkSampleLocationEXT */ - -static inline void -vn_decode_VkSampleLocationEXT_temp(struct vn_cs_decoder *dec, VkSampleLocationEXT *val) -{ - vn_decode_float(dec, &val->x); - vn_decode_float(dec, &val->y); -} - -static inline void -vn_replace_VkSampleLocationEXT_handle(VkSampleLocationEXT *val) -{ - /* skip val->x */ - /* skip val->y */ -} - -/* struct VkSampleLocationsInfoEXT chain */ - -static inline void * -vn_decode_VkSampleLocationsInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkSampleLocationsInfoEXT_self_temp(struct vn_cs_decoder *dec, VkSampleLocationsInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkSampleCountFlagBits(dec, &val->sampleLocationsPerPixel); - vn_decode_VkExtent2D_temp(dec, &val->sampleLocationGridSize); - vn_decode_uint32_t(dec, &val->sampleLocationsCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->sampleLocationsCount); - val->pSampleLocations = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSampleLocations), iter_count); - if (!val->pSampleLocations) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkSampleLocationEXT_temp(dec, &((VkSampleLocationEXT *)val->pSampleLocations)[i]); - } else { - vn_decode_array_size(dec, val->sampleLocationsCount); - val->pSampleLocations = NULL; - } -} - -static inline void -vn_decode_VkSampleLocationsInfoEXT_temp(struct vn_cs_decoder *dec, VkSampleLocationsInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkSampleLocationsInfoEXT_pnext_temp(dec); - vn_decode_VkSampleLocationsInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkSampleLocationsInfoEXT_handle_self(VkSampleLocationsInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->sampleLocationsPerPixel */ - vn_replace_VkExtent2D_handle(&val->sampleLocationGridSize); - /* skip val->sampleLocationsCount */ - if (val->pSampleLocations) { - for (uint32_t i = 0; i < val->sampleLocationsCount; i++) - vn_replace_VkSampleLocationEXT_handle(&((VkSampleLocationEXT *)val->pSampleLocations)[i]); - } -} - -static inline void -vn_replace_VkSampleLocationsInfoEXT_handle(VkSampleLocationsInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: - vn_replace_VkSampleLocationsInfoEXT_handle_self((VkSampleLocationsInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderingAttachmentLocationInfo chain */ - -static inline void * -vn_decode_VkRenderingAttachmentLocationInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderingAttachmentLocationInfo_self_temp(struct vn_cs_decoder *dec, VkRenderingAttachmentLocationInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachmentLocations = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachmentLocations), array_size); - if (!val->pColorAttachmentLocations) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pColorAttachmentLocations, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pColorAttachmentLocations = NULL; - } -} - -static inline void -vn_decode_VkRenderingAttachmentLocationInfo_temp(struct vn_cs_decoder *dec, VkRenderingAttachmentLocationInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderingAttachmentLocationInfo_pnext_temp(dec); - vn_decode_VkRenderingAttachmentLocationInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderingAttachmentLocationInfo_handle_self(VkRenderingAttachmentLocationInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->colorAttachmentCount */ - /* skip val->pColorAttachmentLocations */ -} - -static inline void -vn_replace_VkRenderingAttachmentLocationInfo_handle(VkRenderingAttachmentLocationInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO: - vn_replace_VkRenderingAttachmentLocationInfo_handle_self((VkRenderingAttachmentLocationInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRenderingInputAttachmentIndexInfo chain */ - -static inline void * -vn_decode_VkRenderingInputAttachmentIndexInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRenderingInputAttachmentIndexInfo_self_temp(struct vn_cs_decoder *dec, VkRenderingInputAttachmentIndexInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->colorAttachmentCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->colorAttachmentCount); - val->pColorAttachmentInputIndices = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pColorAttachmentInputIndices), array_size); - if (!val->pColorAttachmentInputIndices) return; - vn_decode_uint32_t_array(dec, (uint32_t *)val->pColorAttachmentInputIndices, array_size); - } else { - vn_decode_array_size_unchecked(dec); - val->pColorAttachmentInputIndices = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pDepthInputAttachmentIndex = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDepthInputAttachmentIndex)); - if (!val->pDepthInputAttachmentIndex) return; - vn_decode_uint32_t(dec, (uint32_t *)val->pDepthInputAttachmentIndex); - } else { - val->pDepthInputAttachmentIndex = NULL; - } - if (vn_decode_simple_pointer(dec)) { - val->pStencilInputAttachmentIndex = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pStencilInputAttachmentIndex)); - if (!val->pStencilInputAttachmentIndex) return; - vn_decode_uint32_t(dec, (uint32_t *)val->pStencilInputAttachmentIndex); - } else { - val->pStencilInputAttachmentIndex = NULL; - } -} - -static inline void -vn_decode_VkRenderingInputAttachmentIndexInfo_temp(struct vn_cs_decoder *dec, VkRenderingInputAttachmentIndexInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRenderingInputAttachmentIndexInfo_pnext_temp(dec); - vn_decode_VkRenderingInputAttachmentIndexInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkRenderingInputAttachmentIndexInfo_handle_self(VkRenderingInputAttachmentIndexInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->colorAttachmentCount */ - /* skip val->pColorAttachmentInputIndices */ - /* skip val->pDepthInputAttachmentIndex */ - /* skip val->pStencilInputAttachmentIndex */ -} - -static inline void -vn_replace_VkRenderingInputAttachmentIndexInfo_handle(VkRenderingInputAttachmentIndexInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO: - vn_replace_VkRenderingInputAttachmentIndexInfo_handle_self((VkRenderingInputAttachmentIndexInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkPushConstantRange */ - -static inline void -vn_decode_VkPushConstantRange_temp(struct vn_cs_decoder *dec, VkPushConstantRange *val) -{ - vn_decode_VkFlags(dec, &val->stageFlags); - vn_decode_uint32_t(dec, &val->offset); - vn_decode_uint32_t(dec, &val->size); -} - -static inline void -vn_replace_VkPushConstantRange_handle(VkPushConstantRange *val) -{ - /* skip val->stageFlags */ - /* skip val->offset */ - /* skip val->size */ -} - -/* struct VkPipelineLayoutCreateInfo chain */ - -static inline void * -vn_decode_VkPipelineLayoutCreateInfo_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkPipelineLayoutCreateInfo_self_temp(struct vn_cs_decoder *dec, VkPipelineLayoutCreateInfo *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->setLayoutCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->setLayoutCount); - val->pSetLayouts = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pSetLayouts), iter_count); - if (!val->pSetLayouts) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorSetLayout_lookup(dec, &((VkDescriptorSetLayout *)val->pSetLayouts)[i]); - } else { - vn_decode_array_size(dec, val->setLayoutCount); - val->pSetLayouts = NULL; - } - vn_decode_uint32_t(dec, &val->pushConstantRangeCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->pushConstantRangeCount); - val->pPushConstantRanges = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pPushConstantRanges), iter_count); - if (!val->pPushConstantRanges) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkPushConstantRange_temp(dec, &((VkPushConstantRange *)val->pPushConstantRanges)[i]); - } else { - vn_decode_array_size(dec, val->pushConstantRangeCount); - val->pPushConstantRanges = NULL; - } -} - -static inline void -vn_decode_VkPipelineLayoutCreateInfo_temp(struct vn_cs_decoder *dec, VkPipelineLayoutCreateInfo *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkPipelineLayoutCreateInfo_pnext_temp(dec); - vn_decode_VkPipelineLayoutCreateInfo_self_temp(dec, val); -} - -static inline void -vn_replace_VkPipelineLayoutCreateInfo_handle_self(VkPipelineLayoutCreateInfo *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->setLayoutCount */ - if (val->pSetLayouts) { - for (uint32_t i = 0; i < val->setLayoutCount; i++) - vn_replace_VkDescriptorSetLayout_handle(&((VkDescriptorSetLayout *)val->pSetLayouts)[i]); - } - /* skip val->pushConstantRangeCount */ - if (val->pPushConstantRanges) { - for (uint32_t i = 0; i < val->pushConstantRangeCount; i++) - vn_replace_VkPushConstantRange_handle(&((VkPushConstantRange *)val->pPushConstantRanges)[i]); - } -} - -static inline void -vn_replace_VkPipelineLayoutCreateInfo_handle(VkPipelineLayoutCreateInfo *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: - vn_replace_VkPipelineLayoutCreateInfo_handle_self((VkPipelineLayoutCreateInfo *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMutableDescriptorTypeListEXT */ - -static inline void -vn_decode_VkMutableDescriptorTypeListEXT_temp(struct vn_cs_decoder *dec, VkMutableDescriptorTypeListEXT *val) -{ - vn_decode_uint32_t(dec, &val->descriptorTypeCount); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->descriptorTypeCount); - val->pDescriptorTypes = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pDescriptorTypes), array_size); - if (!val->pDescriptorTypes) return; - vn_decode_VkDescriptorType_array(dec, (VkDescriptorType *)val->pDescriptorTypes, array_size); - } else { - vn_decode_array_size(dec, val->descriptorTypeCount); - val->pDescriptorTypes = NULL; - } -} - -static inline void -vn_replace_VkMutableDescriptorTypeListEXT_handle(VkMutableDescriptorTypeListEXT *val) -{ - /* skip val->descriptorTypeCount */ - /* skip val->pDescriptorTypes */ -} - -/* struct VkMutableDescriptorTypeCreateInfoEXT chain */ - -static inline void * -vn_decode_VkMutableDescriptorTypeCreateInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMutableDescriptorTypeCreateInfoEXT_self_temp(struct vn_cs_decoder *dec, VkMutableDescriptorTypeCreateInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->mutableDescriptorTypeListCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->mutableDescriptorTypeListCount); - val->pMutableDescriptorTypeLists = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pMutableDescriptorTypeLists), iter_count); - if (!val->pMutableDescriptorTypeLists) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkMutableDescriptorTypeListEXT_temp(dec, &((VkMutableDescriptorTypeListEXT *)val->pMutableDescriptorTypeLists)[i]); - } else { - vn_decode_array_size(dec, val->mutableDescriptorTypeListCount); - val->pMutableDescriptorTypeLists = NULL; - } -} - -static inline void -vn_decode_VkMutableDescriptorTypeCreateInfoEXT_temp(struct vn_cs_decoder *dec, VkMutableDescriptorTypeCreateInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMutableDescriptorTypeCreateInfoEXT_pnext_temp(dec); - vn_decode_VkMutableDescriptorTypeCreateInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkMutableDescriptorTypeCreateInfoEXT_handle_self(VkMutableDescriptorTypeCreateInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->mutableDescriptorTypeListCount */ - if (val->pMutableDescriptorTypeLists) { - for (uint32_t i = 0; i < val->mutableDescriptorTypeListCount; i++) - vn_replace_VkMutableDescriptorTypeListEXT_handle(&((VkMutableDescriptorTypeListEXT *)val->pMutableDescriptorTypeLists)[i]); - } -} - -static inline void -vn_replace_VkMutableDescriptorTypeCreateInfoEXT_handle(VkMutableDescriptorTypeCreateInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: - vn_replace_VkMutableDescriptorTypeCreateInfoEXT_handle_self((VkMutableDescriptorTypeCreateInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDescriptorImageInfo */ - -static inline void -vn_decode_VkDescriptorImageInfo_temp(struct vn_cs_decoder *dec, VkDescriptorImageInfo *val) -{ - vn_decode_VkSampler_lookup(dec, &val->sampler); - vn_decode_VkImageView_lookup(dec, &val->imageView); - vn_decode_VkImageLayout(dec, &val->imageLayout); -} - -static inline void -vn_replace_VkDescriptorImageInfo_handle(VkDescriptorImageInfo *val) -{ - vn_replace_VkSampler_handle(&val->sampler); - vn_replace_VkImageView_handle(&val->imageView); - /* skip val->imageLayout */ -} - -/* struct VkDescriptorBufferInfo */ - -static inline void -vn_decode_VkDescriptorBufferInfo_temp(struct vn_cs_decoder *dec, VkDescriptorBufferInfo *val) -{ - vn_decode_VkBuffer_lookup(dec, &val->buffer); - vn_decode_VkDeviceSize(dec, &val->offset); - vn_decode_VkDeviceSize(dec, &val->range); -} - -static inline void -vn_replace_VkDescriptorBufferInfo_handle(VkDescriptorBufferInfo *val) -{ - vn_replace_VkBuffer_handle(&val->buffer); - /* skip val->offset */ - /* skip val->range */ -} - -/* struct VkWriteDescriptorSetInlineUniformBlock chain */ - -static inline void * -vn_decode_VkWriteDescriptorSetInlineUniformBlock_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkWriteDescriptorSetInlineUniformBlock_self_temp(struct vn_cs_decoder *dec, VkWriteDescriptorSetInlineUniformBlock *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->dataSize); - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, val->dataSize); - val->pData = vn_cs_decoder_get_blob_storage(dec, array_size); - if (!val->pData) return; - vn_decode_blob_array(dec, (void *)val->pData, array_size); - } else { - vn_decode_array_size(dec, val->dataSize); - val->pData = NULL; - } -} - -static inline void -vn_decode_VkWriteDescriptorSetInlineUniformBlock_temp(struct vn_cs_decoder *dec, VkWriteDescriptorSetInlineUniformBlock *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkWriteDescriptorSetInlineUniformBlock_pnext_temp(dec); - vn_decode_VkWriteDescriptorSetInlineUniformBlock_self_temp(dec, val); -} - -static inline void -vn_replace_VkWriteDescriptorSetInlineUniformBlock_handle_self(VkWriteDescriptorSetInlineUniformBlock *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->dataSize */ - /* skip val->pData */ -} - -static inline void -vn_replace_VkWriteDescriptorSetInlineUniformBlock_handle(VkWriteDescriptorSetInlineUniformBlock *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: - vn_replace_VkWriteDescriptorSetInlineUniformBlock_handle_self((VkWriteDescriptorSetInlineUniformBlock *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkWriteDescriptorSetAccelerationStructureKHR chain */ - -static inline void * -vn_decode_VkWriteDescriptorSetAccelerationStructureKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkWriteDescriptorSetAccelerationStructureKHR_self_temp(struct vn_cs_decoder *dec, VkWriteDescriptorSetAccelerationStructureKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->accelerationStructureCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->accelerationStructureCount); - val->pAccelerationStructures = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pAccelerationStructures), iter_count); - if (!val->pAccelerationStructures) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAccelerationStructureKHR_lookup(dec, &((VkAccelerationStructureKHR *)val->pAccelerationStructures)[i]); - } else { - vn_decode_array_size(dec, val->accelerationStructureCount); - val->pAccelerationStructures = NULL; - } -} - -static inline void -vn_decode_VkWriteDescriptorSetAccelerationStructureKHR_temp(struct vn_cs_decoder *dec, VkWriteDescriptorSetAccelerationStructureKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkWriteDescriptorSetAccelerationStructureKHR_pnext_temp(dec); - vn_decode_VkWriteDescriptorSetAccelerationStructureKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkWriteDescriptorSetAccelerationStructureKHR_handle_self(VkWriteDescriptorSetAccelerationStructureKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->accelerationStructureCount */ - if (val->pAccelerationStructures) { - for (uint32_t i = 0; i < val->accelerationStructureCount; i++) - vn_replace_VkAccelerationStructureKHR_handle(&((VkAccelerationStructureKHR *)val->pAccelerationStructures)[i]); - } -} - -static inline void -vn_replace_VkWriteDescriptorSetAccelerationStructureKHR_handle(VkWriteDescriptorSetAccelerationStructureKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: - vn_replace_VkWriteDescriptorSetAccelerationStructureKHR_handle_self((VkWriteDescriptorSetAccelerationStructureKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkWriteDescriptorSet chain */ - -static inline void * -vn_decode_VkWriteDescriptorSet_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkWriteDescriptorSetInlineUniformBlock)); - if (pnext) { - pnext->sType = stype; - ((VkWriteDescriptorSetInlineUniformBlock *)pnext)->pNext = vn_decode_VkWriteDescriptorSet_pnext_temp(dec); - vn_decode_VkWriteDescriptorSetInlineUniformBlock_self_temp(dec, (VkWriteDescriptorSetInlineUniformBlock *)pnext); - } - break; - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkWriteDescriptorSetAccelerationStructureKHR)); - if (pnext) { - pnext->sType = stype; - ((VkWriteDescriptorSetAccelerationStructureKHR *)pnext)->pNext = vn_decode_VkWriteDescriptorSet_pnext_temp(dec); - vn_decode_VkWriteDescriptorSetAccelerationStructureKHR_self_temp(dec, (VkWriteDescriptorSetAccelerationStructureKHR *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkWriteDescriptorSet_self_temp(struct vn_cs_decoder *dec, VkWriteDescriptorSet *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDescriptorSet_lookup(dec, &val->dstSet); - vn_decode_uint32_t(dec, &val->dstBinding); - vn_decode_uint32_t(dec, &val->dstArrayElement); - vn_decode_uint32_t(dec, &val->descriptorCount); - vn_decode_VkDescriptorType(dec, &val->descriptorType); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorCount); - val->pImageInfo = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pImageInfo), iter_count); - if (!val->pImageInfo) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorImageInfo_temp(dec, &((VkDescriptorImageInfo *)val->pImageInfo)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pImageInfo = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorCount); - val->pBufferInfo = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pBufferInfo), iter_count); - if (!val->pBufferInfo) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkDescriptorBufferInfo_temp(dec, &((VkDescriptorBufferInfo *)val->pBufferInfo)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pBufferInfo = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->descriptorCount); - val->pTexelBufferView = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pTexelBufferView), iter_count); - if (!val->pTexelBufferView) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkBufferView_lookup(dec, &((VkBufferView *)val->pTexelBufferView)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pTexelBufferView = NULL; - } -} - -static inline void -vn_decode_VkWriteDescriptorSet_temp(struct vn_cs_decoder *dec, VkWriteDescriptorSet *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkWriteDescriptorSet_pnext_temp(dec); - vn_decode_VkWriteDescriptorSet_self_temp(dec, val); -} - -static inline void -vn_replace_VkWriteDescriptorSet_handle_self(VkWriteDescriptorSet *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkDescriptorSet_handle(&val->dstSet); - /* skip val->dstBinding */ - /* skip val->dstArrayElement */ - /* skip val->descriptorCount */ - /* skip val->descriptorType */ - if (val->pImageInfo) { - for (uint32_t i = 0; i < val->descriptorCount; i++) - vn_replace_VkDescriptorImageInfo_handle(&((VkDescriptorImageInfo *)val->pImageInfo)[i]); - } - if (val->pBufferInfo) { - for (uint32_t i = 0; i < val->descriptorCount; i++) - vn_replace_VkDescriptorBufferInfo_handle(&((VkDescriptorBufferInfo *)val->pBufferInfo)[i]); - } - if (val->pTexelBufferView) { - for (uint32_t i = 0; i < val->descriptorCount; i++) - vn_replace_VkBufferView_handle(&((VkBufferView *)val->pTexelBufferView)[i]); - } -} - -static inline void -vn_replace_VkWriteDescriptorSet_handle(VkWriteDescriptorSet *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: - vn_replace_VkWriteDescriptorSet_handle_self((VkWriteDescriptorSet *)pnext); - break; - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: - vn_replace_VkWriteDescriptorSetInlineUniformBlock_handle_self((VkWriteDescriptorSetInlineUniformBlock *)pnext); - break; - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: - vn_replace_VkWriteDescriptorSetAccelerationStructureKHR_handle_self((VkWriteDescriptorSetAccelerationStructureKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkDeviceAddressRangeEXT */ - -static inline void -vn_decode_VkDeviceAddressRangeEXT_temp(struct vn_cs_decoder *dec, VkDeviceAddressRangeEXT *val) -{ - vn_decode_VkDeviceAddress(dec, &val->address); - vn_decode_VkDeviceSize(dec, &val->size); -} - -static inline void -vn_replace_VkDeviceAddressRangeEXT_handle(VkDeviceAddressRangeEXT *val) -{ - /* skip val->address */ - /* skip val->size */ -} - -/* struct VkImageSubresourceLayers */ - -static inline void -vn_decode_VkImageSubresourceLayers_temp(struct vn_cs_decoder *dec, VkImageSubresourceLayers *val) -{ - vn_decode_VkFlags(dec, &val->aspectMask); - vn_decode_uint32_t(dec, &val->mipLevel); - vn_decode_uint32_t(dec, &val->baseArrayLayer); - vn_decode_uint32_t(dec, &val->layerCount); -} - -static inline void -vn_replace_VkImageSubresourceLayers_handle(VkImageSubresourceLayers *val) -{ - /* skip val->aspectMask */ - /* skip val->mipLevel */ - /* skip val->baseArrayLayer */ - /* skip val->layerCount */ -} - -/* struct VkBindMemoryStatus chain */ - -static inline void * -vn_decode_VkBindMemoryStatus_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkBindMemoryStatus_self_temp(struct vn_cs_decoder *dec, VkBindMemoryStatus *val) -{ - /* skip val->{sType,pNext} */ - if (vn_decode_simple_pointer(dec)) { - val->pResult = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pResult)); - if (!val->pResult) return; - vn_decode_VkResult(dec, val->pResult); - } else { - val->pResult = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void -vn_decode_VkBindMemoryStatus_temp(struct vn_cs_decoder *dec, VkBindMemoryStatus *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkBindMemoryStatus_pnext_temp(dec); - vn_decode_VkBindMemoryStatus_self_temp(dec, val); -} - -static inline void -vn_replace_VkBindMemoryStatus_handle_self(VkBindMemoryStatus *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->pResult */ -} - -static inline void -vn_replace_VkBindMemoryStatus_handle(VkBindMemoryStatus *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: - vn_replace_VkBindMemoryStatus_handle_self((VkBindMemoryStatus *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryDedicatedRequirements chain */ - -static inline void -vn_encode_VkMemoryDedicatedRequirements_pnext(struct vn_cs_encoder *enc, const void *val) -{ - /* no known/supported struct */ - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkMemoryDedicatedRequirements_self(struct vn_cs_encoder *enc, const VkMemoryDedicatedRequirements *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkBool32(enc, &val->prefersDedicatedAllocation); - vn_encode_VkBool32(enc, &val->requiresDedicatedAllocation); -} - -static inline void -vn_encode_VkMemoryDedicatedRequirements(struct vn_cs_encoder *enc, const VkMemoryDedicatedRequirements *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS }); - vn_encode_VkMemoryDedicatedRequirements_pnext(enc, val->pNext); - vn_encode_VkMemoryDedicatedRequirements_self(enc, val); -} - -static inline void * -vn_decode_VkMemoryDedicatedRequirements_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryDedicatedRequirements_self_partial_temp(struct vn_cs_decoder *dec, VkMemoryDedicatedRequirements *val) -{ - /* skip val->{sType,pNext} */ - /* skip val->prefersDedicatedAllocation */ - /* skip val->requiresDedicatedAllocation */ -} - -static inline void -vn_decode_VkMemoryDedicatedRequirements_partial_temp(struct vn_cs_decoder *dec, VkMemoryDedicatedRequirements *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryDedicatedRequirements_pnext_partial_temp(dec); - vn_decode_VkMemoryDedicatedRequirements_self_partial_temp(dec, val); -} - -/* struct VkMemoryRequirements2 chain */ - -static inline void -vn_encode_VkMemoryRequirements2_pnext(struct vn_cs_encoder *enc, const void *val) -{ - const VkBaseInStructure *pnext = val; - - while (pnext) { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: - vn_encode_simple_pointer(enc, pnext); - vn_encode_VkStructureType(enc, &pnext->sType); - vn_encode_VkMemoryRequirements2_pnext(enc, ((const VkMemoryDedicatedRequirements *)pnext)->pNext); - vn_encode_VkMemoryDedicatedRequirements_self(enc, (const VkMemoryDedicatedRequirements *)pnext); - return; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } - - vn_encode_simple_pointer(enc, NULL); -} - -static inline void -vn_encode_VkMemoryRequirements2_self(struct vn_cs_encoder *enc, const VkMemoryRequirements2 *val) -{ - /* skip val->{sType,pNext} */ - vn_encode_VkMemoryRequirements(enc, &val->memoryRequirements); -} - -static inline void -vn_encode_VkMemoryRequirements2(struct vn_cs_encoder *enc, const VkMemoryRequirements2 *val) -{ - assert(val->sType == VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2); - vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 }); - vn_encode_VkMemoryRequirements2_pnext(enc, val->pNext); - vn_encode_VkMemoryRequirements2_self(enc, val); -} - -static inline void * -vn_decode_VkMemoryRequirements2_pnext_partial_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMemoryDedicatedRequirements)); - if (pnext) { - pnext->sType = stype; - ((VkMemoryDedicatedRequirements *)pnext)->pNext = vn_decode_VkMemoryRequirements2_pnext_partial_temp(dec); - vn_decode_VkMemoryDedicatedRequirements_self_partial_temp(dec, (VkMemoryDedicatedRequirements *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkMemoryRequirements2_self_partial_temp(struct vn_cs_decoder *dec, VkMemoryRequirements2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkMemoryRequirements_partial_temp(dec, &val->memoryRequirements); -} - -static inline void -vn_decode_VkMemoryRequirements2_partial_temp(struct vn_cs_decoder *dec, VkMemoryRequirements2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryRequirements2_pnext_partial_temp(dec); - vn_decode_VkMemoryRequirements2_self_partial_temp(dec, val); -} - -/* struct VkMultisampledRenderToSingleSampledInfoEXT chain */ - -static inline void * -vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_self_temp(struct vn_cs_decoder *dec, VkMultisampledRenderToSingleSampledInfoEXT *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->multisampledRenderToSingleSampledEnable); - vn_decode_VkSampleCountFlagBits(dec, &val->rasterizationSamples); -} - -static inline void -vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_temp(struct vn_cs_decoder *dec, VkMultisampledRenderToSingleSampledInfoEXT *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_pnext_temp(dec); - vn_decode_VkMultisampledRenderToSingleSampledInfoEXT_self_temp(dec, val); -} - -static inline void -vn_replace_VkMultisampledRenderToSingleSampledInfoEXT_handle_self(VkMultisampledRenderToSingleSampledInfoEXT *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->multisampledRenderToSingleSampledEnable */ - /* skip val->rasterizationSamples */ -} - -static inline void -vn_replace_VkMultisampledRenderToSingleSampledInfoEXT_handle(VkMultisampledRenderToSingleSampledInfoEXT *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: - vn_replace_VkMultisampledRenderToSingleSampledInfoEXT_handle_self((VkMultisampledRenderToSingleSampledInfoEXT *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkMemoryBarrier2 chain */ - -static inline void * -vn_decode_VkMemoryBarrier2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkMemoryBarrier2_self_temp(struct vn_cs_decoder *dec, VkMemoryBarrier2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags64(dec, &val->srcStageMask); - vn_decode_VkFlags64(dec, &val->srcAccessMask); - vn_decode_VkFlags64(dec, &val->dstStageMask); - vn_decode_VkFlags64(dec, &val->dstAccessMask); -} - -static inline void -vn_decode_VkMemoryBarrier2_temp(struct vn_cs_decoder *dec, VkMemoryBarrier2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_MEMORY_BARRIER_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkMemoryBarrier2_pnext_temp(dec); - vn_decode_VkMemoryBarrier2_self_temp(dec, val); -} - -static inline void -vn_replace_VkMemoryBarrier2_handle_self(VkMemoryBarrier2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->srcStageMask */ - /* skip val->srcAccessMask */ - /* skip val->dstStageMask */ - /* skip val->dstAccessMask */ -} - -static inline void -vn_replace_VkMemoryBarrier2_handle(VkMemoryBarrier2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: - vn_replace_VkMemoryBarrier2_handle_self((VkMemoryBarrier2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkCopyAccelerationStructureInfoKHR chain */ - -static inline void * -vn_decode_VkCopyAccelerationStructureInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyAccelerationStructureInfoKHR_self_temp(struct vn_cs_decoder *dec, VkCopyAccelerationStructureInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->src); - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->dst); - vn_decode_VkCopyAccelerationStructureModeKHR(dec, &val->mode); -} - -static inline void -vn_decode_VkCopyAccelerationStructureInfoKHR_temp(struct vn_cs_decoder *dec, VkCopyAccelerationStructureInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyAccelerationStructureInfoKHR_pnext_temp(dec); - vn_decode_VkCopyAccelerationStructureInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyAccelerationStructureInfoKHR_handle_self(VkCopyAccelerationStructureInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkAccelerationStructureKHR_handle(&val->src); - vn_replace_VkAccelerationStructureKHR_handle(&val->dst); - /* skip val->mode */ -} - -static inline void -vn_replace_VkCopyAccelerationStructureInfoKHR_handle(VkCopyAccelerationStructureInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR: - vn_replace_VkCopyAccelerationStructureInfoKHR_handle_self((VkCopyAccelerationStructureInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* union VkDeviceOrHostAddressKHR */ - -static inline void -vn_decode_VkDeviceOrHostAddressKHR_temp(struct vn_cs_decoder *dec, VkDeviceOrHostAddressKHR *val) -{ - uint32_t tag; - vn_decode_uint32_t(dec, &tag); - switch (tag) { - case 0: - vn_decode_VkDeviceAddress(dec, &val->deviceAddress); - break; - case 1: - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - val->hostAddress = NULL; - } - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -/* struct VkCopyAccelerationStructureToMemoryInfoKHR chain */ - -static inline void * -vn_decode_VkCopyAccelerationStructureToMemoryInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyAccelerationStructureToMemoryInfoKHR_self_temp(struct vn_cs_decoder *dec, VkCopyAccelerationStructureToMemoryInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->src); - vn_decode_VkDeviceOrHostAddressKHR_temp(dec, &val->dst); - vn_decode_VkCopyAccelerationStructureModeKHR(dec, &val->mode); -} - -static inline void -vn_decode_VkCopyAccelerationStructureToMemoryInfoKHR_temp(struct vn_cs_decoder *dec, VkCopyAccelerationStructureToMemoryInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyAccelerationStructureToMemoryInfoKHR_pnext_temp(dec); - vn_decode_VkCopyAccelerationStructureToMemoryInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyAccelerationStructureToMemoryInfoKHR_handle_self(VkCopyAccelerationStructureToMemoryInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkAccelerationStructureKHR_handle(&val->src); - /* skip val->dst */ - /* skip val->mode */ -} - -static inline void -vn_replace_VkCopyAccelerationStructureToMemoryInfoKHR_handle(VkCopyAccelerationStructureToMemoryInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR: - vn_replace_VkCopyAccelerationStructureToMemoryInfoKHR_handle_self((VkCopyAccelerationStructureToMemoryInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* union VkDeviceOrHostAddressConstKHR */ - -static inline void -vn_decode_VkDeviceOrHostAddressConstKHR_temp(struct vn_cs_decoder *dec, VkDeviceOrHostAddressConstKHR *val) -{ - uint32_t tag; - vn_decode_uint32_t(dec, &tag); - switch (tag) { - case 0: - vn_decode_VkDeviceAddress(dec, &val->deviceAddress); - break; - case 1: - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - val->hostAddress = NULL; - } - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -/* struct VkCopyMemoryToAccelerationStructureInfoKHR chain */ - -static inline void * -vn_decode_VkCopyMemoryToAccelerationStructureInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkCopyMemoryToAccelerationStructureInfoKHR_self_temp(struct vn_cs_decoder *dec, VkCopyMemoryToAccelerationStructureInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceOrHostAddressConstKHR_temp(dec, &val->src); - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->dst); - vn_decode_VkCopyAccelerationStructureModeKHR(dec, &val->mode); -} - -static inline void -vn_decode_VkCopyMemoryToAccelerationStructureInfoKHR_temp(struct vn_cs_decoder *dec, VkCopyMemoryToAccelerationStructureInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkCopyMemoryToAccelerationStructureInfoKHR_pnext_temp(dec); - vn_decode_VkCopyMemoryToAccelerationStructureInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkCopyMemoryToAccelerationStructureInfoKHR_handle_self(VkCopyMemoryToAccelerationStructureInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->src */ - vn_replace_VkAccelerationStructureKHR_handle(&val->dst); - /* skip val->mode */ -} - -static inline void -vn_replace_VkCopyMemoryToAccelerationStructureInfoKHR_handle(VkCopyMemoryToAccelerationStructureInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR: - vn_replace_VkCopyMemoryToAccelerationStructureInfoKHR_handle_self((VkCopyMemoryToAccelerationStructureInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureGeometryTrianglesDataKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureGeometryTrianglesDataKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureGeometryTrianglesDataKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryTrianglesDataKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFormat(dec, &val->vertexFormat); - vn_decode_VkDeviceOrHostAddressConstKHR_temp(dec, &val->vertexData); - vn_decode_VkDeviceSize(dec, &val->vertexStride); - vn_decode_uint32_t(dec, &val->maxVertex); - vn_decode_VkIndexType(dec, &val->indexType); - vn_decode_VkDeviceOrHostAddressConstKHR_temp(dec, &val->indexData); - vn_decode_VkDeviceOrHostAddressConstKHR_temp(dec, &val->transformData); -} - -static inline void -vn_decode_VkAccelerationStructureGeometryTrianglesDataKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryTrianglesDataKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureGeometryTrianglesDataKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureGeometryTrianglesDataKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureGeometryTrianglesDataKHR_handle_self(VkAccelerationStructureGeometryTrianglesDataKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->vertexFormat */ - /* skip val->vertexData */ - /* skip val->vertexStride */ - /* skip val->maxVertex */ - /* skip val->indexType */ - /* skip val->indexData */ - /* skip val->transformData */ -} - -static inline void -vn_replace_VkAccelerationStructureGeometryTrianglesDataKHR_handle(VkAccelerationStructureGeometryTrianglesDataKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR: - vn_replace_VkAccelerationStructureGeometryTrianglesDataKHR_handle_self((VkAccelerationStructureGeometryTrianglesDataKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureGeometryAabbsDataKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureGeometryAabbsDataKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureGeometryAabbsDataKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryAabbsDataKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkDeviceOrHostAddressConstKHR_temp(dec, &val->data); - vn_decode_VkDeviceSize(dec, &val->stride); -} - -static inline void -vn_decode_VkAccelerationStructureGeometryAabbsDataKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryAabbsDataKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureGeometryAabbsDataKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureGeometryAabbsDataKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureGeometryAabbsDataKHR_handle_self(VkAccelerationStructureGeometryAabbsDataKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->data */ - /* skip val->stride */ -} - -static inline void -vn_replace_VkAccelerationStructureGeometryAabbsDataKHR_handle(VkAccelerationStructureGeometryAabbsDataKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR: - vn_replace_VkAccelerationStructureGeometryAabbsDataKHR_handle_self((VkAccelerationStructureGeometryAabbsDataKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureGeometryInstancesDataKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureGeometryInstancesDataKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureGeometryInstancesDataKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryInstancesDataKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkBool32(dec, &val->arrayOfPointers); - vn_decode_VkDeviceOrHostAddressConstKHR_temp(dec, &val->data); -} - -static inline void -vn_decode_VkAccelerationStructureGeometryInstancesDataKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryInstancesDataKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureGeometryInstancesDataKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureGeometryInstancesDataKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureGeometryInstancesDataKHR_handle_self(VkAccelerationStructureGeometryInstancesDataKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->arrayOfPointers */ - /* skip val->data */ -} - -static inline void -vn_replace_VkAccelerationStructureGeometryInstancesDataKHR_handle(VkAccelerationStructureGeometryInstancesDataKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR: - vn_replace_VkAccelerationStructureGeometryInstancesDataKHR_handle_self((VkAccelerationStructureGeometryInstancesDataKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* union VkAccelerationStructureGeometryDataKHR */ - -static inline void -vn_decode_VkAccelerationStructureGeometryDataKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryDataKHR *val) -{ - VkGeometryTypeKHR tag; - vn_decode_VkGeometryTypeKHR(dec, &tag); - switch (tag) { - case VK_GEOMETRY_TYPE_TRIANGLES_KHR: - vn_decode_VkAccelerationStructureGeometryTrianglesDataKHR_temp(dec, &val->triangles); - break; - case VK_GEOMETRY_TYPE_AABBS_KHR: - vn_decode_VkAccelerationStructureGeometryAabbsDataKHR_temp(dec, &val->aabbs); - break; - case VK_GEOMETRY_TYPE_INSTANCES_KHR: - vn_decode_VkAccelerationStructureGeometryInstancesDataKHR_temp(dec, &val->instances); - break; - default: - vn_cs_decoder_set_fatal(dec); - break; - } -} - -static inline void -vn_replace_VkAccelerationStructureGeometryDataKHR_handle(VkAccelerationStructureGeometryDataKHR *val, VkGeometryTypeKHR tag) -{ - switch (tag) { - case VK_GEOMETRY_TYPE_TRIANGLES_KHR: - vn_replace_VkAccelerationStructureGeometryTrianglesDataKHR_handle(&val->triangles); - break; - case VK_GEOMETRY_TYPE_AABBS_KHR: - vn_replace_VkAccelerationStructureGeometryAabbsDataKHR_handle(&val->aabbs); - break; - case VK_GEOMETRY_TYPE_INSTANCES_KHR: - vn_replace_VkAccelerationStructureGeometryInstancesDataKHR_handle(&val->instances); - break; - default: - assert(false); - break; - } -} - -/* struct VkAccelerationStructureGeometryKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureGeometryKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureGeometryKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkGeometryTypeKHR(dec, &val->geometryType); - vn_decode_VkAccelerationStructureGeometryDataKHR_temp(dec, &val->geometry); - vn_decode_VkFlags(dec, &val->flags); -} - -static inline void -vn_decode_VkAccelerationStructureGeometryKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureGeometryKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureGeometryKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureGeometryKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureGeometryKHR_handle_self(VkAccelerationStructureGeometryKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->geometryType */ - vn_replace_VkAccelerationStructureGeometryDataKHR_handle(&val->geometry, val->geometryType); - /* skip val->flags */ -} - -static inline void -vn_replace_VkAccelerationStructureGeometryKHR_handle(VkAccelerationStructureGeometryKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR: - vn_replace_VkAccelerationStructureGeometryKHR_handle_self((VkAccelerationStructureGeometryKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureBuildGeometryInfoKHR chain */ - -static inline void * -vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_self_temp(struct vn_cs_decoder *dec, VkAccelerationStructureBuildGeometryInfoKHR *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkAccelerationStructureTypeKHR(dec, &val->type); - vn_decode_VkFlags(dec, &val->flags); - vn_decode_VkBuildAccelerationStructureModeKHR(dec, &val->mode); - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->srcAccelerationStructure); - vn_decode_VkAccelerationStructureKHR_lookup(dec, &val->dstAccelerationStructure); - vn_decode_uint32_t(dec, &val->geometryCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->geometryCount); - val->pGeometries = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->pGeometries), iter_count); - if (!val->pGeometries) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkAccelerationStructureGeometryKHR_temp(dec, &((VkAccelerationStructureGeometryKHR *)val->pGeometries)[i]); - } else { - vn_decode_array_size_unchecked(dec); - val->pGeometries = NULL; - } - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, val->geometryCount); - val->ppGeometries = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppGeometries), iter_count); - if (!val->ppGeometries) return; - for (uint32_t i = 0; i < iter_count; i++) { - const uint32_t iter_count_j = vn_decode_array_size(dec, 1); - ((VkAccelerationStructureGeometryKHR **)val->ppGeometries)[i] = vn_cs_decoder_alloc_temp_array(dec, sizeof(*val->ppGeometries[i]), iter_count_j); - if (!val->ppGeometries[i]) return; - for (uint32_t j = 0; j < iter_count_j; j++) - vn_decode_VkAccelerationStructureGeometryKHR_temp(dec, &((VkAccelerationStructureGeometryKHR **)val->ppGeometries)[i][j]); - } - } else { - vn_decode_array_size_unchecked(dec); - val->ppGeometries = NULL; - } - vn_decode_VkDeviceOrHostAddressKHR_temp(dec, &val->scratchData); -} - -static inline void -vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureBuildGeometryInfoKHR *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_pnext_temp(dec); - vn_decode_VkAccelerationStructureBuildGeometryInfoKHR_self_temp(dec, val); -} - -static inline void -vn_replace_VkAccelerationStructureBuildGeometryInfoKHR_handle_self(VkAccelerationStructureBuildGeometryInfoKHR *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->type */ - /* skip val->flags */ - /* skip val->mode */ - vn_replace_VkAccelerationStructureKHR_handle(&val->srcAccelerationStructure); - vn_replace_VkAccelerationStructureKHR_handle(&val->dstAccelerationStructure); - /* skip val->geometryCount */ - if (val->pGeometries) { - for (uint32_t i = 0; i < val->geometryCount; i++) - vn_replace_VkAccelerationStructureGeometryKHR_handle(&((VkAccelerationStructureGeometryKHR *)val->pGeometries)[i]); - } - if (val->ppGeometries) { - for (uint32_t i = 0; i < val->geometryCount; i++) { - for (uint32_t j = 0; j < 1; j++) - vn_replace_VkAccelerationStructureGeometryKHR_handle(&((VkAccelerationStructureGeometryKHR **)val->ppGeometries)[i][j]); - } - } - /* skip val->scratchData */ -} - -static inline void -vn_replace_VkAccelerationStructureBuildGeometryInfoKHR_handle(VkAccelerationStructureBuildGeometryInfoKHR *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR: - vn_replace_VkAccelerationStructureBuildGeometryInfoKHR_handle_self((VkAccelerationStructureBuildGeometryInfoKHR *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkAccelerationStructureBuildRangeInfoKHR */ - -static inline void -vn_decode_VkAccelerationStructureBuildRangeInfoKHR_temp(struct vn_cs_decoder *dec, VkAccelerationStructureBuildRangeInfoKHR *val) -{ - vn_decode_uint32_t(dec, &val->primitiveCount); - vn_decode_uint32_t(dec, &val->primitiveOffset); - vn_decode_uint32_t(dec, &val->firstVertex); - vn_decode_uint32_t(dec, &val->transformOffset); -} - -static inline void -vn_replace_VkAccelerationStructureBuildRangeInfoKHR_handle(VkAccelerationStructureBuildRangeInfoKHR *val) -{ - /* skip val->primitiveCount */ - /* skip val->primitiveOffset */ - /* skip val->firstVertex */ - /* skip val->transformOffset */ -} - -/* struct VkImageCopy2 chain */ - -static inline void * -vn_decode_VkImageCopy2_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkImageCopy2_self_temp(struct vn_cs_decoder *dec, VkImageCopy2 *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkImageSubresourceLayers_temp(dec, &val->srcSubresource); - vn_decode_VkOffset3D_temp(dec, &val->srcOffset); - vn_decode_VkImageSubresourceLayers_temp(dec, &val->dstSubresource); - vn_decode_VkOffset3D_temp(dec, &val->dstOffset); - vn_decode_VkExtent3D_temp(dec, &val->extent); -} - -static inline void -vn_decode_VkImageCopy2_temp(struct vn_cs_decoder *dec, VkImageCopy2 *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_IMAGE_COPY_2) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkImageCopy2_pnext_temp(dec); - vn_decode_VkImageCopy2_self_temp(dec, val); -} - -static inline void -vn_replace_VkImageCopy2_handle_self(VkImageCopy2 *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - vn_replace_VkImageSubresourceLayers_handle(&val->srcSubresource); - vn_replace_VkOffset3D_handle(&val->srcOffset); - vn_replace_VkImageSubresourceLayers_handle(&val->dstSubresource); - vn_replace_VkOffset3D_handle(&val->dstOffset); - vn_replace_VkExtent3D_handle(&val->extent); -} - -static inline void -vn_replace_VkImageCopy2_handle(VkImageCopy2 *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_IMAGE_COPY_2: - vn_replace_VkImageCopy2_handle_self((VkImageCopy2 *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_STRUCTS_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_transport.h b/src/venus/venus-protocol/vn_protocol_renderer_transport.h deleted file mode 100644 index 7da9a087..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_transport.h +++ /dev/null @@ -1,1058 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_TRANSPORT_H -#define VN_PROTOCOL_RENDERER_TRANSPORT_H - -#include "vn_protocol_renderer_structs.h" - -#pragma GCC diagnostic push -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 12 -#pragma GCC diagnostic ignored "-Wdangling-pointer" -#endif -#pragma GCC diagnostic ignored "-Wpointer-arith" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* struct VkCommandStreamDescriptionMESA */ - -static inline void -vn_decode_VkCommandStreamDescriptionMESA_temp(struct vn_cs_decoder *dec, VkCommandStreamDescriptionMESA *val) -{ - vn_decode_uint32_t(dec, &val->resourceId); - vn_decode_size_t(dec, &val->offset); - vn_decode_size_t(dec, &val->size); -} - -static inline void -vn_replace_VkCommandStreamDescriptionMESA_handle(VkCommandStreamDescriptionMESA *val) -{ - /* skip val->resourceId */ - /* skip val->offset */ - /* skip val->size */ -} - -/* struct VkCommandStreamDependencyMESA */ - -static inline void -vn_decode_VkCommandStreamDependencyMESA_temp(struct vn_cs_decoder *dec, VkCommandStreamDependencyMESA *val) -{ - vn_decode_uint32_t(dec, &val->srcCommandStream); - vn_decode_uint32_t(dec, &val->dstCommandStream); -} - -static inline void -vn_replace_VkCommandStreamDependencyMESA_handle(VkCommandStreamDependencyMESA *val) -{ - /* skip val->srcCommandStream */ - /* skip val->dstCommandStream */ -} - -/* struct VkRingMonitorInfoMESA chain */ - -static inline void * -vn_decode_VkRingMonitorInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRingMonitorInfoMESA_self_temp(struct vn_cs_decoder *dec, VkRingMonitorInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_uint32_t(dec, &val->maxReportingPeriodMicroseconds); -} - -static inline void -vn_decode_VkRingMonitorInfoMESA_temp(struct vn_cs_decoder *dec, VkRingMonitorInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRingMonitorInfoMESA_pnext_temp(dec); - vn_decode_VkRingMonitorInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkRingMonitorInfoMESA_handle_self(VkRingMonitorInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->maxReportingPeriodMicroseconds */ -} - -static inline void -vn_replace_VkRingMonitorInfoMESA_handle(VkRingMonitorInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA: - vn_replace_VkRingMonitorInfoMESA_handle_self((VkRingMonitorInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRingPriorityInfoMESA chain */ - -static inline void * -vn_decode_VkRingPriorityInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - /* no known/supported struct */ - if (vn_decode_simple_pointer(dec)) - vn_cs_decoder_set_fatal(dec); - return NULL; -} - -static inline void -vn_decode_VkRingPriorityInfoMESA_self_temp(struct vn_cs_decoder *dec, VkRingPriorityInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_int32_t(dec, &val->priority); -} - -static inline void -vn_decode_VkRingPriorityInfoMESA_temp(struct vn_cs_decoder *dec, VkRingPriorityInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RING_PRIORITY_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRingPriorityInfoMESA_pnext_temp(dec); - vn_decode_VkRingPriorityInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkRingPriorityInfoMESA_handle_self(VkRingPriorityInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->priority */ -} - -static inline void -vn_replace_VkRingPriorityInfoMESA_handle(VkRingPriorityInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RING_PRIORITY_INFO_MESA: - vn_replace_VkRingPriorityInfoMESA_handle_self((VkRingPriorityInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -/* struct VkRingCreateInfoMESA chain */ - -static inline void * -vn_decode_VkRingCreateInfoMESA_pnext_temp(struct vn_cs_decoder *dec) -{ - VkBaseOutStructure *pnext; - VkStructureType stype; - - if (!vn_decode_simple_pointer(dec)) - return NULL; - - vn_decode_VkStructureType(dec, &stype); - switch ((int32_t)stype) { - case VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRingMonitorInfoMESA)); - if (pnext) { - pnext->sType = stype; - ((VkRingMonitorInfoMESA *)pnext)->pNext = vn_decode_VkRingCreateInfoMESA_pnext_temp(dec); - vn_decode_VkRingMonitorInfoMESA_self_temp(dec, (VkRingMonitorInfoMESA *)pnext); - } - break; - case VK_STRUCTURE_TYPE_RING_PRIORITY_INFO_MESA: - pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkRingPriorityInfoMESA)); - if (pnext) { - pnext->sType = stype; - ((VkRingPriorityInfoMESA *)pnext)->pNext = vn_decode_VkRingCreateInfoMESA_pnext_temp(dec); - vn_decode_VkRingPriorityInfoMESA_self_temp(dec, (VkRingPriorityInfoMESA *)pnext); - } - break; - default: - /* unexpected struct */ - pnext = NULL; - vn_cs_decoder_set_fatal(dec); - break; - } - - return pnext; -} - -static inline void -vn_decode_VkRingCreateInfoMESA_self_temp(struct vn_cs_decoder *dec, VkRingCreateInfoMESA *val) -{ - /* skip val->{sType,pNext} */ - vn_decode_VkFlags(dec, &val->flags); - vn_decode_uint32_t(dec, &val->resourceId); - vn_decode_size_t(dec, &val->offset); - vn_decode_size_t(dec, &val->size); - vn_decode_uint64_t(dec, &val->idleTimeout); - vn_decode_size_t(dec, &val->headOffset); - vn_decode_size_t(dec, &val->tailOffset); - vn_decode_size_t(dec, &val->statusOffset); - vn_decode_size_t(dec, &val->bufferOffset); - vn_decode_size_t(dec, &val->bufferSize); - vn_decode_size_t(dec, &val->extraOffset); - vn_decode_size_t(dec, &val->extraSize); -} - -static inline void -vn_decode_VkRingCreateInfoMESA_temp(struct vn_cs_decoder *dec, VkRingCreateInfoMESA *val) -{ - VkStructureType stype; - vn_decode_VkStructureType(dec, &stype); - if (stype != VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA) - vn_cs_decoder_set_fatal(dec); - - val->sType = stype; - val->pNext = vn_decode_VkRingCreateInfoMESA_pnext_temp(dec); - vn_decode_VkRingCreateInfoMESA_self_temp(dec, val); -} - -static inline void -vn_replace_VkRingCreateInfoMESA_handle_self(VkRingCreateInfoMESA *val) -{ - /* skip val->sType */ - /* skip val->pNext */ - /* skip val->flags */ - /* skip val->resourceId */ - /* skip val->offset */ - /* skip val->size */ - /* skip val->idleTimeout */ - /* skip val->headOffset */ - /* skip val->tailOffset */ - /* skip val->statusOffset */ - /* skip val->bufferOffset */ - /* skip val->bufferSize */ - /* skip val->extraOffset */ - /* skip val->extraSize */ -} - -static inline void -vn_replace_VkRingCreateInfoMESA_handle(VkRingCreateInfoMESA *val) -{ - struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val; - - do { - switch ((int32_t)pnext->sType) { - case VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA: - vn_replace_VkRingCreateInfoMESA_handle_self((VkRingCreateInfoMESA *)pnext); - break; - case VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA: - vn_replace_VkRingMonitorInfoMESA_handle_self((VkRingMonitorInfoMESA *)pnext); - break; - case VK_STRUCTURE_TYPE_RING_PRIORITY_INFO_MESA: - vn_replace_VkRingPriorityInfoMESA_handle_self((VkRingPriorityInfoMESA *)pnext); - break; - default: - /* ignore unknown/unsupported struct */ - break; - } - pnext = pnext->pNext; - } while (pnext); -} - -static inline void vn_decode_vkCreateDeferredOperationKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateDeferredOperationKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } - if (vn_decode_simple_pointer(dec)) { - args->pDeferredOperation = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pDeferredOperation)); - if (!args->pDeferredOperation) return; - vn_decode_VkDeferredOperationKHR(dec, args->pDeferredOperation); - } else { - args->pDeferredOperation = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateDeferredOperationKHR_args_handle(struct vn_command_vkCreateDeferredOperationKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - /* skip args->pAllocator */ - /* skip args->pDeferredOperation */ -} - -static inline void vn_encode_vkCreateDeferredOperationKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateDeferredOperationKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateDeferredOperationKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->pAllocator */ - if (vn_encode_simple_pointer(enc, args->pDeferredOperation)) - vn_encode_VkDeferredOperationKHR(enc, args->pDeferredOperation); -} - -static inline void vn_decode_vkDestroyDeferredOperationKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyDeferredOperationKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeferredOperationKHR_lookup(dec, &args->operation); - if (vn_decode_simple_pointer(dec)) { - vn_cs_decoder_set_fatal(dec); - } else { - args->pAllocator = NULL; - } -} - -static inline void vn_replace_vkDestroyDeferredOperationKHR_args_handle(struct vn_command_vkDestroyDeferredOperationKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeferredOperationKHR_handle(&args->operation); - /* skip args->pAllocator */ -} - -static inline void vn_encode_vkDestroyDeferredOperationKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyDeferredOperationKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyDeferredOperationKHR_EXT}); - - /* skip args->device */ - /* skip args->operation */ - /* skip args->pAllocator */ -} - -static inline void vn_decode_vkGetDeferredOperationMaxConcurrencyKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeferredOperationMaxConcurrencyKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeferredOperationKHR_lookup(dec, &args->operation); -} - -static inline void vn_replace_vkGetDeferredOperationMaxConcurrencyKHR_args_handle(struct vn_command_vkGetDeferredOperationMaxConcurrencyKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeferredOperationKHR_handle(&args->operation); -} - -static inline void vn_encode_vkGetDeferredOperationMaxConcurrencyKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeferredOperationMaxConcurrencyKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeferredOperationMaxConcurrencyKHR_EXT}); - - vn_encode_uint32_t(enc, &args->ret); - /* skip args->device */ - /* skip args->operation */ -} - -static inline void vn_decode_vkGetDeferredOperationResultKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkGetDeferredOperationResultKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeferredOperationKHR_lookup(dec, &args->operation); -} - -static inline void vn_replace_vkGetDeferredOperationResultKHR_args_handle(struct vn_command_vkGetDeferredOperationResultKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeferredOperationKHR_handle(&args->operation); -} - -static inline void vn_encode_vkGetDeferredOperationResultKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkGetDeferredOperationResultKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkGetDeferredOperationResultKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->operation */ -} - -static inline void vn_decode_vkDeferredOperationJoinKHR_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDeferredOperationJoinKHR *args) -{ - vn_decode_VkDevice_lookup(dec, &args->device); - vn_decode_VkDeferredOperationKHR_lookup(dec, &args->operation); -} - -static inline void vn_replace_vkDeferredOperationJoinKHR_args_handle(struct vn_command_vkDeferredOperationJoinKHR *args) -{ - vn_replace_VkDevice_handle(&args->device); - vn_replace_VkDeferredOperationKHR_handle(&args->operation); -} - -static inline void vn_encode_vkDeferredOperationJoinKHR_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDeferredOperationJoinKHR *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDeferredOperationJoinKHR_EXT}); - - vn_encode_VkResult(enc, &args->ret); - /* skip args->device */ - /* skip args->operation */ -} - -static inline void vn_decode_vkSetReplyCommandStreamMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSetReplyCommandStreamMESA *args) -{ - if (vn_decode_simple_pointer(dec)) { - args->pStream = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pStream)); - if (!args->pStream) return; - vn_decode_VkCommandStreamDescriptionMESA_temp(dec, (VkCommandStreamDescriptionMESA *)args->pStream); - } else { - args->pStream = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkSetReplyCommandStreamMESA_args_handle(struct vn_command_vkSetReplyCommandStreamMESA *args) -{ - if (args->pStream) - vn_replace_VkCommandStreamDescriptionMESA_handle((VkCommandStreamDescriptionMESA *)args->pStream); -} - -static inline void vn_encode_vkSetReplyCommandStreamMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSetReplyCommandStreamMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSetReplyCommandStreamMESA_EXT}); - - /* skip args->pStream */ -} - -static inline void vn_decode_vkSeekReplyCommandStreamMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSeekReplyCommandStreamMESA *args) -{ - vn_decode_size_t(dec, &args->position); -} - -static inline void vn_replace_vkSeekReplyCommandStreamMESA_args_handle(struct vn_command_vkSeekReplyCommandStreamMESA *args) -{ - /* skip args->position */ -} - -static inline void vn_encode_vkSeekReplyCommandStreamMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSeekReplyCommandStreamMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSeekReplyCommandStreamMESA_EXT}); - - /* skip args->position */ -} - -static inline void vn_decode_vkExecuteCommandStreamsMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkExecuteCommandStreamsMESA *args) -{ - vn_decode_uint32_t(dec, &args->streamCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->streamCount); - args->pStreams = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pStreams), iter_count); - if (!args->pStreams) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandStreamDescriptionMESA_temp(dec, &((VkCommandStreamDescriptionMESA *)args->pStreams)[i]); - } else { - vn_decode_array_size(dec, args->streamCount); - args->pStreams = NULL; - } - if (vn_peek_array_size(dec)) { - const size_t array_size = vn_decode_array_size(dec, args->streamCount); - args->pReplyPositions = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pReplyPositions), array_size); - if (!args->pReplyPositions) return; - vn_decode_size_t_array(dec, (size_t *)args->pReplyPositions, array_size); - } else { - vn_decode_array_size_unchecked(dec); - args->pReplyPositions = NULL; - } - vn_decode_uint32_t(dec, &args->dependencyCount); - if (vn_peek_array_size(dec)) { - const uint32_t iter_count = vn_decode_array_size(dec, args->dependencyCount); - args->pDependencies = vn_cs_decoder_alloc_temp_array(dec, sizeof(*args->pDependencies), iter_count); - if (!args->pDependencies) return; - for (uint32_t i = 0; i < iter_count; i++) - vn_decode_VkCommandStreamDependencyMESA_temp(dec, &((VkCommandStreamDependencyMESA *)args->pDependencies)[i]); - } else { - vn_decode_array_size(dec, args->dependencyCount); - args->pDependencies = NULL; - } - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkExecuteCommandStreamsMESA_args_handle(struct vn_command_vkExecuteCommandStreamsMESA *args) -{ - /* skip args->streamCount */ - if (args->pStreams) { - for (uint32_t i = 0; i < args->streamCount; i++) - vn_replace_VkCommandStreamDescriptionMESA_handle(&((VkCommandStreamDescriptionMESA *)args->pStreams)[i]); - } - /* skip args->pReplyPositions */ - /* skip args->dependencyCount */ - if (args->pDependencies) { - for (uint32_t i = 0; i < args->dependencyCount; i++) - vn_replace_VkCommandStreamDependencyMESA_handle(&((VkCommandStreamDependencyMESA *)args->pDependencies)[i]); - } - /* skip args->flags */ -} - -static inline void vn_encode_vkExecuteCommandStreamsMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkExecuteCommandStreamsMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkExecuteCommandStreamsMESA_EXT}); - - /* skip args->streamCount */ - /* skip args->pStreams */ - /* skip args->pReplyPositions */ - /* skip args->dependencyCount */ - /* skip args->pDependencies */ - /* skip args->flags */ -} - -static inline void vn_decode_vkCreateRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkCreateRingMESA *args) -{ - vn_decode_uint64_t(dec, &args->ring); - if (vn_decode_simple_pointer(dec)) { - args->pCreateInfo = vn_cs_decoder_alloc_temp(dec, sizeof(*args->pCreateInfo)); - if (!args->pCreateInfo) return; - vn_decode_VkRingCreateInfoMESA_temp(dec, (VkRingCreateInfoMESA *)args->pCreateInfo); - } else { - args->pCreateInfo = NULL; - vn_cs_decoder_set_fatal(dec); - } -} - -static inline void vn_replace_vkCreateRingMESA_args_handle(struct vn_command_vkCreateRingMESA *args) -{ - /* skip args->ring */ - if (args->pCreateInfo) - vn_replace_VkRingCreateInfoMESA_handle((VkRingCreateInfoMESA *)args->pCreateInfo); -} - -static inline void vn_encode_vkCreateRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkCreateRingMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkCreateRingMESA_EXT}); - - /* skip args->ring */ - /* skip args->pCreateInfo */ -} - -static inline void vn_decode_vkDestroyRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkDestroyRingMESA *args) -{ - vn_decode_uint64_t(dec, &args->ring); -} - -static inline void vn_replace_vkDestroyRingMESA_args_handle(struct vn_command_vkDestroyRingMESA *args) -{ - /* skip args->ring */ -} - -static inline void vn_encode_vkDestroyRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkDestroyRingMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkDestroyRingMESA_EXT}); - - /* skip args->ring */ -} - -static inline void vn_decode_vkNotifyRingMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkNotifyRingMESA *args) -{ - vn_decode_uint64_t(dec, &args->ring); - vn_decode_uint32_t(dec, &args->seqno); - vn_decode_VkFlags(dec, &args->flags); -} - -static inline void vn_replace_vkNotifyRingMESA_args_handle(struct vn_command_vkNotifyRingMESA *args) -{ - /* skip args->ring */ - /* skip args->seqno */ - /* skip args->flags */ -} - -static inline void vn_encode_vkNotifyRingMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkNotifyRingMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkNotifyRingMESA_EXT}); - - /* skip args->ring */ - /* skip args->seqno */ - /* skip args->flags */ -} - -static inline void vn_decode_vkWriteRingExtraMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWriteRingExtraMESA *args) -{ - vn_decode_uint64_t(dec, &args->ring); - vn_decode_size_t(dec, &args->offset); - vn_decode_uint32_t(dec, &args->value); -} - -static inline void vn_replace_vkWriteRingExtraMESA_args_handle(struct vn_command_vkWriteRingExtraMESA *args) -{ - /* skip args->ring */ - /* skip args->offset */ - /* skip args->value */ -} - -static inline void vn_encode_vkWriteRingExtraMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWriteRingExtraMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWriteRingExtraMESA_EXT}); - - /* skip args->ring */ - /* skip args->offset */ - /* skip args->value */ -} - -static inline void vn_decode_vkSubmitVirtqueueSeqnoMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkSubmitVirtqueueSeqnoMESA *args) -{ - vn_decode_uint64_t(dec, &args->ring); - vn_decode_uint64_t(dec, &args->seqno); -} - -static inline void vn_replace_vkSubmitVirtqueueSeqnoMESA_args_handle(struct vn_command_vkSubmitVirtqueueSeqnoMESA *args) -{ - /* skip args->ring */ - /* skip args->seqno */ -} - -static inline void vn_encode_vkSubmitVirtqueueSeqnoMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkSubmitVirtqueueSeqnoMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkSubmitVirtqueueSeqnoMESA_EXT}); - - /* skip args->ring */ - /* skip args->seqno */ -} - -static inline void vn_decode_vkWaitVirtqueueSeqnoMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWaitVirtqueueSeqnoMESA *args) -{ - vn_decode_uint64_t(dec, &args->seqno); -} - -static inline void vn_replace_vkWaitVirtqueueSeqnoMESA_args_handle(struct vn_command_vkWaitVirtqueueSeqnoMESA *args) -{ - /* skip args->seqno */ -} - -static inline void vn_encode_vkWaitVirtqueueSeqnoMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWaitVirtqueueSeqnoMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWaitVirtqueueSeqnoMESA_EXT}); - - /* skip args->seqno */ -} - -static inline void vn_decode_vkWaitRingSeqnoMESA_args_temp(struct vn_cs_decoder *dec, struct vn_command_vkWaitRingSeqnoMESA *args) -{ - vn_decode_uint64_t(dec, &args->ring); - vn_decode_uint64_t(dec, &args->seqno); -} - -static inline void vn_replace_vkWaitRingSeqnoMESA_args_handle(struct vn_command_vkWaitRingSeqnoMESA *args) -{ - /* skip args->ring */ - /* skip args->seqno */ -} - -static inline void vn_encode_vkWaitRingSeqnoMESA_reply(struct vn_cs_encoder *enc, const struct vn_command_vkWaitRingSeqnoMESA *args) -{ - vn_encode_VkCommandTypeEXT(enc, &(VkCommandTypeEXT){VK_COMMAND_TYPE_vkWaitRingSeqnoMESA_EXT}); - - /* skip args->ring */ - /* skip args->seqno */ -} - -static inline void vn_dispatch_vkCreateDeferredOperationKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateDeferredOperationKHR args; - - if (!ctx->dispatch_vkCreateDeferredOperationKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateDeferredOperationKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateDeferredOperationKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkCreateDeferredOperationKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateDeferredOperationKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyDeferredOperationKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyDeferredOperationKHR args; - - if (!ctx->dispatch_vkDestroyDeferredOperationKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyDeferredOperationKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyDeferredOperationKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyDeferredOperationKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeferredOperationMaxConcurrencyKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeferredOperationMaxConcurrencyKHR args; - - if (!ctx->dispatch_vkGetDeferredOperationMaxConcurrencyKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeferredOperationMaxConcurrencyKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeferredOperationMaxConcurrencyKHR(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeferredOperationMaxConcurrencyKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkGetDeferredOperationResultKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkGetDeferredOperationResultKHR args; - - if (!ctx->dispatch_vkGetDeferredOperationResultKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkGetDeferredOperationResultKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkGetDeferredOperationResultKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkGetDeferredOperationResultKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkGetDeferredOperationResultKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDeferredOperationJoinKHR(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDeferredOperationJoinKHR args; - - if (!ctx->dispatch_vkDeferredOperationJoinKHR) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDeferredOperationJoinKHR_args_temp(ctx->decoder, &args); - if (!args.device) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDeferredOperationJoinKHR(ctx, &args); - -#ifdef DEBUG - if (!vn_cs_decoder_get_fatal(ctx->decoder) && vn_dispatch_should_log_result(args.ret)) - vn_dispatch_debug_log(ctx, "vkDeferredOperationJoinKHR returned %d", args.ret); -#endif - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDeferredOperationJoinKHR_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkSetReplyCommandStreamMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkSetReplyCommandStreamMESA args; - - if (!ctx->dispatch_vkSetReplyCommandStreamMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkSetReplyCommandStreamMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkSetReplyCommandStreamMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkSetReplyCommandStreamMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkSeekReplyCommandStreamMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkSeekReplyCommandStreamMESA args; - - if (!ctx->dispatch_vkSeekReplyCommandStreamMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkSeekReplyCommandStreamMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkSeekReplyCommandStreamMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkSeekReplyCommandStreamMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkExecuteCommandStreamsMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkExecuteCommandStreamsMESA args; - - if (!ctx->dispatch_vkExecuteCommandStreamsMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkExecuteCommandStreamsMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkExecuteCommandStreamsMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkExecuteCommandStreamsMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkCreateRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkCreateRingMESA args; - - if (!ctx->dispatch_vkCreateRingMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkCreateRingMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkCreateRingMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkCreateRingMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkDestroyRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkDestroyRingMESA args; - - if (!ctx->dispatch_vkDestroyRingMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkDestroyRingMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkDestroyRingMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkDestroyRingMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkNotifyRingMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkNotifyRingMESA args; - - if (!ctx->dispatch_vkNotifyRingMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkNotifyRingMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkNotifyRingMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkNotifyRingMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWriteRingExtraMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWriteRingExtraMESA args; - - if (!ctx->dispatch_vkWriteRingExtraMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkWriteRingExtraMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWriteRingExtraMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkWriteRingExtraMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkSubmitVirtqueueSeqnoMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkSubmitVirtqueueSeqnoMESA args; - - if (!ctx->dispatch_vkSubmitVirtqueueSeqnoMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkSubmitVirtqueueSeqnoMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkSubmitVirtqueueSeqnoMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkSubmitVirtqueueSeqnoMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWaitVirtqueueSeqnoMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWaitVirtqueueSeqnoMESA args; - - if (!ctx->dispatch_vkWaitVirtqueueSeqnoMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkWaitVirtqueueSeqnoMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWaitVirtqueueSeqnoMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkWaitVirtqueueSeqnoMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -static inline void vn_dispatch_vkWaitRingSeqnoMESA(struct vn_dispatch_context *ctx, VkCommandFlagsEXT flags) -{ - struct vn_command_vkWaitRingSeqnoMESA args; - - if (!ctx->dispatch_vkWaitRingSeqnoMESA) { - vn_cs_decoder_set_fatal(ctx->decoder); - return; - } - - vn_decode_vkWaitRingSeqnoMESA_args_temp(ctx->decoder, &args); - - if (!vn_cs_decoder_get_fatal(ctx->decoder)) - ctx->dispatch_vkWaitRingSeqnoMESA(ctx, &args); - - if ((flags & VK_COMMAND_GENERATE_REPLY_BIT_EXT) && !vn_cs_decoder_get_fatal(ctx->decoder)) { - if (vn_cs_encoder_acquire(ctx->encoder)) { - vn_encode_vkWaitRingSeqnoMESA_reply(ctx->encoder, &args); - vn_cs_encoder_release(ctx->encoder); - } - } - - vn_cs_decoder_reset_temp_pool(ctx->decoder); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_TRANSPORT_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_types.h b/src/venus/venus-protocol/vn_protocol_renderer_types.h deleted file mode 100644 index d76bacd7..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_types.h +++ /dev/null @@ -1,3890 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2020 Google LLC - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_TYPES_H -#define VN_PROTOCOL_RENDERER_TYPES_H - -#include "vn_protocol_renderer_defines.h" - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* uint64_t */ - -static inline size_t -vn_sizeof_uint64_t(const uint64_t *val) -{ - assert(sizeof(*val) == 8); - return 8; -} - -static inline void -vn_encode_uint64_t(struct vn_cs_encoder *enc, const uint64_t *val) -{ - vn_encode(enc, 8, val, sizeof(*val)); -} - -static inline void -vn_decode_uint64_t(struct vn_cs_decoder *dec, uint64_t *val) -{ - vn_decode(dec, 8, val, sizeof(*val)); -} - -static inline void -vn_encode_uint64_t_array(struct vn_cs_encoder *enc, const uint64_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_encode(enc, size, val, size); -} - -static inline void -vn_decode_uint64_t_array(struct vn_cs_decoder *dec, uint64_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_decode(dec, size, val, size); -} - -/* int32_t */ - -static inline size_t -vn_sizeof_int32_t(const int32_t *val) -{ - assert(sizeof(*val) == 4); - return 4; -} - -static inline void -vn_encode_int32_t(struct vn_cs_encoder *enc, const int32_t *val) -{ - vn_encode(enc, 4, val, sizeof(*val)); -} - -static inline void -vn_decode_int32_t(struct vn_cs_decoder *dec, int32_t *val) -{ - vn_decode(dec, 4, val, sizeof(*val)); -} - -static inline void -vn_encode_int32_t_array(struct vn_cs_encoder *enc, const int32_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_encode(enc, size, val, size); -} - -static inline void -vn_decode_int32_t_array(struct vn_cs_decoder *dec, int32_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_decode(dec, size, val, size); -} - -/* enum VkStructureType */ - -static inline size_t -vn_sizeof_VkStructureType(const VkStructureType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkStructureType(struct vn_cs_encoder *enc, const VkStructureType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkStructureType(struct vn_cs_decoder *dec, VkStructureType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* size_t */ - -static inline size_t -vn_sizeof_size_t(const size_t *val) -{ - return vn_sizeof_uint64_t(&(uint64_t){ *val }); -} - -static inline void -vn_encode_size_t(struct vn_cs_encoder *enc, const size_t *val) -{ - const uint64_t tmp = *val; - vn_encode_uint64_t(enc, &tmp); -} - -static inline void -vn_decode_size_t(struct vn_cs_decoder *dec, size_t *val) -{ - uint64_t tmp; - vn_decode_uint64_t(dec, &tmp); - *val = tmp; -} - -static inline size_t -vn_sizeof_size_t_array(const size_t *val, uint32_t count) -{ - return vn_sizeof_size_t(val) * count; -} - -static inline void -vn_encode_size_t_array(struct vn_cs_encoder *enc, const size_t *val, uint32_t count) -{ - if (sizeof(size_t) == sizeof(uint64_t)) { - vn_encode_uint64_t_array(enc, (const uint64_t *)val, count); - } else { - for (uint32_t i = 0; i < count; i++) - vn_encode_size_t(enc, &val[i]); - } -} - -static inline void -vn_decode_size_t_array(struct vn_cs_decoder *dec, size_t *val, uint32_t count) -{ - if (sizeof(size_t) == sizeof(uint64_t)) { - vn_decode_uint64_t_array(dec, (uint64_t *)val, count); - } else { - for (uint32_t i = 0; i < count; i++) - vn_decode_size_t(dec, &val[i]); - } -} - -/* opaque blob */ - -static inline size_t -vn_sizeof_blob_array(const void *val, size_t size) -{ - return (size + 3) & ~3; -} - -static inline void -vn_encode_blob_array(struct vn_cs_encoder *enc, const void *val, size_t size) -{ - vn_encode(enc, (size + 3) & ~3, val, size); -} - -static inline void -vn_decode_blob_array(struct vn_cs_decoder *dec, void *val, size_t size) -{ - vn_decode(dec, (size + 3) & ~3, val, size); -} - -/* string */ - -static inline size_t -vn_sizeof_char_array(const char *val, size_t size) -{ - return vn_sizeof_blob_array(val, size); -} - -static inline void -vn_encode_char_array(struct vn_cs_encoder *enc, const char *val, size_t size) -{ - assert(size && strlen(val) < size); - vn_encode_blob_array(enc, val, size); -} - -static inline void -vn_decode_char_array(struct vn_cs_decoder *dec, char *val, size_t size) -{ - vn_decode_blob_array(dec, val, size); - if (size) - val[size - 1] = '\0'; - else - vn_cs_decoder_set_fatal(dec); -} - -/* array size (uint64_t) */ - -static inline size_t -vn_sizeof_array_size(uint64_t size) -{ - return vn_sizeof_uint64_t(&size); -} - -static inline void -vn_encode_array_size(struct vn_cs_encoder *enc, uint64_t size) -{ - vn_encode_uint64_t(enc, &size); -} - -static inline uint64_t -vn_decode_array_size(struct vn_cs_decoder *dec, uint64_t expected_size) -{ - uint64_t size; - vn_decode_uint64_t(dec, &size); - if (size != expected_size) { - vn_cs_decoder_set_fatal(dec); - size = 0; - } - return size; -} - -static inline uint64_t -vn_decode_array_size_unchecked(struct vn_cs_decoder *dec) -{ - uint64_t size; - vn_decode_uint64_t(dec, &size); - return size; -} - -static inline uint64_t -vn_peek_array_size(struct vn_cs_decoder *dec) -{ - uint64_t size; - vn_cs_decoder_peek(dec, sizeof(size), &size, sizeof(size)); - return size; -} - -/* non-array pointer */ - -static inline size_t -vn_sizeof_simple_pointer(const void *val) -{ - return vn_sizeof_array_size(val ? 1 : 0); -} - -static inline bool -vn_encode_simple_pointer(struct vn_cs_encoder *enc, const void *val) -{ - vn_encode_array_size(enc, val ? 1 : 0); - return val; -} - -static inline bool -vn_decode_simple_pointer(struct vn_cs_decoder *dec) -{ - return vn_decode_array_size_unchecked(dec); -} - -/* uint32_t */ - -static inline size_t -vn_sizeof_uint32_t(const uint32_t *val) -{ - assert(sizeof(*val) == 4); - return 4; -} - -static inline void -vn_encode_uint32_t(struct vn_cs_encoder *enc, const uint32_t *val) -{ - vn_encode(enc, 4, val, sizeof(*val)); -} - -static inline void -vn_decode_uint32_t(struct vn_cs_decoder *dec, uint32_t *val) -{ - vn_decode(dec, 4, val, sizeof(*val)); -} - -static inline void -vn_encode_uint32_t_array(struct vn_cs_encoder *enc, const uint32_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_encode(enc, size, val, size); -} - -static inline void -vn_decode_uint32_t_array(struct vn_cs_decoder *dec, uint32_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_decode(dec, size, val, size); -} - -/* float */ - -static inline size_t -vn_sizeof_float(const float *val) -{ - assert(sizeof(*val) == 4); - return 4; -} - -static inline void -vn_encode_float(struct vn_cs_encoder *enc, const float *val) -{ - vn_encode(enc, 4, val, sizeof(*val)); -} - -static inline void -vn_decode_float(struct vn_cs_decoder *dec, float *val) -{ - vn_decode(dec, 4, val, sizeof(*val)); -} - -static inline void -vn_encode_float_array(struct vn_cs_encoder *enc, const float *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_encode(enc, size, val, size); -} - -static inline void -vn_decode_float_array(struct vn_cs_decoder *dec, float *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_decode(dec, size, val, size); -} - -/* uint8_t */ - -static inline size_t -vn_sizeof_uint8_t(const uint8_t *val) -{ - assert(sizeof(*val) == 1); - return 4; -} - -static inline void -vn_encode_uint8_t(struct vn_cs_encoder *enc, const uint8_t *val) -{ - vn_encode(enc, 4, val, sizeof(*val)); -} - -static inline void -vn_decode_uint8_t(struct vn_cs_decoder *dec, uint8_t *val) -{ - vn_decode(dec, 4, val, sizeof(*val)); -} - -static inline void -vn_encode_uint8_t_array(struct vn_cs_encoder *enc, const uint8_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_encode(enc, (size + 3) & ~3, val, size); -} - -static inline void -vn_decode_uint8_t_array(struct vn_cs_decoder *dec, uint8_t *val, uint32_t count) -{ - const size_t size = sizeof(*val) * count; - assert(size >= count); - vn_decode(dec, (size + 3) & ~3, val, size); -} - -/* uint16_t */ - -static inline size_t -vn_sizeof_uint16_t(const uint16_t *val) -{ - assert(sizeof(*val) == 2); - return 4; -} - -static inline void -vn_encode_uint16_t(struct vn_cs_encoder *enc, const uint16_t *val) -{ - vn_encode(enc, 4, val, sizeof(*val)); -} - -static inline void -vn_decode_uint16_t(struct vn_cs_decoder *dec, uint16_t *val) -{ - vn_decode(dec, 4, val, sizeof(*val)); -} - -/* typedef uint32_t VkSampleMask */ - -static inline size_t -vn_sizeof_VkSampleMask(const VkSampleMask *val) -{ - return vn_sizeof_uint32_t(val); -} - -static inline void -vn_encode_VkSampleMask(struct vn_cs_encoder *enc, const VkSampleMask *val) -{ - vn_encode_uint32_t(enc, val); -} - -static inline void -vn_decode_VkSampleMask(struct vn_cs_decoder *dec, VkSampleMask *val) -{ - vn_decode_uint32_t(dec, val); -} - -static inline void -vn_encode_VkSampleMask_array(struct vn_cs_encoder *enc, const VkSampleMask *val, uint32_t count) -{ - vn_encode_uint32_t_array(enc, val, count); -} - -static inline void -vn_decode_VkSampleMask_array(struct vn_cs_decoder *dec, VkSampleMask *val, uint32_t count) -{ - vn_decode_uint32_t_array(dec, val, count); -} - -/* typedef uint32_t VkBool32 */ - -static inline size_t -vn_sizeof_VkBool32(const VkBool32 *val) -{ - return vn_sizeof_uint32_t(val); -} - -static inline void -vn_encode_VkBool32(struct vn_cs_encoder *enc, const VkBool32 *val) -{ - vn_encode_uint32_t(enc, val); -} - -static inline void -vn_decode_VkBool32(struct vn_cs_decoder *dec, VkBool32 *val) -{ - vn_decode_uint32_t(dec, val); -} - -static inline void -vn_encode_VkBool32_array(struct vn_cs_encoder *enc, const VkBool32 *val, uint32_t count) -{ - vn_encode_uint32_t_array(enc, val, count); -} - -static inline void -vn_decode_VkBool32_array(struct vn_cs_decoder *dec, VkBool32 *val, uint32_t count) -{ - vn_decode_uint32_t_array(dec, val, count); -} - -/* typedef uint32_t VkFlags */ - -static inline size_t -vn_sizeof_VkFlags(const VkFlags *val) -{ - return vn_sizeof_uint32_t(val); -} - -static inline void -vn_encode_VkFlags(struct vn_cs_encoder *enc, const VkFlags *val) -{ - vn_encode_uint32_t(enc, val); -} - -static inline void -vn_decode_VkFlags(struct vn_cs_decoder *dec, VkFlags *val) -{ - vn_decode_uint32_t(dec, val); -} - -static inline void -vn_encode_VkFlags_array(struct vn_cs_encoder *enc, const VkFlags *val, uint32_t count) -{ - vn_encode_uint32_t_array(enc, val, count); -} - -static inline void -vn_decode_VkFlags_array(struct vn_cs_decoder *dec, VkFlags *val, uint32_t count) -{ - vn_decode_uint32_t_array(dec, val, count); -} - -/* typedef uint64_t VkFlags64 */ - -static inline size_t -vn_sizeof_VkFlags64(const VkFlags64 *val) -{ - return vn_sizeof_uint64_t(val); -} - -static inline void -vn_encode_VkFlags64(struct vn_cs_encoder *enc, const VkFlags64 *val) -{ - vn_encode_uint64_t(enc, val); -} - -static inline void -vn_decode_VkFlags64(struct vn_cs_decoder *dec, VkFlags64 *val) -{ - vn_decode_uint64_t(dec, val); -} - -/* typedef uint64_t VkDeviceSize */ - -static inline size_t -vn_sizeof_VkDeviceSize(const VkDeviceSize *val) -{ - return vn_sizeof_uint64_t(val); -} - -static inline void -vn_encode_VkDeviceSize(struct vn_cs_encoder *enc, const VkDeviceSize *val) -{ - vn_encode_uint64_t(enc, val); -} - -static inline void -vn_decode_VkDeviceSize(struct vn_cs_decoder *dec, VkDeviceSize *val) -{ - vn_decode_uint64_t(dec, val); -} - -static inline void -vn_encode_VkDeviceSize_array(struct vn_cs_encoder *enc, const VkDeviceSize *val, uint32_t count) -{ - vn_encode_uint64_t_array(enc, val, count); -} - -static inline void -vn_decode_VkDeviceSize_array(struct vn_cs_decoder *dec, VkDeviceSize *val, uint32_t count) -{ - vn_decode_uint64_t_array(dec, val, count); -} - -/* typedef uint64_t VkDeviceAddress */ - -static inline size_t -vn_sizeof_VkDeviceAddress(const VkDeviceAddress *val) -{ - return vn_sizeof_uint64_t(val); -} - -static inline void -vn_encode_VkDeviceAddress(struct vn_cs_encoder *enc, const VkDeviceAddress *val) -{ - vn_encode_uint64_t(enc, val); -} - -static inline void -vn_decode_VkDeviceAddress(struct vn_cs_decoder *dec, VkDeviceAddress *val) -{ - vn_decode_uint64_t(dec, val); -} - -static inline void -vn_encode_VkDeviceAddress_array(struct vn_cs_encoder *enc, const VkDeviceAddress *val, uint32_t count) -{ - vn_encode_uint64_t_array(enc, val, count); -} - -static inline void -vn_decode_VkDeviceAddress_array(struct vn_cs_decoder *dec, VkDeviceAddress *val, uint32_t count) -{ - vn_decode_uint64_t_array(dec, val, count); -} - -/* enum VkFramebufferCreateFlagBits */ - -static inline size_t -vn_sizeof_VkFramebufferCreateFlagBits(const VkFramebufferCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFramebufferCreateFlagBits(struct vn_cs_encoder *enc, const VkFramebufferCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFramebufferCreateFlagBits(struct vn_cs_decoder *dec, VkFramebufferCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueryPoolCreateFlagBits */ - -static inline size_t -vn_sizeof_VkQueryPoolCreateFlagBits(const VkQueryPoolCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueryPoolCreateFlagBits(struct vn_cs_encoder *enc, const VkQueryPoolCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueryPoolCreateFlagBits(struct vn_cs_decoder *dec, VkQueryPoolCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkRenderPassCreateFlagBits */ - -static inline size_t -vn_sizeof_VkRenderPassCreateFlagBits(const VkRenderPassCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkRenderPassCreateFlagBits(struct vn_cs_encoder *enc, const VkRenderPassCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkRenderPassCreateFlagBits(struct vn_cs_decoder *dec, VkRenderPassCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSamplerCreateFlagBits */ - -static inline size_t -vn_sizeof_VkSamplerCreateFlagBits(const VkSamplerCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSamplerCreateFlagBits(struct vn_cs_encoder *enc, const VkSamplerCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSamplerCreateFlagBits(struct vn_cs_decoder *dec, VkSamplerCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineLayoutCreateFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineLayoutCreateFlagBits(const VkPipelineLayoutCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineLayoutCreateFlagBits(struct vn_cs_encoder *enc, const VkPipelineLayoutCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineLayoutCreateFlagBits(struct vn_cs_decoder *dec, VkPipelineLayoutCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineCacheCreateFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineCacheCreateFlagBits(const VkPipelineCacheCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineCacheCreateFlagBits(struct vn_cs_encoder *enc, const VkPipelineCacheCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineCacheCreateFlagBits(struct vn_cs_decoder *dec, VkPipelineCacheCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineDepthStencilStateCreateFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineDepthStencilStateCreateFlagBits(const VkPipelineDepthStencilStateCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineDepthStencilStateCreateFlagBits(struct vn_cs_encoder *enc, const VkPipelineDepthStencilStateCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineDepthStencilStateCreateFlagBits(struct vn_cs_decoder *dec, VkPipelineDepthStencilStateCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineColorBlendStateCreateFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineColorBlendStateCreateFlagBits(const VkPipelineColorBlendStateCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineColorBlendStateCreateFlagBits(struct vn_cs_encoder *enc, const VkPipelineColorBlendStateCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineColorBlendStateCreateFlagBits(struct vn_cs_decoder *dec, VkPipelineColorBlendStateCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineShaderStageCreateFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineShaderStageCreateFlagBits(const VkPipelineShaderStageCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineShaderStageCreateFlagBits(struct vn_cs_encoder *enc, const VkPipelineShaderStageCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineShaderStageCreateFlagBits(struct vn_cs_decoder *dec, VkPipelineShaderStageCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDescriptorSetLayoutCreateFlagBits */ - -static inline size_t -vn_sizeof_VkDescriptorSetLayoutCreateFlagBits(const VkDescriptorSetLayoutCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorSetLayoutCreateFlagBits(struct vn_cs_encoder *enc, const VkDescriptorSetLayoutCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDescriptorSetLayoutCreateFlagBits(struct vn_cs_decoder *dec, VkDescriptorSetLayoutCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkInstanceCreateFlagBits */ - -static inline size_t -vn_sizeof_VkInstanceCreateFlagBits(const VkInstanceCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkInstanceCreateFlagBits(struct vn_cs_encoder *enc, const VkInstanceCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkInstanceCreateFlagBits(struct vn_cs_decoder *dec, VkInstanceCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDeviceQueueCreateFlagBits */ - -static inline size_t -vn_sizeof_VkDeviceQueueCreateFlagBits(const VkDeviceQueueCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDeviceQueueCreateFlagBits(struct vn_cs_encoder *enc, const VkDeviceQueueCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDeviceQueueCreateFlagBits(struct vn_cs_decoder *dec, VkDeviceQueueCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueueFlagBits */ - -static inline size_t -vn_sizeof_VkQueueFlagBits(const VkQueueFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueueFlagBits(struct vn_cs_encoder *enc, const VkQueueFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueueFlagBits(struct vn_cs_decoder *dec, VkQueueFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkMemoryPropertyFlagBits */ - -static inline size_t -vn_sizeof_VkMemoryPropertyFlagBits(const VkMemoryPropertyFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkMemoryPropertyFlagBits(struct vn_cs_encoder *enc, const VkMemoryPropertyFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkMemoryPropertyFlagBits(struct vn_cs_decoder *dec, VkMemoryPropertyFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkMemoryHeapFlagBits */ - -static inline size_t -vn_sizeof_VkMemoryHeapFlagBits(const VkMemoryHeapFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkMemoryHeapFlagBits(struct vn_cs_encoder *enc, const VkMemoryHeapFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkMemoryHeapFlagBits(struct vn_cs_decoder *dec, VkMemoryHeapFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAccessFlagBits */ - -static inline size_t -vn_sizeof_VkAccessFlagBits(const VkAccessFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAccessFlagBits(struct vn_cs_encoder *enc, const VkAccessFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAccessFlagBits(struct vn_cs_decoder *dec, VkAccessFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBufferUsageFlagBits */ - -static inline size_t -vn_sizeof_VkBufferUsageFlagBits(const VkBufferUsageFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBufferUsageFlagBits(struct vn_cs_encoder *enc, const VkBufferUsageFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBufferUsageFlagBits(struct vn_cs_decoder *dec, VkBufferUsageFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBufferCreateFlagBits */ - -static inline size_t -vn_sizeof_VkBufferCreateFlagBits(const VkBufferCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBufferCreateFlagBits(struct vn_cs_encoder *enc, const VkBufferCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBufferCreateFlagBits(struct vn_cs_decoder *dec, VkBufferCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkShaderStageFlagBits */ - -static inline size_t -vn_sizeof_VkShaderStageFlagBits(const VkShaderStageFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkShaderStageFlagBits(struct vn_cs_encoder *enc, const VkShaderStageFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkShaderStageFlagBits(struct vn_cs_decoder *dec, VkShaderStageFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkShaderStageFlagBits_array(struct vn_cs_encoder *enc, const VkShaderStageFlagBits *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkShaderStageFlagBits_array(struct vn_cs_decoder *dec, VkShaderStageFlagBits *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkImageUsageFlagBits */ - -static inline size_t -vn_sizeof_VkImageUsageFlagBits(const VkImageUsageFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageUsageFlagBits(struct vn_cs_encoder *enc, const VkImageUsageFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageUsageFlagBits(struct vn_cs_decoder *dec, VkImageUsageFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkImageCreateFlagBits */ - -static inline size_t -vn_sizeof_VkImageCreateFlagBits(const VkImageCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageCreateFlagBits(struct vn_cs_encoder *enc, const VkImageCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageCreateFlagBits(struct vn_cs_decoder *dec, VkImageCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkImageViewCreateFlagBits */ - -static inline size_t -vn_sizeof_VkImageViewCreateFlagBits(const VkImageViewCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageViewCreateFlagBits(struct vn_cs_encoder *enc, const VkImageViewCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageViewCreateFlagBits(struct vn_cs_decoder *dec, VkImageViewCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineCreateFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineCreateFlagBits(const VkPipelineCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineCreateFlagBits(struct vn_cs_encoder *enc, const VkPipelineCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineCreateFlagBits(struct vn_cs_decoder *dec, VkPipelineCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkColorComponentFlagBits */ - -static inline size_t -vn_sizeof_VkColorComponentFlagBits(const VkColorComponentFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkColorComponentFlagBits(struct vn_cs_encoder *enc, const VkColorComponentFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkColorComponentFlagBits(struct vn_cs_decoder *dec, VkColorComponentFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkFenceCreateFlagBits */ - -static inline size_t -vn_sizeof_VkFenceCreateFlagBits(const VkFenceCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFenceCreateFlagBits(struct vn_cs_encoder *enc, const VkFenceCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFenceCreateFlagBits(struct vn_cs_decoder *dec, VkFenceCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkFormatFeatureFlagBits */ - -static inline size_t -vn_sizeof_VkFormatFeatureFlagBits(const VkFormatFeatureFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFormatFeatureFlagBits(struct vn_cs_encoder *enc, const VkFormatFeatureFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFormatFeatureFlagBits(struct vn_cs_decoder *dec, VkFormatFeatureFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueryControlFlagBits */ - -static inline size_t -vn_sizeof_VkQueryControlFlagBits(const VkQueryControlFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueryControlFlagBits(struct vn_cs_encoder *enc, const VkQueryControlFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueryControlFlagBits(struct vn_cs_decoder *dec, VkQueryControlFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueryResultFlagBits */ - -static inline size_t -vn_sizeof_VkQueryResultFlagBits(const VkQueryResultFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueryResultFlagBits(struct vn_cs_encoder *enc, const VkQueryResultFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueryResultFlagBits(struct vn_cs_decoder *dec, VkQueryResultFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkEventCreateFlagBits */ - -static inline size_t -vn_sizeof_VkEventCreateFlagBits(const VkEventCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkEventCreateFlagBits(struct vn_cs_encoder *enc, const VkEventCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkEventCreateFlagBits(struct vn_cs_decoder *dec, VkEventCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandPoolCreateFlagBits */ - -static inline size_t -vn_sizeof_VkCommandPoolCreateFlagBits(const VkCommandPoolCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandPoolCreateFlagBits(struct vn_cs_encoder *enc, const VkCommandPoolCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandPoolCreateFlagBits(struct vn_cs_decoder *dec, VkCommandPoolCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandPoolResetFlagBits */ - -static inline size_t -vn_sizeof_VkCommandPoolResetFlagBits(const VkCommandPoolResetFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandPoolResetFlagBits(struct vn_cs_encoder *enc, const VkCommandPoolResetFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandPoolResetFlagBits(struct vn_cs_decoder *dec, VkCommandPoolResetFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandBufferResetFlagBits */ - -static inline size_t -vn_sizeof_VkCommandBufferResetFlagBits(const VkCommandBufferResetFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandBufferResetFlagBits(struct vn_cs_encoder *enc, const VkCommandBufferResetFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandBufferResetFlagBits(struct vn_cs_decoder *dec, VkCommandBufferResetFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandBufferUsageFlagBits */ - -static inline size_t -vn_sizeof_VkCommandBufferUsageFlagBits(const VkCommandBufferUsageFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandBufferUsageFlagBits(struct vn_cs_encoder *enc, const VkCommandBufferUsageFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandBufferUsageFlagBits(struct vn_cs_decoder *dec, VkCommandBufferUsageFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueryPipelineStatisticFlagBits */ - -static inline size_t -vn_sizeof_VkQueryPipelineStatisticFlagBits(const VkQueryPipelineStatisticFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueryPipelineStatisticFlagBits(struct vn_cs_encoder *enc, const VkQueryPipelineStatisticFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueryPipelineStatisticFlagBits(struct vn_cs_decoder *dec, VkQueryPipelineStatisticFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkMemoryMapFlagBits */ - -static inline size_t -vn_sizeof_VkMemoryMapFlagBits(const VkMemoryMapFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkMemoryMapFlagBits(struct vn_cs_encoder *enc, const VkMemoryMapFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkMemoryMapFlagBits(struct vn_cs_decoder *dec, VkMemoryMapFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkMemoryUnmapFlagBits */ - -static inline size_t -vn_sizeof_VkMemoryUnmapFlagBits(const VkMemoryUnmapFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkMemoryUnmapFlagBits(struct vn_cs_encoder *enc, const VkMemoryUnmapFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkMemoryUnmapFlagBits(struct vn_cs_decoder *dec, VkMemoryUnmapFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkImageAspectFlagBits */ - -static inline size_t -vn_sizeof_VkImageAspectFlagBits(const VkImageAspectFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageAspectFlagBits(struct vn_cs_encoder *enc, const VkImageAspectFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageAspectFlagBits(struct vn_cs_decoder *dec, VkImageAspectFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSparseMemoryBindFlagBits */ - -static inline size_t -vn_sizeof_VkSparseMemoryBindFlagBits(const VkSparseMemoryBindFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSparseMemoryBindFlagBits(struct vn_cs_encoder *enc, const VkSparseMemoryBindFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSparseMemoryBindFlagBits(struct vn_cs_decoder *dec, VkSparseMemoryBindFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSparseImageFormatFlagBits */ - -static inline size_t -vn_sizeof_VkSparseImageFormatFlagBits(const VkSparseImageFormatFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSparseImageFormatFlagBits(struct vn_cs_encoder *enc, const VkSparseImageFormatFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSparseImageFormatFlagBits(struct vn_cs_decoder *dec, VkSparseImageFormatFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSubpassDescriptionFlagBits */ - -static inline size_t -vn_sizeof_VkSubpassDescriptionFlagBits(const VkSubpassDescriptionFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSubpassDescriptionFlagBits(struct vn_cs_encoder *enc, const VkSubpassDescriptionFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSubpassDescriptionFlagBits(struct vn_cs_decoder *dec, VkSubpassDescriptionFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineStageFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineStageFlagBits(const VkPipelineStageFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineStageFlagBits(struct vn_cs_encoder *enc, const VkPipelineStageFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineStageFlagBits(struct vn_cs_decoder *dec, VkPipelineStageFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSampleCountFlagBits */ - -static inline size_t -vn_sizeof_VkSampleCountFlagBits(const VkSampleCountFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSampleCountFlagBits(struct vn_cs_encoder *enc, const VkSampleCountFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSampleCountFlagBits(struct vn_cs_decoder *dec, VkSampleCountFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkSampleCountFlagBits_array(struct vn_cs_encoder *enc, const VkSampleCountFlagBits *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkSampleCountFlagBits_array(struct vn_cs_decoder *dec, VkSampleCountFlagBits *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkAttachmentDescriptionFlagBits */ - -static inline size_t -vn_sizeof_VkAttachmentDescriptionFlagBits(const VkAttachmentDescriptionFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAttachmentDescriptionFlagBits(struct vn_cs_encoder *enc, const VkAttachmentDescriptionFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAttachmentDescriptionFlagBits(struct vn_cs_decoder *dec, VkAttachmentDescriptionFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkStencilFaceFlagBits */ - -static inline size_t -vn_sizeof_VkStencilFaceFlagBits(const VkStencilFaceFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkStencilFaceFlagBits(struct vn_cs_encoder *enc, const VkStencilFaceFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkStencilFaceFlagBits(struct vn_cs_decoder *dec, VkStencilFaceFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCullModeFlagBits */ - -static inline size_t -vn_sizeof_VkCullModeFlagBits(const VkCullModeFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCullModeFlagBits(struct vn_cs_encoder *enc, const VkCullModeFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCullModeFlagBits(struct vn_cs_decoder *dec, VkCullModeFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDescriptorPoolCreateFlagBits */ - -static inline size_t -vn_sizeof_VkDescriptorPoolCreateFlagBits(const VkDescriptorPoolCreateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorPoolCreateFlagBits(struct vn_cs_encoder *enc, const VkDescriptorPoolCreateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDescriptorPoolCreateFlagBits(struct vn_cs_decoder *dec, VkDescriptorPoolCreateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDependencyFlagBits */ - -static inline size_t -vn_sizeof_VkDependencyFlagBits(const VkDependencyFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDependencyFlagBits(struct vn_cs_encoder *enc, const VkDependencyFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDependencyFlagBits(struct vn_cs_decoder *dec, VkDependencyFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSubgroupFeatureFlagBits */ - -static inline size_t -vn_sizeof_VkSubgroupFeatureFlagBits(const VkSubgroupFeatureFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSubgroupFeatureFlagBits(struct vn_cs_encoder *enc, const VkSubgroupFeatureFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSubgroupFeatureFlagBits(struct vn_cs_decoder *dec, VkSubgroupFeatureFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkGeometryFlagBitsKHR */ - -static inline size_t -vn_sizeof_VkGeometryFlagBitsKHR(const VkGeometryFlagBitsKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkGeometryFlagBitsKHR(struct vn_cs_encoder *enc, const VkGeometryFlagBitsKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkGeometryFlagBitsKHR(struct vn_cs_decoder *dec, VkGeometryFlagBitsKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkGeometryInstanceFlagBitsKHR */ - -static inline size_t -vn_sizeof_VkGeometryInstanceFlagBitsKHR(const VkGeometryInstanceFlagBitsKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkGeometryInstanceFlagBitsKHR(struct vn_cs_encoder *enc, const VkGeometryInstanceFlagBitsKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkGeometryInstanceFlagBitsKHR(struct vn_cs_decoder *dec, VkGeometryInstanceFlagBitsKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBuildAccelerationStructureFlagBitsKHR */ - -static inline size_t -vn_sizeof_VkBuildAccelerationStructureFlagBitsKHR(const VkBuildAccelerationStructureFlagBitsKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBuildAccelerationStructureFlagBitsKHR(struct vn_cs_encoder *enc, const VkBuildAccelerationStructureFlagBitsKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBuildAccelerationStructureFlagBitsKHR(struct vn_cs_decoder *dec, VkBuildAccelerationStructureFlagBitsKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAccelerationStructureCreateFlagBitsKHR */ - -static inline size_t -vn_sizeof_VkAccelerationStructureCreateFlagBitsKHR(const VkAccelerationStructureCreateFlagBitsKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAccelerationStructureCreateFlagBitsKHR(struct vn_cs_encoder *enc, const VkAccelerationStructureCreateFlagBitsKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAccelerationStructureCreateFlagBitsKHR(struct vn_cs_decoder *dec, VkAccelerationStructureCreateFlagBitsKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineCreationFeedbackFlagBits */ - -static inline size_t -vn_sizeof_VkPipelineCreationFeedbackFlagBits(const VkPipelineCreationFeedbackFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineCreationFeedbackFlagBits(struct vn_cs_encoder *enc, const VkPipelineCreationFeedbackFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineCreationFeedbackFlagBits(struct vn_cs_decoder *dec, VkPipelineCreationFeedbackFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSemaphoreWaitFlagBits */ - -static inline size_t -vn_sizeof_VkSemaphoreWaitFlagBits(const VkSemaphoreWaitFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSemaphoreWaitFlagBits(struct vn_cs_encoder *enc, const VkSemaphoreWaitFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSemaphoreWaitFlagBits(struct vn_cs_decoder *dec, VkSemaphoreWaitFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* typedef VkFlags64 VkAccessFlagBits2 */ - -static inline size_t -vn_sizeof_VkAccessFlagBits2(const VkAccessFlagBits2 *val) -{ - assert(sizeof(*val) == sizeof(uint64_t)); - return vn_sizeof_uint64_t((const uint64_t *)val); -} - -static inline void -vn_encode_VkAccessFlagBits2(struct vn_cs_encoder *enc, const VkAccessFlagBits2 *val) -{ - vn_encode_uint64_t(enc, (const uint64_t *)val); -} - -static inline void -vn_decode_VkAccessFlagBits2(struct vn_cs_decoder *dec, VkAccessFlagBits2 *val) -{ - vn_decode_uint64_t(dec, (uint64_t *)val); -} - -/* typedef VkFlags64 VkPipelineStageFlagBits2 */ - -static inline size_t -vn_sizeof_VkPipelineStageFlagBits2(const VkPipelineStageFlagBits2 *val) -{ - assert(sizeof(*val) == sizeof(uint64_t)); - return vn_sizeof_uint64_t((const uint64_t *)val); -} - -static inline void -vn_encode_VkPipelineStageFlagBits2(struct vn_cs_encoder *enc, const VkPipelineStageFlagBits2 *val) -{ - vn_encode_uint64_t(enc, (const uint64_t *)val); -} - -static inline void -vn_decode_VkPipelineStageFlagBits2(struct vn_cs_decoder *dec, VkPipelineStageFlagBits2 *val) -{ - vn_decode_uint64_t(dec, (uint64_t *)val); -} - -/* typedef VkFlags64 VkFormatFeatureFlagBits2 */ - -static inline size_t -vn_sizeof_VkFormatFeatureFlagBits2(const VkFormatFeatureFlagBits2 *val) -{ - assert(sizeof(*val) == sizeof(uint64_t)); - return vn_sizeof_uint64_t((const uint64_t *)val); -} - -static inline void -vn_encode_VkFormatFeatureFlagBits2(struct vn_cs_encoder *enc, const VkFormatFeatureFlagBits2 *val) -{ - vn_encode_uint64_t(enc, (const uint64_t *)val); -} - -static inline void -vn_decode_VkFormatFeatureFlagBits2(struct vn_cs_decoder *dec, VkFormatFeatureFlagBits2 *val) -{ - vn_decode_uint64_t(dec, (uint64_t *)val); -} - -/* enum VkRenderingFlagBits */ - -static inline size_t -vn_sizeof_VkRenderingFlagBits(const VkRenderingFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkRenderingFlagBits(struct vn_cs_encoder *enc, const VkRenderingFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkRenderingFlagBits(struct vn_cs_decoder *dec, VkRenderingFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* typedef VkFlags64 VkPipelineCreateFlagBits2 */ - -static inline size_t -vn_sizeof_VkPipelineCreateFlagBits2(const VkPipelineCreateFlagBits2 *val) -{ - assert(sizeof(*val) == sizeof(uint64_t)); - return vn_sizeof_uint64_t((const uint64_t *)val); -} - -static inline void -vn_encode_VkPipelineCreateFlagBits2(struct vn_cs_encoder *enc, const VkPipelineCreateFlagBits2 *val) -{ - vn_encode_uint64_t(enc, (const uint64_t *)val); -} - -static inline void -vn_decode_VkPipelineCreateFlagBits2(struct vn_cs_decoder *dec, VkPipelineCreateFlagBits2 *val) -{ - vn_decode_uint64_t(dec, (uint64_t *)val); -} - -/* typedef VkFlags64 VkBufferUsageFlagBits2 */ - -static inline size_t -vn_sizeof_VkBufferUsageFlagBits2(const VkBufferUsageFlagBits2 *val) -{ - assert(sizeof(*val) == sizeof(uint64_t)); - return vn_sizeof_uint64_t((const uint64_t *)val); -} - -static inline void -vn_encode_VkBufferUsageFlagBits2(struct vn_cs_encoder *enc, const VkBufferUsageFlagBits2 *val) -{ - vn_encode_uint64_t(enc, (const uint64_t *)val); -} - -static inline void -vn_decode_VkBufferUsageFlagBits2(struct vn_cs_decoder *dec, VkBufferUsageFlagBits2 *val) -{ - vn_decode_uint64_t(dec, (uint64_t *)val); -} - -/* typedef VkFlags64 VkTensorViewCreateFlagBitsARM */ - -static inline size_t -vn_sizeof_VkTensorViewCreateFlagBitsARM(const VkTensorViewCreateFlagBitsARM *val) -{ - assert(sizeof(*val) == sizeof(uint64_t)); - return vn_sizeof_uint64_t((const uint64_t *)val); -} - -static inline void -vn_encode_VkTensorViewCreateFlagBitsARM(struct vn_cs_encoder *enc, const VkTensorViewCreateFlagBitsARM *val) -{ - vn_encode_uint64_t(enc, (const uint64_t *)val); -} - -static inline void -vn_decode_VkTensorViewCreateFlagBitsARM(struct vn_cs_decoder *dec, VkTensorViewCreateFlagBitsARM *val) -{ - vn_decode_uint64_t(dec, (uint64_t *)val); -} - -/* enum VkSpirvResourceTypeFlagBitsEXT */ - -static inline size_t -vn_sizeof_VkSpirvResourceTypeFlagBitsEXT(const VkSpirvResourceTypeFlagBitsEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSpirvResourceTypeFlagBitsEXT(struct vn_cs_encoder *enc, const VkSpirvResourceTypeFlagBitsEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSpirvResourceTypeFlagBitsEXT(struct vn_cs_decoder *dec, VkSpirvResourceTypeFlagBitsEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPeerMemoryFeatureFlagBits */ - -static inline size_t -vn_sizeof_VkPeerMemoryFeatureFlagBits(const VkPeerMemoryFeatureFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPeerMemoryFeatureFlagBits(struct vn_cs_encoder *enc, const VkPeerMemoryFeatureFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPeerMemoryFeatureFlagBits(struct vn_cs_decoder *dec, VkPeerMemoryFeatureFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkMemoryAllocateFlagBits */ - -static inline size_t -vn_sizeof_VkMemoryAllocateFlagBits(const VkMemoryAllocateFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkMemoryAllocateFlagBits(struct vn_cs_encoder *enc, const VkMemoryAllocateFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkMemoryAllocateFlagBits(struct vn_cs_decoder *dec, VkMemoryAllocateFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkExternalMemoryHandleTypeFlagBits */ - -static inline size_t -vn_sizeof_VkExternalMemoryHandleTypeFlagBits(const VkExternalMemoryHandleTypeFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkExternalMemoryHandleTypeFlagBits(struct vn_cs_encoder *enc, const VkExternalMemoryHandleTypeFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkExternalMemoryHandleTypeFlagBits(struct vn_cs_decoder *dec, VkExternalMemoryHandleTypeFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkExternalMemoryFeatureFlagBits */ - -static inline size_t -vn_sizeof_VkExternalMemoryFeatureFlagBits(const VkExternalMemoryFeatureFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkExternalMemoryFeatureFlagBits(struct vn_cs_encoder *enc, const VkExternalMemoryFeatureFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkExternalMemoryFeatureFlagBits(struct vn_cs_decoder *dec, VkExternalMemoryFeatureFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkExternalSemaphoreHandleTypeFlagBits */ - -static inline size_t -vn_sizeof_VkExternalSemaphoreHandleTypeFlagBits(const VkExternalSemaphoreHandleTypeFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkExternalSemaphoreHandleTypeFlagBits(struct vn_cs_encoder *enc, const VkExternalSemaphoreHandleTypeFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkExternalSemaphoreHandleTypeFlagBits(struct vn_cs_decoder *dec, VkExternalSemaphoreHandleTypeFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkExternalSemaphoreFeatureFlagBits */ - -static inline size_t -vn_sizeof_VkExternalSemaphoreFeatureFlagBits(const VkExternalSemaphoreFeatureFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkExternalSemaphoreFeatureFlagBits(struct vn_cs_encoder *enc, const VkExternalSemaphoreFeatureFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkExternalSemaphoreFeatureFlagBits(struct vn_cs_decoder *dec, VkExternalSemaphoreFeatureFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSemaphoreImportFlagBits */ - -static inline size_t -vn_sizeof_VkSemaphoreImportFlagBits(const VkSemaphoreImportFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSemaphoreImportFlagBits(struct vn_cs_encoder *enc, const VkSemaphoreImportFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSemaphoreImportFlagBits(struct vn_cs_decoder *dec, VkSemaphoreImportFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkExternalFenceHandleTypeFlagBits */ - -static inline size_t -vn_sizeof_VkExternalFenceHandleTypeFlagBits(const VkExternalFenceHandleTypeFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkExternalFenceHandleTypeFlagBits(struct vn_cs_encoder *enc, const VkExternalFenceHandleTypeFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkExternalFenceHandleTypeFlagBits(struct vn_cs_decoder *dec, VkExternalFenceHandleTypeFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkExternalFenceFeatureFlagBits */ - -static inline size_t -vn_sizeof_VkExternalFenceFeatureFlagBits(const VkExternalFenceFeatureFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkExternalFenceFeatureFlagBits(struct vn_cs_encoder *enc, const VkExternalFenceFeatureFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkExternalFenceFeatureFlagBits(struct vn_cs_decoder *dec, VkExternalFenceFeatureFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkFenceImportFlagBits */ - -static inline size_t -vn_sizeof_VkFenceImportFlagBits(const VkFenceImportFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFenceImportFlagBits(struct vn_cs_encoder *enc, const VkFenceImportFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFenceImportFlagBits(struct vn_cs_decoder *dec, VkFenceImportFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDescriptorBindingFlagBits */ - -static inline size_t -vn_sizeof_VkDescriptorBindingFlagBits(const VkDescriptorBindingFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorBindingFlagBits(struct vn_cs_encoder *enc, const VkDescriptorBindingFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDescriptorBindingFlagBits(struct vn_cs_decoder *dec, VkDescriptorBindingFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkConditionalRenderingFlagBitsEXT */ - -static inline size_t -vn_sizeof_VkConditionalRenderingFlagBitsEXT(const VkConditionalRenderingFlagBitsEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkConditionalRenderingFlagBitsEXT(struct vn_cs_encoder *enc, const VkConditionalRenderingFlagBitsEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkConditionalRenderingFlagBitsEXT(struct vn_cs_decoder *dec, VkConditionalRenderingFlagBitsEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkResolveModeFlagBits */ - -static inline size_t -vn_sizeof_VkResolveModeFlagBits(const VkResolveModeFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkResolveModeFlagBits(struct vn_cs_encoder *enc, const VkResolveModeFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkResolveModeFlagBits(struct vn_cs_decoder *dec, VkResolveModeFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkToolPurposeFlagBits */ - -static inline size_t -vn_sizeof_VkToolPurposeFlagBits(const VkToolPurposeFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkToolPurposeFlagBits(struct vn_cs_encoder *enc, const VkToolPurposeFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkToolPurposeFlagBits(struct vn_cs_decoder *dec, VkToolPurposeFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSubmitFlagBits */ - -static inline size_t -vn_sizeof_VkSubmitFlagBits(const VkSubmitFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSubmitFlagBits(struct vn_cs_encoder *enc, const VkSubmitFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSubmitFlagBits(struct vn_cs_decoder *dec, VkSubmitFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkHostImageCopyFlagBits */ - -static inline size_t -vn_sizeof_VkHostImageCopyFlagBits(const VkHostImageCopyFlagBits *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkHostImageCopyFlagBits(struct vn_cs_encoder *enc, const VkHostImageCopyFlagBits *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkHostImageCopyFlagBits(struct vn_cs_decoder *dec, VkHostImageCopyFlagBits *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkGraphicsPipelineLibraryFlagBitsEXT */ - -static inline size_t -vn_sizeof_VkGraphicsPipelineLibraryFlagBitsEXT(const VkGraphicsPipelineLibraryFlagBitsEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkGraphicsPipelineLibraryFlagBitsEXT(struct vn_cs_encoder *enc, const VkGraphicsPipelineLibraryFlagBitsEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkGraphicsPipelineLibraryFlagBitsEXT(struct vn_cs_decoder *dec, VkGraphicsPipelineLibraryFlagBitsEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAttachmentLoadOp */ - -static inline size_t -vn_sizeof_VkAttachmentLoadOp(const VkAttachmentLoadOp *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAttachmentLoadOp(struct vn_cs_encoder *enc, const VkAttachmentLoadOp *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAttachmentLoadOp(struct vn_cs_decoder *dec, VkAttachmentLoadOp *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAttachmentStoreOp */ - -static inline size_t -vn_sizeof_VkAttachmentStoreOp(const VkAttachmentStoreOp *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAttachmentStoreOp(struct vn_cs_encoder *enc, const VkAttachmentStoreOp *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAttachmentStoreOp(struct vn_cs_decoder *dec, VkAttachmentStoreOp *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBlendFactor */ - -static inline size_t -vn_sizeof_VkBlendFactor(const VkBlendFactor *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBlendFactor(struct vn_cs_encoder *enc, const VkBlendFactor *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBlendFactor(struct vn_cs_decoder *dec, VkBlendFactor *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBlendOp */ - -static inline size_t -vn_sizeof_VkBlendOp(const VkBlendOp *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBlendOp(struct vn_cs_encoder *enc, const VkBlendOp *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBlendOp(struct vn_cs_decoder *dec, VkBlendOp *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBorderColor */ - -static inline size_t -vn_sizeof_VkBorderColor(const VkBorderColor *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBorderColor(struct vn_cs_encoder *enc, const VkBorderColor *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBorderColor(struct vn_cs_decoder *dec, VkBorderColor *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineCacheHeaderVersion */ - -static inline size_t -vn_sizeof_VkPipelineCacheHeaderVersion(const VkPipelineCacheHeaderVersion *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineCacheHeaderVersion(struct vn_cs_encoder *enc, const VkPipelineCacheHeaderVersion *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineCacheHeaderVersion(struct vn_cs_decoder *dec, VkPipelineCacheHeaderVersion *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkComponentSwizzle */ - -static inline size_t -vn_sizeof_VkComponentSwizzle(const VkComponentSwizzle *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkComponentSwizzle(struct vn_cs_encoder *enc, const VkComponentSwizzle *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkComponentSwizzle(struct vn_cs_decoder *dec, VkComponentSwizzle *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandBufferLevel */ - -static inline size_t -vn_sizeof_VkCommandBufferLevel(const VkCommandBufferLevel *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandBufferLevel(struct vn_cs_encoder *enc, const VkCommandBufferLevel *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandBufferLevel(struct vn_cs_decoder *dec, VkCommandBufferLevel *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCompareOp */ - -static inline size_t -vn_sizeof_VkCompareOp(const VkCompareOp *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCompareOp(struct vn_cs_encoder *enc, const VkCompareOp *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCompareOp(struct vn_cs_decoder *dec, VkCompareOp *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDescriptorType */ - -static inline size_t -vn_sizeof_VkDescriptorType(const VkDescriptorType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorType(struct vn_cs_encoder *enc, const VkDescriptorType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDescriptorType(struct vn_cs_decoder *dec, VkDescriptorType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorType_array(struct vn_cs_encoder *enc, const VkDescriptorType *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkDescriptorType_array(struct vn_cs_decoder *dec, VkDescriptorType *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkDynamicState */ - -static inline size_t -vn_sizeof_VkDynamicState(const VkDynamicState *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDynamicState(struct vn_cs_encoder *enc, const VkDynamicState *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDynamicState(struct vn_cs_decoder *dec, VkDynamicState *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkDynamicState_array(struct vn_cs_encoder *enc, const VkDynamicState *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkDynamicState_array(struct vn_cs_decoder *dec, VkDynamicState *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkPolygonMode */ - -static inline size_t -vn_sizeof_VkPolygonMode(const VkPolygonMode *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPolygonMode(struct vn_cs_encoder *enc, const VkPolygonMode *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPolygonMode(struct vn_cs_decoder *dec, VkPolygonMode *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkFormat */ - -static inline size_t -vn_sizeof_VkFormat(const VkFormat *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFormat(struct vn_cs_encoder *enc, const VkFormat *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFormat(struct vn_cs_decoder *dec, VkFormat *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkFormat_array(struct vn_cs_encoder *enc, const VkFormat *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkFormat_array(struct vn_cs_decoder *dec, VkFormat *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkFrontFace */ - -static inline size_t -vn_sizeof_VkFrontFace(const VkFrontFace *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFrontFace(struct vn_cs_encoder *enc, const VkFrontFace *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFrontFace(struct vn_cs_decoder *dec, VkFrontFace *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkImageLayout */ - -static inline size_t -vn_sizeof_VkImageLayout(const VkImageLayout *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageLayout(struct vn_cs_encoder *enc, const VkImageLayout *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageLayout(struct vn_cs_decoder *dec, VkImageLayout *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkImageLayout_array(struct vn_cs_encoder *enc, const VkImageLayout *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkImageLayout_array(struct vn_cs_decoder *dec, VkImageLayout *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkImageTiling */ - -static inline size_t -vn_sizeof_VkImageTiling(const VkImageTiling *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageTiling(struct vn_cs_encoder *enc, const VkImageTiling *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageTiling(struct vn_cs_decoder *dec, VkImageTiling *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkImageType */ - -static inline size_t -vn_sizeof_VkImageType(const VkImageType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageType(struct vn_cs_encoder *enc, const VkImageType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageType(struct vn_cs_decoder *dec, VkImageType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkImageViewType */ - -static inline size_t -vn_sizeof_VkImageViewType(const VkImageViewType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkImageViewType(struct vn_cs_encoder *enc, const VkImageViewType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkImageViewType(struct vn_cs_decoder *dec, VkImageViewType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSharingMode */ - -static inline size_t -vn_sizeof_VkSharingMode(const VkSharingMode *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSharingMode(struct vn_cs_encoder *enc, const VkSharingMode *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSharingMode(struct vn_cs_decoder *dec, VkSharingMode *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkIndexType */ - -static inline size_t -vn_sizeof_VkIndexType(const VkIndexType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkIndexType(struct vn_cs_encoder *enc, const VkIndexType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkIndexType(struct vn_cs_decoder *dec, VkIndexType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkIndexType_array(struct vn_cs_encoder *enc, const VkIndexType *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkIndexType_array(struct vn_cs_decoder *dec, VkIndexType *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkLogicOp */ - -static inline size_t -vn_sizeof_VkLogicOp(const VkLogicOp *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkLogicOp(struct vn_cs_encoder *enc, const VkLogicOp *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkLogicOp(struct vn_cs_decoder *dec, VkLogicOp *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPhysicalDeviceType */ - -static inline size_t -vn_sizeof_VkPhysicalDeviceType(const VkPhysicalDeviceType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPhysicalDeviceType(struct vn_cs_encoder *enc, const VkPhysicalDeviceType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPhysicalDeviceType(struct vn_cs_decoder *dec, VkPhysicalDeviceType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineBindPoint */ - -static inline size_t -vn_sizeof_VkPipelineBindPoint(const VkPipelineBindPoint *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineBindPoint(struct vn_cs_encoder *enc, const VkPipelineBindPoint *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineBindPoint(struct vn_cs_decoder *dec, VkPipelineBindPoint *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPrimitiveTopology */ - -static inline size_t -vn_sizeof_VkPrimitiveTopology(const VkPrimitiveTopology *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPrimitiveTopology(struct vn_cs_encoder *enc, const VkPrimitiveTopology *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPrimitiveTopology(struct vn_cs_decoder *dec, VkPrimitiveTopology *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueryType */ - -static inline size_t -vn_sizeof_VkQueryType(const VkQueryType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueryType(struct vn_cs_encoder *enc, const VkQueryType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueryType(struct vn_cs_decoder *dec, VkQueryType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSubpassContents */ - -static inline size_t -vn_sizeof_VkSubpassContents(const VkSubpassContents *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSubpassContents(struct vn_cs_encoder *enc, const VkSubpassContents *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSubpassContents(struct vn_cs_decoder *dec, VkSubpassContents *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkResult */ - -static inline size_t -vn_sizeof_VkResult(const VkResult *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkResult(struct vn_cs_encoder *enc, const VkResult *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkResult(struct vn_cs_decoder *dec, VkResult *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkResult_array(struct vn_cs_encoder *enc, const VkResult *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkResult_array(struct vn_cs_decoder *dec, VkResult *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkStencilOp */ - -static inline size_t -vn_sizeof_VkStencilOp(const VkStencilOp *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkStencilOp(struct vn_cs_encoder *enc, const VkStencilOp *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkStencilOp(struct vn_cs_decoder *dec, VkStencilOp *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSystemAllocationScope */ - -static inline size_t -vn_sizeof_VkSystemAllocationScope(const VkSystemAllocationScope *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSystemAllocationScope(struct vn_cs_encoder *enc, const VkSystemAllocationScope *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSystemAllocationScope(struct vn_cs_decoder *dec, VkSystemAllocationScope *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkInternalAllocationType */ - -static inline size_t -vn_sizeof_VkInternalAllocationType(const VkInternalAllocationType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkInternalAllocationType(struct vn_cs_encoder *enc, const VkInternalAllocationType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkInternalAllocationType(struct vn_cs_decoder *dec, VkInternalAllocationType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSamplerAddressMode */ - -static inline size_t -vn_sizeof_VkSamplerAddressMode(const VkSamplerAddressMode *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSamplerAddressMode(struct vn_cs_encoder *enc, const VkSamplerAddressMode *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSamplerAddressMode(struct vn_cs_decoder *dec, VkSamplerAddressMode *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkFilter */ - -static inline size_t -vn_sizeof_VkFilter(const VkFilter *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFilter(struct vn_cs_encoder *enc, const VkFilter *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFilter(struct vn_cs_decoder *dec, VkFilter *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSamplerMipmapMode */ - -static inline size_t -vn_sizeof_VkSamplerMipmapMode(const VkSamplerMipmapMode *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSamplerMipmapMode(struct vn_cs_encoder *enc, const VkSamplerMipmapMode *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSamplerMipmapMode(struct vn_cs_decoder *dec, VkSamplerMipmapMode *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkVertexInputRate */ - -static inline size_t -vn_sizeof_VkVertexInputRate(const VkVertexInputRate *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkVertexInputRate(struct vn_cs_encoder *enc, const VkVertexInputRate *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkVertexInputRate(struct vn_cs_decoder *dec, VkVertexInputRate *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkObjectType */ - -static inline size_t -vn_sizeof_VkObjectType(const VkObjectType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkObjectType(struct vn_cs_encoder *enc, const VkObjectType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkObjectType(struct vn_cs_decoder *dec, VkObjectType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkObjectType_array(struct vn_cs_encoder *enc, const VkObjectType *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkObjectType_array(struct vn_cs_decoder *dec, VkObjectType *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkDescriptorUpdateTemplateType */ - -static inline size_t -vn_sizeof_VkDescriptorUpdateTemplateType(const VkDescriptorUpdateTemplateType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorUpdateTemplateType(struct vn_cs_encoder *enc, const VkDescriptorUpdateTemplateType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDescriptorUpdateTemplateType(struct vn_cs_decoder *dec, VkDescriptorUpdateTemplateType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPointClippingBehavior */ - -static inline size_t -vn_sizeof_VkPointClippingBehavior(const VkPointClippingBehavior *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPointClippingBehavior(struct vn_cs_encoder *enc, const VkPointClippingBehavior *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPointClippingBehavior(struct vn_cs_decoder *dec, VkPointClippingBehavior *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkQueueGlobalPriority */ - -static inline size_t -vn_sizeof_VkQueueGlobalPriority(const VkQueueGlobalPriority *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkQueueGlobalPriority(struct vn_cs_encoder *enc, const VkQueueGlobalPriority *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkQueueGlobalPriority(struct vn_cs_decoder *dec, VkQueueGlobalPriority *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkQueueGlobalPriority_array(struct vn_cs_encoder *enc, const VkQueueGlobalPriority *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkQueueGlobalPriority_array(struct vn_cs_decoder *dec, VkQueueGlobalPriority *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkTimeDomainKHR */ - -static inline size_t -vn_sizeof_VkTimeDomainKHR(const VkTimeDomainKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkTimeDomainKHR(struct vn_cs_encoder *enc, const VkTimeDomainKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkTimeDomainKHR(struct vn_cs_decoder *dec, VkTimeDomainKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkTimeDomainKHR_array(struct vn_cs_encoder *enc, const VkTimeDomainKHR *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkTimeDomainKHR_array(struct vn_cs_decoder *dec, VkTimeDomainKHR *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkConservativeRasterizationModeEXT */ - -static inline size_t -vn_sizeof_VkConservativeRasterizationModeEXT(const VkConservativeRasterizationModeEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkConservativeRasterizationModeEXT(struct vn_cs_encoder *enc, const VkConservativeRasterizationModeEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkConservativeRasterizationModeEXT(struct vn_cs_decoder *dec, VkConservativeRasterizationModeEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSemaphoreType */ - -static inline size_t -vn_sizeof_VkSemaphoreType(const VkSemaphoreType *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSemaphoreType(struct vn_cs_encoder *enc, const VkSemaphoreType *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSemaphoreType(struct vn_cs_decoder *dec, VkSemaphoreType *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBuildAccelerationStructureModeKHR */ - -static inline size_t -vn_sizeof_VkBuildAccelerationStructureModeKHR(const VkBuildAccelerationStructureModeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBuildAccelerationStructureModeKHR(struct vn_cs_encoder *enc, const VkBuildAccelerationStructureModeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBuildAccelerationStructureModeKHR(struct vn_cs_decoder *dec, VkBuildAccelerationStructureModeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCopyAccelerationStructureModeKHR */ - -static inline size_t -vn_sizeof_VkCopyAccelerationStructureModeKHR(const VkCopyAccelerationStructureModeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCopyAccelerationStructureModeKHR(struct vn_cs_encoder *enc, const VkCopyAccelerationStructureModeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCopyAccelerationStructureModeKHR(struct vn_cs_decoder *dec, VkCopyAccelerationStructureModeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAccelerationStructureTypeKHR */ - -static inline size_t -vn_sizeof_VkAccelerationStructureTypeKHR(const VkAccelerationStructureTypeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAccelerationStructureTypeKHR(struct vn_cs_encoder *enc, const VkAccelerationStructureTypeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAccelerationStructureTypeKHR(struct vn_cs_decoder *dec, VkAccelerationStructureTypeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkGeometryTypeKHR */ - -static inline size_t -vn_sizeof_VkGeometryTypeKHR(const VkGeometryTypeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkGeometryTypeKHR(struct vn_cs_encoder *enc, const VkGeometryTypeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkGeometryTypeKHR(struct vn_cs_decoder *dec, VkGeometryTypeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkRayTracingShaderGroupTypeKHR */ - -static inline size_t -vn_sizeof_VkRayTracingShaderGroupTypeKHR(const VkRayTracingShaderGroupTypeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkRayTracingShaderGroupTypeKHR(struct vn_cs_encoder *enc, const VkRayTracingShaderGroupTypeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkRayTracingShaderGroupTypeKHR(struct vn_cs_decoder *dec, VkRayTracingShaderGroupTypeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAccelerationStructureBuildTypeKHR */ - -static inline size_t -vn_sizeof_VkAccelerationStructureBuildTypeKHR(const VkAccelerationStructureBuildTypeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAccelerationStructureBuildTypeKHR(struct vn_cs_encoder *enc, const VkAccelerationStructureBuildTypeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAccelerationStructureBuildTypeKHR(struct vn_cs_decoder *dec, VkAccelerationStructureBuildTypeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkAccelerationStructureCompatibilityKHR */ - -static inline size_t -vn_sizeof_VkAccelerationStructureCompatibilityKHR(const VkAccelerationStructureCompatibilityKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkAccelerationStructureCompatibilityKHR(struct vn_cs_encoder *enc, const VkAccelerationStructureCompatibilityKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkAccelerationStructureCompatibilityKHR(struct vn_cs_decoder *dec, VkAccelerationStructureCompatibilityKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkAccelerationStructureCompatibilityKHR_array(struct vn_cs_encoder *enc, const VkAccelerationStructureCompatibilityKHR *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkAccelerationStructureCompatibilityKHR_array(struct vn_cs_decoder *dec, VkAccelerationStructureCompatibilityKHR *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkShaderGroupShaderKHR */ - -static inline size_t -vn_sizeof_VkShaderGroupShaderKHR(const VkShaderGroupShaderKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkShaderGroupShaderKHR(struct vn_cs_encoder *enc, const VkShaderGroupShaderKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkShaderGroupShaderKHR(struct vn_cs_decoder *dec, VkShaderGroupShaderKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkLineRasterizationMode */ - -static inline size_t -vn_sizeof_VkLineRasterizationMode(const VkLineRasterizationMode *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkLineRasterizationMode(struct vn_cs_encoder *enc, const VkLineRasterizationMode *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkLineRasterizationMode(struct vn_cs_decoder *dec, VkLineRasterizationMode *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkProvokingVertexModeEXT */ - -static inline size_t -vn_sizeof_VkProvokingVertexModeEXT(const VkProvokingVertexModeEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkProvokingVertexModeEXT(struct vn_cs_encoder *enc, const VkProvokingVertexModeEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkProvokingVertexModeEXT(struct vn_cs_decoder *dec, VkProvokingVertexModeEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineRobustnessBufferBehavior */ - -static inline size_t -vn_sizeof_VkPipelineRobustnessBufferBehavior(const VkPipelineRobustnessBufferBehavior *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineRobustnessBufferBehavior(struct vn_cs_encoder *enc, const VkPipelineRobustnessBufferBehavior *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineRobustnessBufferBehavior(struct vn_cs_decoder *dec, VkPipelineRobustnessBufferBehavior *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkPipelineRobustnessImageBehavior */ - -static inline size_t -vn_sizeof_VkPipelineRobustnessImageBehavior(const VkPipelineRobustnessImageBehavior *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkPipelineRobustnessImageBehavior(struct vn_cs_encoder *enc, const VkPipelineRobustnessImageBehavior *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkPipelineRobustnessImageBehavior(struct vn_cs_decoder *dec, VkPipelineRobustnessImageBehavior *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDepthBiasRepresentationEXT */ - -static inline size_t -vn_sizeof_VkDepthBiasRepresentationEXT(const VkDepthBiasRepresentationEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDepthBiasRepresentationEXT(struct vn_cs_encoder *enc, const VkDepthBiasRepresentationEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDepthBiasRepresentationEXT(struct vn_cs_decoder *dec, VkDepthBiasRepresentationEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkScopeKHR */ - -static inline size_t -vn_sizeof_VkScopeKHR(const VkScopeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkScopeKHR(struct vn_cs_encoder *enc, const VkScopeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkScopeKHR(struct vn_cs_decoder *dec, VkScopeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkComponentTypeKHR */ - -static inline size_t -vn_sizeof_VkComponentTypeKHR(const VkComponentTypeKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkComponentTypeKHR(struct vn_cs_encoder *enc, const VkComponentTypeKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkComponentTypeKHR(struct vn_cs_decoder *dec, VkComponentTypeKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDepthClampModeEXT */ - -static inline size_t -vn_sizeof_VkDepthClampModeEXT(const VkDepthClampModeEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDepthClampModeEXT(struct vn_cs_encoder *enc, const VkDepthClampModeEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDepthClampModeEXT(struct vn_cs_decoder *dec, VkDepthClampModeEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDescriptorMappingSourceEXT */ - -static inline size_t -vn_sizeof_VkDescriptorMappingSourceEXT(const VkDescriptorMappingSourceEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDescriptorMappingSourceEXT(struct vn_cs_encoder *enc, const VkDescriptorMappingSourceEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDescriptorMappingSourceEXT(struct vn_cs_decoder *dec, VkDescriptorMappingSourceEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkTessellationDomainOrigin */ - -static inline size_t -vn_sizeof_VkTessellationDomainOrigin(const VkTessellationDomainOrigin *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkTessellationDomainOrigin(struct vn_cs_encoder *enc, const VkTessellationDomainOrigin *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkTessellationDomainOrigin(struct vn_cs_decoder *dec, VkTessellationDomainOrigin *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSamplerYcbcrModelConversion */ - -static inline size_t -vn_sizeof_VkSamplerYcbcrModelConversion(const VkSamplerYcbcrModelConversion *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSamplerYcbcrModelConversion(struct vn_cs_encoder *enc, const VkSamplerYcbcrModelConversion *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSamplerYcbcrModelConversion(struct vn_cs_decoder *dec, VkSamplerYcbcrModelConversion *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSamplerYcbcrRange */ - -static inline size_t -vn_sizeof_VkSamplerYcbcrRange(const VkSamplerYcbcrRange *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSamplerYcbcrRange(struct vn_cs_encoder *enc, const VkSamplerYcbcrRange *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSamplerYcbcrRange(struct vn_cs_decoder *dec, VkSamplerYcbcrRange *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkChromaLocation */ - -static inline size_t -vn_sizeof_VkChromaLocation(const VkChromaLocation *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkChromaLocation(struct vn_cs_encoder *enc, const VkChromaLocation *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkChromaLocation(struct vn_cs_decoder *dec, VkChromaLocation *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkSamplerReductionMode */ - -static inline size_t -vn_sizeof_VkSamplerReductionMode(const VkSamplerReductionMode *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkSamplerReductionMode(struct vn_cs_encoder *enc, const VkSamplerReductionMode *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkSamplerReductionMode(struct vn_cs_decoder *dec, VkSamplerReductionMode *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkBlendOverlapEXT */ - -static inline size_t -vn_sizeof_VkBlendOverlapEXT(const VkBlendOverlapEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkBlendOverlapEXT(struct vn_cs_encoder *enc, const VkBlendOverlapEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkBlendOverlapEXT(struct vn_cs_decoder *dec, VkBlendOverlapEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkShaderFloatControlsIndependence */ - -static inline size_t -vn_sizeof_VkShaderFloatControlsIndependence(const VkShaderFloatControlsIndependence *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkShaderFloatControlsIndependence(struct vn_cs_encoder *enc, const VkShaderFloatControlsIndependence *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkShaderFloatControlsIndependence(struct vn_cs_decoder *dec, VkShaderFloatControlsIndependence *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkFragmentShadingRateCombinerOpKHR */ - -static inline size_t -vn_sizeof_VkFragmentShadingRateCombinerOpKHR(const VkFragmentShadingRateCombinerOpKHR *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkFragmentShadingRateCombinerOpKHR(struct vn_cs_encoder *enc, const VkFragmentShadingRateCombinerOpKHR *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkFragmentShadingRateCombinerOpKHR(struct vn_cs_decoder *dec, VkFragmentShadingRateCombinerOpKHR *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -static inline void -vn_encode_VkFragmentShadingRateCombinerOpKHR_array(struct vn_cs_encoder *enc, const VkFragmentShadingRateCombinerOpKHR *val, uint32_t count) -{ - vn_encode_int32_t_array(enc, (const int32_t *)val, count); -} - -static inline void -vn_decode_VkFragmentShadingRateCombinerOpKHR_array(struct vn_cs_decoder *dec, VkFragmentShadingRateCombinerOpKHR *val, uint32_t count) -{ - vn_decode_int32_t_array(dec, (int32_t *)val, count); -} - -/* enum VkVendorId */ - -static inline size_t -vn_sizeof_VkVendorId(const VkVendorId *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkVendorId(struct vn_cs_encoder *enc, const VkVendorId *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkVendorId(struct vn_cs_decoder *dec, VkVendorId *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkDriverId */ - -static inline size_t -vn_sizeof_VkDriverId(const VkDriverId *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkDriverId(struct vn_cs_encoder *enc, const VkDriverId *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkDriverId(struct vn_cs_decoder *dec, VkDriverId *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandFlagBitsEXT */ - -static inline size_t -vn_sizeof_VkCommandFlagBitsEXT(const VkCommandFlagBitsEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandFlagBitsEXT(struct vn_cs_encoder *enc, const VkCommandFlagBitsEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandFlagBitsEXT(struct vn_cs_decoder *dec, VkCommandFlagBitsEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkCommandTypeEXT */ - -static inline size_t -vn_sizeof_VkCommandTypeEXT(const VkCommandTypeEXT *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkCommandTypeEXT(struct vn_cs_encoder *enc, const VkCommandTypeEXT *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkCommandTypeEXT(struct vn_cs_decoder *dec, VkCommandTypeEXT *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -/* enum VkRingStatusFlagBitsMESA */ - -static inline size_t -vn_sizeof_VkRingStatusFlagBitsMESA(const VkRingStatusFlagBitsMESA *val) -{ - assert(sizeof(*val) == sizeof(int32_t)); - return vn_sizeof_int32_t((const int32_t *)val); -} - -static inline void -vn_encode_VkRingStatusFlagBitsMESA(struct vn_cs_encoder *enc, const VkRingStatusFlagBitsMESA *val) -{ - vn_encode_int32_t(enc, (const int32_t *)val); -} - -static inline void -vn_decode_VkRingStatusFlagBitsMESA(struct vn_cs_decoder *dec, VkRingStatusFlagBitsMESA *val) -{ - vn_decode_int32_t(dec, (int32_t *)val); -} - -#pragma GCC diagnostic pop - -#endif /* VN_PROTOCOL_RENDERER_TYPES_H */ diff --git a/src/venus/venus-protocol/vn_protocol_renderer_util.h b/src/venus/venus-protocol/vn_protocol_renderer_util.h deleted file mode 100644 index 5a99fb37..00000000 --- a/src/venus/venus-protocol/vn_protocol_renderer_util.h +++ /dev/null @@ -1,1174 +0,0 @@ -/* This file is generated by venus-protocol. See vn_protocol_renderer.h. */ - -/* - * Copyright 2022 Google LLC - * Copyright 2022 Collabora Ltd. - * SPDX-License-Identifier: MIT - */ - -#ifndef VN_PROTOCOL_RENDERER_UTIL_H -#define VN_PROTOCOL_RENDERER_UTIL_H - -#include "vn_protocol_renderer_info.h" - -struct vn_global_proc_table { - PFN_vkCreateInstance CreateInstance; - PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties; - PFN_vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties; - PFN_vkEnumerateInstanceVersion EnumerateInstanceVersion; -}; - -struct vn_instance_proc_table { - PFN_vkDestroyInstance DestroyInstance; - PFN_vkEnumeratePhysicalDeviceGroups EnumeratePhysicalDeviceGroups; - PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices; -}; - -struct vn_physical_device_proc_table { - PFN_vkCreateDevice CreateDevice; - PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties; - PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties; - PFN_vkGetDeviceProcAddr GetDeviceProcAddr; - PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR GetPhysicalDeviceCalibrateableTimeDomainsKHR; - PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR GetPhysicalDeviceCooperativeMatrixPropertiesKHR; - PFN_vkGetPhysicalDeviceDescriptorSizeEXT GetPhysicalDeviceDescriptorSizeEXT; - PFN_vkGetPhysicalDeviceExternalBufferProperties GetPhysicalDeviceExternalBufferProperties; - PFN_vkGetPhysicalDeviceExternalFenceProperties GetPhysicalDeviceExternalFenceProperties; - PFN_vkGetPhysicalDeviceExternalSemaphoreProperties GetPhysicalDeviceExternalSemaphoreProperties; - PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures; - PFN_vkGetPhysicalDeviceFeatures2 GetPhysicalDeviceFeatures2; - PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties; - PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysicalDeviceFormatProperties2; - PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR GetPhysicalDeviceFragmentShadingRatesKHR; - PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties; - PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysicalDeviceImageFormatProperties2; - PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; - PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysicalDeviceMemoryProperties2; - PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT; - PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties; - PFN_vkGetPhysicalDeviceProperties2 GetPhysicalDeviceProperties2; - PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysicalDeviceQueueFamilyProperties2; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysicalDeviceSparseImageFormatProperties2; - PFN_vkGetPhysicalDeviceToolProperties GetPhysicalDeviceToolProperties; -}; - -struct vn_device_proc_table { - PFN_vkAllocateCommandBuffers AllocateCommandBuffers; - PFN_vkAllocateDescriptorSets AllocateDescriptorSets; - PFN_vkAllocateMemory AllocateMemory; - PFN_vkBeginCommandBuffer BeginCommandBuffer; - PFN_vkBindBufferMemory BindBufferMemory; - PFN_vkBindBufferMemory2 BindBufferMemory2; - PFN_vkBindImageMemory BindImageMemory; - PFN_vkBindImageMemory2 BindImageMemory2; - PFN_vkBuildAccelerationStructuresKHR BuildAccelerationStructuresKHR; - PFN_vkCmdBeginConditionalRenderingEXT CmdBeginConditionalRenderingEXT; - PFN_vkCmdBeginQuery CmdBeginQuery; - PFN_vkCmdBeginQueryIndexedEXT CmdBeginQueryIndexedEXT; - PFN_vkCmdBeginRenderPass CmdBeginRenderPass; - PFN_vkCmdBeginRenderPass2 CmdBeginRenderPass2; - PFN_vkCmdBeginRendering CmdBeginRendering; - PFN_vkCmdBeginTransformFeedbackEXT CmdBeginTransformFeedbackEXT; - PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets; - PFN_vkCmdBindDescriptorSets2 CmdBindDescriptorSets2; - PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer; - PFN_vkCmdBindIndexBuffer2 CmdBindIndexBuffer2; - PFN_vkCmdBindPipeline CmdBindPipeline; - PFN_vkCmdBindResourceHeapEXT CmdBindResourceHeapEXT; - PFN_vkCmdBindSamplerHeapEXT CmdBindSamplerHeapEXT; - PFN_vkCmdBindTransformFeedbackBuffersEXT CmdBindTransformFeedbackBuffersEXT; - PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers; - PFN_vkCmdBindVertexBuffers2 CmdBindVertexBuffers2; - PFN_vkCmdBlitImage CmdBlitImage; - PFN_vkCmdBlitImage2 CmdBlitImage2; - PFN_vkCmdBuildAccelerationStructuresIndirectKHR CmdBuildAccelerationStructuresIndirectKHR; - PFN_vkCmdBuildAccelerationStructuresKHR CmdBuildAccelerationStructuresKHR; - PFN_vkCmdClearAttachments CmdClearAttachments; - PFN_vkCmdClearColorImage CmdClearColorImage; - PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage; - PFN_vkCmdCopyAccelerationStructureKHR CmdCopyAccelerationStructureKHR; - PFN_vkCmdCopyAccelerationStructureToMemoryKHR CmdCopyAccelerationStructureToMemoryKHR; - PFN_vkCmdCopyBuffer CmdCopyBuffer; - PFN_vkCmdCopyBuffer2 CmdCopyBuffer2; - PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage; - PFN_vkCmdCopyBufferToImage2 CmdCopyBufferToImage2; - PFN_vkCmdCopyImage CmdCopyImage; - PFN_vkCmdCopyImage2 CmdCopyImage2; - PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer; - PFN_vkCmdCopyImageToBuffer2 CmdCopyImageToBuffer2; - PFN_vkCmdCopyMemoryToAccelerationStructureKHR CmdCopyMemoryToAccelerationStructureKHR; - PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults; - PFN_vkCmdDispatch CmdDispatch; - PFN_vkCmdDispatchBase CmdDispatchBase; - PFN_vkCmdDispatchIndirect CmdDispatchIndirect; - PFN_vkCmdDraw CmdDraw; - PFN_vkCmdDrawIndexed CmdDrawIndexed; - PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect; - PFN_vkCmdDrawIndexedIndirectCount CmdDrawIndexedIndirectCount; - PFN_vkCmdDrawIndirect CmdDrawIndirect; - PFN_vkCmdDrawIndirectByteCountEXT CmdDrawIndirectByteCountEXT; - PFN_vkCmdDrawIndirectCount CmdDrawIndirectCount; - PFN_vkCmdDrawMeshTasksEXT CmdDrawMeshTasksEXT; - PFN_vkCmdDrawMeshTasksIndirectCountEXT CmdDrawMeshTasksIndirectCountEXT; - PFN_vkCmdDrawMeshTasksIndirectEXT CmdDrawMeshTasksIndirectEXT; - PFN_vkCmdDrawMultiEXT CmdDrawMultiEXT; - PFN_vkCmdDrawMultiIndexedEXT CmdDrawMultiIndexedEXT; - PFN_vkCmdEndConditionalRenderingEXT CmdEndConditionalRenderingEXT; - PFN_vkCmdEndQuery CmdEndQuery; - PFN_vkCmdEndQueryIndexedEXT CmdEndQueryIndexedEXT; - PFN_vkCmdEndRenderPass CmdEndRenderPass; - PFN_vkCmdEndRenderPass2 CmdEndRenderPass2; - PFN_vkCmdEndRendering CmdEndRendering; - PFN_vkCmdEndTransformFeedbackEXT CmdEndTransformFeedbackEXT; - PFN_vkCmdExecuteCommands CmdExecuteCommands; - PFN_vkCmdFillBuffer CmdFillBuffer; - PFN_vkCmdNextSubpass CmdNextSubpass; - PFN_vkCmdNextSubpass2 CmdNextSubpass2; - PFN_vkCmdPipelineBarrier CmdPipelineBarrier; - PFN_vkCmdPipelineBarrier2 CmdPipelineBarrier2; - PFN_vkCmdPushConstants CmdPushConstants; - PFN_vkCmdPushConstants2 CmdPushConstants2; - PFN_vkCmdPushDataEXT CmdPushDataEXT; - PFN_vkCmdPushDescriptorSet CmdPushDescriptorSet; - PFN_vkCmdPushDescriptorSet2 CmdPushDescriptorSet2; - PFN_vkCmdPushDescriptorSetWithTemplate CmdPushDescriptorSetWithTemplate; - PFN_vkCmdPushDescriptorSetWithTemplate2 CmdPushDescriptorSetWithTemplate2; - PFN_vkCmdResetEvent CmdResetEvent; - PFN_vkCmdResetEvent2 CmdResetEvent2; - PFN_vkCmdResetQueryPool CmdResetQueryPool; - PFN_vkCmdResolveImage CmdResolveImage; - PFN_vkCmdResolveImage2 CmdResolveImage2; - PFN_vkCmdSetAlphaToCoverageEnableEXT CmdSetAlphaToCoverageEnableEXT; - PFN_vkCmdSetAlphaToOneEnableEXT CmdSetAlphaToOneEnableEXT; - PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT CmdSetAttachmentFeedbackLoopEnableEXT; - PFN_vkCmdSetBlendConstants CmdSetBlendConstants; - PFN_vkCmdSetColorBlendAdvancedEXT CmdSetColorBlendAdvancedEXT; - PFN_vkCmdSetColorBlendEnableEXT CmdSetColorBlendEnableEXT; - PFN_vkCmdSetColorBlendEquationEXT CmdSetColorBlendEquationEXT; - PFN_vkCmdSetColorWriteEnableEXT CmdSetColorWriteEnableEXT; - PFN_vkCmdSetColorWriteMaskEXT CmdSetColorWriteMaskEXT; - PFN_vkCmdSetConservativeRasterizationModeEXT CmdSetConservativeRasterizationModeEXT; - PFN_vkCmdSetCullMode CmdSetCullMode; - PFN_vkCmdSetDepthBias CmdSetDepthBias; - PFN_vkCmdSetDepthBias2EXT CmdSetDepthBias2EXT; - PFN_vkCmdSetDepthBiasEnable CmdSetDepthBiasEnable; - PFN_vkCmdSetDepthBounds CmdSetDepthBounds; - PFN_vkCmdSetDepthBoundsTestEnable CmdSetDepthBoundsTestEnable; - PFN_vkCmdSetDepthClampEnableEXT CmdSetDepthClampEnableEXT; - PFN_vkCmdSetDepthClampRangeEXT CmdSetDepthClampRangeEXT; - PFN_vkCmdSetDepthClipEnableEXT CmdSetDepthClipEnableEXT; - PFN_vkCmdSetDepthClipNegativeOneToOneEXT CmdSetDepthClipNegativeOneToOneEXT; - PFN_vkCmdSetDepthCompareOp CmdSetDepthCompareOp; - PFN_vkCmdSetDepthTestEnable CmdSetDepthTestEnable; - PFN_vkCmdSetDepthWriteEnable CmdSetDepthWriteEnable; - PFN_vkCmdSetDeviceMask CmdSetDeviceMask; - PFN_vkCmdSetEvent CmdSetEvent; - PFN_vkCmdSetEvent2 CmdSetEvent2; - PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT CmdSetExtraPrimitiveOverestimationSizeEXT; - PFN_vkCmdSetFragmentShadingRateKHR CmdSetFragmentShadingRateKHR; - PFN_vkCmdSetFrontFace CmdSetFrontFace; - PFN_vkCmdSetLineRasterizationModeEXT CmdSetLineRasterizationModeEXT; - PFN_vkCmdSetLineStipple CmdSetLineStipple; - PFN_vkCmdSetLineStippleEnableEXT CmdSetLineStippleEnableEXT; - PFN_vkCmdSetLineWidth CmdSetLineWidth; - PFN_vkCmdSetLogicOpEXT CmdSetLogicOpEXT; - PFN_vkCmdSetLogicOpEnableEXT CmdSetLogicOpEnableEXT; - PFN_vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT; - PFN_vkCmdSetPolygonModeEXT CmdSetPolygonModeEXT; - PFN_vkCmdSetPrimitiveRestartEnable CmdSetPrimitiveRestartEnable; - PFN_vkCmdSetPrimitiveTopology CmdSetPrimitiveTopology; - PFN_vkCmdSetProvokingVertexModeEXT CmdSetProvokingVertexModeEXT; - PFN_vkCmdSetRasterizationSamplesEXT CmdSetRasterizationSamplesEXT; - PFN_vkCmdSetRasterizationStreamEXT CmdSetRasterizationStreamEXT; - PFN_vkCmdSetRasterizerDiscardEnable CmdSetRasterizerDiscardEnable; - PFN_vkCmdSetRayTracingPipelineStackSizeKHR CmdSetRayTracingPipelineStackSizeKHR; - PFN_vkCmdSetRenderingAttachmentLocations CmdSetRenderingAttachmentLocations; - PFN_vkCmdSetRenderingInputAttachmentIndices CmdSetRenderingInputAttachmentIndices; - PFN_vkCmdSetSampleLocationsEXT CmdSetSampleLocationsEXT; - PFN_vkCmdSetSampleLocationsEnableEXT CmdSetSampleLocationsEnableEXT; - PFN_vkCmdSetSampleMaskEXT CmdSetSampleMaskEXT; - PFN_vkCmdSetScissor CmdSetScissor; - PFN_vkCmdSetScissorWithCount CmdSetScissorWithCount; - PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask; - PFN_vkCmdSetStencilOp CmdSetStencilOp; - PFN_vkCmdSetStencilReference CmdSetStencilReference; - PFN_vkCmdSetStencilTestEnable CmdSetStencilTestEnable; - PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask; - PFN_vkCmdSetTessellationDomainOriginEXT CmdSetTessellationDomainOriginEXT; - PFN_vkCmdSetVertexInputEXT CmdSetVertexInputEXT; - PFN_vkCmdSetViewport CmdSetViewport; - PFN_vkCmdSetViewportWithCount CmdSetViewportWithCount; - PFN_vkCmdTraceRaysIndirect2KHR CmdTraceRaysIndirect2KHR; - PFN_vkCmdTraceRaysIndirectKHR CmdTraceRaysIndirectKHR; - PFN_vkCmdTraceRaysKHR CmdTraceRaysKHR; - PFN_vkCmdUpdateBuffer CmdUpdateBuffer; - PFN_vkCmdWaitEvents CmdWaitEvents; - PFN_vkCmdWaitEvents2 CmdWaitEvents2; - PFN_vkCmdWriteAccelerationStructuresPropertiesKHR CmdWriteAccelerationStructuresPropertiesKHR; - PFN_vkCmdWriteTimestamp CmdWriteTimestamp; - PFN_vkCmdWriteTimestamp2 CmdWriteTimestamp2; - PFN_vkCopyAccelerationStructureKHR CopyAccelerationStructureKHR; - PFN_vkCopyAccelerationStructureToMemoryKHR CopyAccelerationStructureToMemoryKHR; - PFN_vkCopyImageToImage CopyImageToImage; - PFN_vkCopyImageToMemory CopyImageToMemory; - PFN_vkCopyMemoryToAccelerationStructureKHR CopyMemoryToAccelerationStructureKHR; - PFN_vkCopyMemoryToImage CopyMemoryToImage; - PFN_vkCreateAccelerationStructureKHR CreateAccelerationStructureKHR; - PFN_vkCreateBuffer CreateBuffer; - PFN_vkCreateBufferView CreateBufferView; - PFN_vkCreateCommandPool CreateCommandPool; - PFN_vkCreateComputePipelines CreateComputePipelines; - PFN_vkCreateDeferredOperationKHR CreateDeferredOperationKHR; - PFN_vkCreateDescriptorPool CreateDescriptorPool; - PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout; - PFN_vkCreateDescriptorUpdateTemplate CreateDescriptorUpdateTemplate; - PFN_vkCreateEvent CreateEvent; - PFN_vkCreateFence CreateFence; - PFN_vkCreateFramebuffer CreateFramebuffer; - PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines; - PFN_vkCreateImage CreateImage; - PFN_vkCreateImageView CreateImageView; - PFN_vkCreatePipelineCache CreatePipelineCache; - PFN_vkCreatePipelineLayout CreatePipelineLayout; - PFN_vkCreatePrivateDataSlot CreatePrivateDataSlot; - PFN_vkCreateQueryPool CreateQueryPool; - PFN_vkCreateRayTracingPipelinesKHR CreateRayTracingPipelinesKHR; - PFN_vkCreateRenderPass CreateRenderPass; - PFN_vkCreateRenderPass2 CreateRenderPass2; - PFN_vkCreateSampler CreateSampler; - PFN_vkCreateSamplerYcbcrConversion CreateSamplerYcbcrConversion; - PFN_vkCreateSemaphore CreateSemaphore; - PFN_vkCreateShaderModule CreateShaderModule; - PFN_vkDeferredOperationJoinKHR DeferredOperationJoinKHR; - PFN_vkDestroyAccelerationStructureKHR DestroyAccelerationStructureKHR; - PFN_vkDestroyBuffer DestroyBuffer; - PFN_vkDestroyBufferView DestroyBufferView; - PFN_vkDestroyCommandPool DestroyCommandPool; - PFN_vkDestroyDeferredOperationKHR DestroyDeferredOperationKHR; - PFN_vkDestroyDescriptorPool DestroyDescriptorPool; - PFN_vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout; - PFN_vkDestroyDescriptorUpdateTemplate DestroyDescriptorUpdateTemplate; - PFN_vkDestroyDevice DestroyDevice; - PFN_vkDestroyEvent DestroyEvent; - PFN_vkDestroyFence DestroyFence; - PFN_vkDestroyFramebuffer DestroyFramebuffer; - PFN_vkDestroyImage DestroyImage; - PFN_vkDestroyImageView DestroyImageView; - PFN_vkDestroyPipeline DestroyPipeline; - PFN_vkDestroyPipelineCache DestroyPipelineCache; - PFN_vkDestroyPipelineLayout DestroyPipelineLayout; - PFN_vkDestroyPrivateDataSlot DestroyPrivateDataSlot; - PFN_vkDestroyQueryPool DestroyQueryPool; - PFN_vkDestroyRenderPass DestroyRenderPass; - PFN_vkDestroySampler DestroySampler; - PFN_vkDestroySamplerYcbcrConversion DestroySamplerYcbcrConversion; - PFN_vkDestroySemaphore DestroySemaphore; - PFN_vkDestroyShaderModule DestroyShaderModule; - PFN_vkDeviceWaitIdle DeviceWaitIdle; - PFN_vkEndCommandBuffer EndCommandBuffer; - PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges; - PFN_vkFreeCommandBuffers FreeCommandBuffers; - PFN_vkFreeDescriptorSets FreeDescriptorSets; - PFN_vkFreeMemory FreeMemory; - PFN_vkGetAccelerationStructureBuildSizesKHR GetAccelerationStructureBuildSizesKHR; - PFN_vkGetAccelerationStructureDeviceAddressKHR GetAccelerationStructureDeviceAddressKHR; - PFN_vkGetBufferDeviceAddress GetBufferDeviceAddress; - PFN_vkGetBufferMemoryRequirements GetBufferMemoryRequirements; - PFN_vkGetBufferMemoryRequirements2 GetBufferMemoryRequirements2; - PFN_vkGetBufferOpaqueCaptureAddress GetBufferOpaqueCaptureAddress; - PFN_vkGetCalibratedTimestampsKHR GetCalibratedTimestampsKHR; - PFN_vkGetDeferredOperationMaxConcurrencyKHR GetDeferredOperationMaxConcurrencyKHR; - PFN_vkGetDeferredOperationResultKHR GetDeferredOperationResultKHR; - PFN_vkGetDescriptorSetLayoutSupport GetDescriptorSetLayoutSupport; - PFN_vkGetDeviceAccelerationStructureCompatibilityKHR GetDeviceAccelerationStructureCompatibilityKHR; - PFN_vkGetDeviceBufferMemoryRequirements GetDeviceBufferMemoryRequirements; - PFN_vkGetDeviceGroupPeerMemoryFeatures GetDeviceGroupPeerMemoryFeatures; - PFN_vkGetDeviceImageMemoryRequirements GetDeviceImageMemoryRequirements; - PFN_vkGetDeviceImageSparseMemoryRequirements GetDeviceImageSparseMemoryRequirements; - PFN_vkGetDeviceImageSubresourceLayout GetDeviceImageSubresourceLayout; - PFN_vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment; - PFN_vkGetDeviceMemoryOpaqueCaptureAddress GetDeviceMemoryOpaqueCaptureAddress; - PFN_vkGetDeviceQueue GetDeviceQueue; - PFN_vkGetDeviceQueue2 GetDeviceQueue2; - PFN_vkGetEventStatus GetEventStatus; - PFN_vkGetFenceFdKHR GetFenceFdKHR; - PFN_vkGetFenceStatus GetFenceStatus; - PFN_vkGetImageDrmFormatModifierPropertiesEXT GetImageDrmFormatModifierPropertiesEXT; - PFN_vkGetImageMemoryRequirements GetImageMemoryRequirements; - PFN_vkGetImageMemoryRequirements2 GetImageMemoryRequirements2; - PFN_vkGetImageOpaqueCaptureDataEXT GetImageOpaqueCaptureDataEXT; - PFN_vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements; - PFN_vkGetImageSparseMemoryRequirements2 GetImageSparseMemoryRequirements2; - PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout; - PFN_vkGetImageSubresourceLayout2 GetImageSubresourceLayout2; - PFN_vkGetMemoryFdKHR GetMemoryFdKHR; - PFN_vkGetMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR; - PFN_vkGetPipelineCacheData GetPipelineCacheData; - PFN_vkGetPrivateData GetPrivateData; - PFN_vkGetQueryPoolResults GetQueryPoolResults; - PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR GetRayTracingCaptureReplayShaderGroupHandlesKHR; - PFN_vkGetRayTracingShaderGroupHandlesKHR GetRayTracingShaderGroupHandlesKHR; - PFN_vkGetRayTracingShaderGroupStackSizeKHR GetRayTracingShaderGroupStackSizeKHR; - PFN_vkGetRenderAreaGranularity GetRenderAreaGranularity; - PFN_vkGetRenderingAreaGranularity GetRenderingAreaGranularity; - PFN_vkGetSemaphoreCounterValue GetSemaphoreCounterValue; - PFN_vkGetSemaphoreFdKHR GetSemaphoreFdKHR; - PFN_vkImportFenceFdKHR ImportFenceFdKHR; - PFN_vkImportSemaphoreFdKHR ImportSemaphoreFdKHR; - PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges; - PFN_vkMapMemory MapMemory; - PFN_vkMapMemory2 MapMemory2; - PFN_vkMergePipelineCaches MergePipelineCaches; - PFN_vkQueueBindSparse QueueBindSparse; - PFN_vkQueueSubmit QueueSubmit; - PFN_vkQueueSubmit2 QueueSubmit2; - PFN_vkQueueWaitIdle QueueWaitIdle; - PFN_vkRegisterCustomBorderColorEXT RegisterCustomBorderColorEXT; - PFN_vkResetCommandBuffer ResetCommandBuffer; - PFN_vkResetCommandPool ResetCommandPool; - PFN_vkResetDescriptorPool ResetDescriptorPool; - PFN_vkResetEvent ResetEvent; - PFN_vkResetFences ResetFences; - PFN_vkResetQueryPool ResetQueryPool; - PFN_vkSetEvent SetEvent; - PFN_vkSetPrivateData SetPrivateData; - PFN_vkSignalSemaphore SignalSemaphore; - PFN_vkTransitionImageLayout TransitionImageLayout; - PFN_vkTrimCommandPool TrimCommandPool; - PFN_vkUnmapMemory UnmapMemory; - PFN_vkUnmapMemory2 UnmapMemory2; - PFN_vkUnregisterCustomBorderColorEXT UnregisterCustomBorderColorEXT; - PFN_vkUpdateDescriptorSetWithTemplate UpdateDescriptorSetWithTemplate; - PFN_vkUpdateDescriptorSets UpdateDescriptorSets; - PFN_vkWaitForFences WaitForFences; - PFN_vkWaitSemaphores WaitSemaphores; - PFN_vkWriteAccelerationStructuresPropertiesKHR WriteAccelerationStructuresPropertiesKHR; - PFN_vkWriteResourceDescriptorsEXT WriteResourceDescriptorsEXT; - PFN_vkWriteSamplerDescriptorsEXT WriteSamplerDescriptorsEXT; -}; - -static inline void -vn_util_init_global_proc_table(PFN_vkGetInstanceProcAddr get_proc_addr, - struct vn_global_proc_table *proc_table) -{ -#define VN_GIPA(cmd) (PFN_ ## cmd)get_proc_addr(VK_NULL_HANDLE, #cmd) - proc_table->CreateInstance = VN_GIPA(vkCreateInstance); - proc_table->EnumerateInstanceExtensionProperties = VN_GIPA(vkEnumerateInstanceExtensionProperties); - proc_table->EnumerateInstanceLayerProperties = VN_GIPA(vkEnumerateInstanceLayerProperties); - proc_table->EnumerateInstanceVersion = VN_GIPA(vkEnumerateInstanceVersion); -#undef VN_GIPA -} - -static inline void -vn_util_init_instance_proc_table(VkInstance instance, - PFN_vkGetInstanceProcAddr get_proc_addr, - struct vn_instance_proc_table *proc_table) -{ -#define VN_GIPA(instance, cmd) (PFN_ ## cmd)get_proc_addr(instance, #cmd) - proc_table->DestroyInstance = VN_GIPA(instance, vkDestroyInstance); - proc_table->EnumeratePhysicalDeviceGroups = VN_GIPA(instance, vkEnumeratePhysicalDeviceGroups); - if (!proc_table->EnumeratePhysicalDeviceGroups) - proc_table->EnumeratePhysicalDeviceGroups = VN_GIPA(instance, vkEnumeratePhysicalDeviceGroupsKHR); - proc_table->EnumeratePhysicalDevices = VN_GIPA(instance, vkEnumeratePhysicalDevices); -#undef VN_GIPA -} - -static inline void -vn_util_init_physical_device_proc_table(VkInstance instance, - PFN_vkGetInstanceProcAddr get_proc_addr, - struct vn_physical_device_proc_table *proc_table) -{ -#define VN_GIPA(instance, cmd) (PFN_ ## cmd)get_proc_addr(instance, #cmd) - proc_table->CreateDevice = VN_GIPA(instance, vkCreateDevice); - proc_table->EnumerateDeviceExtensionProperties = VN_GIPA(instance, vkEnumerateDeviceExtensionProperties); - proc_table->EnumerateDeviceLayerProperties = VN_GIPA(instance, vkEnumerateDeviceLayerProperties); - proc_table->GetDeviceProcAddr = VN_GIPA(instance, vkGetDeviceProcAddr); - proc_table->GetPhysicalDeviceCalibrateableTimeDomainsKHR = VN_GIPA(instance, vkGetPhysicalDeviceCalibrateableTimeDomainsKHR); - if (!proc_table->GetPhysicalDeviceCalibrateableTimeDomainsKHR) - proc_table->GetPhysicalDeviceCalibrateableTimeDomainsKHR = VN_GIPA(instance, vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); - proc_table->GetPhysicalDeviceCooperativeMatrixPropertiesKHR = VN_GIPA(instance, vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR); - proc_table->GetPhysicalDeviceDescriptorSizeEXT = VN_GIPA(instance, vkGetPhysicalDeviceDescriptorSizeEXT); - proc_table->GetPhysicalDeviceExternalBufferProperties = VN_GIPA(instance, vkGetPhysicalDeviceExternalBufferProperties); - if (!proc_table->GetPhysicalDeviceExternalBufferProperties) - proc_table->GetPhysicalDeviceExternalBufferProperties = VN_GIPA(instance, vkGetPhysicalDeviceExternalBufferPropertiesKHR); - proc_table->GetPhysicalDeviceExternalFenceProperties = VN_GIPA(instance, vkGetPhysicalDeviceExternalFenceProperties); - if (!proc_table->GetPhysicalDeviceExternalFenceProperties) - proc_table->GetPhysicalDeviceExternalFenceProperties = VN_GIPA(instance, vkGetPhysicalDeviceExternalFencePropertiesKHR); - proc_table->GetPhysicalDeviceExternalSemaphoreProperties = VN_GIPA(instance, vkGetPhysicalDeviceExternalSemaphoreProperties); - if (!proc_table->GetPhysicalDeviceExternalSemaphoreProperties) - proc_table->GetPhysicalDeviceExternalSemaphoreProperties = VN_GIPA(instance, vkGetPhysicalDeviceExternalSemaphorePropertiesKHR); - proc_table->GetPhysicalDeviceFeatures = VN_GIPA(instance, vkGetPhysicalDeviceFeatures); - proc_table->GetPhysicalDeviceFeatures2 = VN_GIPA(instance, vkGetPhysicalDeviceFeatures2); - if (!proc_table->GetPhysicalDeviceFeatures2) - proc_table->GetPhysicalDeviceFeatures2 = VN_GIPA(instance, vkGetPhysicalDeviceFeatures2KHR); - proc_table->GetPhysicalDeviceFormatProperties = VN_GIPA(instance, vkGetPhysicalDeviceFormatProperties); - proc_table->GetPhysicalDeviceFormatProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceFormatProperties2); - if (!proc_table->GetPhysicalDeviceFormatProperties2) - proc_table->GetPhysicalDeviceFormatProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceFormatProperties2KHR); - proc_table->GetPhysicalDeviceFragmentShadingRatesKHR = VN_GIPA(instance, vkGetPhysicalDeviceFragmentShadingRatesKHR); - proc_table->GetPhysicalDeviceImageFormatProperties = VN_GIPA(instance, vkGetPhysicalDeviceImageFormatProperties); - proc_table->GetPhysicalDeviceImageFormatProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceImageFormatProperties2); - if (!proc_table->GetPhysicalDeviceImageFormatProperties2) - proc_table->GetPhysicalDeviceImageFormatProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceImageFormatProperties2KHR); - proc_table->GetPhysicalDeviceMemoryProperties = VN_GIPA(instance, vkGetPhysicalDeviceMemoryProperties); - proc_table->GetPhysicalDeviceMemoryProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceMemoryProperties2); - if (!proc_table->GetPhysicalDeviceMemoryProperties2) - proc_table->GetPhysicalDeviceMemoryProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceMemoryProperties2KHR); - proc_table->GetPhysicalDeviceMultisamplePropertiesEXT = VN_GIPA(instance, vkGetPhysicalDeviceMultisamplePropertiesEXT); - proc_table->GetPhysicalDeviceProperties = VN_GIPA(instance, vkGetPhysicalDeviceProperties); - proc_table->GetPhysicalDeviceProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceProperties2); - if (!proc_table->GetPhysicalDeviceProperties2) - proc_table->GetPhysicalDeviceProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceProperties2KHR); - proc_table->GetPhysicalDeviceQueueFamilyProperties = VN_GIPA(instance, vkGetPhysicalDeviceQueueFamilyProperties); - proc_table->GetPhysicalDeviceQueueFamilyProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceQueueFamilyProperties2); - if (!proc_table->GetPhysicalDeviceQueueFamilyProperties2) - proc_table->GetPhysicalDeviceQueueFamilyProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceQueueFamilyProperties2KHR); - proc_table->GetPhysicalDeviceSparseImageFormatProperties = VN_GIPA(instance, vkGetPhysicalDeviceSparseImageFormatProperties); - proc_table->GetPhysicalDeviceSparseImageFormatProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceSparseImageFormatProperties2); - if (!proc_table->GetPhysicalDeviceSparseImageFormatProperties2) - proc_table->GetPhysicalDeviceSparseImageFormatProperties2 = VN_GIPA(instance, vkGetPhysicalDeviceSparseImageFormatProperties2KHR); - proc_table->GetPhysicalDeviceToolProperties = VN_GIPA(instance, vkGetPhysicalDeviceToolProperties); - if (!proc_table->GetPhysicalDeviceToolProperties) - proc_table->GetPhysicalDeviceToolProperties = VN_GIPA(instance, vkGetPhysicalDeviceToolPropertiesEXT); -#undef VN_GIPA -} - - -static inline void -vn_util_init_device_proc_table(VkDevice dev, - PFN_vkGetDeviceProcAddr get_proc_addr, - uint32_t api_version, - const struct vn_info_extension_table *ext_table, - struct vn_device_proc_table *proc_table) -{ -#define VN_GDPA(dev, cmd) (PFN_ ## cmd)get_proc_addr(dev, #cmd) - proc_table->AllocateCommandBuffers = VN_GDPA(dev, vkAllocateCommandBuffers); - proc_table->AllocateDescriptorSets = VN_GDPA(dev, vkAllocateDescriptorSets); - proc_table->AllocateMemory = VN_GDPA(dev, vkAllocateMemory); - proc_table->BeginCommandBuffer = VN_GDPA(dev, vkBeginCommandBuffer); - proc_table->BindBufferMemory = VN_GDPA(dev, vkBindBufferMemory); - proc_table->BindBufferMemory2 = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkBindBufferMemory2) : - ext_table->KHR_bind_memory2 ? VN_GDPA(dev, vkBindBufferMemory2KHR) : - NULL; - proc_table->BindImageMemory = VN_GDPA(dev, vkBindImageMemory); - proc_table->BindImageMemory2 = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkBindImageMemory2) : - ext_table->KHR_bind_memory2 ? VN_GDPA(dev, vkBindImageMemory2KHR) : - NULL; - proc_table->BuildAccelerationStructuresKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkBuildAccelerationStructuresKHR) : - NULL; - proc_table->CmdBeginConditionalRenderingEXT = - ext_table->EXT_conditional_rendering ? VN_GDPA(dev, vkCmdBeginConditionalRenderingEXT) : - NULL; - proc_table->CmdBeginQuery = VN_GDPA(dev, vkCmdBeginQuery); - proc_table->CmdBeginQueryIndexedEXT = - ext_table->EXT_transform_feedback ? VN_GDPA(dev, vkCmdBeginQueryIndexedEXT) : - NULL; - proc_table->CmdBeginRenderPass = VN_GDPA(dev, vkCmdBeginRenderPass); - proc_table->CmdBeginRenderPass2 = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkCmdBeginRenderPass2) : - ext_table->KHR_create_renderpass2 ? VN_GDPA(dev, vkCmdBeginRenderPass2KHR) : - NULL; - proc_table->CmdBeginRendering = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdBeginRendering) : - ext_table->KHR_dynamic_rendering ? VN_GDPA(dev, vkCmdBeginRenderingKHR) : - NULL; - proc_table->CmdBeginTransformFeedbackEXT = - ext_table->EXT_transform_feedback ? VN_GDPA(dev, vkCmdBeginTransformFeedbackEXT) : - NULL; - proc_table->CmdBindDescriptorSets = VN_GDPA(dev, vkCmdBindDescriptorSets); - proc_table->CmdBindDescriptorSets2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdBindDescriptorSets2) : - ext_table->KHR_maintenance6 ? VN_GDPA(dev, vkCmdBindDescriptorSets2KHR) : - NULL; - proc_table->CmdBindIndexBuffer = VN_GDPA(dev, vkCmdBindIndexBuffer); - proc_table->CmdBindIndexBuffer2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdBindIndexBuffer2) : - ext_table->KHR_maintenance5 ? VN_GDPA(dev, vkCmdBindIndexBuffer2KHR) : - NULL; - proc_table->CmdBindPipeline = VN_GDPA(dev, vkCmdBindPipeline); - proc_table->CmdBindResourceHeapEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkCmdBindResourceHeapEXT) : - NULL; - proc_table->CmdBindSamplerHeapEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkCmdBindSamplerHeapEXT) : - NULL; - proc_table->CmdBindTransformFeedbackBuffersEXT = - ext_table->EXT_transform_feedback ? VN_GDPA(dev, vkCmdBindTransformFeedbackBuffersEXT) : - NULL; - proc_table->CmdBindVertexBuffers = VN_GDPA(dev, vkCmdBindVertexBuffers); - proc_table->CmdBindVertexBuffers2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdBindVertexBuffers2) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdBindVertexBuffers2EXT) : - NULL; - proc_table->CmdBlitImage = VN_GDPA(dev, vkCmdBlitImage); - proc_table->CmdBlitImage2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdBlitImage2) : - ext_table->KHR_copy_commands2 ? VN_GDPA(dev, vkCmdBlitImage2KHR) : - NULL; - proc_table->CmdBuildAccelerationStructuresIndirectKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCmdBuildAccelerationStructuresIndirectKHR) : - NULL; - proc_table->CmdBuildAccelerationStructuresKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCmdBuildAccelerationStructuresKHR) : - NULL; - proc_table->CmdClearAttachments = VN_GDPA(dev, vkCmdClearAttachments); - proc_table->CmdClearColorImage = VN_GDPA(dev, vkCmdClearColorImage); - proc_table->CmdClearDepthStencilImage = VN_GDPA(dev, vkCmdClearDepthStencilImage); - proc_table->CmdCopyAccelerationStructureKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCmdCopyAccelerationStructureKHR) : - NULL; - proc_table->CmdCopyAccelerationStructureToMemoryKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCmdCopyAccelerationStructureToMemoryKHR) : - NULL; - proc_table->CmdCopyBuffer = VN_GDPA(dev, vkCmdCopyBuffer); - proc_table->CmdCopyBuffer2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdCopyBuffer2) : - ext_table->KHR_copy_commands2 ? VN_GDPA(dev, vkCmdCopyBuffer2KHR) : - NULL; - proc_table->CmdCopyBufferToImage = VN_GDPA(dev, vkCmdCopyBufferToImage); - proc_table->CmdCopyBufferToImage2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdCopyBufferToImage2) : - ext_table->KHR_copy_commands2 ? VN_GDPA(dev, vkCmdCopyBufferToImage2KHR) : - NULL; - proc_table->CmdCopyImage = VN_GDPA(dev, vkCmdCopyImage); - proc_table->CmdCopyImage2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdCopyImage2) : - ext_table->KHR_copy_commands2 ? VN_GDPA(dev, vkCmdCopyImage2KHR) : - NULL; - proc_table->CmdCopyImageToBuffer = VN_GDPA(dev, vkCmdCopyImageToBuffer); - proc_table->CmdCopyImageToBuffer2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdCopyImageToBuffer2) : - ext_table->KHR_copy_commands2 ? VN_GDPA(dev, vkCmdCopyImageToBuffer2KHR) : - NULL; - proc_table->CmdCopyMemoryToAccelerationStructureKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCmdCopyMemoryToAccelerationStructureKHR) : - NULL; - proc_table->CmdCopyQueryPoolResults = VN_GDPA(dev, vkCmdCopyQueryPoolResults); - proc_table->CmdDispatch = VN_GDPA(dev, vkCmdDispatch); - proc_table->CmdDispatchBase = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkCmdDispatchBase) : - ext_table->KHR_device_group ? VN_GDPA(dev, vkCmdDispatchBaseKHR) : - NULL; - proc_table->CmdDispatchIndirect = VN_GDPA(dev, vkCmdDispatchIndirect); - proc_table->CmdDraw = VN_GDPA(dev, vkCmdDraw); - proc_table->CmdDrawIndexed = VN_GDPA(dev, vkCmdDrawIndexed); - proc_table->CmdDrawIndexedIndirect = VN_GDPA(dev, vkCmdDrawIndexedIndirect); - proc_table->CmdDrawIndexedIndirectCount = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkCmdDrawIndexedIndirectCount) : - ext_table->KHR_draw_indirect_count ? VN_GDPA(dev, vkCmdDrawIndexedIndirectCountKHR) : - NULL; - proc_table->CmdDrawIndirect = VN_GDPA(dev, vkCmdDrawIndirect); - proc_table->CmdDrawIndirectByteCountEXT = - ext_table->EXT_transform_feedback ? VN_GDPA(dev, vkCmdDrawIndirectByteCountEXT) : - NULL; - proc_table->CmdDrawIndirectCount = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkCmdDrawIndirectCount) : - ext_table->KHR_draw_indirect_count ? VN_GDPA(dev, vkCmdDrawIndirectCountKHR) : - NULL; - proc_table->CmdDrawMeshTasksEXT = - ext_table->EXT_mesh_shader ? VN_GDPA(dev, vkCmdDrawMeshTasksEXT) : - NULL; - proc_table->CmdDrawMeshTasksIndirectCountEXT = - ext_table->EXT_mesh_shader ? VN_GDPA(dev, vkCmdDrawMeshTasksIndirectCountEXT) : - NULL; - proc_table->CmdDrawMeshTasksIndirectEXT = - ext_table->EXT_mesh_shader ? VN_GDPA(dev, vkCmdDrawMeshTasksIndirectEXT) : - NULL; - proc_table->CmdDrawMultiEXT = - ext_table->EXT_multi_draw ? VN_GDPA(dev, vkCmdDrawMultiEXT) : - NULL; - proc_table->CmdDrawMultiIndexedEXT = - ext_table->EXT_multi_draw ? VN_GDPA(dev, vkCmdDrawMultiIndexedEXT) : - NULL; - proc_table->CmdEndConditionalRenderingEXT = - ext_table->EXT_conditional_rendering ? VN_GDPA(dev, vkCmdEndConditionalRenderingEXT) : - NULL; - proc_table->CmdEndQuery = VN_GDPA(dev, vkCmdEndQuery); - proc_table->CmdEndQueryIndexedEXT = - ext_table->EXT_transform_feedback ? VN_GDPA(dev, vkCmdEndQueryIndexedEXT) : - NULL; - proc_table->CmdEndRenderPass = VN_GDPA(dev, vkCmdEndRenderPass); - proc_table->CmdEndRenderPass2 = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkCmdEndRenderPass2) : - ext_table->KHR_create_renderpass2 ? VN_GDPA(dev, vkCmdEndRenderPass2KHR) : - NULL; - proc_table->CmdEndRendering = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdEndRendering) : - ext_table->KHR_dynamic_rendering ? VN_GDPA(dev, vkCmdEndRenderingKHR) : - NULL; - proc_table->CmdEndTransformFeedbackEXT = - ext_table->EXT_transform_feedback ? VN_GDPA(dev, vkCmdEndTransformFeedbackEXT) : - NULL; - proc_table->CmdExecuteCommands = VN_GDPA(dev, vkCmdExecuteCommands); - proc_table->CmdFillBuffer = VN_GDPA(dev, vkCmdFillBuffer); - proc_table->CmdNextSubpass = VN_GDPA(dev, vkCmdNextSubpass); - proc_table->CmdNextSubpass2 = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkCmdNextSubpass2) : - ext_table->KHR_create_renderpass2 ? VN_GDPA(dev, vkCmdNextSubpass2KHR) : - NULL; - proc_table->CmdPipelineBarrier = VN_GDPA(dev, vkCmdPipelineBarrier); - proc_table->CmdPipelineBarrier2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdPipelineBarrier2) : - ext_table->KHR_synchronization2 ? VN_GDPA(dev, vkCmdPipelineBarrier2KHR) : - NULL; - proc_table->CmdPushConstants = VN_GDPA(dev, vkCmdPushConstants); - proc_table->CmdPushConstants2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdPushConstants2) : - ext_table->KHR_maintenance6 ? VN_GDPA(dev, vkCmdPushConstants2KHR) : - NULL; - proc_table->CmdPushDataEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkCmdPushDataEXT) : - NULL; - proc_table->CmdPushDescriptorSet = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdPushDescriptorSet) : - ext_table->KHR_push_descriptor ? VN_GDPA(dev, vkCmdPushDescriptorSetKHR) : - NULL; - proc_table->CmdPushDescriptorSet2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdPushDescriptorSet2) : - ext_table->KHR_maintenance6 ? VN_GDPA(dev, vkCmdPushDescriptorSet2KHR) : - NULL; - proc_table->CmdPushDescriptorSetWithTemplate = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdPushDescriptorSetWithTemplate) : - ext_table->KHR_push_descriptor ? VN_GDPA(dev, vkCmdPushDescriptorSetWithTemplateKHR) : - ext_table->KHR_descriptor_update_template ? VN_GDPA(dev, vkCmdPushDescriptorSetWithTemplateKHR) : - NULL; - proc_table->CmdPushDescriptorSetWithTemplate2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdPushDescriptorSetWithTemplate2) : - ext_table->KHR_maintenance6 ? VN_GDPA(dev, vkCmdPushDescriptorSetWithTemplate2KHR) : - NULL; - proc_table->CmdResetEvent = VN_GDPA(dev, vkCmdResetEvent); - proc_table->CmdResetEvent2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdResetEvent2) : - ext_table->KHR_synchronization2 ? VN_GDPA(dev, vkCmdResetEvent2KHR) : - NULL; - proc_table->CmdResetQueryPool = VN_GDPA(dev, vkCmdResetQueryPool); - proc_table->CmdResolveImage = VN_GDPA(dev, vkCmdResolveImage); - proc_table->CmdResolveImage2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdResolveImage2) : - ext_table->KHR_copy_commands2 ? VN_GDPA(dev, vkCmdResolveImage2KHR) : - NULL; - proc_table->CmdSetAlphaToCoverageEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetAlphaToCoverageEnableEXT) : - NULL; - proc_table->CmdSetAlphaToOneEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetAlphaToOneEnableEXT) : - NULL; - proc_table->CmdSetAttachmentFeedbackLoopEnableEXT = - ext_table->EXT_attachment_feedback_loop_dynamic_state ? VN_GDPA(dev, vkCmdSetAttachmentFeedbackLoopEnableEXT) : - NULL; - proc_table->CmdSetBlendConstants = VN_GDPA(dev, vkCmdSetBlendConstants); - proc_table->CmdSetColorBlendAdvancedEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetColorBlendAdvancedEXT) : - NULL; - proc_table->CmdSetColorBlendEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetColorBlendEnableEXT) : - NULL; - proc_table->CmdSetColorBlendEquationEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetColorBlendEquationEXT) : - NULL; - proc_table->CmdSetColorWriteEnableEXT = - ext_table->EXT_color_write_enable ? VN_GDPA(dev, vkCmdSetColorWriteEnableEXT) : - NULL; - proc_table->CmdSetColorWriteMaskEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetColorWriteMaskEXT) : - NULL; - proc_table->CmdSetConservativeRasterizationModeEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetConservativeRasterizationModeEXT) : - NULL; - proc_table->CmdSetCullMode = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetCullMode) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetCullModeEXT) : - NULL; - proc_table->CmdSetDepthBias = VN_GDPA(dev, vkCmdSetDepthBias); - proc_table->CmdSetDepthBias2EXT = - ext_table->EXT_depth_bias_control ? VN_GDPA(dev, vkCmdSetDepthBias2EXT) : - NULL; - proc_table->CmdSetDepthBiasEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetDepthBiasEnable) : - ext_table->EXT_extended_dynamic_state2 ? VN_GDPA(dev, vkCmdSetDepthBiasEnableEXT) : - NULL; - proc_table->CmdSetDepthBounds = VN_GDPA(dev, vkCmdSetDepthBounds); - proc_table->CmdSetDepthBoundsTestEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetDepthBoundsTestEnable) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetDepthBoundsTestEnableEXT) : - NULL; - proc_table->CmdSetDepthClampEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetDepthClampEnableEXT) : - NULL; - proc_table->CmdSetDepthClampRangeEXT = - ext_table->EXT_depth_clamp_control ? VN_GDPA(dev, vkCmdSetDepthClampRangeEXT) : - NULL; - proc_table->CmdSetDepthClipEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetDepthClipEnableEXT) : - NULL; - proc_table->CmdSetDepthClipNegativeOneToOneEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetDepthClipNegativeOneToOneEXT) : - NULL; - proc_table->CmdSetDepthCompareOp = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetDepthCompareOp) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetDepthCompareOpEXT) : - NULL; - proc_table->CmdSetDepthTestEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetDepthTestEnable) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetDepthTestEnableEXT) : - NULL; - proc_table->CmdSetDepthWriteEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetDepthWriteEnable) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetDepthWriteEnableEXT) : - NULL; - proc_table->CmdSetDeviceMask = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkCmdSetDeviceMask) : - ext_table->KHR_device_group ? VN_GDPA(dev, vkCmdSetDeviceMaskKHR) : - NULL; - proc_table->CmdSetEvent = VN_GDPA(dev, vkCmdSetEvent); - proc_table->CmdSetEvent2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetEvent2) : - ext_table->KHR_synchronization2 ? VN_GDPA(dev, vkCmdSetEvent2KHR) : - NULL; - proc_table->CmdSetExtraPrimitiveOverestimationSizeEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetExtraPrimitiveOverestimationSizeEXT) : - NULL; - proc_table->CmdSetFragmentShadingRateKHR = - ext_table->KHR_fragment_shading_rate ? VN_GDPA(dev, vkCmdSetFragmentShadingRateKHR) : - NULL; - proc_table->CmdSetFrontFace = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetFrontFace) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetFrontFaceEXT) : - NULL; - proc_table->CmdSetLineRasterizationModeEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetLineRasterizationModeEXT) : - NULL; - proc_table->CmdSetLineStipple = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdSetLineStipple) : - ext_table->EXT_line_rasterization ? VN_GDPA(dev, vkCmdSetLineStippleEXT) : - ext_table->KHR_line_rasterization ? VN_GDPA(dev, vkCmdSetLineStippleKHR) : - NULL; - proc_table->CmdSetLineStippleEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetLineStippleEnableEXT) : - NULL; - proc_table->CmdSetLineWidth = VN_GDPA(dev, vkCmdSetLineWidth); - proc_table->CmdSetLogicOpEXT = - ext_table->EXT_extended_dynamic_state2 ? VN_GDPA(dev, vkCmdSetLogicOpEXT) : - NULL; - proc_table->CmdSetLogicOpEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetLogicOpEnableEXT) : - NULL; - proc_table->CmdSetPatchControlPointsEXT = - ext_table->EXT_extended_dynamic_state2 ? VN_GDPA(dev, vkCmdSetPatchControlPointsEXT) : - NULL; - proc_table->CmdSetPolygonModeEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetPolygonModeEXT) : - NULL; - proc_table->CmdSetPrimitiveRestartEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetPrimitiveRestartEnable) : - ext_table->EXT_extended_dynamic_state2 ? VN_GDPA(dev, vkCmdSetPrimitiveRestartEnableEXT) : - NULL; - proc_table->CmdSetPrimitiveTopology = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetPrimitiveTopology) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetPrimitiveTopologyEXT) : - NULL; - proc_table->CmdSetProvokingVertexModeEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetProvokingVertexModeEXT) : - NULL; - proc_table->CmdSetRasterizationSamplesEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetRasterizationSamplesEXT) : - NULL; - proc_table->CmdSetRasterizationStreamEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetRasterizationStreamEXT) : - NULL; - proc_table->CmdSetRasterizerDiscardEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetRasterizerDiscardEnable) : - ext_table->EXT_extended_dynamic_state2 ? VN_GDPA(dev, vkCmdSetRasterizerDiscardEnableEXT) : - NULL; - proc_table->CmdSetRayTracingPipelineStackSizeKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkCmdSetRayTracingPipelineStackSizeKHR) : - NULL; - proc_table->CmdSetRenderingAttachmentLocations = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdSetRenderingAttachmentLocations) : - ext_table->KHR_dynamic_rendering_local_read ? VN_GDPA(dev, vkCmdSetRenderingAttachmentLocationsKHR) : - NULL; - proc_table->CmdSetRenderingInputAttachmentIndices = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCmdSetRenderingInputAttachmentIndices) : - ext_table->KHR_dynamic_rendering_local_read ? VN_GDPA(dev, vkCmdSetRenderingInputAttachmentIndicesKHR) : - NULL; - proc_table->CmdSetSampleLocationsEXT = - ext_table->EXT_sample_locations ? VN_GDPA(dev, vkCmdSetSampleLocationsEXT) : - NULL; - proc_table->CmdSetSampleLocationsEnableEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetSampleLocationsEnableEXT) : - NULL; - proc_table->CmdSetSampleMaskEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetSampleMaskEXT) : - NULL; - proc_table->CmdSetScissor = VN_GDPA(dev, vkCmdSetScissor); - proc_table->CmdSetScissorWithCount = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetScissorWithCount) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetScissorWithCountEXT) : - NULL; - proc_table->CmdSetStencilCompareMask = VN_GDPA(dev, vkCmdSetStencilCompareMask); - proc_table->CmdSetStencilOp = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetStencilOp) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetStencilOpEXT) : - NULL; - proc_table->CmdSetStencilReference = VN_GDPA(dev, vkCmdSetStencilReference); - proc_table->CmdSetStencilTestEnable = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetStencilTestEnable) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetStencilTestEnableEXT) : - NULL; - proc_table->CmdSetStencilWriteMask = VN_GDPA(dev, vkCmdSetStencilWriteMask); - proc_table->CmdSetTessellationDomainOriginEXT = - ext_table->EXT_extended_dynamic_state3 ? VN_GDPA(dev, vkCmdSetTessellationDomainOriginEXT) : - NULL; - proc_table->CmdSetVertexInputEXT = - ext_table->EXT_vertex_input_dynamic_state ? VN_GDPA(dev, vkCmdSetVertexInputEXT) : - NULL; - proc_table->CmdSetViewport = VN_GDPA(dev, vkCmdSetViewport); - proc_table->CmdSetViewportWithCount = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdSetViewportWithCount) : - ext_table->EXT_extended_dynamic_state ? VN_GDPA(dev, vkCmdSetViewportWithCountEXT) : - NULL; - proc_table->CmdTraceRaysIndirect2KHR = - ext_table->KHR_ray_tracing_maintenance1 ? VN_GDPA(dev, vkCmdTraceRaysIndirect2KHR) : - NULL; - proc_table->CmdTraceRaysIndirectKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkCmdTraceRaysIndirectKHR) : - NULL; - proc_table->CmdTraceRaysKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkCmdTraceRaysKHR) : - NULL; - proc_table->CmdUpdateBuffer = VN_GDPA(dev, vkCmdUpdateBuffer); - proc_table->CmdWaitEvents = VN_GDPA(dev, vkCmdWaitEvents); - proc_table->CmdWaitEvents2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdWaitEvents2) : - ext_table->KHR_synchronization2 ? VN_GDPA(dev, vkCmdWaitEvents2KHR) : - NULL; - proc_table->CmdWriteAccelerationStructuresPropertiesKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCmdWriteAccelerationStructuresPropertiesKHR) : - NULL; - proc_table->CmdWriteTimestamp = VN_GDPA(dev, vkCmdWriteTimestamp); - proc_table->CmdWriteTimestamp2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCmdWriteTimestamp2) : - ext_table->KHR_synchronization2 ? VN_GDPA(dev, vkCmdWriteTimestamp2KHR) : - NULL; - proc_table->CopyAccelerationStructureKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCopyAccelerationStructureKHR) : - NULL; - proc_table->CopyAccelerationStructureToMemoryKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCopyAccelerationStructureToMemoryKHR) : - NULL; - proc_table->CopyImageToImage = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCopyImageToImage) : - ext_table->EXT_host_image_copy ? VN_GDPA(dev, vkCopyImageToImageEXT) : - NULL; - proc_table->CopyImageToMemory = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCopyImageToMemory) : - ext_table->EXT_host_image_copy ? VN_GDPA(dev, vkCopyImageToMemoryEXT) : - NULL; - proc_table->CopyMemoryToAccelerationStructureKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCopyMemoryToAccelerationStructureKHR) : - NULL; - proc_table->CopyMemoryToImage = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkCopyMemoryToImage) : - ext_table->EXT_host_image_copy ? VN_GDPA(dev, vkCopyMemoryToImageEXT) : - NULL; - proc_table->CreateAccelerationStructureKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkCreateAccelerationStructureKHR) : - NULL; - proc_table->CreateBuffer = VN_GDPA(dev, vkCreateBuffer); - proc_table->CreateBufferView = VN_GDPA(dev, vkCreateBufferView); - proc_table->CreateCommandPool = VN_GDPA(dev, vkCreateCommandPool); - proc_table->CreateComputePipelines = VN_GDPA(dev, vkCreateComputePipelines); - proc_table->CreateDeferredOperationKHR = - ext_table->KHR_deferred_host_operations ? VN_GDPA(dev, vkCreateDeferredOperationKHR) : - NULL; - proc_table->CreateDescriptorPool = VN_GDPA(dev, vkCreateDescriptorPool); - proc_table->CreateDescriptorSetLayout = VN_GDPA(dev, vkCreateDescriptorSetLayout); - proc_table->CreateDescriptorUpdateTemplate = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkCreateDescriptorUpdateTemplate) : - ext_table->KHR_descriptor_update_template ? VN_GDPA(dev, vkCreateDescriptorUpdateTemplateKHR) : - NULL; - proc_table->CreateEvent = VN_GDPA(dev, vkCreateEvent); - proc_table->CreateFence = VN_GDPA(dev, vkCreateFence); - proc_table->CreateFramebuffer = VN_GDPA(dev, vkCreateFramebuffer); - proc_table->CreateGraphicsPipelines = VN_GDPA(dev, vkCreateGraphicsPipelines); - proc_table->CreateImage = VN_GDPA(dev, vkCreateImage); - proc_table->CreateImageView = VN_GDPA(dev, vkCreateImageView); - proc_table->CreatePipelineCache = VN_GDPA(dev, vkCreatePipelineCache); - proc_table->CreatePipelineLayout = VN_GDPA(dev, vkCreatePipelineLayout); - proc_table->CreatePrivateDataSlot = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkCreatePrivateDataSlot) : - ext_table->EXT_private_data ? VN_GDPA(dev, vkCreatePrivateDataSlotEXT) : - NULL; - proc_table->CreateQueryPool = VN_GDPA(dev, vkCreateQueryPool); - proc_table->CreateRayTracingPipelinesKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkCreateRayTracingPipelinesKHR) : - NULL; - proc_table->CreateRenderPass = VN_GDPA(dev, vkCreateRenderPass); - proc_table->CreateRenderPass2 = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkCreateRenderPass2) : - ext_table->KHR_create_renderpass2 ? VN_GDPA(dev, vkCreateRenderPass2KHR) : - NULL; - proc_table->CreateSampler = VN_GDPA(dev, vkCreateSampler); - proc_table->CreateSamplerYcbcrConversion = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkCreateSamplerYcbcrConversion) : - ext_table->KHR_sampler_ycbcr_conversion ? VN_GDPA(dev, vkCreateSamplerYcbcrConversionKHR) : - NULL; - proc_table->CreateSemaphore = VN_GDPA(dev, vkCreateSemaphore); - proc_table->CreateShaderModule = VN_GDPA(dev, vkCreateShaderModule); - proc_table->DeferredOperationJoinKHR = - ext_table->KHR_deferred_host_operations ? VN_GDPA(dev, vkDeferredOperationJoinKHR) : - NULL; - proc_table->DestroyAccelerationStructureKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkDestroyAccelerationStructureKHR) : - NULL; - proc_table->DestroyBuffer = VN_GDPA(dev, vkDestroyBuffer); - proc_table->DestroyBufferView = VN_GDPA(dev, vkDestroyBufferView); - proc_table->DestroyCommandPool = VN_GDPA(dev, vkDestroyCommandPool); - proc_table->DestroyDeferredOperationKHR = - ext_table->KHR_deferred_host_operations ? VN_GDPA(dev, vkDestroyDeferredOperationKHR) : - NULL; - proc_table->DestroyDescriptorPool = VN_GDPA(dev, vkDestroyDescriptorPool); - proc_table->DestroyDescriptorSetLayout = VN_GDPA(dev, vkDestroyDescriptorSetLayout); - proc_table->DestroyDescriptorUpdateTemplate = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkDestroyDescriptorUpdateTemplate) : - ext_table->KHR_descriptor_update_template ? VN_GDPA(dev, vkDestroyDescriptorUpdateTemplateKHR) : - NULL; - proc_table->DestroyDevice = VN_GDPA(dev, vkDestroyDevice); - proc_table->DestroyEvent = VN_GDPA(dev, vkDestroyEvent); - proc_table->DestroyFence = VN_GDPA(dev, vkDestroyFence); - proc_table->DestroyFramebuffer = VN_GDPA(dev, vkDestroyFramebuffer); - proc_table->DestroyImage = VN_GDPA(dev, vkDestroyImage); - proc_table->DestroyImageView = VN_GDPA(dev, vkDestroyImageView); - proc_table->DestroyPipeline = VN_GDPA(dev, vkDestroyPipeline); - proc_table->DestroyPipelineCache = VN_GDPA(dev, vkDestroyPipelineCache); - proc_table->DestroyPipelineLayout = VN_GDPA(dev, vkDestroyPipelineLayout); - proc_table->DestroyPrivateDataSlot = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkDestroyPrivateDataSlot) : - ext_table->EXT_private_data ? VN_GDPA(dev, vkDestroyPrivateDataSlotEXT) : - NULL; - proc_table->DestroyQueryPool = VN_GDPA(dev, vkDestroyQueryPool); - proc_table->DestroyRenderPass = VN_GDPA(dev, vkDestroyRenderPass); - proc_table->DestroySampler = VN_GDPA(dev, vkDestroySampler); - proc_table->DestroySamplerYcbcrConversion = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkDestroySamplerYcbcrConversion) : - ext_table->KHR_sampler_ycbcr_conversion ? VN_GDPA(dev, vkDestroySamplerYcbcrConversionKHR) : - NULL; - proc_table->DestroySemaphore = VN_GDPA(dev, vkDestroySemaphore); - proc_table->DestroyShaderModule = VN_GDPA(dev, vkDestroyShaderModule); - proc_table->DeviceWaitIdle = VN_GDPA(dev, vkDeviceWaitIdle); - proc_table->EndCommandBuffer = VN_GDPA(dev, vkEndCommandBuffer); - proc_table->FlushMappedMemoryRanges = VN_GDPA(dev, vkFlushMappedMemoryRanges); - proc_table->FreeCommandBuffers = VN_GDPA(dev, vkFreeCommandBuffers); - proc_table->FreeDescriptorSets = VN_GDPA(dev, vkFreeDescriptorSets); - proc_table->FreeMemory = VN_GDPA(dev, vkFreeMemory); - proc_table->GetAccelerationStructureBuildSizesKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkGetAccelerationStructureBuildSizesKHR) : - NULL; - proc_table->GetAccelerationStructureDeviceAddressKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkGetAccelerationStructureDeviceAddressKHR) : - NULL; - proc_table->GetBufferDeviceAddress = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkGetBufferDeviceAddress) : - ext_table->EXT_buffer_device_address ? VN_GDPA(dev, vkGetBufferDeviceAddressEXT) : - ext_table->KHR_buffer_device_address ? VN_GDPA(dev, vkGetBufferDeviceAddressKHR) : - NULL; - proc_table->GetBufferMemoryRequirements = VN_GDPA(dev, vkGetBufferMemoryRequirements); - proc_table->GetBufferMemoryRequirements2 = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkGetBufferMemoryRequirements2) : - ext_table->KHR_get_memory_requirements2 ? VN_GDPA(dev, vkGetBufferMemoryRequirements2KHR) : - NULL; - proc_table->GetBufferOpaqueCaptureAddress = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkGetBufferOpaqueCaptureAddress) : - ext_table->KHR_buffer_device_address ? VN_GDPA(dev, vkGetBufferOpaqueCaptureAddressKHR) : - NULL; - proc_table->GetCalibratedTimestampsKHR = - ext_table->EXT_calibrated_timestamps ? VN_GDPA(dev, vkGetCalibratedTimestampsEXT) : - ext_table->KHR_calibrated_timestamps ? VN_GDPA(dev, vkGetCalibratedTimestampsKHR) : - NULL; - proc_table->GetDeferredOperationMaxConcurrencyKHR = - ext_table->KHR_deferred_host_operations ? VN_GDPA(dev, vkGetDeferredOperationMaxConcurrencyKHR) : - NULL; - proc_table->GetDeferredOperationResultKHR = - ext_table->KHR_deferred_host_operations ? VN_GDPA(dev, vkGetDeferredOperationResultKHR) : - NULL; - proc_table->GetDescriptorSetLayoutSupport = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkGetDescriptorSetLayoutSupport) : - ext_table->KHR_maintenance3 ? VN_GDPA(dev, vkGetDescriptorSetLayoutSupportKHR) : - NULL; - proc_table->GetDeviceAccelerationStructureCompatibilityKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkGetDeviceAccelerationStructureCompatibilityKHR) : - NULL; - proc_table->GetDeviceBufferMemoryRequirements = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkGetDeviceBufferMemoryRequirements) : - ext_table->KHR_maintenance4 ? VN_GDPA(dev, vkGetDeviceBufferMemoryRequirementsKHR) : - NULL; - proc_table->GetDeviceGroupPeerMemoryFeatures = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkGetDeviceGroupPeerMemoryFeatures) : - ext_table->KHR_device_group ? VN_GDPA(dev, vkGetDeviceGroupPeerMemoryFeaturesKHR) : - NULL; - proc_table->GetDeviceImageMemoryRequirements = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkGetDeviceImageMemoryRequirements) : - ext_table->KHR_maintenance4 ? VN_GDPA(dev, vkGetDeviceImageMemoryRequirementsKHR) : - NULL; - proc_table->GetDeviceImageSparseMemoryRequirements = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkGetDeviceImageSparseMemoryRequirements) : - ext_table->KHR_maintenance4 ? VN_GDPA(dev, vkGetDeviceImageSparseMemoryRequirementsKHR) : - NULL; - proc_table->GetDeviceImageSubresourceLayout = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkGetDeviceImageSubresourceLayout) : - ext_table->KHR_maintenance5 ? VN_GDPA(dev, vkGetDeviceImageSubresourceLayoutKHR) : - NULL; - proc_table->GetDeviceMemoryCommitment = VN_GDPA(dev, vkGetDeviceMemoryCommitment); - proc_table->GetDeviceMemoryOpaqueCaptureAddress = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkGetDeviceMemoryOpaqueCaptureAddress) : - ext_table->KHR_buffer_device_address ? VN_GDPA(dev, vkGetDeviceMemoryOpaqueCaptureAddressKHR) : - NULL; - proc_table->GetDeviceQueue = VN_GDPA(dev, vkGetDeviceQueue); - proc_table->GetDeviceQueue2 = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkGetDeviceQueue2) : - NULL; - proc_table->GetEventStatus = VN_GDPA(dev, vkGetEventStatus); - proc_table->GetFenceFdKHR = - ext_table->KHR_external_fence_fd ? VN_GDPA(dev, vkGetFenceFdKHR) : - NULL; - proc_table->GetFenceStatus = VN_GDPA(dev, vkGetFenceStatus); - proc_table->GetImageDrmFormatModifierPropertiesEXT = - ext_table->EXT_image_drm_format_modifier ? VN_GDPA(dev, vkGetImageDrmFormatModifierPropertiesEXT) : - NULL; - proc_table->GetImageMemoryRequirements = VN_GDPA(dev, vkGetImageMemoryRequirements); - proc_table->GetImageMemoryRequirements2 = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkGetImageMemoryRequirements2) : - ext_table->KHR_get_memory_requirements2 ? VN_GDPA(dev, vkGetImageMemoryRequirements2KHR) : - NULL; - proc_table->GetImageOpaqueCaptureDataEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkGetImageOpaqueCaptureDataEXT) : - NULL; - proc_table->GetImageSparseMemoryRequirements = VN_GDPA(dev, vkGetImageSparseMemoryRequirements); - proc_table->GetImageSparseMemoryRequirements2 = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkGetImageSparseMemoryRequirements2) : - ext_table->KHR_get_memory_requirements2 ? VN_GDPA(dev, vkGetImageSparseMemoryRequirements2KHR) : - NULL; - proc_table->GetImageSubresourceLayout = VN_GDPA(dev, vkGetImageSubresourceLayout); - proc_table->GetImageSubresourceLayout2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkGetImageSubresourceLayout2) : - ext_table->EXT_host_image_copy ? VN_GDPA(dev, vkGetImageSubresourceLayout2EXT) : - ext_table->KHR_maintenance5 ? VN_GDPA(dev, vkGetImageSubresourceLayout2KHR) : - NULL; - proc_table->GetMemoryFdKHR = - ext_table->KHR_external_memory_fd ? VN_GDPA(dev, vkGetMemoryFdKHR) : - NULL; - proc_table->GetMemoryFdPropertiesKHR = - ext_table->KHR_external_memory_fd ? VN_GDPA(dev, vkGetMemoryFdPropertiesKHR) : - NULL; - proc_table->GetPipelineCacheData = VN_GDPA(dev, vkGetPipelineCacheData); - proc_table->GetPrivateData = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkGetPrivateData) : - ext_table->EXT_private_data ? VN_GDPA(dev, vkGetPrivateDataEXT) : - NULL; - proc_table->GetQueryPoolResults = VN_GDPA(dev, vkGetQueryPoolResults); - proc_table->GetRayTracingCaptureReplayShaderGroupHandlesKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkGetRayTracingCaptureReplayShaderGroupHandlesKHR) : - NULL; - proc_table->GetRayTracingShaderGroupHandlesKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkGetRayTracingShaderGroupHandlesKHR) : - NULL; - proc_table->GetRayTracingShaderGroupStackSizeKHR = - ext_table->KHR_ray_tracing_pipeline ? VN_GDPA(dev, vkGetRayTracingShaderGroupStackSizeKHR) : - NULL; - proc_table->GetRenderAreaGranularity = VN_GDPA(dev, vkGetRenderAreaGranularity); - proc_table->GetRenderingAreaGranularity = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkGetRenderingAreaGranularity) : - ext_table->KHR_maintenance5 ? VN_GDPA(dev, vkGetRenderingAreaGranularityKHR) : - NULL; - proc_table->GetSemaphoreCounterValue = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkGetSemaphoreCounterValue) : - ext_table->KHR_timeline_semaphore ? VN_GDPA(dev, vkGetSemaphoreCounterValueKHR) : - NULL; - proc_table->GetSemaphoreFdKHR = - ext_table->KHR_external_semaphore_fd ? VN_GDPA(dev, vkGetSemaphoreFdKHR) : - NULL; - proc_table->ImportFenceFdKHR = - ext_table->KHR_external_fence_fd ? VN_GDPA(dev, vkImportFenceFdKHR) : - NULL; - proc_table->ImportSemaphoreFdKHR = - ext_table->KHR_external_semaphore_fd ? VN_GDPA(dev, vkImportSemaphoreFdKHR) : - NULL; - proc_table->InvalidateMappedMemoryRanges = VN_GDPA(dev, vkInvalidateMappedMemoryRanges); - proc_table->MapMemory = VN_GDPA(dev, vkMapMemory); - proc_table->MapMemory2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkMapMemory2) : - ext_table->KHR_map_memory2 ? VN_GDPA(dev, vkMapMemory2KHR) : - NULL; - proc_table->MergePipelineCaches = VN_GDPA(dev, vkMergePipelineCaches); - proc_table->QueueBindSparse = VN_GDPA(dev, vkQueueBindSparse); - proc_table->QueueSubmit = VN_GDPA(dev, vkQueueSubmit); - proc_table->QueueSubmit2 = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkQueueSubmit2) : - ext_table->KHR_synchronization2 ? VN_GDPA(dev, vkQueueSubmit2KHR) : - NULL; - proc_table->QueueWaitIdle = VN_GDPA(dev, vkQueueWaitIdle); - proc_table->RegisterCustomBorderColorEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkRegisterCustomBorderColorEXT) : - NULL; - proc_table->ResetCommandBuffer = VN_GDPA(dev, vkResetCommandBuffer); - proc_table->ResetCommandPool = VN_GDPA(dev, vkResetCommandPool); - proc_table->ResetDescriptorPool = VN_GDPA(dev, vkResetDescriptorPool); - proc_table->ResetEvent = VN_GDPA(dev, vkResetEvent); - proc_table->ResetFences = VN_GDPA(dev, vkResetFences); - proc_table->ResetQueryPool = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkResetQueryPool) : - ext_table->EXT_host_query_reset ? VN_GDPA(dev, vkResetQueryPoolEXT) : - NULL; - proc_table->SetEvent = VN_GDPA(dev, vkSetEvent); - proc_table->SetPrivateData = - api_version >= VK_API_VERSION_1_3 ? VN_GDPA(dev, vkSetPrivateData) : - ext_table->EXT_private_data ? VN_GDPA(dev, vkSetPrivateDataEXT) : - NULL; - proc_table->SignalSemaphore = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkSignalSemaphore) : - ext_table->KHR_timeline_semaphore ? VN_GDPA(dev, vkSignalSemaphoreKHR) : - NULL; - proc_table->TransitionImageLayout = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkTransitionImageLayout) : - ext_table->EXT_host_image_copy ? VN_GDPA(dev, vkTransitionImageLayoutEXT) : - NULL; - proc_table->TrimCommandPool = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkTrimCommandPool) : - ext_table->KHR_maintenance1 ? VN_GDPA(dev, vkTrimCommandPoolKHR) : - NULL; - proc_table->UnmapMemory = VN_GDPA(dev, vkUnmapMemory); - proc_table->UnmapMemory2 = - api_version >= VK_API_VERSION_1_4 ? VN_GDPA(dev, vkUnmapMemory2) : - ext_table->KHR_map_memory2 ? VN_GDPA(dev, vkUnmapMemory2KHR) : - NULL; - proc_table->UnregisterCustomBorderColorEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkUnregisterCustomBorderColorEXT) : - NULL; - proc_table->UpdateDescriptorSetWithTemplate = - api_version >= VK_API_VERSION_1_1 ? VN_GDPA(dev, vkUpdateDescriptorSetWithTemplate) : - ext_table->KHR_descriptor_update_template ? VN_GDPA(dev, vkUpdateDescriptorSetWithTemplateKHR) : - NULL; - proc_table->UpdateDescriptorSets = VN_GDPA(dev, vkUpdateDescriptorSets); - proc_table->WaitForFences = VN_GDPA(dev, vkWaitForFences); - proc_table->WaitSemaphores = - api_version >= VK_API_VERSION_1_2 ? VN_GDPA(dev, vkWaitSemaphores) : - ext_table->KHR_timeline_semaphore ? VN_GDPA(dev, vkWaitSemaphoresKHR) : - NULL; - proc_table->WriteAccelerationStructuresPropertiesKHR = - ext_table->KHR_acceleration_structure ? VN_GDPA(dev, vkWriteAccelerationStructuresPropertiesKHR) : - NULL; - proc_table->WriteResourceDescriptorsEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkWriteResourceDescriptorsEXT) : - NULL; - proc_table->WriteSamplerDescriptorsEXT = - ext_table->EXT_descriptor_heap ? VN_GDPA(dev, vkWriteSamplerDescriptorsEXT) : - NULL; -#undef VN_GDPA -} - -#endif /* VN_PROTOCOL_RENDERER_UTIL_H */ diff --git a/src/venus/vkr_acceleration_structure.c b/src/venus/vkr_acceleration_structure.c index 2c9cb804..f08abf0b 100644 --- a/src/venus/vkr_acceleration_structure.c +++ b/src/venus/vkr_acceleration_structure.c @@ -5,7 +5,7 @@ #include "vkr_acceleration_structure.h" -#include "venus-protocol/vn_protocol_renderer_acceleration_structure.h" +#include "vn_protocol_renderer_acceleration_structure.h" #include "vkr_acceleration_structure_gen.h" #include "vkr_context.h" diff --git a/src/venus/vkr_allocator.c b/src/venus/vkr_allocator.c index 3461e6ce..47ec2402 100644 --- a/src/venus/vkr_allocator.c +++ b/src/venus/vkr_allocator.c @@ -31,8 +31,8 @@ #include "util/list.h" #include "util/macros.h" -#include "venus-protocol/vulkan.h" #include "virgl_resource.h" +#include "vulkan/vulkan.h" #include "vkr_library.h" diff --git a/src/venus/vkr_command_buffer.c b/src/venus/vkr_command_buffer.c index dc42c5a1..766c5c71 100644 --- a/src/venus/vkr_command_buffer.c +++ b/src/venus/vkr_command_buffer.c @@ -1267,6 +1267,21 @@ vkr_dispatch_vkCmdPushDataEXT(UNUSED struct vn_dispatch_context *dispatch, VKR_CMD_CALL(CmdPushDataEXT, args, args->pPushDataInfo); } +static void +vkr_dispatch_vkCmdEndRendering2KHR(UNUSED struct vn_dispatch_context *ctx, + struct vn_command_vkCmdEndRendering2KHR *args) +{ + VKR_CMD_CALL(CmdEndRendering2KHR, args, args->pRenderingEndInfo); +} + +static void +vkr_dispatch_vkCmdSetPrimitiveRestartIndexEXT( + UNUSED struct vn_dispatch_context *ctx, + struct vn_command_vkCmdSetPrimitiveRestartIndexEXT *args) +{ + VKR_CMD_CALL(CmdSetPrimitiveRestartIndexEXT, args, args->primitiveRestartIndex); +} + void vkr_context_init_command_pool_dispatch(struct vkr_context *ctx) { @@ -1527,4 +1542,11 @@ vkr_context_init_command_buffer_dispatch(struct vkr_context *ctx) dispatch->dispatch_vkCmdBindSamplerHeapEXT = vkr_dispatch_vkCmdBindSamplerHeapEXT; dispatch->dispatch_vkCmdBindResourceHeapEXT = vkr_dispatch_vkCmdBindResourceHeapEXT; dispatch->dispatch_vkCmdPushDataEXT = vkr_dispatch_vkCmdPushDataEXT; + + /* VK_KHR_maintenance10 */ + dispatch->dispatch_vkCmdEndRendering2KHR = vkr_dispatch_vkCmdEndRendering2KHR; + + /* VK_EXT_primitive_restart_index */ + dispatch->dispatch_vkCmdSetPrimitiveRestartIndexEXT = + vkr_dispatch_vkCmdSetPrimitiveRestartIndexEXT; } diff --git a/src/venus/vkr_common.c b/src/venus/vkr_common.c index 8ff62c77..0a5c9e8c 100644 --- a/src/venus/vkr_common.c +++ b/src/venus/vkr_common.c @@ -9,7 +9,7 @@ #include #include "util/u_debug.h" -#include "venus-protocol/vn_protocol_renderer_info.h" +#include "vn_protocol_renderer_info.h" #include "vkr_context.h" #include "vkr_cs.h" @@ -122,6 +122,10 @@ static const struct vn_info_extension_table vkr_extension_table = { .KHR_fragment_shader_barycentric = true, .KHR_fragment_shading_rate = true, .KHR_maintenance7 = true, + .KHR_maintenance8 = true, + .KHR_maintenance9 = true, + .KHR_maintenance10 = true, + .KHR_maintenance11 = true, .KHR_pipeline_library = true, .KHR_ray_query = true, .KHR_ray_tracing_maintenance1 = true, @@ -130,12 +134,14 @@ static const struct vn_info_extension_table vkr_extension_table = { .KHR_robustness2 = true, .KHR_shader_bfloat16 = true, .KHR_shader_clock = true, + .KHR_shader_constant_data = true, .KHR_shader_fma = true, .KHR_shader_maximal_reconvergence = true, .KHR_shader_quad_control = true, .KHR_shader_relaxed_extended_instruction = true, .KHR_shader_subgroup_uniform_control_flow = true, .KHR_shader_untyped_pointers = true, + .KHR_unified_image_layouts = true, .KHR_workgroup_memory_explicit_layout = true, /* EXT extensions */ .EXT_attachment_feedback_loop_dynamic_state = true, @@ -183,11 +189,13 @@ static const struct vn_info_extension_table vkr_extension_table = { .EXT_pci_bus_info = true, .EXT_pipeline_library_group_handles = true, .EXT_post_depth_coverage = true, + .EXT_primitive_restart_index = true, .EXT_primitive_topology_list_restart = true, .EXT_primitives_generated_query = true, .EXT_provoking_vertex = true, .EXT_queue_family_foreign = true, .EXT_rasterization_order_attachment_access = true, + .EXT_rgba10x6_formats = true, .EXT_robustness2 = true, .EXT_sample_locations = true, .EXT_shader_atomic_float = true, @@ -195,14 +203,18 @@ static const struct vn_info_extension_table vkr_extension_table = { .EXT_shader_float8 = true, .EXT_shader_image_atomic_int64 = true, .EXT_shader_replicated_composites = true, + .EXT_shader_split_barrier = true, .EXT_shader_stencil_export = true, .EXT_shader_subgroup_ballot = true, .EXT_shader_subgroup_vote = true, + .EXT_shader_tile_image = true, .EXT_shader_uniform_buffer_unsized_array = true, .EXT_transform_feedback = true, .EXT_vertex_attribute_divisor = true, + .EXT_vertex_attribute_robustness = true, .EXT_vertex_input_dynamic_state = true, .EXT_ycbcr_image_arrays = true, + .EXT_zero_initialize_device_memory = true, /* vendor extensions */ .ARM_rasterization_order_attachment_access = true, .GOOGLE_decorate_string = true, diff --git a/src/venus/vkr_common.h b/src/venus/vkr_common.h index 7a0df1d1..00a42529 100644 --- a/src/venus/vkr_common.h +++ b/src/venus/vkr_common.h @@ -28,10 +28,11 @@ #include "util/u_memory.h" #include "util/u_pointer.h" #include "util/u_thread.h" -#include "venus-protocol/vulkan.h" #include "virgl_context.h" #include "virgl_util.h" #include "virglrenderer.h" +#include "vulkan/vulkan.h" +#include "vulkan/vulkan_metal.h" #include "vkr_renderer.h" @@ -215,14 +216,33 @@ object_array_init(struct vkr_context *ctx, void object_array_fini(struct object_array *arr); +static inline VkStructureType +vkr_pnext_get_stype(const void *s) +{ + return *(const VkStructureType *)s; +} + +static inline const void * +vkr_pnext_get_next(const void *s) +{ + void *next; + memcpy(&next, (const char *)s + offsetof(VkBaseInStructure, pNext), sizeof(next)); + return next; +} + +static inline void +vkr_pnext_set_next(void *s, const void *next) +{ + memcpy((char *)s + offsetof(VkBaseInStructure, pNext), &next, sizeof(next)); +} + static inline void * -vkr_find_struct(const void *chain, VkStructureType type) +vkr_find_struct(const void *s, VkStructureType type) { - VkBaseOutStructure *s = (VkBaseOutStructure *)chain; while (s) { - if (s->sType == type) - return s; - s = s->pNext; + if (vkr_pnext_get_stype(s) == type) + return (void *)s; + s = vkr_pnext_get_next(s); } return NULL; } @@ -231,13 +251,12 @@ vkr_find_struct(const void *chain, VkStructureType type) * Find struct in the pNext of chain and return its previous struct. */ static inline void * -vkr_find_prev_struct(const void *chain, VkStructureType type) +vkr_find_prev_struct(const void *s, VkStructureType type) { - VkBaseOutStructure *prev = (VkBaseOutStructure *)chain; - while (prev->pNext) { - if (prev->pNext->sType == type) - return prev; - prev = prev->pNext; + while (vkr_pnext_get_next(s)) { + if (vkr_pnext_get_stype(vkr_pnext_get_next(s)) == type) + return (void *)s; + s = vkr_pnext_get_next(s); } return NULL; } diff --git a/src/venus/vkr_context.c b/src/venus/vkr_context.c index 2ea58988..b97e5ea2 100644 --- a/src/venus/vkr_context.c +++ b/src/venus/vkr_context.c @@ -10,7 +10,7 @@ #include #include "util/anon_file.h" -#include "venus-protocol/vn_protocol_renderer_dispatches.h" +#include "vn_protocol_renderer_dispatches.h" #define XXH_INLINE_ALL #include "util/xxhash.h" diff --git a/src/venus/vkr_context.h b/src/venus/vkr_context.h index 12541a72..3867f138 100644 --- a/src/venus/vkr_context.h +++ b/src/venus/vkr_context.h @@ -9,8 +9,8 @@ #include "vkr_common.h" #include "vkr_library.h" -#include "venus-protocol/vn_protocol_renderer_defines.h" -#include "venus-protocol/vn_protocol_renderer_util.h" +#include "vn_protocol_renderer_defines.h" +#include "vn_protocol_renderer_util.h" #include "virgl_resource.h" #include "vkr_cs.h" @@ -167,17 +167,13 @@ vkr_context_get_fatal(struct vkr_context *ctx) } static inline bool -vkr_context_validate_object_id(struct vkr_context *ctx, vkr_object_id id) +vkr_context_validate_object_id_locked(struct vkr_context *ctx, vkr_object_id id) { - mtx_lock(&ctx->object_mutex); if (unlikely(!id || _mesa_hash_table_search(ctx->object_table, &id))) { - mtx_unlock(&ctx->object_mutex); vkr_log("invalid object id %" PRIu64, id); vkr_context_set_fatal(ctx); return false; } - mtx_unlock(&ctx->object_mutex); - return true; } @@ -188,9 +184,6 @@ vkr_context_alloc_object(UNUSED struct vkr_context *ctx, const void *id_handle) { const vkr_object_id id = vkr_cs_handle_load_id((const void **)id_handle, type); - if (!vkr_context_validate_object_id(ctx, id)) - return NULL; - return vkr_object_alloc(size, type, id); } @@ -201,11 +194,9 @@ static inline void vkr_context_add_object(struct vkr_context *ctx, struct vkr_object *obj) { assert(vkr_is_recognized_object_type(obj->type)); - assert(obj->id); - mtx_lock(&ctx->object_mutex); - assert(!_mesa_hash_table_search(ctx->object_table, &obj->id)); - _mesa_hash_table_insert(ctx->object_table, &obj->id, obj); + if (vkr_context_validate_object_id_locked(ctx, obj->id)) + _mesa_hash_table_insert(ctx->object_table, &obj->id, obj); mtx_unlock(&ctx->object_mutex); } diff --git a/src/venus/vkr_cs.h b/src/venus/vkr_cs.h index c72c5cc1..5e7d4b1d 100644 --- a/src/venus/vkr_cs.h +++ b/src/venus/vkr_cs.h @@ -374,15 +374,34 @@ vkr_cs_decoder_alloc_temp_array(struct vkr_cs_decoder *dec, size_t size, size_t static inline void * vkr_cs_decoder_get_blob_storage(struct vkr_cs_decoder *dec, size_t size) { - return unlikely(size > (size_t)(dec->end - dec->cur)) ? NULL : (void *)dec->cur; + if (unlikely(size > (size_t)(dec->end - dec->cur))) { + vkr_log("decoder requested blob storage %zu exceeds %zu", size, + (size_t)(dec->end - dec->cur)); + vkr_cs_decoder_set_fatal(dec); + return NULL; + } + + return (void *)dec->cur; } static inline void * vkr_cs_encoder_get_blob_storage(struct vkr_cs_encoder *enc, size_t offset, size_t size) { - return unlikely(offset + size > (size_t)(enc->end - enc->cur)) - ? NULL - : (void *)(enc->cur + offset); + size_t end_offset; + if (unlikely(__builtin_add_overflow(offset, size, &end_offset))) { + vkr_log("encoder overflow with %zu requested at offset %zu", size, offset); + vkr_cs_encoder_set_fatal(enc); + return NULL; + } + + if (unlikely(end_offset > (size_t)(enc->end - enc->cur))) { + vkr_log("encoder requested blob storage %zu + %zu exceeds %zu", offset, size, + (size_t)(enc->end - enc->cur)); + vkr_cs_encoder_set_fatal(enc); + return NULL; + } + + return (void *)(enc->cur + offset); } static inline bool diff --git a/src/venus/vkr_descriptor_heap.c b/src/venus/vkr_descriptor_heap.c index 3d3b57be..6b2f3479 100644 --- a/src/venus/vkr_descriptor_heap.c +++ b/src/venus/vkr_descriptor_heap.c @@ -5,7 +5,7 @@ #include "vkr_descriptor_heap.h" -#include "venus-protocol/vn_protocol_renderer_descriptor_heap.h" +#include "vn_protocol_renderer_descriptor_heap.h" #include "vkr_context.h" #include "vkr_device.h" diff --git a/src/venus/vkr_device.c b/src/venus/vkr_device.c index 3e943bfd..603f45b8 100644 --- a/src/venus/vkr_device.c +++ b/src/venus/vkr_device.c @@ -5,7 +5,7 @@ #include "vkr_device.h" -#include "venus-protocol/vn_protocol_renderer_device.h" +#include "vn_protocol_renderer_device.h" #include "vkr_command_buffer.h" #include "vkr_context.h" diff --git a/src/venus/vkr_device.h b/src/venus/vkr_device.h index f7de555c..c71f0853 100644 --- a/src/venus/vkr_device.h +++ b/src/venus/vkr_device.h @@ -8,7 +8,7 @@ #include "vkr_common.h" -#include "venus-protocol/vn_protocol_renderer_util.h" +#include "vn_protocol_renderer_util.h" #include "vkr_context.h" diff --git a/src/venus/vkr_device_memory.c b/src/venus/vkr_device_memory.c index 97338b63..1abc23a8 100644 --- a/src/venus/vkr_device_memory.c +++ b/src/venus/vkr_device_memory.c @@ -7,7 +7,7 @@ #include -#include "venus-protocol/vn_protocol_renderer_transport.h" +#include "vn_protocol_renderer_transport.h" #include "vkr_device_memory_gen.h" #include "vkr_metal_helpers.h" @@ -263,16 +263,16 @@ vkr_dispatch_vkAllocateMemory(struct vn_dispatch_context *dispatch, /* translate VkImportMemoryResourceInfoMESA into VkImportMemoryFdInfoKHR in place */ VkImportMemoryFdInfoKHR local_import_info = { .fd = -1 }; VkImportMemoryResourceInfoMESA *res_info = NULL; - VkBaseInStructure *prev_of_res_info = vkr_find_prev_struct( + void *prev_of_res_info = vkr_find_prev_struct( alloc_info, VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA); if (prev_of_res_info) { - res_info = (VkImportMemoryResourceInfoMESA *)prev_of_res_info->pNext; + res_info = (VkImportMemoryResourceInfoMESA *)vkr_pnext_get_next(prev_of_res_info); if (!vkr_get_fd_info_from_resource_info(ctx, res_info, &local_import_info)) { args->ret = VK_ERROR_INVALID_EXTERNAL_HANDLE; return; } - prev_of_res_info->pNext = (const struct VkBaseInStructure *)&local_import_info; + vkr_pnext_set_next(prev_of_res_info, &local_import_info); } VkExportMemoryAllocateInfo *export_info = @@ -297,34 +297,10 @@ vkr_dispatch_vkAllocateMemory(struct vn_dispatch_context *dispatch, uint32_t valid_fd_types = 0; int udmabuf_fd = -1; void *gbm_bo = NULL; - VkExportMemoryAllocateInfo local_export_info; - - /* macOS: use shared memory + Metal buffer for HOST_VISIBLE cross-process sharing. */ struct vkr_mtl_shm *mtl_shm = NULL; -#ifdef __APPLE__ - VkImportMemoryMetalHandleInfoEXT local_metal_import = { - .sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT, - }; - - if ((property_flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) && - physical_dev->EXT_external_memory_metal && !res_info) { - assert(!res_info); - mtl_shm = vkr_mtl_shm_alloc(dev->mtl_device, alloc_info->allocationSize); - if (!mtl_shm) { - args->ret = VK_ERROR_OUT_OF_HOST_MEMORY; - return; - } - - /* Chain Metal import into alloc_info */ - local_metal_import.pNext = alloc_info->pNext; - local_metal_import.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT; - local_metal_import.handle = mtl_shm->mtl_buffer; - alloc_info->pNext = &local_metal_import; - alloc_info->allocationSize = mtl_shm->shm_size; + VkExportMemoryAllocateInfo local_export_info; + VkImportMemoryMetalHandleInfoEXT local_metal_import; - valid_fd_types = 1 << VIRGL_RESOURCE_FD_SHM; - } else -#endif /* __APPLE__ */ if ((property_flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) && !res_info) { /* An implementation can support dma_buf import along with opaque fd export/import. * If the client driver is using external memory and requesting dma_buf, without @@ -373,14 +349,31 @@ vkr_dispatch_vkAllocateMemory(struct vn_dispatch_context *dispatch, align(alloc_info->allocationSize, getpagesize()); } } + } else if (physical_dev->EXT_external_memory_metal) { + /* Allocate shm and wrap as a MTLBuffer for import. */ + mtl_shm = vkr_mtl_shm_alloc(dev->mtl_device, alloc_info->allocationSize); + if (!mtl_shm) { + args->ret = VK_ERROR_OUT_OF_HOST_MEMORY; + return; + } + + local_metal_import = (VkImportMemoryMetalHandleInfoEXT){ + .sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT, + .pNext = alloc_info->pNext, + .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, + .handle = mtl_shm->mtl_buffer, + }; + alloc_info->pNext = &local_metal_import; + alloc_info->allocationSize = mtl_shm->shm_size; + valid_fd_types = 1 << VIRGL_RESOURCE_FD_SHM; } else if (physical_dev->EXT_external_memory_dma_buf) { /* Allocate dma_buf externally and force to import. */ if (export_info) { /* Strip export info since valid_fd_types can only be dma_buf here. */ - VkBaseInStructure *prev_of_export_info = vkr_find_prev_struct( + void *prev_of_export_info = vkr_find_prev_struct( alloc_info, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO); - prev_of_export_info->pNext = export_info->pNext; + vkr_pnext_set_next(prev_of_export_info, export_info->pNext); export_info = NULL; } diff --git a/src/venus/vkr_device_object.py b/src/venus/vkr_device_object.py index 343b9ba3..07d14cd1 100644 --- a/src/venus/vkr_device_object.py +++ b/src/venus/vkr_device_object.py @@ -462,7 +462,7 @@ def file_header_generator(json_file): include_filenames = [] for json_obj in json_file['objects']: - name = 'venus-protocol/vn_protocol_renderer_{}.h'.format( + name = 'vn_protocol_renderer_{}.h'.format( json_obj['vkr_type']) include_filenames.append(name) protocol_includes = '#include "' + '"\n#include "'.join(include_filenames) + '"' diff --git a/src/venus/vkr_host_copy.c b/src/venus/vkr_host_copy.c index cd5a3173..95c4ee7e 100644 --- a/src/venus/vkr_host_copy.c +++ b/src/venus/vkr_host_copy.c @@ -5,7 +5,7 @@ #include "vkr_host_copy.h" -#include "venus-protocol/vn_protocol_renderer_host_copy.h" +#include "vn_protocol_renderer_host_copy.h" #include "vkr_context.h" #include "vkr_device.h" diff --git a/src/venus/vkr_instance.c b/src/venus/vkr_instance.c index 27bf2dca..d90f6cbf 100644 --- a/src/venus/vkr_instance.c +++ b/src/venus/vkr_instance.c @@ -5,7 +5,7 @@ #include "vkr_instance.h" -#include "venus-protocol/vn_protocol_renderer_instance.h" +#include "vn_protocol_renderer_instance.h" #include "vkr_context.h" #include "vkr_physical_device.h" @@ -58,7 +58,7 @@ vkr_dispatch_vkEnumerateInstanceExtensionProperties( args->ret = count == ARRAY_SIZE(private_extensions) ? VK_SUCCESS : VK_INCOMPLETE; } -static VkBool32 +static VkBool32 VKAPI_ATTR vkr_validation_callback(UNUSED VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, UNUSED VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, @@ -66,6 +66,26 @@ vkr_validation_callback(UNUSED VkDebugUtilsMessageSeverityFlagBitsEXT messageSev { struct vkr_context *ctx = pUserData; + const char *skips[] = { + "VUID-vkBindBufferMemory-memory-02726", + "VUID-vkBindBufferMemory-memory-02985", + "VUID-VkBindBufferMemoryInfo-memory-02726", + "VUID-VkBindBufferMemoryInfo-memory-02985", + "VUID-vkBindImageMemory-memory-02728", + "VUID-vkBindImageMemory-memory-02989", + "VUID-VkBindImageMemoryInfo-memory-02728", + "VUID-VkBindImageMemoryInfo-memory-02989", + "VUID-VkSparseMemoryBind-memory-02730", + "VUID-VkSparseMemoryBind-memory-02731", + "VUID-VkSparseImageMemoryBind-memory-02732", + "VUID-VkSparseImageMemoryBind-memory-02733", + }; + for (uint32_t i = 0; i < ARRAY_SIZE(skips); i++) { + if (!strcmp(pCallbackData->pMessageIdName, skips[i])) + return false; + } + + vkr_log(pCallbackData->pMessageIdName); vkr_log(pCallbackData->pMessage); if (!ctx->validate_fatal) @@ -183,6 +203,17 @@ vkr_dispatch_vkCreateInstance(struct vn_dispatch_context *dispatch, create_info->flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; ext_names[ext_count++] = VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME; } + + /* The Metal shared-memory allocator exports the underlying MTLDevice via + * vkExportMetalObjectsEXT (see vkr_metal_get_device). VK_EXT_metal_objects + * requires the export intent to be declared at instance creation, otherwise + * the export violates VUID-VkExportMetalObjectsInfoEXT-pNext-06791. */ + VkExportMetalObjectCreateInfoEXT export_metal_device = { + .sType = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT, + .pNext = create_info->pNext, + .exportObjectType = VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT, + }; + create_info->pNext = &export_metal_device; #endif /* __APPLE__ */ assert(layer_count <= ARRAY_SIZE(layer_names)); diff --git a/src/venus/vkr_instance.h b/src/venus/vkr_instance.h index e7421244..edd2ec07 100644 --- a/src/venus/vkr_instance.h +++ b/src/venus/vkr_instance.h @@ -8,7 +8,7 @@ #include "vkr_common.h" -#include "venus-protocol/vn_protocol_renderer_util.h" +#include "vn_protocol_renderer_util.h" struct vkr_instance { struct vkr_object base; diff --git a/src/venus/vkr_library.h b/src/venus/vkr_library.h index 48e1e09d..12aebf96 100644 --- a/src/venus/vkr_library.h +++ b/src/venus/vkr_library.h @@ -8,7 +8,7 @@ #include -#include "venus-protocol/vulkan.h" +#include "vulkan/vulkan.h" struct vulkan_library { void *handle; diff --git a/src/venus/vkr_physical_device.c b/src/venus/vkr_physical_device.c index 65fdf4c4..bc387548 100644 --- a/src/venus/vkr_physical_device.c +++ b/src/venus/vkr_physical_device.c @@ -5,7 +5,7 @@ #include "vkr_physical_device.h" -#include "venus-protocol/vn_protocol_renderer_device.h" +#include "vn_protocol_renderer_device.h" #include "vkr_context.h" #include "vkr_device.h" @@ -430,9 +430,6 @@ vkr_dispatch_vkEnumeratePhysicalDevices(struct vn_dispatch_context *dispatch, continue; } - if (!vkr_context_validate_object_id(ctx, id)) - break; - physical_dev = vkr_object_alloc(sizeof(*physical_dev), VK_OBJECT_TYPE_PHYSICAL_DEVICE, id); if (!physical_dev) { diff --git a/src/venus/vkr_physical_device.h b/src/venus/vkr_physical_device.h index 139b11ad..371899b3 100644 --- a/src/venus/vkr_physical_device.h +++ b/src/venus/vkr_physical_device.h @@ -8,7 +8,7 @@ #include "vkr_common.h" -#include "venus-protocol/vn_protocol_renderer_util.h" +#include "vn_protocol_renderer_util.h" struct vkr_physical_device { struct vkr_object base; diff --git a/src/venus/vkr_queue.c b/src/venus/vkr_queue.c index 61b94bef..d75a2294 100644 --- a/src/venus/vkr_queue.c +++ b/src/venus/vkr_queue.c @@ -5,7 +5,7 @@ #include "vkr_queue.h" -#include "venus-protocol/vn_protocol_renderer_queue.h" +#include "vn_protocol_renderer_queue.h" #include "vkr_context.h" #include "vkr_physical_device.h" @@ -177,6 +177,7 @@ vkr_queue_thread(void *arg) if (sync->device_lost) { result = VK_ERROR_DEVICE_LOST; } else { + TRACE_SCOPE("vk->WaitForFences"); result = vk->WaitForFences(dev->base.handle.device, 1, &sync->fence, true, ns_per_sec * 3); } @@ -296,8 +297,6 @@ vkr_queue_assign_object_id(struct vkr_context *ctx, vkr_context_set_fatal(ctx); return; } - if (!vkr_context_validate_object_id(ctx, id)) - return; queue->base.id = id; @@ -440,6 +439,7 @@ static void vkr_dispatch_vkResetFences(UNUSED struct vn_dispatch_context *dispatch, struct vn_command_vkResetFences *args) { + TRACE_FUNC(); struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; @@ -462,6 +462,7 @@ static void vkr_dispatch_vkWaitForFences(UNUSED struct vn_dispatch_context *dispatch, struct vn_command_vkWaitForFences *args) { + TRACE_FUNC(); struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; @@ -474,6 +475,7 @@ static void vkr_dispatch_vkResetFenceResourceMESA(struct vn_dispatch_context *dispatch, struct vn_command_vkResetFenceResourceMESA *args) { + TRACE_FUNC(); struct vkr_context *ctx = dispatch->data; struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; @@ -525,6 +527,7 @@ static void vkr_dispatch_vkWaitSemaphores(UNUSED struct vn_dispatch_context *dispatch, struct vn_command_vkWaitSemaphores *args) { + TRACE_FUNC(); struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; @@ -536,6 +539,7 @@ static void vkr_dispatch_vkSignalSemaphore(UNUSED struct vn_dispatch_context *dispatch, struct vn_command_vkSignalSemaphore *args) { + TRACE_FUNC(); struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; @@ -548,6 +552,7 @@ vkr_dispatch_vkWaitSemaphoreResourceMESA( struct vn_dispatch_context *dispatch, struct vn_command_vkWaitSemaphoreResourceMESA *args) { + TRACE_FUNC(); struct vkr_context *ctx = dispatch->data; struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; @@ -575,6 +580,7 @@ vkr_dispatch_vkImportSemaphoreResourceMESA( struct vn_dispatch_context *dispatch, struct vn_command_vkImportSemaphoreResourceMESA *args) { + TRACE_FUNC(); struct vkr_context *ctx = dispatch->data; struct vkr_device *dev = vkr_device_from_handle(args->device); struct vn_device_proc_table *vk = &dev->proc_table; diff --git a/src/venus/vkr_renderer.c b/src/venus/vkr_renderer.c index c43a96e6..8aae9241 100644 --- a/src/venus/vkr_renderer.c +++ b/src/venus/vkr_renderer.c @@ -5,7 +5,7 @@ #include "vkr_common.h" -#include "venus-protocol/vn_protocol_renderer_info.h" +#include "vn_protocol_renderer_info.h" #include "virtgpu_drm.h" #include "venus_hw.h" @@ -69,7 +69,9 @@ vkr_renderer_init(uint32_t flags, const struct vkr_renderer_callbacks *cbs) return false; vkr_debug_init(); - virgl_log_set_handler(cbs->debug_logger, NULL, NULL); + + if (cbs->debug_logger) + virgl_log_set_handler(cbs->debug_logger, NULL, NULL); vkr_state.cbs = cbs; list_inithead(&vkr_state.contexts); diff --git a/src/venus/vkr_ring.c b/src/venus/vkr_ring.c index dc6b5789..0d4899ef 100644 --- a/src/venus/vkr_ring.c +++ b/src/venus/vkr_ring.c @@ -9,7 +9,7 @@ #include #include -#include "venus-protocol/vn_protocol_renderer_dispatches.h" +#include "vn_protocol_renderer_dispatches.h" #include "vkr_context.h" diff --git a/src/venus/vkr_ring.h b/src/venus/vkr_ring.h index cd70c149..89d8159e 100644 --- a/src/venus/vkr_ring.h +++ b/src/venus/vkr_ring.h @@ -8,7 +8,7 @@ #include "vkr_common.h" -#include "venus-protocol/vn_protocol_renderer_defines.h" +#include "vn_protocol_renderer_defines.h" /* We read from the ring buffer to a temporary buffer for * vkr_context_submit_cmd. Until that is changed, we want to put a limit diff --git a/src/venus/vkr_transport.c b/src/venus/vkr_transport.c index 85c02945..a8daba46 100644 --- a/src/venus/vkr_transport.c +++ b/src/venus/vkr_transport.c @@ -5,8 +5,8 @@ #include "vkr_transport.h" -#include "venus-protocol/vn_protocol_renderer_dispatches.h" -#include "venus-protocol/vn_protocol_renderer_transport.h" +#include "vn_protocol_renderer_dispatches.h" +#include "vn_protocol_renderer_transport.h" #include "vkr_context.h" #include "vkr_ring.h" diff --git a/src/virgl_hw.h b/src/virgl_hw.h index 078da7d7..0ee3f60b 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -561,6 +561,7 @@ enum virgl_formats { VIRGL_FORMAT_Y12X4_U12X4_V12X4_420_UNORM = 478, VIRGL_FORMAT_Y12X4_U12X4_V12X4_422_UNORM = 479, VIRGL_FORMAT_Y12X4_U12X4_V12X4_444_UNORM = 480, + VIRGL_FORMAT_X6Y10_X6U10X6V10_422_UNORM = 481, VIRGL_FORMAT_MAX /* = PIPE_FORMAT_COUNT */, @@ -628,6 +629,7 @@ enum virgl_formats { #define VIRGL_CAP_V2_MIRROR_CLAMP_TO_EDGE (1u << 16) #define VIRGL_CAP_V2_MIRROR_CLAMP (1u << 17) #define VIRGL_CAP_V2_RESOURCE_LAYOUT (1u << 18) +#define VIRGL_CAP_V2_QUERY_FORMAT_MODIFIER (1u << 19) /* virgl bind flags - these are compatible with mesa 10.5 gallium. * but are fixed, no other should be passed to virgl either. diff --git a/src/virgl_protocol.h b/src/virgl_protocol.h index 1df10a40..d3d1ede7 100644 --- a/src/virgl_protocol.h +++ b/src/virgl_protocol.h @@ -58,6 +58,16 @@ struct virgl_resource_layout } planes[VIRGL_RESOURCE_MAX_PLANES]; }; +#define VIRGL_MAX_FORMATS_MODIFIERS 128 +struct virgl_gbm_format_modifier +{ + uint64_t num; + struct { + uint64_t modifier; + uint64_t virgl_format; + } formats[VIRGL_MAX_FORMATS_MODIFIERS]; +}; + enum virgl_object_type { VIRGL_OBJECT_NULL, VIRGL_OBJECT_BLEND, @@ -144,6 +154,7 @@ enum virgl_context_cmd { VIRGL_CCMD_CLEAR_SURFACE, VIRGL_CCMD_GET_PIPE_RESOURCE_LAYOUT, + VIRGL_CCMD_QUERY_GBM_FORMAT_MODIFIER, VIRGL_MAX_COMMANDS }; @@ -790,4 +801,8 @@ enum vrend_tweak_type { #define VIRGL_RESOURCE_LAYOUT_HANDLE_OUT 1 #define VIRGL_RESOURCE_LAYOUT_HANDLE_TARGET 2 +/* VIRGL_CCMD_QUERY_GBM_FORMAT_MODIFIER */ +#define VIRGL_QUERY_FORMAT_MODIFIER_SIZE 1 +#define VIRGL_QUERY_FORMAT_MODIFIER_HANDLE 1 + #endif diff --git a/src/virgl_util.c b/src/virgl_util.c index 81846503..8988bb76 100644 --- a/src/virgl_util.c +++ b/src/virgl_util.c @@ -257,10 +257,15 @@ void virgl_prefixed_logv(const char *domain, va_list va) { char *prefixed_fmt = NULL; + char line_end = '\0'; assert(strchr(domain,'%') == NULL); - if (asprintf(&prefixed_fmt, "%s: %s", domain, fmt) < 0) + /* add new line if needed */ + if (fmt[strlen(fmt)-1] != '\n') + line_end = '\n'; + + if (asprintf(&prefixed_fmt, "%s: %s%c", domain, fmt, line_end) < 0) return; virgl_logv(log_level, prefixed_fmt, va); diff --git a/src/virglrenderer.c b/src/virglrenderer.c index 2e64d82e..a37b108e 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -207,6 +207,18 @@ static void per_context_fence_retire(struct virgl_context *ctx, fence_id); } +static int get_drm_fd(void) +{ + if (state.cbs->version >= 2 && state.cbs->get_drm_fd) + return state.cbs->get_drm_fd(state.cookie); + +#ifdef HAVE_EPOXY_EGL_H + return virgl_egl_open_drm_fd(egl); +#else + return -1; +#endif +} + int virgl_renderer_context_create_with_flags(uint32_t ctx_id, uint32_t ctx_flags, uint32_t nlen, @@ -246,10 +258,7 @@ int virgl_renderer_context_create_with_flags(uint32_t ctx_id, case VIRTGPU_DRM_CAPSET_DRM: if (!state.drm_initialized) return EINVAL; - if (state.cbs->version >= 2 && state.cbs->get_drm_fd) - ctx = drm_renderer_create(nlen, name, state.cbs->get_drm_fd(state.cookie)); - else - ctx = drm_renderer_create(nlen, name, -1); + ctx = drm_renderer_create(nlen, name, get_drm_fd()); break; default: return EINVAL; @@ -689,14 +698,6 @@ static int make_current_surfaceless(virgl_renderer_gl_context ctx) return 0; } -static int get_drm_fd(void) -{ - if (state.cbs->get_drm_fd) - return state.cbs->get_drm_fd(state.cookie); - - return -1; -} - static const struct vrend_if_cbs vrend_cbs = { ctx0_fence_retire, create_gl_context, @@ -806,7 +807,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (state.client_initialized && (state.cookie != cookie || state.flags != flags || state.cbs != cbs)) { - virgl_error("renderer already initialized"); + virgl_error("renderer already initialized\n"); return -EBUSY; } @@ -814,7 +815,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (!cbs || cbs->version < 1 || cbs->version > VIRGL_RENDERER_CALLBACKS_VERSION) { - virgl_error("invalid renderer callbacks"); + virgl_error("invalid renderer callbacks\n"); return -1; } @@ -831,7 +832,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks ret = virgl_resource_table_init(pipe_cbs); if (ret) { - virgl_error("failed to initialize virgl resources"); + virgl_error("failed to initialize virgl resources\n"); goto fail; } state.resource_initialized = true; @@ -840,7 +841,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (!state.context_initialized) { ret = virgl_context_table_init(); if (ret) { - virgl_error("failed to initialize virgl context"); + virgl_error("failed to initialize virgl context\n"); goto fail; } state.context_initialized = true; @@ -859,7 +860,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (ret) { if (drm_fd >= 0) close(drm_fd); - virgl_error("failed to initialize vrend winsys"); + virgl_error("failed to initialize vrend winsys\n"); goto fail; } state.winsys_initialized = true; @@ -871,7 +872,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (!cbs->create_gl_context || !cbs->destroy_gl_context || !cbs->make_current) { - virgl_error("invalid renderer gl callbacks"); + virgl_error("invalid renderer gl callbacks\n"); ret = EINVAL; goto fail; } @@ -879,14 +880,14 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks egl_display = state.cbs->get_egl_display(cookie); if (!egl_display) { - virgl_error("failed to get egl display"); + virgl_error("failed to get egl display\n"); ret = -1; goto fail; } ret = vrend_winsys_init_external(egl_display); if (ret) { - virgl_error("failed to initialize vrend winsys"); + virgl_error("failed to initialize vrend winsys\n"); ret = -1; goto fail; } @@ -898,7 +899,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks uint32_t renderer_flags = 0; if (!cookie || !cbs) { - virgl_error("invalid renderer vrend callbacks"); + virgl_error("invalid renderer vrend callbacks\n"); ret = -1; goto fail; } @@ -922,7 +923,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks ret = vrend_renderer_init(&vrend_cbs, renderer_flags); if (ret) { - virgl_error("failed to initialize vrend renderer"); + virgl_error("failed to initialize vrend renderer\n"); goto fail; } state.vrend_initialized = true; @@ -931,7 +932,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (!state.proxy_initialized && (flags & VIRGL_RENDERER_RENDER_SERVER)) { ret = proxy_renderer_init(&proxy_cbs, flags | VIRGL_RENDERER_NO_VIRGL); if (ret) { - virgl_error("failed to initialize venus renderer"); + virgl_error("failed to initialize venus renderer\n"); goto fail; } state.proxy_initialized = true; @@ -939,14 +940,11 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if ((flags & VIRGL_RENDERER_ASYNC_FENCE_CB) && (flags & VIRGL_RENDERER_DRM)) { - int drm_fd = -1; - - if (cbs->version >= 2 && cbs->get_drm_fd) - drm_fd = cbs->get_drm_fd(cookie); + int drm_fd = get_drm_fd(); ret = drm_renderer_init(drm_fd); if (ret) { - virgl_error("failed to initialize drm renderer"); + virgl_error("failed to initialize drm renderer\n"); goto fail; } state.drm_initialized = true; @@ -955,7 +953,7 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks if (!state.fence_initialized) { ret = virgl_fence_table_init(); if (ret) { - virgl_error("failed to initialize fence table"); + virgl_error("failed to initialize fence table\n"); goto fail; } state.fence_initialized = true; diff --git a/src/vrend/virgl_video.c b/src/vrend/virgl_video.c index dc1e8cd6..43f19c67 100644 --- a/src/vrend/virgl_video.c +++ b/src/vrend/virgl_video.c @@ -194,6 +194,8 @@ static enum pipe_format pipe_format_from_va_fourcc(unsigned format) return PIPE_FORMAT_P010; case VA_FOURCC('P','0','1','6'): return PIPE_FORMAT_P016; + case VA_FOURCC('P','2','1','0'): + return PIPE_FORMAT_P210; case VA_FOURCC('I','4','2','0'): return PIPE_FORMAT_IYUV; case VA_FOURCC('Y','V','1','2'): @@ -296,6 +298,9 @@ static uint32_t va_format_from_pipe(uint32_t format) case PIPE_FORMAT_P010: va_format = VA_RT_FORMAT_YUV420_10; break; + case PIPE_FORMAT_P210: + va_format = VA_RT_FORMAT_YUV422_10; + break; default: va_format = VA_RT_FORMAT_YUV420; } diff --git a/src/vrend/vrend_blitter.c b/src/vrend/vrend_blitter.c index f8291153..eed56e4d 100644 --- a/src/vrend/vrend_blitter.c +++ b/src/vrend/vrend_blitter.c @@ -477,7 +477,7 @@ static void vrend_renderer_init_blit_ctx(struct vrend_blitter_ctx *blit_ctx) } if (!blit_ctx->gl_context) { - virgl_error("virglrenderer: Unable to create blit context"); + virgl_error("virglrenderer: Unable to create blit context\n"); abort(); } diff --git a/src/vrend/vrend_decode.c b/src/vrend/vrend_decode.c index 7774a253..72fdab49 100644 --- a/src/vrend/vrend_decode.c +++ b/src/vrend/vrend_decode.c @@ -1763,6 +1763,17 @@ static int vrend_decode_get_pipe_resource_layout(struct vrend_context *ctx, cons return vrend_renderer_pipe_resource_get_layout(ctx, out_handle, target_handle); } +static int vrend_decode_query_gbm_format_modifier(struct vrend_context *ctx, const uint32_t *buf, uint32_t length) +{ + TRACE_FUNC(); + if (length < VIRGL_QUERY_FORMAT_MODIFIER_SIZE) + return EINVAL; + + uint32_t handle = get_buf_entry(buf, VIRGL_QUERY_FORMAT_MODIFIER_HANDLE); + + return vrend_renderer_pipe_query_format_modifier(ctx, handle); +} + #ifdef ENABLE_VIDEO /* video codec related functions */ @@ -2031,6 +2042,7 @@ static const vrend_decode_callback decode_table[VIRGL_MAX_COMMANDS] = { [VIRGL_CCMD_END_FRAME] = vrend_unsupported, #endif [VIRGL_CCMD_GET_PIPE_RESOURCE_LAYOUT] = vrend_decode_get_pipe_resource_layout, + [VIRGL_CCMD_QUERY_GBM_FORMAT_MODIFIER] = vrend_decode_query_gbm_format_modifier, }; static void dump_command_stream_to_file(const void *buffer, size_t size) diff --git a/src/vrend/vrend_renderer.c b/src/vrend/vrend_renderer.c index 94c75b10..3282e399 100644 --- a/src/vrend/vrend_renderer.c +++ b/src/vrend/vrend_renderer.c @@ -53,6 +53,7 @@ #include "vrend_debug.h" #include "vrend_winsys.h" #include "vrend_blitter.h" +#include "vrend_venus_interop.h" #include "virgl_util.h" @@ -982,13 +983,6 @@ bool vrend_format_is_bgra(enum virgl_formats format) { format == VIRGL_FORMAT_B8G8R8A8_SRGB); } -static bool -vrend_resource_resource_is_imported(const struct vrend_resource *res) -{ - return has_bit(res->storage_bits, VREND_STORAGE_EGL_IMAGE) || - has_bit(res->storage_bits, VREND_STORAGE_GL_MEMOBJ); -} - static GLuint vrend_resource_get_internal_format_override(const struct vrend_resource *res) { /* Some shared resources imported to guest mesa as EGL images occupy 24bpp instead of more common 32bpp. @@ -1017,17 +1011,25 @@ static GLuint vrend_resource_get_internal_format_override(const struct vrend_res static bool vrend_resource_supports_view(const struct vrend_resource *res, UNUSED enum virgl_formats view_format) { - /* Texture views on imported bgr* resources are not supported and lead to - * unexpected format interpretation since internally allocated bgr* resources - * use GL_RGBA8 internal format, while imported resources use BGRA8, but GL - * lacks an equivalent internalformat enum. + /* Texture views on eglimage-backed bgr* resources are not supported and + * lead to unexpected format interpretation since internally allocated + * bgr* resources use GL_RGBA8 internal format, while eglimage-backed + * resources use BGRA8, but GL lacks an equivalent internalformat enum. * * For views that don't require colorspace conversion, we can add swizzles * instead. For views that do require colorspace conversion, manual srgb * decode/encode is required. */ return !(vrend_format_is_bgra(res->base.format) && - vrend_resource_resource_is_imported(res)) && - (vrend_resource_get_internal_format_override(res) == GL_NONE); + has_bit(res->storage_bits, VREND_STORAGE_EGL_IMAGE)) && + (vrend_resource_get_internal_format_override(res) == GL_NONE); +} + +static inline bool +vrend_resource_needs_redblue_swizzle(struct vrend_resource *res, + enum virgl_formats view_format) +{ + return !vrend_resource_supports_view(res, view_format) && + vrend_format_is_bgra(res->base.format) ^ vrend_format_is_bgra(view_format); } static inline bool @@ -2751,8 +2753,7 @@ int vrend_create_sampler_view(struct vrend_context *ctx, for (enum pipe_swizzle i = 0; i < 4; ++i) view->gl_swizzle[i] = to_gl_swizzle(swizzle[i]); - if (!vrend_resource_supports_view(view->texture, view->format) && - vrend_format_is_bgra(view->format)) { + if (res->is_imported && vrend_format_is_bgra(view->texture->base.format)) { /* Swap R/B channel for vulkan imported texture. */ GLenum tmp = view->gl_swizzle[0]; view->gl_swizzle[0] = view->gl_swizzle[2]; @@ -3130,8 +3131,7 @@ static void vrend_hw_emit_framebuffer_state(struct vrend_sub_context *sub_ctx) * be necessary, e.g. for rgb* views on bgr* resources. Ensure this * happens by adding a shader swizzle to the final write of such surfaces. */ - if (!vrend_resource_supports_view(surf->texture, surf->format) && - vrend_format_is_bgra(surf->format)) + if (vrend_resource_needs_redblue_swizzle(surf->texture, surf->format)) sub_ctx->swizzle_output_rgb_to_bgr |= 1 << i; /* glTextureView() on eglimage-backed bgr* textures for is not supported. @@ -4707,8 +4707,7 @@ static void vrend_clear_prepare(struct vrend_sub_context *sub_ctx, if (surf && vrend_format_is_emulated_alpha(surf->format)) { glClearColor(colorf[3], 0.0, 0.0, 0.0); } else if (surf && - (!vrend_resource_supports_view(surf->texture, surf->format) && - vrend_format_is_bgra(surf->format))) { + vrend_resource_needs_redblue_swizzle(surf->texture, surf->format)) { VREND_DEBUG(dbg_bgra, sub_ctx->parent, "swizzling glClearColor() since rendering surface is an externally-stored BGR* resource\n"); glClearColor(colorf[2], colorf[1], colorf[0], colorf[3]); } else { @@ -7506,6 +7505,7 @@ static enum virgl_resource_fd_type vrend_pipe_resource_export_fd(UNUSED struct p struct vrend_resource *res = (struct vrend_resource *)pres; if (res->storage_bits & VREND_STORAGE_GBM_BUFFER) { + assert(res->gbm_bo != NULL); int ret = virgl_gbm_export_fd(gbm->device, gbm_bo_get_handle(res->gbm_bo).u32, fd); if (!ret) @@ -7574,7 +7574,7 @@ static bool vrend_use_gbm_layout_feature(UNUSED uint32_t flags) if (debug_get_bool_option("VIRGL_GBM_LAYOUT_FORCE_ENABLE", false)) return true; - if (!debug_get_bool_option("VIRGL_GBM_LAYOUT_ENABLE", false)) + if (debug_get_bool_option("VIRGL_GBM_LAYOUT_DISABLE", false)) return false; if (!(flags & VREND_USE_GBM_LAYOUT)) @@ -7770,6 +7770,11 @@ int vrend_renderer_init(const struct vrend_if_cbs *cbs, uint32_t flags) vrend_state.gbm_layout_feat = vrend_use_gbm_layout_feature(flags); +#if defined(ENABLE_GBM_ALLOCATION) && !defined(MINIGBM) + if (gbm && gbm->device && vrend_state.gbm_layout_feat) + vrend_init_venus_interop(gbm->device); +#endif + return 0; cleanup_and_fail: if (flags & VREND_USE_THREAD_SYNC) @@ -7790,6 +7795,8 @@ vrend_renderer_fini(void) vrend_state.eventfd = -1; } + vrend_deinit_venus_interop(); + vrend_free_fences(); vrend_blitter_fini(); @@ -8614,24 +8621,27 @@ static void vrend_resource_gbm_init(struct vrend_resource *gr, uint32_t format) * GBM allocation may be less optimal compared to a regular GL allocation. * Skip GBM allocation when we don't actually need it. */ - if (!vrend_state.gbm_layout_feat) + if (!vrend_has_venus_interop()) return; - - /* - * Kernel virtio-gpu driver doesn't support modifiers other than linear and - * venus needs a real modifier that backs GBM buffer when it imports vrend - * resource. Linear allocation is needed when venus works in KMS mode on guest - * and it wants to present vrend resources. - */ - if (gr->base.bind & VIRGL_BIND_SHARED) - gbm_flags |= GBM_BO_USE_LINEAR; #endif if (!gbm_device_is_format_supported(gbm->device, gbm_format, gbm_flags)) return; - struct gbm_bo *bo = gbm_bo_create(gbm->device, gr->base.width0, gr->base.height0, - gbm_format, gbm_flags); + struct gbm_bo *bo; + +#if !defined(MINIGBM) + if ((gr->base.bind & VIRGL_BIND_SHARED) && !(gbm_flags & GBM_BO_USE_LINEAR)) { + bo = vrend_vk_gbm_bo_create(gbm->device, gr->base.width0, gr->base.height0, + gbm_format); + } else +#endif + { + bo = gbm_bo_create(gbm->device, gr->base.width0, gr->base.height0, + gbm_format, gbm_flags); + + gr->gbm_direct_transfer = true; + } if (!bo) return; @@ -8646,6 +8656,7 @@ static void vrend_resource_gbm_init(struct vrend_resource *gr, uint32_t format) gr->egl_image = virgl_egl_image_from_gbm_bo(egl, bo); if (!gr->egl_image) { gr->gbm_bo = NULL; + gr->storage_bits &= ~VREND_STORAGE_GBM_BUFFER; gbm_bo_destroy(bo); return; } @@ -9095,6 +9106,10 @@ static inline bool resource_contains_box(struct vrend_resource *res, box->x > width || box->y > height || box->z > depth)) return false; + /* Check box size sanity */ + if (unlikely(box->width < 0 || box->height < 0 || box->depth < 0)) + return false; + end_x = (int64_t) box->x + (int64_t) box->width; end_y = (int64_t) box->y + (int64_t) box->height; end_z = (int64_t) box->z + (int64_t) box->depth; @@ -9675,7 +9690,7 @@ static int vrend_transfer_send_getteximage(struct vrend_resource *res, return 0; } -static void do_readpixels(struct vrend_resource *res, +static bool do_readpixels(struct vrend_resource *res, int idx, uint32_t level, uint32_t layer, GLint x, GLint y, GLsizei width, GLsizei height, @@ -9683,6 +9698,7 @@ static void do_readpixels(struct vrend_resource *res, GLsizei bufSize, void *data) { GLuint fb_id; + GLenum err; glGenFramebuffers(1, &fb_id); glBindFramebuffer(GL_FRAMEBUFFER, fb_id); @@ -9731,7 +9747,15 @@ static void do_readpixels(struct vrend_resource *res, else glReadPixels(x, y, width, height, format, type, data); + err = glGetError(); glDeleteFramebuffers(1, &fb_id); + + if (err != GL_NO_ERROR) { + virgl_error("glReadPixels failed: GL error %d\n", err); + return false; + } + + return true; } static int vrend_transfer_send_readpixels(struct vrend_context *ctx, @@ -9742,7 +9766,7 @@ static int vrend_transfer_send_readpixels(struct vrend_context *ctx, char *myptr = (char*)iov[0].iov_base + info->offset; int need_temp = 0; char *data; - bool actually_invert, separate_invert = false; + bool actually_invert, separate_invert = false, read_pixels; GLenum format, type; GLint y1; uint64_t send_size = 0; @@ -9807,7 +9831,7 @@ static int vrend_transfer_send_readpixels(struct vrend_context *ctx, return EINVAL; } - data = malloc(send_size); + data = calloc(1, send_size); if (!data) { virgl_error("Memory allocation failed for %"PRIu64"\n", send_size); return ENOMEM; @@ -9857,8 +9881,26 @@ static int vrend_transfer_send_readpixels(struct vrend_context *ctx, } } - do_readpixels(res, 0, info->level, info->box->z, info->box->x, y1, - info->box->width, info->box->height, format, type, send_size, data); + read_pixels = do_readpixels(res, 0, info->level, info->box->z, info->box->x, y1, + info->box->width, info->box->height, format, type, + send_size, data); + + if (has_feature(feat_mesa_invert) && actually_invert) + glPixelStorei(GL_PACK_INVERT_MESA, 0); + if (!need_temp && row_stride) + glPixelStorei(GL_PACK_ROW_LENGTH, 0); + glPixelStorei(GL_PACK_ALIGNMENT, 4); + +#if UTIL_ARCH_BIG_ENDIAN + glPixelStorei(GL_PACK_SWAP_BYTES, 0); +#endif + + if (!read_pixels) { + if (need_temp) + free(data); + glBindFramebuffer(GL_FRAMEBUFFER, old_fbo); + return EINVAL; + } /* on GLES, texture-backed BGR* resources are always stored with RGB* internal format, but * the guest will expect to readback the data in BGRA format. @@ -9877,15 +9919,6 @@ static int vrend_transfer_send_readpixels(struct vrend_context *ctx, else vrend_scale_depth(data, send_size, depth_scale); } - if (has_feature(feat_mesa_invert) && actually_invert) - glPixelStorei(GL_PACK_INVERT_MESA, 0); - if (!need_temp && row_stride) - glPixelStorei(GL_PACK_ROW_LENGTH, 0); - glPixelStorei(GL_PACK_ALIGNMENT, 4); - -#if UTIL_ARCH_BIG_ENDIAN - glPixelStorei(GL_PACK_SWAP_BYTES, 0); -#endif if (need_temp) { write_transfer_data(&res->base, iov, num_iovs, data, @@ -10004,7 +10037,8 @@ static int vrend_renderer_transfer_internal(struct vrend_context *ctx, } #if defined(HAVE_EPOXY_EGL_H) && defined(ENABLE_GBM_ALLOCATION) - if (res->gbm_bo && (transfer_mode == VIRGL_TRANSFER_TO_HOST || + if (res->gbm_direct_transfer && + (transfer_mode == VIRGL_TRANSFER_TO_HOST || !has_bit(res->storage_bits, VREND_STORAGE_EGL_IMAGE))) { const bool success = virgl_gbm_transfer(res->gbm_bo, transfer_mode, iov, num_iovs, info) == 0; if (success) @@ -10097,7 +10131,7 @@ int vrend_transfer_inline_write(struct vrend_context *ctx, } #if defined(HAVE_EPOXY_EGL_H) && defined(ENABLE_GBM_ALLOCATION) - if (res->gbm_bo) { + if (res->gbm_direct_transfer) { assert(!info->synchronized); return virgl_gbm_transfer(res->gbm_bo, VIRGL_TRANSFER_TO_HOST, @@ -10129,7 +10163,7 @@ int vrend_renderer_copy_transfer3d(struct vrend_context *ctx, } #if defined(HAVE_EPOXY_EGL_H) && defined(ENABLE_GBM_ALLOCATION) - if (dst_res->gbm_bo && !TRANSFER_NO_GBM_MAPPING(info)) { + if (dst_res->gbm_direct_transfer && !TRANSFER_NO_GBM_MAPPING(info)) { bool use_gbm = true; /* The guest uses copy transfers against busy resources to avoid @@ -10186,7 +10220,7 @@ int vrend_renderer_copy_transfer3d_from_host(struct vrend_context *ctx, } #if defined(HAVE_EPOXY_EGL_H) && defined(ENABLE_GBM_ALLOCATION) - if (src_res->gbm_bo && !TRANSFER_NO_GBM_MAPPING(info)) { + if (src_res->gbm_direct_transfer && !TRANSFER_NO_GBM_MAPPING(info)) { bool use_gbm = true; /* The guest uses copy transfers against busy resources to avoid @@ -10834,14 +10868,6 @@ static GLuint vrend_make_view(struct vrend_resource *res, enum virgl_formats for return view_id; } -static inline bool -vrend_blit_resource_needs_redblue_swizzle(struct vrend_resource *res, - enum virgl_formats view_format) -{ - return !vrend_resource_supports_view(res, view_format) && - vrend_format_is_bgra(res->base.format) ^ vrend_format_is_bgra(view_format); -} - static bool vrend_blit_needs_redblue_swizzle(struct vrend_resource *src_res, struct vrend_resource *dst_res, const struct pipe_blit_info *info) @@ -10849,8 +10875,8 @@ static bool vrend_blit_needs_redblue_swizzle(struct vrend_resource *src_res, /* EGL-backed bgr* resources are always stored with BGR* internal format, * despite Virgl's use of the GL_RGBA8 internal format, so special care must * be taken when determining the swizzling. */ - bool src_needs_swizzle = vrend_blit_resource_needs_redblue_swizzle(src_res, info->src.format); - bool dst_needs_swizzle = vrend_blit_resource_needs_redblue_swizzle(dst_res, info->dst.format); + bool src_needs_swizzle = vrend_resource_needs_redblue_swizzle(src_res, info->src.format); + bool dst_needs_swizzle = vrend_resource_needs_redblue_swizzle(dst_res, info->dst.format); return src_needs_swizzle ^ dst_needs_swizzle; } @@ -12090,7 +12116,7 @@ static int get_glsl_version(void) version_str = glGetString(GL_SHADING_LANGUAGE_VERSION); if (!version_str) { - virgl_error("GL_SHADING_LANGUAGE_VERSION query failed with empty output."); + virgl_error("GL_SHADING_LANGUAGE_VERSION query failed with empty output.\n"); return -1; } @@ -12103,7 +12129,7 @@ static int get_glsl_version(void) } if (count != 2) { - virgl_error("GL_SHADING_LANGUAGE_VERSION query failed with unexpected version format."); + virgl_error("GL_SHADING_LANGUAGE_VERSION query failed with unexpected version format.\n"); return -1; } @@ -12869,8 +12895,8 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c #else caps->v2.num_video_caps = 0; #endif - if (vrend_state.gbm_layout_feat) - caps->v2.capability_bits_v2 |= VIRGL_CAP_V2_RESOURCE_LAYOUT; + if (vrend_has_venus_interop()) + caps->v2.capability_bits_v2 |= VIRGL_CAP_V2_QUERY_FORMAT_MODIFIER; } void vrend_renderer_fill_caps(uint32_t set, uint32_t version, @@ -12973,7 +12999,11 @@ void *vrend_renderer_get_cursor_contents(struct pipe_resource *pres, glBindTexture(res->target, res->gl_id); glGetnTexImageARB(res->target, 0, format, type, size, data); } else if (vrend_state.use_gles) { - do_readpixels(res, 0, 0, 0, 0, 0, *width, *height, format, type, size, data); + if (!do_readpixels(res, 0, 0, 0, 0, 0, *width, *height, format, type, size, data)) { + free(data); + free(data2); + return NULL; + } } else { glBindTexture(res->target, res->gl_id); glGetTexImage(res->target, 0, format, type, data); @@ -13497,6 +13527,7 @@ vrend_renderer_pipe_resource_set_type(struct vrend_context *ctx, glTexParameteri(gr->target, GL_TEXTURE_TILING_EXT, GL_LINEAR_TILING_EXT); glTexStorageMem2DEXT(gr->target, 1, internalformat, width, height, mem_object, 0); glBindTexture(gr->target, 0); + gr->is_imported = true; } res->pipe_resource = &gr->base; } @@ -13794,6 +13825,40 @@ vrend_renderer_pipe_resource_get_layout(struct vrend_context *ctx, return 0; } + +int +vrend_renderer_pipe_query_format_modifier(struct vrend_context *ctx, uint32_t res_id) +{ + struct virgl_gbm_format_modifier fmt_mod = { 0 }; + struct vrend_resource *res; + + res = vrend_renderer_ctx_res_lookup(ctx, res_id); + if (!res) { + vrend_report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_RESOURCE, res_id); + return EINVAL; + } + + vrend_vk_get_supported_formats(&fmt_mod); + + if (res->iov) { + if (vrend_write_to_iovec(res->iov, res->num_iovs, 0, + (const void *) &fmt_mod, sizeof(fmt_mod)) != sizeof(fmt_mod)) { + virgl_error("format modifier list does not fit IOV size\n"); + vrend_report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_RESOURCE, res_id); + return EINVAL; + } + } else { + if (res->base.width0 >= sizeof(fmt_mod)) { + memcpy(res->ptr, &fmt_mod, sizeof(fmt_mod)); + } else { + virgl_error("format modifier list does not fit buffer size\n"); + vrend_report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_RESOURCE, res_id); + return EINVAL; + } + } + + return 0; +} #else int vrend_renderer_pipe_resource_get_layout(UNUSED struct vrend_context *ctx, @@ -13801,4 +13866,11 @@ vrend_renderer_pipe_resource_get_layout(UNUSED struct vrend_context *ctx, { return EINVAL; } + +int +vrend_renderer_pipe_query_format_modifier(UNUSED struct vrend_context *ctx, + UNUSED uint32_t res_id) +{ + return EINVAL; +} #endif diff --git a/src/vrend/vrend_renderer.h b/src/vrend/vrend_renderer.h index d732e7f1..cb773c0a 100644 --- a/src/vrend/vrend_renderer.h +++ b/src/vrend/vrend_renderer.h @@ -104,6 +104,7 @@ struct vrend_resource { uint64_t mipmap_offsets[VR_MAX_TEXTURE_2D_LEVELS]; void *gbm_bo, *egl_image; void *aux_plane_egl_image[VIRGL_GBM_MAX_PLANES]; + bool gbm_direct_transfer; #ifdef WIN32 ID3D11Texture2D *d3d_tex2d; #endif @@ -114,6 +115,7 @@ struct vrend_resource { uint32_t blob_id; struct list_head head; + bool is_imported; }; #define VIRGL_TEXTURE_NEED_SWIZZLE (1 << 0) @@ -646,4 +648,7 @@ int vrend_renderer_pipe_resource_get_layout(struct vrend_context *ctx, uint32_t out_res_id, uint32_t res_id); +int +vrend_renderer_pipe_query_format_modifier(struct vrend_context *ctx, uint32_t res_id); + #endif diff --git a/src/vrend/vrend_shader.c b/src/vrend/vrend_shader.c index d4e815b6..83f8bad9 100644 --- a/src/vrend/vrend_shader.c +++ b/src/vrend/vrend_shader.c @@ -239,10 +239,10 @@ struct dump_ctx { uint32_t ssbo_array_base; uint32_t ssbo_atomic_array_base; uint32_t ssbo_integer_mask; - uint8_t ssbo_memory_qualifier[32]; + uint8_t ssbo_memory_qualifier[PIPE_MAX_SHADER_BUFFERS]; int32_t ssbo_last_binding; - struct vrend_shader_image images[32]; + struct vrend_shader_image images[PIPE_MAX_SHADER_IMAGES]; uint32_t images_used_mask; int32_t image_last_binding; @@ -1331,6 +1331,12 @@ iter_declaration(struct tgsi_iterate_context *iter, return false; } + if (decl->Range.Last >= ARRAY_SIZE(ctx->inputs)) { + virgl_error("Input slot out of range, want %d, max is %zd\n", + decl->Range.Last, ARRAY_SIZE(ctx->inputs)); + return false; + } + if (iter->processor.Processor == TGSI_PROCESSOR_VERTEX) { ctx->attrib_input_mask |= (1 << decl->Range.First); ctx->inputs[i].type = get_type(ctx->key->vs.attrib_signed_int_bitmask, @@ -1638,6 +1644,12 @@ iter_declaration(struct tgsi_iterate_context *iter, return false; } + if (decl->Range.Last >= ARRAY_SIZE(ctx->outputs)) { + virgl_error("Input slot out of range, want %d, max is %zd\n", + decl->Range.Last, ARRAY_SIZE(ctx->outputs)); + return false; + } + if (unlikely(decl->Range.First > decl->Range.Last)) { virgl_error("Wrong range: First (%u) > Last (%u)\n", decl->Range.First, decl->Range.Last); return false; @@ -3716,13 +3728,13 @@ static bool is_integer_memory(const struct dump_ctx *ctx, enum tgsi_file_type fi case TGSI_FILE_MEMORY: return ctx->integer_memory; default: - virgl_error("Invalid file type"); + virgl_error("Invalid file type: %d\n", file_type); } return false; } -static void set_image_qualifier(struct vrend_shader_image images[], +static bool set_image_qualifier(struct vrend_shader_image images[], uint32_t image_used_mask, const struct tgsi_full_instruction *inst, uint32_t reg_index, bool indirect) @@ -3731,12 +3743,15 @@ static void set_image_qualifier(struct vrend_shader_image images[], if (indirect) { while (image_used_mask) images[u_bit_scan(&image_used_mask)].coherent = true; - } else + } else if (reg_index < PIPE_MAX_SHADER_IMAGES) { images[reg_index].coherent = true; + } else + return false; } + return true; } -static void set_memory_qualifier(uint8_t ssbo_memory_qualifier[], +static bool set_memory_qualifier(uint8_t ssbo_memory_qualifier[], uint32_t ssbo_used_mask, const struct tgsi_full_instruction *inst, uint32_t reg_index, bool indirect) @@ -3745,9 +3760,12 @@ static void set_memory_qualifier(uint8_t ssbo_memory_qualifier[], if (indirect) { while (ssbo_used_mask) ssbo_memory_qualifier[u_bit_scan(&ssbo_used_mask)] = TGSI_MEMORY_COHERENT; - } else + } else if (reg_index < PIPE_MAX_SHADER_BUFFERS) { ssbo_memory_qualifier[reg_index] = TGSI_MEMORY_COHERENT; + } else + return false; } + return true; } static void emit_store_mem(struct vrend_glsl_strbufs *glsl_strbufs, const char *dst, int writemask, @@ -3801,11 +3819,19 @@ translate_store(const struct dump_ctx *ctx, } if (dst_reg->Register.File == TGSI_FILE_IMAGE) { + if (dinfo->dest_index >= PIPE_MAX_SHADER_IMAGES) { + set_buf_error(glsl_strbufs); + return; + } + /* bail out if we want to write to a non-existing image */ if (!((1 << dinfo->dest_index) & ctx->images_used_mask)) return; - set_image_qualifier(images, ctx->images_used_mask, inst, inst->Src[0].Register.Index, inst->Src[0].Register.Indirect); + if (!set_image_qualifier(images, ctx->images_used_mask, inst, inst->Src[0].Register.Index, inst->Src[0].Register.Indirect)) { + set_buf_error(glsl_strbufs); + return; + } bool is_ms = false; enum vrend_type_qualifier coord_prefix = get_coord_prefix(ctx->images[dst_reg->Register.Index].decl.Resource, &is_ms, ctx->cfg->use_gles); @@ -3852,8 +3878,17 @@ translate_store(const struct dump_ctx *ctx, } else if (dst_reg->Register.File == TGSI_FILE_BUFFER || dst_reg->Register.File == TGSI_FILE_MEMORY) { enum vrend_type_qualifier dtypeprefix; - set_memory_qualifier(ssbo_memory_qualifier, ctx->ssbo_used_mask, inst, dst_reg->Register.Index, - dst_reg->Register.Indirect); + + if (dinfo->dest_index >= PIPE_MAX_SHADER_BUFFERS) { + set_buf_error(glsl_strbufs); + return; + } + + if (!set_memory_qualifier(ssbo_memory_qualifier, ctx->ssbo_used_mask, inst, dst_reg->Register.Index, + dst_reg->Register.Indirect)) { + set_buf_error(glsl_strbufs); + return; + } dtypeprefix = is_integer_memory(ctx, dst_reg->Register.File, dst_reg->Register.Index) ? FLOAT_BITS_TO_INT : FLOAT_BITS_TO_UINT; const char *conversion = sinfo->override_no_cast[1] ? "" : get_string(dtypeprefix); @@ -3913,13 +3948,17 @@ translate_load(const struct dump_ctx *ctx, if (src->Register.File == TGSI_FILE_IMAGE) { /* Bail out if we want to load from an image that is not actually used */ - if (sinfo->sreg_index < 0) { + if (sinfo->sreg_index < 0 || sinfo->sreg_index > PIPE_MAX_SHADER_IMAGES) { return false; } + if (!((1 << sinfo->sreg_index) & ctx->images_used_mask)) return false; - set_image_qualifier(images, ctx->images_used_mask, inst, inst->Src[0].Register.Index, inst->Src[0].Register.Indirect); + if (!set_image_qualifier(images, ctx->images_used_mask, inst, inst->Src[0].Register.Index, inst->Src[0].Register.Indirect)) { + set_buf_error(glsl_strbufs); + return false; + } bool is_ms = false; @@ -3985,7 +4024,10 @@ translate_load(const struct dump_ctx *ctx, char mydst[255], atomic_op[9], atomic_src[10]; enum vrend_type_qualifier dtypeprefix; - set_memory_qualifier(ssbo_memory_qualifier, ctx->ssbo_used_mask, inst, inst->Src[0].Register.Index, inst->Src[0].Register.Indirect); + if (!set_memory_qualifier(ssbo_memory_qualifier, ctx->ssbo_used_mask, inst, inst->Src[0].Register.Index, inst->Src[0].Register.Indirect)) { + set_buf_error(glsl_strbufs); + return false; + } const char *d = dst; char *md = mydst; @@ -4068,7 +4110,7 @@ static const char *get_atomic_opname(int tgsi_opcode, bool *is_cas) opname = "Max"; break; default: - virgl_error("Illegal atomic opcode"); + virgl_error("Illegal atomic opcode: %d\n", tgsi_opcode); return NULL; } return opname; @@ -4121,6 +4163,11 @@ translate_atomic(struct dump_ctx *ctx, char cas_str[128] = ""; if (src->Register.File == TGSI_FILE_IMAGE) { + if (sinfo->sreg_index < 0 || sinfo->sreg_index >= PIPE_MAX_SHADER_IMAGES) { + set_buf_error(&ctx->glsl_strbufs); + return; + } + enum tgsi_return_type itype; get_internalformat_string(ctx->images[sinfo->sreg_index].decl.Format, &itype); switch (itype) { @@ -4167,8 +4214,11 @@ translate_atomic(struct dump_ctx *ctx, snprintf(ms_str, 32, ", int(%s.w)", srcs[1]); } - set_image_qualifier(ctx->images, ctx->images_used_mask, inst, - inst->Src[0].Register.Index, inst->Src[0].Register.Indirect); + if (!set_image_qualifier(ctx->images, ctx->images_used_mask, inst, + inst->Src[0].Register.Index, inst->Src[0].Register.Indirect)) { + set_buf_error(&ctx->glsl_strbufs); + return; + } if (!ctx->cfg->use_gles || !inst->Src[0].Register.Indirect) { emit_buff(&ctx->glsl_strbufs, "%s = %s(imageAtomic%s(%s, %s(%s(%s))%s, %s(%s(%s))%s));\n", @@ -4200,6 +4250,11 @@ translate_atomic(struct dump_ctx *ctx, } if (src->Register.File == TGSI_FILE_BUFFER || src->Register.File == TGSI_FILE_MEMORY) { enum vrend_type_qualifier type; + if (src->Register.Index < 0 || src->Register.Index >= PIPE_MAX_SHADER_BUFFERS) { + set_buf_error(&ctx->glsl_strbufs); + return; + } + if ((is_integer_memory(ctx, src->Register.File, src->Register.Index))) { type = INT; dtypeprefix = INT_BITS_TO_FLOAT; diff --git a/src/vrend/vrend_venus_interop.c b/src/vrend/vrend_venus_interop.c new file mode 100755 index 00000000..99421ff7 --- /dev/null +++ b/src/vrend/vrend_venus_interop.c @@ -0,0 +1,554 @@ +/* + * Copyright 2026 Collabora Limited + * SPDX-License-Identifier: MIT + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include + +#include + +#include "vulkan/vulkan.h" + +#include "vrend_venus_interop.h" + +#include "virgl_util.h" +#include "virgl_hw.h" +#include "virgl_protocol.h" + +static PFN_vkCreateInstance pfn_vkCreateInstance; +static PFN_vkDestroyInstance pfn_vkDestroyInstance; +static PFN_vkEnumeratePhysicalDevices pfn_vkEnumeratePhysicalDevices; +static PFN_vkGetPhysicalDeviceProperties2 pfn_vkGetPhysicalDeviceProperties2; +static PFN_vkGetPhysicalDeviceFormatProperties2 pfn_vkGetPhysicalDeviceFormatProperties2; +static PFN_vkGetPhysicalDeviceImageFormatProperties2 pfn_vkGetPhysicalDeviceImageFormatProperties2; +static PFN_vkGetPhysicalDeviceMemoryProperties pfn_vkGetPhysicalDeviceMemoryProperties; +static PFN_vkGetPhysicalDeviceQueueFamilyProperties pfn_vkGetPhysicalDeviceQueueFamilyProperties; +static PFN_vkCreateDevice pfn_vkCreateDevice; +static PFN_vkDestroyDevice pfn_vkDestroyDevice; +static PFN_vkGetDeviceProcAddr pfn_vkGetDeviceProcAddr; +static PFN_vkGetInstanceProcAddr pfn_vkGetInstanceProcAddr; + +static void *g_vulkan_lib; + +static bool g_vk_inited; +static VkInstance g_instance; +static VkPhysicalDevice g_phys; +static VkDevice g_dev; + +static const struct { + uint32_t gbm_format; + VkFormat vk_format; + uint32_t virgl_format; +} gbm_to_vk_conversions[] = { + { GBM_FORMAT_RGB565, VK_FORMAT_B5G6R5_UNORM_PACK16, VIRGL_FORMAT_B5G6R5_UNORM }, + { GBM_FORMAT_ARGB8888, VK_FORMAT_B8G8R8A8_UNORM, VIRGL_FORMAT_B8G8R8A8_UNORM }, + { GBM_FORMAT_XRGB8888, VK_FORMAT_B8G8R8A8_UNORM, VIRGL_FORMAT_B8G8R8X8_UNORM }, + { GBM_FORMAT_ABGR2101010, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VIRGL_FORMAT_R10G10B10A2_UNORM }, + { GBM_FORMAT_XBGR2101010, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VIRGL_FORMAT_R10G10B10X2_UNORM }, + { GBM_FORMAT_ARGB2101010, VK_FORMAT_A2R10G10B10_UNORM_PACK32, VIRGL_FORMAT_B10G10R10A2_UNORM }, + { GBM_FORMAT_XRGB2101010, VK_FORMAT_A2R10G10B10_UNORM_PACK32, VIRGL_FORMAT_B10G10R10X2_UNORM }, + { GBM_FORMAT_ABGR16161616F, VK_FORMAT_R16G16B16A16_SFLOAT, VIRGL_FORMAT_R16G16B16A16_FLOAT }, + { GBM_FORMAT_XBGR16161616F, VK_FORMAT_R16G16B16A16_SFLOAT, VIRGL_FORMAT_R16G16B16X16_FLOAT }, +#ifdef GBM_FORMAT_XBGR16161616 + { GBM_FORMAT_XBGR16161616, VK_FORMAT_R16G16B16A16_UNORM, VIRGL_FORMAT_R16G16B16X16_UNORM }, + { GBM_FORMAT_ABGR16161616, VK_FORMAT_R16G16B16A16_UNORM, VIRGL_FORMAT_R16G16B16A16_UNORM }, +#endif + { GBM_FORMAT_ABGR8888, VK_FORMAT_R8G8B8A8_UNORM, VIRGL_FORMAT_R8G8B8A8_UNORM }, + { GBM_FORMAT_XBGR8888, VK_FORMAT_R8G8B8A8_UNORM, VIRGL_FORMAT_R8G8B8X8_UNORM }, +}; + +struct vrend_virgl_format_modifier { + uint32_t virgl_format; + uint32_t gbm_format; + uint64_t modifier; +}; + +static struct vrend_virgl_format_modifier g_supported_formats[ARRAY_SIZE(gbm_to_vk_conversions)]; +static uint32_t g_num_supported_formats; + +struct mod_info { + uint64_t modifier; + uint32_t plane_count; +}; + +static struct mod_info * +query_modifier_infos(VkPhysicalDevice phys, VkFormat fmt, uint32_t *out_count) +{ + *out_count = 0; + + VkDrmFormatModifierPropertiesListEXT mod_list = { + .sType = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT, + }; + VkFormatProperties2 props2 = { + .sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, + .pNext = &mod_list, + }; + + pfn_vkGetPhysicalDeviceFormatProperties2(phys, fmt, &props2); + if (mod_list.drmFormatModifierCount == 0) + return NULL; + + VkDrmFormatModifierPropertiesEXT *mods = + calloc(mod_list.drmFormatModifierCount, sizeof(*mods)); + if (!mods) + return NULL; + + mod_list.pDrmFormatModifierProperties = mods; + pfn_vkGetPhysicalDeviceFormatProperties2(phys, fmt, &props2); + + if (mod_list.drmFormatModifierCount == 0) { + free(mods); + return NULL; + } + + struct mod_info *infos = calloc(mod_list.drmFormatModifierCount, sizeof(*infos)); + if (!infos) { + free(mods); + return NULL; + } + + for (uint32_t i = 0; i < mod_list.drmFormatModifierCount; i++) { + infos[i].modifier = mods[i].drmFormatModifier; + infos[i].plane_count = mods[i].drmFormatModifierPlaneCount; + } + + *out_count = mod_list.drmFormatModifierCount; + free(mods); + return infos; +} + +static bool +check_modifier_image_format_support(VkPhysicalDevice phys, VkFormat fmt, uint64_t modifier) +{ + VkPhysicalDeviceImageDrmFormatModifierInfoEXT mod_info = { + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT, + .drmFormatModifier = modifier, + .sharingMode = VK_SHARING_MODE_EXCLUSIVE, + }; + + VkPhysicalDeviceExternalImageFormatInfo ext_img_info = { + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, + .pNext = &mod_info, + .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, + }; + + VkPhysicalDeviceImageFormatInfo2 fmt_info = { + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, + .pNext = &ext_img_info, + .format = fmt, + .type = VK_IMAGE_TYPE_2D, + .tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, + .usage = VK_IMAGE_USAGE_SAMPLED_BIT | + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | + VK_IMAGE_USAGE_TRANSFER_DST_BIT | + VK_IMAGE_USAGE_TRANSFER_SRC_BIT, + .flags = 0, + }; + + VkExternalImageFormatProperties ext_props = { + .sType = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, + }; + + VkImageFormatProperties2 props2 = { + .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, + .pNext = &ext_props, + }; + + VkResult vr = pfn_vkGetPhysicalDeviceImageFormatProperties2(phys, &fmt_info, &props2); + if (vr != VK_SUCCESS) + return false; + + const VkExternalMemoryFeatureFlags required = + VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT; + + return (ext_props.externalMemoryProperties.externalMemoryFeatures & required) == required; +} + +static void init_supported_formats(void) +{ + memset(g_supported_formats, 0, sizeof(g_supported_formats)); + g_num_supported_formats = 0; + + for (size_t i = 0; i < ARRAY_SIZE(gbm_to_vk_conversions); i++) { + uint32_t gbm_format = gbm_to_vk_conversions[i].gbm_format; + VkFormat vk_fmt = gbm_to_vk_conversions[i].vk_format; + + uint32_t mod_count = 0; + struct mod_info *mods = query_modifier_infos(g_phys, vk_fmt, &mod_count); + if (!mods) + continue; + + for (uint32_t mi = 0; mi < mod_count; mi++) { + uint64_t mod = mods[mi].modifier; + + if (mod == DRM_FORMAT_MOD_LINEAR) + continue; + + /* + * Mesa EGL requires format planes == memory planes + * https://elixir.bootlin.com/mesa/mesa-26.0.5/source/src/egl/drivers/dri2/egl_dri2.c#L2273 + * + * AMD VK driver has modifier that uses disjoint CCS planes for RGBA, + * which conflicts with Mesa's requirement. + */ + if (mods[mi].plane_count != 1) + continue; + + if (!check_modifier_image_format_support(g_phys, vk_fmt, mod)) + continue; + + virgl_debug("%s: gbm_format=0x%08x picked modifier 0x%016" PRIx64"\n", + __func__, gbm_format, mod); + + g_supported_formats[g_num_supported_formats].virgl_format = + gbm_to_vk_conversions[i].virgl_format; + g_supported_formats[g_num_supported_formats].gbm_format = gbm_format; + g_supported_formats[g_num_supported_formats].modifier = mod; + g_num_supported_formats++; + break; /* one (best) modifier per format is enough */ + } + + free(mods); + } +} + +static uint64_t +pick_gbm_format_modifier(uint32_t gbm_format, uint64_t *out_modifier) +{ + for (size_t i = 0; i < ARRAY_SIZE(g_supported_formats); i++) { + if (g_supported_formats[i].gbm_format == gbm_format) { + *out_modifier = g_supported_formats[i].modifier; + return true; + } + } + return false; +} + +static bool +load_vulkan_library(void) +{ + if (g_vulkan_lib) + return true; + + g_vulkan_lib = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL); + if (!g_vulkan_lib) + g_vulkan_lib = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL); + + if (!g_vulkan_lib) { + virgl_error("%s: Failed to load libvulkan.so: %s\n", __func__, dlerror()); + return false; + } + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" + pfn_vkCreateInstance = (PFN_vkCreateInstance)dlsym(g_vulkan_lib, "vkCreateInstance"); + pfn_vkDestroyInstance = (PFN_vkDestroyInstance)dlsym(g_vulkan_lib, "vkDestroyInstance"); + pfn_vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices)dlsym(g_vulkan_lib, "vkEnumeratePhysicalDevices"); + pfn_vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2)dlsym(g_vulkan_lib, "vkGetPhysicalDeviceProperties2"); + pfn_vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2)dlsym(g_vulkan_lib, "vkGetPhysicalDeviceFormatProperties2"); + pfn_vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties)dlsym(g_vulkan_lib, "vkGetPhysicalDeviceMemoryProperties"); + pfn_vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties)dlsym(g_vulkan_lib, "vkGetPhysicalDeviceQueueFamilyProperties"); + pfn_vkCreateDevice = (PFN_vkCreateDevice)dlsym(g_vulkan_lib, "vkCreateDevice"); + pfn_vkDestroyDevice = (PFN_vkDestroyDevice)dlsym(g_vulkan_lib, "vkDestroyDevice"); + pfn_vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)dlsym(g_vulkan_lib, "vkGetDeviceProcAddr"); + pfn_vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(g_vulkan_lib, "vkGetInstanceProcAddr"); +#pragma GCC diagnostic pop + + if (!pfn_vkCreateInstance || !pfn_vkDestroyInstance || + !pfn_vkEnumeratePhysicalDevices || !pfn_vkGetPhysicalDeviceProperties2 || + !pfn_vkGetPhysicalDeviceFormatProperties2 || !pfn_vkGetPhysicalDeviceMemoryProperties || + !pfn_vkGetPhysicalDeviceQueueFamilyProperties || !pfn_vkCreateDevice || + !pfn_vkDestroyDevice || !pfn_vkGetDeviceProcAddr || !pfn_vkGetInstanceProcAddr) { + virgl_error("%s: Failed to load required Vulkan symbols\n", __func__); + dlclose(g_vulkan_lib); + g_vulkan_lib = NULL; + return false; + } + + return true; +} + +static bool +get_gbm_fd_major_minor(struct gbm_device *gbm_dev, unsigned *out_major, unsigned *out_minor) +{ + int fd = gbm_device_get_fd(gbm_dev); + if (fd < 0) + return false; + + struct stat st; + if (fstat(fd, &st) != 0) { + virgl_error("%s: failed fstat(gbm_fd)\n", __func__); + return false; + } + + *out_major = major(st.st_rdev); + *out_minor = minor(st.st_rdev); + return true; +} + +static VkPhysicalDevice +pick_physdev_matching_gbm(struct gbm_device *gbm_dev, VkInstance instance) +{ + unsigned gbm_major = 0, gbm_minor = 0; + if (!get_gbm_fd_major_minor(gbm_dev, &gbm_major, &gbm_minor)) { + virgl_error("%s: failed to get gbm fd major/minor\n", __func__); + return VK_NULL_HANDLE; + } + + uint32_t count = 0; + pfn_vkEnumeratePhysicalDevices(instance, &count, NULL); + if (!count) + return VK_NULL_HANDLE; + + VkPhysicalDevice *devs = calloc(count, sizeof(*devs)); + if (!devs) + return VK_NULL_HANDLE; + + pfn_vkEnumeratePhysicalDevices(instance, &count, devs); + + VkPhysicalDevice chosen = VK_NULL_HANDLE; + for (uint32_t i = 0; i < count; i++) { + VkPhysicalDeviceDrmPropertiesEXT drm = { + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT, + }; + VkPhysicalDeviceProperties2 props2 = { + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, + .pNext = &drm, + }; + + pfn_vkGetPhysicalDeviceProperties2(devs[i], &props2); + + bool match = + (drm.hasRender && drm.renderMajor == gbm_major && drm.renderMinor == gbm_minor) || + (drm.hasPrimary && drm.primaryMajor == gbm_major && drm.primaryMinor == gbm_minor); + + if (match) { + chosen = devs[i]; + break; + } + } + + free(devs); + return chosen; +} + +void vrend_init_venus_interop(struct gbm_device *gbm_dev) +{ + if (!gbm_dev) { + virgl_debug("%s: gbm_dev is NULL\n", __func__); + return; + } + + unsigned gbm_major = 0, gbm_minor = 0; + if (!get_gbm_fd_major_minor(gbm_dev, &gbm_major, &gbm_minor)) { + virgl_error("%s: failed to get gbm fd major/minor\n", __func__); + return; + } + + if (g_vk_inited) + return; + + if (!load_vulkan_library()) { + virgl_error("%s: Failed to load Vulkan library\n", __func__); + return; + } + + const char *inst_exts[] = { + VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, + }; + + VkApplicationInfo app = { + .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, + .pApplicationName = "vrend-venus-integration", + .apiVersion = VK_API_VERSION_1_1, + }; + + VkInstanceCreateInfo ici = { + .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, + .pApplicationInfo = &app, + .enabledExtensionCount = ARRAY_SIZE(inst_exts), + .ppEnabledExtensionNames = inst_exts, + }; + + VkResult vr = pfn_vkCreateInstance(&ici, NULL, &g_instance); + if (vr != VK_SUCCESS) { + virgl_error("%s: vkCreateInstance failed (VkResult=%d)\n", __func__, vr); + return; + } + + pfn_vkGetPhysicalDeviceProperties2 = + (PFN_vkGetPhysicalDeviceProperties2)pfn_vkGetInstanceProcAddr(g_instance, "vkGetPhysicalDeviceProperties2"); + pfn_vkGetPhysicalDeviceFormatProperties2 = + (PFN_vkGetPhysicalDeviceFormatProperties2)pfn_vkGetInstanceProcAddr(g_instance, "vkGetPhysicalDeviceFormatProperties2"); + pfn_vkGetPhysicalDeviceImageFormatProperties2 = + (PFN_vkGetPhysicalDeviceImageFormatProperties2)pfn_vkGetInstanceProcAddr(g_instance, "vkGetPhysicalDeviceImageFormatProperties2"); + + if (!pfn_vkGetPhysicalDeviceProperties2 || !pfn_vkGetPhysicalDeviceFormatProperties2 || + !pfn_vkGetPhysicalDeviceImageFormatProperties2) { + virgl_error("%s: required instance procs missing\n", __func__); + goto fail_instance; + } + + g_phys = pick_physdev_matching_gbm(gbm_dev, g_instance); + if (g_phys == VK_NULL_HANDLE) { + virgl_error("%s: no VkPhysicalDevice matches gbm fd\n", __func__); + goto fail_instance; + } + + uint32_t qf_count = 0; + pfn_vkGetPhysicalDeviceQueueFamilyProperties(g_phys, &qf_count, NULL); + if (!qf_count) { + virgl_error("%s: no queue families found\n", __func__); + goto fail_instance; + } + + VkQueueFamilyProperties *qfp = calloc(qf_count, sizeof(*qfp)); + if (!qfp) + goto fail_instance; + + pfn_vkGetPhysicalDeviceQueueFamilyProperties(g_phys, &qf_count, qfp); + + uint32_t qfam = UINT32_MAX; + for (uint32_t i = 0; i < qf_count; i++) { + if (qfp[i].queueCount > 0) { + qfam = i; + break; + } + } + free(qfp); + + if (qfam == UINT32_MAX) { + virgl_error("%s: no queue family found\n", __func__); + goto fail_instance; + } + + float prio = 1.0f; + VkDeviceQueueCreateInfo dqci = { + .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, + .queueFamilyIndex = qfam, + .queueCount = 1, + .pQueuePriorities = &prio, + }; + + const char *dev_exts[] = { + VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, + VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, + VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME, + VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME, + }; + + VkDeviceCreateInfo dci = { + .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, + .queueCreateInfoCount = 1, + .pQueueCreateInfos = &dqci, + .enabledExtensionCount = (uint32_t)(sizeof(dev_exts) / sizeof(dev_exts[0])), + .ppEnabledExtensionNames = dev_exts, + }; + + vr = pfn_vkCreateDevice(g_phys, &dci, NULL, &g_dev); + if (vr != VK_SUCCESS) { + virgl_error("%s: vkCreateDevice failed (VkResult=%d)\n", __func__, vr); + goto fail_instance; + } + + init_supported_formats(); + + g_vk_inited = true; + + return; + +fail_instance: + pfn_vkDestroyInstance(g_instance, NULL); + g_instance = VK_NULL_HANDLE; + g_phys = VK_NULL_HANDLE; + pfn_vkGetPhysicalDeviceFormatProperties2 = NULL; + pfn_vkGetPhysicalDeviceImageFormatProperties2 = NULL; + pfn_vkGetPhysicalDeviceProperties2 = NULL; +} + +void vrend_deinit_venus_interop(void) +{ + if (!g_vk_inited) + return; + + if (g_dev != VK_NULL_HANDLE) + pfn_vkDestroyDevice(g_dev, NULL); + if (g_instance != VK_NULL_HANDLE) + pfn_vkDestroyInstance(g_instance, NULL); + + if (g_vulkan_lib) { + dlclose(g_vulkan_lib); + g_vulkan_lib = NULL; + } + + g_vk_inited = false; + g_instance = VK_NULL_HANDLE; + g_phys = VK_NULL_HANDLE; + g_dev = VK_NULL_HANDLE; + g_num_supported_formats = 0; + + pfn_vkCreateInstance = NULL; + pfn_vkDestroyInstance = NULL; + pfn_vkEnumeratePhysicalDevices = NULL; + pfn_vkGetPhysicalDeviceProperties2 = NULL; + pfn_vkGetPhysicalDeviceFormatProperties2 = NULL; + pfn_vkGetPhysicalDeviceImageFormatProperties2 = NULL; + pfn_vkGetPhysicalDeviceMemoryProperties = NULL; + pfn_vkGetPhysicalDeviceQueueFamilyProperties = NULL; + pfn_vkCreateDevice = NULL; + pfn_vkDestroyDevice = NULL; + pfn_vkGetDeviceProcAddr = NULL; + pfn_vkGetInstanceProcAddr = NULL; +} + +bool vrend_has_venus_interop(void) +{ + return g_vk_inited; +} + +struct gbm_bo * +vrend_vk_gbm_bo_create(struct gbm_device *gbm_dev, uint32_t width, uint32_t height, + uint32_t gbm_format) +{ + if (!g_vk_inited) + return NULL; + + uint64_t mod = 0; + if (pick_gbm_format_modifier(gbm_format, &mod)) { + struct gbm_bo *bo = gbm_bo_create_with_modifiers(gbm_dev, width, height, + gbm_format, &mod, 1); + if (bo) { + virgl_debug("%s: gbm_bo_create_with_modifiers success mod=0x%016" PRIx64 + " gbm_format=0x%08x %ux%u\n", + __func__, mod, gbm_format, width, height); + return bo; + } + + virgl_error("%s: gbm_bo_create_with_modifiers failed for mod=0x%016" PRIx64 + " gbm_format=0x%08x %ux%u\n", + __func__, mod, gbm_format, width, height); + } else { + virgl_debug("%s: unsupported gbm_format=0x%08x\n", __func__, gbm_format); + } + + return NULL; +} + +void vrend_vk_get_supported_formats(struct virgl_gbm_format_modifier *fmt_mod) +{ + for (size_t i = 0; i < g_num_supported_formats; i++) { + fmt_mod->formats[i].virgl_format = g_supported_formats[i].virgl_format; + fmt_mod->formats[i].modifier = g_supported_formats[i].modifier; + } + + fmt_mod->num = g_num_supported_formats; +} diff --git a/src/vrend/vrend_venus_interop.h b/src/vrend/vrend_venus_interop.h new file mode 100755 index 00000000..c098d8fe --- /dev/null +++ b/src/vrend/vrend_venus_interop.h @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Collabora Limited + * SPDX-License-Identifier: MIT + */ + +#ifndef VREND_VENUS_INTEROP_H +#define VREND_VENUS_INTEROP_H + +#include + +#include "util/macros.h" + +struct virgl_gbm_format_modifier; + +#if defined(ENABLE_GBM_ALLOCATION) && !defined(MINIGBM) && defined(ENABLE_VENUS) +#include + +void vrend_init_venus_interop(struct gbm_device *gbm_dev); +void vrend_deinit_venus_interop(void); +bool vrend_has_venus_interop(void); +struct gbm_bo * +vrend_vk_gbm_bo_create(struct gbm_device *gbm_dev, uint32_t width, uint32_t height, + uint32_t gbm_format); +void vrend_vk_get_supported_formats(struct virgl_gbm_format_modifier *fmt_mod); +#else +struct gbm_device; +struct gbm_bo; + +static inline void vrend_init_venus_interop(UNUSED struct gbm_device *gbm_dev) {} +static inline void vrend_deinit_venus_interop(void) {} +static inline bool vrend_has_venus_interop(void) { return false; } +static inline struct gbm_bo * +vrend_vk_gbm_bo_create(UNUSED struct gbm_device *gbm_dev, + UNUSED uint32_t width, UNUSED uint32_t height, + UNUSED uint32_t gbm_format) +{ + return NULL; +} +static inline void vrend_vk_get_supported_formats(UNUSED struct virgl_gbm_format_modifier *fmt_mod) {} +#endif + +#endif diff --git a/src/vrend/vrend_winsys_egl.c b/src/vrend/vrend_winsys_egl.c index 4ddcd0df..c15f6b61 100644 --- a/src/vrend/vrend_winsys_egl.c +++ b/src/vrend/vrend_winsys_egl.c @@ -431,7 +431,7 @@ struct virgl_egl *virgl_egl_init(EGLNativeDisplayType display_id, bool surfacele egl->signaled_fence = eglCreateSyncKHR(egl->egl_display, EGL_SYNC_NATIVE_FENCE_ANDROID, NULL); if (!egl->signaled_fence) { - virgl_error("Failed to create signaled fence"); + virgl_error("Failed to create signaled fence\n"); goto fail; } @@ -605,7 +605,7 @@ struct virgl_egl *virgl_egl_init_external(EGLDisplay egl_display) goto fail; #ifdef ENABLE_GBM - gbm = virgl_gbm_init(-1); + gbm = virgl_gbm_init( virgl_egl_open_drm_fd(egl) ); egl->gbm = gbm; #endif @@ -1020,3 +1020,76 @@ const char *virgl_egl_error_string(EGLint error) default: return "Unknown error"; } } + +int virgl_egl_open_drm_fd(struct virgl_egl *egl) +{ +#if DETECT_OS_WINDOWS + return -1; +#else + const char *drm_path = NULL; + EGLDeviceEXT device; + + if (!egl || !egl->funcs.eglQueryDisplayAttrib || !egl->funcs.eglQueryDeviceString) + return -1; + + if (!egl->funcs.eglQueryDisplayAttrib(egl->egl_display, EGL_DEVICE_EXT, (EGLAttrib *)&device)) + return -1; + +#ifdef EGL_DRM_RENDER_NODE_FILE_EXT + drm_path = egl->funcs.eglQueryDeviceString(device, + EGL_DRM_RENDER_NODE_FILE_EXT); +#endif + +#ifdef EGL_DRM_DEVICE_FILE_EXT + if (!drm_path) { + drm_path = egl->funcs.eglQueryDeviceString(device, + EGL_DRM_DEVICE_FILE_EXT); + +#ifdef ENABLE_LIBDRM + if (drm_path) { + int fd = open(drm_path, O_RDWR | O_CLOEXEC); + + /* + * EGL_DRM_RENDER_NODE_FILE_EXT may not be defined by the epoxy version + * we build against, or the EGL driver may not implement it, in which + * case drm_path above falls back to EGL_DRM_DEVICE_FILE_EXT, i.e. the + * DRM primary/master node. Rendering on a primary node requires DRM + * master/auth and some kernel drivers (e.g. amdgpu) reject rendering + * ioctls on it, so resolve and switch to the render node of the same + * GPU whenever libdrm can tell us its path. + */ + drmDevicePtr drm_device; + if (drmGetDevice2(fd, 0, &drm_device) == 0) { + int render_fd = -1; + + if ((drm_device->available_nodes & (1 << DRM_NODE_RENDER)) && + drm_device->nodes[DRM_NODE_RENDER]) { + render_fd = open(drm_device->nodes[DRM_NODE_RENDER], + O_RDWR | O_CLOEXEC); + + virgl_debug("%s: using render node %s\n", + __func__, drm_device->nodes[DRM_NODE_RENDER]); + } + + drmFreeDevice(&drm_device); + + if (render_fd >= 0) { + close(fd); + return render_fd; + } + } + + close(fd); + } +#endif + } +#endif + + if (!drm_path) + return -1; + + virgl_debug("%s: %s\n", __func__, drm_path); + + return open(drm_path, O_RDWR | O_CLOEXEC); +#endif +} diff --git a/src/vrend/vrend_winsys_egl.h b/src/vrend/vrend_winsys_egl.h index 4af897b8..129d16d5 100644 --- a/src/vrend/vrend_winsys_egl.h +++ b/src/vrend/vrend_winsys_egl.h @@ -101,4 +101,6 @@ bool virgl_egl_win32_create_d3d11_texture2d(struct virgl_egl *egl, EGLImageKHR virgl_egl_win32_image_from_d3d11_texture2d(struct virgl_egl *egl, ID3D11Texture2D *tex); #endif +int virgl_egl_open_drm_fd(struct virgl_egl *egl); + #endif diff --git a/subprojects/venus-protocol.wrap b/subprojects/venus-protocol.wrap new file mode 100644 index 00000000..8d92c750 --- /dev/null +++ b/subprojects/venus-protocol.wrap @@ -0,0 +1,8 @@ +[wrap-git] +directory = venus-protocol-1.1.1 +url = https://gitlab.freedesktop.org/virgl/venus-protocol.git +revision = v1.1.1 +depth = 1 + +[provide] +dependency_names = dep_vn_protocol_renderer