From 4eac776f40836a3f7d46bf808d696f63d840da89 Mon Sep 17 00:00:00 2001 From: Yun Hsiao Wu Date: Wed, 23 Dec 2020 19:50:32 +0800 Subject: [PATCH] merge latest device --- native/cocos/bindings/auto/jsb_audio_auto.h | 2 +- native/cocos/bindings/auto/jsb_cocos_auto.h | 2 +- .../cocos/bindings/auto/jsb_extension_auto.h | 2 +- native/cocos/bindings/auto/jsb_gfx_auto.cpp | 154 +----------------- native/cocos/bindings/auto/jsb_gfx_auto.h | 2 +- native/cocos/bindings/auto/jsb_gles2_auto.cpp | 1 - native/cocos/bindings/auto/jsb_gles2_auto.h | 2 +- native/cocos/bindings/auto/jsb_gles3_auto.cpp | 1 - native/cocos/bindings/auto/jsb_gles3_auto.h | 2 +- native/cocos/bindings/auto/jsb_mtl_auto.cpp | 38 +++++ native/cocos/bindings/auto/jsb_mtl_auto.h | 4 +- native/cocos/bindings/auto/jsb_network_auto.h | 2 +- native/cocos/bindings/auto/jsb_video_auto.h | 2 +- native/cocos/bindings/auto/jsb_vk_auto.h | 2 +- native/cocos/bindings/auto/jsb_webview_auto.h | 2 +- native/cocos/renderer/core/Core.h | 20 --- .../renderer/core/gfx/GFXCommandBuffer.h | 25 ++- .../renderer/gfx-gles2/GLES2CommandBuffer.cpp | 2 +- .../renderer/gfx-gles2/GLES2CommandBuffer.h | 2 +- .../renderer/gfx-gles2/GLES2Commands.cpp | 4 + .../gfx-gles2/GLES2PrimaryCommandBuffer.cpp | 2 +- .../gfx-gles2/GLES2PrimaryCommandBuffer.h | 2 +- .../renderer/gfx-gles3/GLES3CommandBuffer.cpp | 2 +- .../renderer/gfx-gles3/GLES3CommandBuffer.h | 2 +- .../renderer/gfx-gles3/GLES3Commands.cpp | 4 + .../cocos/renderer/gfx-gles3/GLES3Context.mm | 2 - .../gfx-gles3/GLES3PrimaryCommandBuffer.cpp | 2 +- .../gfx-gles3/GLES3PrimaryCommandBuffer.h | 2 +- native/cocos/renderer/gfx-metal/MTLBuffer.h | 2 + native/cocos/renderer/gfx-metal/MTLBuffer.mm | 6 +- .../renderer/gfx-metal/MTLCommandBuffer.h | 2 +- .../renderer/gfx-metal/MTLCommandBuffer.mm | 75 ++++----- native/cocos/renderer/gfx-metal/MTLDevice.h | 30 ---- .../renderer/gfx-vulkan/VKCommandBuffer.cpp | 4 +- .../renderer/gfx-vulkan/VKCommandBuffer.h | 2 +- .../cocos/renderer/gfx-vulkan/VKCommands.cpp | 32 +++- .../renderer/gfx-vulkan/VKDescriptorSet.cpp | 9 +- .../cocos/renderer/gfx-vulkan/VKGPUObjects.h | 42 +++-- 38 files changed, 187 insertions(+), 306 deletions(-) diff --git a/native/cocos/bindings/auto/jsb_audio_auto.h b/native/cocos/bindings/auto/jsb_audio_auto.h index bca7e300f4..5487be5e79 100644 --- a/native/cocos/bindings/auto/jsb_audio_auto.h +++ b/native/cocos/bindings/auto/jsb_audio_auto.h @@ -4,7 +4,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/audio/include/AudioEngine.h" +#include "cocos\audio\include\AudioEngine.h" extern se::Object* __jsb_cc_AudioProfile_proto; extern se::Class* __jsb_cc_AudioProfile_class; diff --git a/native/cocos/bindings/auto/jsb_cocos_auto.h b/native/cocos/bindings/auto/jsb_cocos_auto.h index cce293e62b..3151ee1180 100644 --- a/native/cocos/bindings/auto/jsb_cocos_auto.h +++ b/native/cocos/bindings/auto/jsb_cocos_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/cocos2d.h" +#include "cocos\cocos2d.h" extern se::Object* __jsb_cc_FileUtils_proto; extern se::Class* __jsb_cc_FileUtils_class; diff --git a/native/cocos/bindings/auto/jsb_extension_auto.h b/native/cocos/bindings/auto/jsb_extension_auto.h index dcfd3d411f..6d392f0471 100644 --- a/native/cocos/bindings/auto/jsb_extension_auto.h +++ b/native/cocos/bindings/auto/jsb_extension_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "extensions/cocos-ext.h" +#include "extensions\cocos-ext.h" extern se::Object* __jsb_cc_extension_EventAssetsManagerEx_proto; extern se::Class* __jsb_cc_extension_EventAssetsManagerEx_class; diff --git a/native/cocos/bindings/auto/jsb_gfx_auto.cpp b/native/cocos/bindings/auto/jsb_gfx_auto.cpp index e57aef87c3..fde8dd6dba 100644 --- a/native/cocos/bindings/auto/jsb_gfx_auto.cpp +++ b/native/cocos/bindings/auto/jsb_gfx_auto.cpp @@ -11321,7 +11321,6 @@ static bool js_gfx_Buffer_getCount(se::State& s) unsigned int result = cobj->getCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Buffer_getCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11340,7 +11339,6 @@ static bool js_gfx_Buffer_getFlags(se::State& s) int result = (int)cobj->getFlags(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Buffer_getFlags : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11359,7 +11357,6 @@ static bool js_gfx_Buffer_getMemUsage(se::State& s) int result = (int)cobj->getMemUsage(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Buffer_getMemUsage : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11378,7 +11375,6 @@ static bool js_gfx_Buffer_getSize(se::State& s) unsigned int result = cobj->getSize(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Buffer_getSize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11397,7 +11393,6 @@ static bool js_gfx_Buffer_getStride(se::State& s) unsigned int result = cobj->getStride(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Buffer_getStride : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11416,7 +11411,6 @@ static bool js_gfx_Buffer_getUsage(se::State& s) int result = (int)cobj->getUsage(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Buffer_getUsage : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11601,7 +11595,7 @@ static bool js_gfx_CommandBuffer_beginRenderPass(se::State& s) HolderType arg0 = {}; HolderType arg1 = {}; HolderType arg2 = {}; - HolderType arg3 = {}; + HolderType arg3 = {}; HolderType arg4 = {}; HolderType arg5 = {}; @@ -11655,7 +11649,7 @@ static bool js_gfx_CommandBuffer_beginRenderPass(se::State& s) HolderType arg0 = {}; HolderType arg1 = {}; HolderType arg2 = {}; - HolderType arg3 = {}; + HolderType arg3 = {}; HolderType arg4 = {}; HolderType arg5 = {}; @@ -11837,7 +11831,6 @@ static bool js_gfx_CommandBuffer_getNumDrawCalls(se::State& s) unsigned int result = cobj->getNumDrawCalls(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_CommandBuffer_getNumDrawCalls : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11856,7 +11849,6 @@ static bool js_gfx_CommandBuffer_getNumInstances(se::State& s) unsigned int result = cobj->getNumInstances(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_CommandBuffer_getNumInstances : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11875,7 +11867,6 @@ static bool js_gfx_CommandBuffer_getNumTris(se::State& s) unsigned int result = cobj->getNumTris(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_CommandBuffer_getNumTris : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11894,7 +11885,6 @@ static bool js_gfx_CommandBuffer_getQueue(se::State& s) cc::gfx::Queue* result = cobj->getQueue(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_CommandBuffer_getQueue : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11913,7 +11903,6 @@ static bool js_gfx_CommandBuffer_getType(se::State& s) int result = (int)cobj->getType(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_CommandBuffer_getType : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -11935,7 +11924,6 @@ static bool js_gfx_CommandBuffer_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_CommandBuffer_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -12201,7 +12189,6 @@ static bool js_gfx_Context_getColorFormat(se::State& s) int result = (int)cobj->getColorFormat(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Context_getColorFormat : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12220,7 +12207,6 @@ static bool js_gfx_Context_getDepthStencilFormat(se::State& s) int result = (int)cobj->getDepthStencilFormat(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Context_getDepthStencilFormat : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12239,7 +12225,6 @@ static bool js_gfx_Context_getDevice(se::State& s) cc::gfx::Device* result = cobj->getDevice(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Context_getDevice : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12258,7 +12243,6 @@ static bool js_gfx_Context_getSharedContext(se::State& s) cc::gfx::Context* result = cobj->getSharedContext(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Context_getSharedContext : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12277,7 +12261,6 @@ static bool js_gfx_Context_getVsyncMode(se::State& s) int result = (int)cobj->getVsyncMode(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Context_getVsyncMode : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12299,7 +12282,6 @@ static bool js_gfx_Context_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Context_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -12435,7 +12417,6 @@ static bool js_gfx_DescriptorSet_bindBufferJSB(se::State& s) bool result = cobj->bindBufferJSB(arg0.value(), arg1.value(), arg2.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_bindBufferJSB : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 3); @@ -12504,7 +12485,6 @@ static bool js_gfx_DescriptorSet_bindSamplerJSB(se::State& s) bool result = cobj->bindSamplerJSB(arg0.value(), arg1.value(), arg2.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_bindSamplerJSB : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 3); @@ -12573,7 +12553,6 @@ static bool js_gfx_DescriptorSet_bindTextureJSB(se::State& s) bool result = cobj->bindTextureJSB(arg0.value(), arg1.value(), arg2.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_bindTextureJSB : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 3); @@ -12612,7 +12591,6 @@ static bool js_gfx_DescriptorSet_getBuffer(se::State& s) cc::gfx::Buffer* result = cobj->getBuffer(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_getBuffer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } } while(false); @@ -12629,7 +12607,6 @@ static bool js_gfx_DescriptorSet_getBuffer(se::State& s) cc::gfx::Buffer* result = cobj->getBuffer(arg0.value(), arg1.value()); ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_getBuffer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } } while(false); @@ -12655,7 +12632,6 @@ static bool js_gfx_DescriptorSet_getSampler(se::State& s) cc::gfx::Sampler* result = cobj->getSampler(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_getSampler : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } } while(false); @@ -12672,7 +12648,6 @@ static bool js_gfx_DescriptorSet_getSampler(se::State& s) cc::gfx::Sampler* result = cobj->getSampler(arg0.value(), arg1.value()); ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_getSampler : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } } while(false); @@ -12698,7 +12673,6 @@ static bool js_gfx_DescriptorSet_getTexture(se::State& s) cc::gfx::Texture* result = cobj->getTexture(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_getTexture : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } } while(false); @@ -12715,7 +12689,6 @@ static bool js_gfx_DescriptorSet_getTexture(se::State& s) cc::gfx::Texture* result = cobj->getTexture(arg0.value(), arg1.value()); ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_getTexture : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } } while(false); @@ -12739,7 +12712,6 @@ static bool js_gfx_DescriptorSet_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSet_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -12845,7 +12817,6 @@ static bool js_gfx_DescriptorSetLayout_getBindings(se::State& s) const std::vector& result = cobj->getBindings(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSetLayout_getBindings : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12864,7 +12835,6 @@ static bool js_gfx_DescriptorSetLayout_getDescriptorCount(se::State& s) const unsigned int result = cobj->getDescriptorCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSetLayout_getDescriptorCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -12886,7 +12856,6 @@ static bool js_gfx_DescriptorSetLayout_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_DescriptorSetLayout_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -12972,7 +12941,6 @@ static bool js_gfx_Fence_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Fence_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -13085,7 +13053,6 @@ static bool js_gfx_Queue_getType(se::State& s) int result = (int)cobj->getType(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Queue_getType : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13107,7 +13074,6 @@ static bool js_gfx_Queue_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Queue_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -13126,7 +13092,6 @@ static bool js_gfx_Queue_isAsync(se::State& s) bool result = cobj->isAsync(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Queue_isAsync : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13264,7 +13229,6 @@ static bool js_gfx_Sampler_getAddressU(se::State& s) int result = (int)cobj->getAddressU(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getAddressU : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13283,7 +13247,6 @@ static bool js_gfx_Sampler_getAddressV(se::State& s) int result = (int)cobj->getAddressV(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getAddressV : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13302,7 +13265,6 @@ static bool js_gfx_Sampler_getAddressW(se::State& s) int result = (int)cobj->getAddressW(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getAddressW : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13321,7 +13283,6 @@ static bool js_gfx_Sampler_getBorderColor(se::State& s) const cc::gfx::Color& result = cobj->getBorderColor(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getBorderColor : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13340,7 +13301,6 @@ static bool js_gfx_Sampler_getCmpFunc(se::State& s) int result = (int)cobj->getCmpFunc(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getCmpFunc : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13359,7 +13319,6 @@ static bool js_gfx_Sampler_getMagFilter(se::State& s) int result = (int)cobj->getMagFilter(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMagFilter : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13378,7 +13337,6 @@ static bool js_gfx_Sampler_getMaxAnisotropy(se::State& s) unsigned int result = cobj->getMaxAnisotropy(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMaxAnisotropy : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13397,7 +13355,6 @@ static bool js_gfx_Sampler_getMaxLOD(se::State& s) unsigned int result = cobj->getMaxLOD(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMaxLOD : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13416,7 +13373,6 @@ static bool js_gfx_Sampler_getMinFilter(se::State& s) int result = (int)cobj->getMinFilter(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMinFilter : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13435,7 +13391,6 @@ static bool js_gfx_Sampler_getMinLOD(se::State& s) unsigned int result = cobj->getMinLOD(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMinLOD : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13454,7 +13409,6 @@ static bool js_gfx_Sampler_getMipFilter(se::State& s) int result = (int)cobj->getMipFilter(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMipFilter : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13473,7 +13427,6 @@ static bool js_gfx_Sampler_getMipLODBias(se::State& s) float result = cobj->getMipLODBias(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_getMipLODBias : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13495,7 +13448,6 @@ static bool js_gfx_Sampler_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Sampler_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -13588,7 +13540,6 @@ static bool js_gfx_InputAssembler_getAttributes(se::State& s) const std::vector& result = cobj->getAttributes(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getAttributes : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13607,7 +13558,6 @@ static bool js_gfx_InputAssembler_getAttributesHash(se::State& s) unsigned int result = cobj->getAttributesHash(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getAttributesHash : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13626,7 +13576,6 @@ static bool js_gfx_InputAssembler_getFirstIndex(se::State& s) unsigned int result = cobj->getFirstIndex(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getFirstIndex : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13645,7 +13594,6 @@ static bool js_gfx_InputAssembler_getFirstInstance(se::State& s) unsigned int result = cobj->getFirstInstance(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getFirstInstance : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13664,7 +13612,6 @@ static bool js_gfx_InputAssembler_getFirstVertex(se::State& s) unsigned int result = cobj->getFirstVertex(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getFirstVertex : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13683,7 +13630,6 @@ static bool js_gfx_InputAssembler_getIndexBuffer(se::State& s) cc::gfx::Buffer* result = cobj->getIndexBuffer(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getIndexBuffer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13702,7 +13648,6 @@ static bool js_gfx_InputAssembler_getIndexCount(se::State& s) unsigned int result = cobj->getIndexCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getIndexCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13721,7 +13666,6 @@ static bool js_gfx_InputAssembler_getIndirectBuffer(se::State& s) cc::gfx::Buffer* result = cobj->getIndirectBuffer(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getIndirectBuffer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13740,7 +13684,6 @@ static bool js_gfx_InputAssembler_getInstanceCount(se::State& s) unsigned int result = cobj->getInstanceCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getInstanceCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13759,7 +13702,6 @@ static bool js_gfx_InputAssembler_getVertexBuffers(se::State& s) const std::vector& result = cobj->getVertexBuffers(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getVertexBuffers : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13778,7 +13720,6 @@ static bool js_gfx_InputAssembler_getVertexCount(se::State& s) unsigned int result = cobj->getVertexCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getVertexCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13797,7 +13738,6 @@ static bool js_gfx_InputAssembler_getVertexOffset(se::State& s) unsigned int result = cobj->getVertexOffset(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_getVertexOffset : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -13819,7 +13759,6 @@ static bool js_gfx_InputAssembler_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_InputAssembler_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -14045,7 +13984,6 @@ static bool js_gfx_RenderPass_getDepthStencilAttachment(se::State& s) const cc::gfx::DepthStencilAttachment& result = cobj->getDepthStencilAttachment(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_RenderPass_getDepthStencilAttachment : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14064,7 +14002,6 @@ static bool js_gfx_RenderPass_getHash(se::State& s) unsigned int result = cobj->getHash(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_RenderPass_getHash : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14083,7 +14020,6 @@ static bool js_gfx_RenderPass_getSubPasses(se::State& s) const std::vector& result = cobj->getSubPasses(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_RenderPass_getSubPasses : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14105,7 +14041,6 @@ static bool js_gfx_RenderPass_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_RenderPass_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -14189,7 +14124,6 @@ static bool js_gfx_Framebuffer_getColorTextures(se::State& s) const std::vector& result = cobj->getColorTextures(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Framebuffer_getColorTextures : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14208,7 +14142,6 @@ static bool js_gfx_Framebuffer_getDepthStencilTexture(se::State& s) cc::gfx::Texture* result = cobj->getDepthStencilTexture(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Framebuffer_getDepthStencilTexture : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14227,7 +14160,6 @@ static bool js_gfx_Framebuffer_getRenderPass(se::State& s) cc::gfx::RenderPass* result = cobj->getRenderPass(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Framebuffer_getRenderPass : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14249,7 +14181,6 @@ static bool js_gfx_Framebuffer_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Framebuffer_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -14333,7 +14264,6 @@ static bool js_gfx_PipelineLayout_getSetLayouts(se::State& s) const std::vector& result = cobj->getSetLayouts(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineLayout_getSetLayouts : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14355,7 +14285,6 @@ static bool js_gfx_PipelineLayout_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineLayout_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -14437,7 +14366,6 @@ static bool js_gfx_PipelineState_getBlendState(se::State& s) const cc::gfx::BlendState& result = cobj->getBlendState(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getBlendState : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14456,7 +14384,6 @@ static bool js_gfx_PipelineState_getDepthStencilState(se::State& s) const cc::gfx::DepthStencilState& result = cobj->getDepthStencilState(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getDepthStencilState : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14475,7 +14402,6 @@ static bool js_gfx_PipelineState_getDynamicStates(se::State& s) int result = (int)cobj->getDynamicStates(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getDynamicStates : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14494,7 +14420,6 @@ static bool js_gfx_PipelineState_getInputState(se::State& s) const cc::gfx::InputState& result = cobj->getInputState(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getInputState : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14513,7 +14438,6 @@ static bool js_gfx_PipelineState_getPipelineLayout(se::State& s) const cc::gfx::PipelineLayout* result = cobj->getPipelineLayout(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getPipelineLayout : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14532,7 +14456,6 @@ static bool js_gfx_PipelineState_getPrimitive(se::State& s) int result = (int)cobj->getPrimitive(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getPrimitive : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14551,7 +14474,6 @@ static bool js_gfx_PipelineState_getRasterizerState(se::State& s) const cc::gfx::RasterizerState& result = cobj->getRasterizerState(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getRasterizerState : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14570,7 +14492,6 @@ static bool js_gfx_PipelineState_getRenderPass(se::State& s) const cc::gfx::RenderPass* result = cobj->getRenderPass(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getRenderPass : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14589,7 +14510,6 @@ static bool js_gfx_PipelineState_getShader(se::State& s) cc::gfx::Shader* result = cobj->getShader(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_getShader : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14611,7 +14531,6 @@ static bool js_gfx_PipelineState_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_PipelineState_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -14701,7 +14620,6 @@ static bool js_gfx_Texture_getBuffer(se::State& s) unsigned char* result = cobj->getBuffer(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getBuffer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14720,7 +14638,6 @@ static bool js_gfx_Texture_getDepth(se::State& s) unsigned int result = cobj->getDepth(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getDepth : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14739,7 +14656,6 @@ static bool js_gfx_Texture_getFlags(se::State& s) int result = (int)cobj->getFlags(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getFlags : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14758,7 +14674,6 @@ static bool js_gfx_Texture_getFormat(se::State& s) int result = (int)cobj->getFormat(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getFormat : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14777,7 +14692,6 @@ static bool js_gfx_Texture_getHeight(se::State& s) unsigned int result = cobj->getHeight(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getHeight : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14796,7 +14710,6 @@ static bool js_gfx_Texture_getLayerCount(se::State& s) unsigned int result = cobj->getLayerCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getLayerCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14815,7 +14728,6 @@ static bool js_gfx_Texture_getLevelCount(se::State& s) unsigned int result = cobj->getLevelCount(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getLevelCount : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14834,7 +14746,6 @@ static bool js_gfx_Texture_getSamples(se::State& s) int result = (int)cobj->getSamples(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getSamples : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14853,7 +14764,6 @@ static bool js_gfx_Texture_getSize(se::State& s) unsigned int result = cobj->getSize(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getSize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14872,7 +14782,6 @@ static bool js_gfx_Texture_getType(se::State& s) int result = (int)cobj->getType(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getType : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14891,7 +14800,6 @@ static bool js_gfx_Texture_getUsage(se::State& s) int result = (int)cobj->getUsage(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getUsage : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14910,7 +14818,6 @@ static bool js_gfx_Texture_getWidth(se::State& s) unsigned int result = cobj->getWidth(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_getWidth : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -14929,7 +14836,6 @@ static bool js_gfx_Texture_isTextureView(se::State& s) bool result = cobj->isTextureView(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Texture_isTextureView : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15044,7 +14950,6 @@ static bool js_gfx_Shader_getAttributes(se::State& s) const std::vector& result = cobj->getAttributes(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_getAttributes : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15063,7 +14968,6 @@ static bool js_gfx_Shader_getBlocks(se::State& s) const std::vector& result = cobj->getBlocks(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_getBlocks : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15082,7 +14986,6 @@ static bool js_gfx_Shader_getID(se::State& s) unsigned int result = cobj->getID(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_getID : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15101,7 +15004,6 @@ static bool js_gfx_Shader_getName(se::State& s) const cc::String& result = cobj->getName(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_getName : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15120,7 +15022,6 @@ static bool js_gfx_Shader_getSamplers(se::State& s) const std::vector& result = cobj->getSamplers(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_getSamplers : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15139,7 +15040,6 @@ static bool js_gfx_Shader_getStages(se::State& s) const std::vector& result = cobj->getStages(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_getStages : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15161,7 +15061,6 @@ static bool js_gfx_Shader_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Shader_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15248,7 +15147,6 @@ static bool js_gfx_Device_bindingMappingInfo(se::State& s) const cc::gfx::BindingMappingInfo& result = cobj->bindingMappingInfo(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_bindingMappingInfo : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15271,7 +15169,6 @@ static bool js_gfx_Device_createCommandBuffer(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createCommandBuffer : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15294,7 +15191,6 @@ static bool js_gfx_Device_createDescriptorSet(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createDescriptorSet : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15317,7 +15213,6 @@ static bool js_gfx_Device_createDescriptorSetLayout(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createDescriptorSetLayout : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15340,7 +15235,6 @@ static bool js_gfx_Device_createFence(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createFence : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15363,7 +15257,6 @@ static bool js_gfx_Device_createFramebuffer(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createFramebuffer : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15386,7 +15279,6 @@ static bool js_gfx_Device_createInputAssembler(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createInputAssembler : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15409,7 +15301,6 @@ static bool js_gfx_Device_createPipelineLayout(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createPipelineLayout : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15432,7 +15323,6 @@ static bool js_gfx_Device_createPipelineState(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createPipelineState : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15455,7 +15345,6 @@ static bool js_gfx_Device_createQueue(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createQueue : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15478,7 +15367,6 @@ static bool js_gfx_Device_createRenderPass(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createRenderPass : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15501,7 +15389,6 @@ static bool js_gfx_Device_createSampler(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createSampler : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15524,7 +15411,6 @@ static bool js_gfx_Device_createShader(se::State& s) ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_createShader : Error processing arguments"); se::NonRefNativePtrCreatedByCtorMap::emplace(result); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -15558,7 +15444,6 @@ static bool js_gfx_Device_genShaderId(se::State& s) unsigned int result = cobj->genShaderId(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_genShaderId : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15577,7 +15462,6 @@ static bool js_gfx_Device_getClipSpaceMinZ(se::State& s) float result = cobj->getClipSpaceMinZ(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getClipSpaceMinZ : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15596,7 +15480,6 @@ static bool js_gfx_Device_getColorFormat(se::State& s) int result = (int)cobj->getColorFormat(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getColorFormat : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15615,7 +15498,6 @@ static bool js_gfx_Device_getCommandBuffer(se::State& s) cc::gfx::CommandBuffer* result = cobj->getCommandBuffer(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getCommandBuffer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15634,7 +15516,6 @@ static bool js_gfx_Device_getContext(se::State& s) cc::gfx::Context* result = cobj->getContext(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getContext : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15653,7 +15534,6 @@ static bool js_gfx_Device_getDepthBits(se::State& s) int result = cobj->getDepthBits(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getDepthBits : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15672,7 +15552,6 @@ static bool js_gfx_Device_getDepthStencilFormat(se::State& s) int result = (int)cobj->getDepthStencilFormat(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getDepthStencilFormat : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15691,7 +15570,6 @@ static bool js_gfx_Device_getDeviceName(se::State& s) const cc::String& result = cobj->getDeviceName(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getDeviceName : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15710,7 +15588,6 @@ static bool js_gfx_Device_getGfxAPI(se::State& s) int result = (int)cobj->getGfxAPI(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getGfxAPI : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15729,7 +15606,6 @@ static bool js_gfx_Device_getHeight(se::State& s) unsigned int result = cobj->getHeight(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getHeight : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15748,7 +15624,6 @@ static bool js_gfx_Device_getMaxCubeMapTextureSize(se::State& s) int result = cobj->getMaxCubeMapTextureSize(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxCubeMapTextureSize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15767,7 +15642,6 @@ static bool js_gfx_Device_getMaxFragmentUniformVectors(se::State& s) int result = cobj->getMaxFragmentUniformVectors(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxFragmentUniformVectors : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15786,7 +15660,6 @@ static bool js_gfx_Device_getMaxTextureSize(se::State& s) int result = cobj->getMaxTextureSize(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxTextureSize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15805,7 +15678,6 @@ static bool js_gfx_Device_getMaxTextureUnits(se::State& s) int result = cobj->getMaxTextureUnits(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxTextureUnits : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15824,7 +15696,6 @@ static bool js_gfx_Device_getMaxUniformBlockSize(se::State& s) int result = cobj->getMaxUniformBlockSize(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxUniformBlockSize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15843,7 +15714,6 @@ static bool js_gfx_Device_getMaxUniformBufferBindings(se::State& s) int result = cobj->getMaxUniformBufferBindings(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxUniformBufferBindings : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15862,7 +15732,6 @@ static bool js_gfx_Device_getMaxVertexAttributes(se::State& s) int result = cobj->getMaxVertexAttributes(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxVertexAttributes : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15881,7 +15750,6 @@ static bool js_gfx_Device_getMaxVertexTextureUnits(se::State& s) int result = cobj->getMaxVertexTextureUnits(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxVertexTextureUnits : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15900,7 +15768,6 @@ static bool js_gfx_Device_getMaxVertexUniformVectors(se::State& s) int result = cobj->getMaxVertexUniformVectors(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMaxVertexUniformVectors : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15919,7 +15786,6 @@ static bool js_gfx_Device_getMemoryStatus(se::State& s) cc::gfx::MemoryStatus& result = cobj->getMemoryStatus(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getMemoryStatus : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15938,7 +15804,6 @@ static bool js_gfx_Device_getNativeHeight(se::State& s) unsigned int result = cobj->getNativeHeight(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getNativeHeight : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15957,7 +15822,6 @@ static bool js_gfx_Device_getNativeWidth(se::State& s) unsigned int result = cobj->getNativeWidth(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getNativeWidth : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15976,7 +15840,6 @@ static bool js_gfx_Device_getNumDrawCalls(se::State& s) unsigned int result = cobj->getNumDrawCalls(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getNumDrawCalls : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -15995,7 +15858,6 @@ static bool js_gfx_Device_getNumInstances(se::State& s) unsigned int result = cobj->getNumInstances(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getNumInstances : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16014,7 +15876,6 @@ static bool js_gfx_Device_getNumTris(se::State& s) unsigned int result = cobj->getNumTris(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getNumTris : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16033,7 +15894,6 @@ static bool js_gfx_Device_getQueue(se::State& s) cc::gfx::Queue* result = cobj->getQueue(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getQueue : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16052,7 +15912,6 @@ static bool js_gfx_Device_getRenderer(se::State& s) const cc::String& result = cobj->getRenderer(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getRenderer : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16071,7 +15930,6 @@ static bool js_gfx_Device_getScreenSpaceSignY(se::State& s) float result = cobj->getScreenSpaceSignY(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getScreenSpaceSignY : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16090,7 +15948,6 @@ static bool js_gfx_Device_getStencilBits(se::State& s) int result = cobj->getStencilBits(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getStencilBits : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16109,7 +15966,6 @@ static bool js_gfx_Device_getSurfaceTransform(se::State& s) int result = (int)cobj->getSurfaceTransform(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getSurfaceTransform : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16128,7 +15984,6 @@ static bool js_gfx_Device_getUVSpaceSignY(se::State& s) float result = cobj->getUVSpaceSignY(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getUVSpaceSignY : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16147,7 +16002,6 @@ static bool js_gfx_Device_getUboOffsetAlignment(se::State& s) int result = cobj->getUboOffsetAlignment(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getUboOffsetAlignment : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16166,7 +16020,6 @@ static bool js_gfx_Device_getVendor(se::State& s) const cc::String& result = cobj->getVendor(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getVendor : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16185,7 +16038,6 @@ static bool js_gfx_Device_getWidth(se::State& s) unsigned int result = cobj->getWidth(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_getWidth : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); @@ -16207,7 +16059,6 @@ static bool js_gfx_Device_hasFeature(se::State& s) bool result = cobj->hasFeature(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_hasFeature : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); @@ -16229,7 +16080,6 @@ static bool js_gfx_Device_initialize(se::State& s) bool result = cobj->initialize(arg0.value()); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gfx_Device_initialize : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1); diff --git a/native/cocos/bindings/auto/jsb_gfx_auto.h b/native/cocos/bindings/auto/jsb_gfx_auto.h index b685e5c733..6d1fe9a2b6 100644 --- a/native/cocos/bindings/auto/jsb_gfx_auto.h +++ b/native/cocos/bindings/auto/jsb_gfx_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/renderer/core/Core.h" +#include "cocos\renderer\core\Core.h" extern se::Object* __jsb_cc_gfx_Offset_proto; extern se::Class* __jsb_cc_gfx_Offset_class; diff --git a/native/cocos/bindings/auto/jsb_gles2_auto.cpp b/native/cocos/bindings/auto/jsb_gles2_auto.cpp index 54a0b0ff83..a0c6d5473b 100644 --- a/native/cocos/bindings/auto/jsb_gles2_auto.cpp +++ b/native/cocos/bindings/auto/jsb_gles2_auto.cpp @@ -46,7 +46,6 @@ static bool js_gles2_GLES2Device_getThreadID(se::State& s) unsigned int result = cobj->getThreadID(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gles2_GLES2Device_getThreadID : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); diff --git a/native/cocos/bindings/auto/jsb_gles2_auto.h b/native/cocos/bindings/auto/jsb_gles2_auto.h index b5a1c46afd..2650b04a5d 100644 --- a/native/cocos/bindings/auto/jsb_gles2_auto.h +++ b/native/cocos/bindings/auto/jsb_gles2_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/renderer/gfx-gles2/GFXGLES2.h" +#include "cocos\renderer\gfx-gles2\GFXGLES2.h" extern se::Object* __jsb_cc_gfx_GLES2Device_proto; extern se::Class* __jsb_cc_gfx_GLES2Device_class; diff --git a/native/cocos/bindings/auto/jsb_gles3_auto.cpp b/native/cocos/bindings/auto/jsb_gles3_auto.cpp index d6965f909f..27549223ed 100644 --- a/native/cocos/bindings/auto/jsb_gles3_auto.cpp +++ b/native/cocos/bindings/auto/jsb_gles3_auto.cpp @@ -46,7 +46,6 @@ static bool js_gles3_GLES3Device_getThreadID(se::State& s) unsigned int result = cobj->getThreadID(); ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); SE_PRECONDITION2(ok, false, "js_gles3_GLES3Device_getThreadID : Error processing arguments"); - SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval()); return true; } SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); diff --git a/native/cocos/bindings/auto/jsb_gles3_auto.h b/native/cocos/bindings/auto/jsb_gles3_auto.h index e2dafa53f8..02cadcc07f 100644 --- a/native/cocos/bindings/auto/jsb_gles3_auto.h +++ b/native/cocos/bindings/auto/jsb_gles3_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/renderer/gfx-gles3/GFXGLES3.h" +#include "cocos\renderer\gfx-gles3\GFXGLES3.h" extern se::Object* __jsb_cc_gfx_GLES3Device_proto; extern se::Class* __jsb_cc_gfx_GLES3Device_class; diff --git a/native/cocos/bindings/auto/jsb_mtl_auto.cpp b/native/cocos/bindings/auto/jsb_mtl_auto.cpp index 369fe2e0d0..99c28eba7c 100644 --- a/native/cocos/bindings/auto/jsb_mtl_auto.cpp +++ b/native/cocos/bindings/auto/jsb_mtl_auto.cpp @@ -13,6 +13,42 @@ se::Object* __jsb_cc_gfx_CCMTLDevice_proto = nullptr; se::Class* __jsb_cc_gfx_CCMTLDevice_class = nullptr; +static bool js_mtl_CCMTLDevice_getDSSTexture(se::State& s) +{ + cc::gfx::CCMTLDevice* cobj = SE_THIS_OBJECT(s); + SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_getDSSTexture : Invalid Native Object"); + const auto& args = s.args(); + size_t argc = args.size(); + CC_UNUSED bool ok = true; + if (argc == 0) { + void* result = cobj->getDSSTexture(); + ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); + SE_PRECONDITION2(ok, false, "js_mtl_CCMTLDevice_getDSSTexture : Error processing arguments"); + return true; + } + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; +} +SE_BIND_FUNC(js_mtl_CCMTLDevice_getDSSTexture) + +static bool js_mtl_CCMTLDevice_getMTLLayer(se::State& s) +{ + cc::gfx::CCMTLDevice* cobj = SE_THIS_OBJECT(s); + SE_PRECONDITION2(cobj, false, "js_mtl_CCMTLDevice_getMTLLayer : Invalid Native Object"); + const auto& args = s.args(); + size_t argc = args.size(); + CC_UNUSED bool ok = true; + if (argc == 0) { + void* result = cobj->getMTLLayer(); + ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/); + SE_PRECONDITION2(ok, false, "js_mtl_CCMTLDevice_getMTLLayer : Error processing arguments"); + return true; + } + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; +} +SE_BIND_FUNC(js_mtl_CCMTLDevice_getMTLLayer) + SE_DECLARE_FINALIZE_FUNC(js_cc_gfx_CCMTLDevice_finalize) static bool js_mtl_CCMTLDevice_constructor(se::State& s) // constructor.c @@ -45,6 +81,8 @@ bool js_register_mtl_CCMTLDevice(se::Object* obj) { auto cls = se::Class::create("CCMTLDevice", obj, __jsb_cc_gfx_Device_proto, _SE(js_mtl_CCMTLDevice_constructor)); + cls->defineFunction("getDSSTexture", _SE(js_mtl_CCMTLDevice_getDSSTexture)); + cls->defineFunction("getMTLLayer", _SE(js_mtl_CCMTLDevice_getMTLLayer)); cls->defineFinalizeFunction(_SE(js_cc_gfx_CCMTLDevice_finalize)); cls->install(); JSBClassType::registerClass(cls); diff --git a/native/cocos/bindings/auto/jsb_mtl_auto.h b/native/cocos/bindings/auto/jsb_mtl_auto.h index d7cd9b191c..4e3e9024e4 100644 --- a/native/cocos/bindings/auto/jsb_mtl_auto.h +++ b/native/cocos/bindings/auto/jsb_mtl_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/renderer/gfx-metal/GFXMTL.h" +#include "cocos\renderer\gfx-metal\GFXMTL.h" extern se::Object* __jsb_cc_gfx_CCMTLDevice_proto; extern se::Class* __jsb_cc_gfx_CCMTLDevice_class; @@ -12,5 +12,7 @@ bool js_register_cc_gfx_CCMTLDevice(se::Object* obj); bool register_all_mtl(se::Object* obj); JSB_REGISTER_OBJECT_TYPE(cc::gfx::CCMTLDevice); +SE_DECLARE_FUNC(js_mtl_CCMTLDevice_getDSSTexture); +SE_DECLARE_FUNC(js_mtl_CCMTLDevice_getMTLLayer); SE_DECLARE_FUNC(js_mtl_CCMTLDevice_CCMTLDevice); diff --git a/native/cocos/bindings/auto/jsb_network_auto.h b/native/cocos/bindings/auto/jsb_network_auto.h index 5dd88e9763..a1af584f27 100644 --- a/native/cocos/bindings/auto/jsb_network_auto.h +++ b/native/cocos/bindings/auto/jsb_network_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/network/Downloader.h" +#include "cocos\network\Downloader.h" extern se::Object* __jsb_cc_network_DownloadTask_proto; extern se::Class* __jsb_cc_network_DownloadTask_class; diff --git a/native/cocos/bindings/auto/jsb_video_auto.h b/native/cocos/bindings/auto/jsb_video_auto.h index 7409e55cb1..81422964ea 100644 --- a/native/cocos/bindings/auto/jsb_video_auto.h +++ b/native/cocos/bindings/auto/jsb_video_auto.h @@ -4,7 +4,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/ui/videoplayer/VideoPlayer.h" +#include "cocos\ui\videoplayer\VideoPlayer.h" extern se::Object* __jsb_cc_VideoPlayer_proto; extern se::Class* __jsb_cc_VideoPlayer_class; diff --git a/native/cocos/bindings/auto/jsb_vk_auto.h b/native/cocos/bindings/auto/jsb_vk_auto.h index c85af8e604..f2ea7a086a 100644 --- a/native/cocos/bindings/auto/jsb_vk_auto.h +++ b/native/cocos/bindings/auto/jsb_vk_auto.h @@ -3,7 +3,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/renderer/gfx-vulkan/GFXVulkan.h" +#include "cocos\renderer\gfx-vulkan\GFXVulkan.h" extern se::Object* __jsb_cc_gfx_CCVKDevice_proto; extern se::Class* __jsb_cc_gfx_CCVKDevice_class; diff --git a/native/cocos/bindings/auto/jsb_webview_auto.h b/native/cocos/bindings/auto/jsb_webview_auto.h index 70d1eff7ce..3f24a2e190 100644 --- a/native/cocos/bindings/auto/jsb_webview_auto.h +++ b/native/cocos/bindings/auto/jsb_webview_auto.h @@ -4,7 +4,7 @@ #include #include "cocos/bindings/jswrapper/SeApi.h" #include "cocos/bindings/manual/jsb_conversions.h" -#include "cocos/ui/webview/WebView.h" +#include "cocos\ui\webview\WebView.h" extern se::Object* __jsb_cc_WebView_proto; extern se::Class* __jsb_cc_WebView_class; diff --git a/native/cocos/renderer/core/Core.h b/native/cocos/renderer/core/Core.h index 88f02efafb..0bdc6fd655 100644 --- a/native/cocos/renderer/core/Core.h +++ b/native/cocos/renderer/core/Core.h @@ -5,9 +5,6 @@ #include "base/CachedArray.h" #include "base/StringUtil.h" -#include "threading/CommandEncoder.h" -#include "threading/ThreadPool.h" - #include "gfx/GFXBuffer.h" #include "gfx/GFXCommand.h" #include "gfx/GFXCommandBuffer.h" @@ -26,20 +23,3 @@ #include "gfx/GFXSampler.h" #include "gfx/GFXShader.h" #include "gfx/GFXTexture.h" - -#include "gfx-agent/GFXBufferAgent.h" -#include "gfx-agent/GFXCommandBufferAgent.h" -#include "gfx-agent/GFXDescriptorSetAgent.h" -#include "gfx-agent/GFXDeviceAgent.h" -#include "gfx-agent/GFXFramebufferAgent.h" -#include "gfx-agent/GFXInputAssemblerAgent.h" -#include "gfx-agent/GFXPipelineStateAgent.h" -#include "gfx-agent/GFXQueueAgent.h" -#include "gfx-agent/GFXRenderPassAgent.h" -#include "gfx-agent/GFXShaderAgent.h" -#include "gfx-agent/GFXTextureAgent.h" - -#define CC_JOB_SYSTEM_TASKFLOW 1 -#define CC_JOB_SYSTEM_TBB 2 - -#define CC_JOB_SYSTEM CC_JOB_SYSTEM_TASKFLOW diff --git a/native/cocos/renderer/core/gfx/GFXCommandBuffer.h b/native/cocos/renderer/core/gfx/GFXCommandBuffer.h index 370301d808..3f9625b887 100755 --- a/native/cocos/renderer/core/gfx/GFXCommandBuffer.h +++ b/native/cocos/renderer/core/gfx/GFXCommandBuffer.h @@ -17,7 +17,7 @@ public: virtual void destroy() = 0; virtual void begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer, int submitIndex) = 0; virtual void end() = 0; - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) = 0; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) = 0; virtual void endRenderPass() = 0; virtual void bindPipelineState(PipelineState *pso) = 0; virtual void bindDescriptorSet(uint set, DescriptorSet *descriptorSet, uint dynamicOffsetCount, const uint *dynamicOffsets) = 0; @@ -35,16 +35,21 @@ public: virtual void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint count) = 0; virtual void execute(const CommandBuffer *const *cmdBuffs, uint32_t count) = 0; - CC_INLINE void begin() { begin(nullptr, 0, nullptr, -1); } - CC_INLINE void begin(int submitIndex) { begin(nullptr, 0, nullptr, submitIndex); } - // secondary command buffer specifics - CC_INLINE void begin(RenderPass *renderPass, uint subpass = 0, Framebuffer *frameBuffer = nullptr) { begin(renderPass, subpass, frameBuffer, -1); } - CC_INLINE void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil) { - beginRenderPass(renderPass, fbo, renderArea, colors, depth, stencil, nullptr, 0); + CC_INLINE void bindDescriptorSetForJS(uint set, DescriptorSet *descriptorSet) { + bindDescriptorSet(set, descriptorSet, 0, nullptr); } CC_INLINE void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const ColorList &colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs = nullptr, uint32_t count = 0) { beginRenderPass(renderPass, fbo, renderArea, colors.data(), depth, stencil, cmdBuffs, count); } + + CC_INLINE void begin() { begin(nullptr, 0, nullptr, -1); } + CC_INLINE void begin(int submitIndex) { begin(nullptr, 0, nullptr, submitIndex); } + // secondary command buffer specifics + CC_INLINE void begin(RenderPass *renderPass) { begin(renderPass, 0, nullptr, -1); } + CC_INLINE void begin(RenderPass *renderPass, uint subpass) { begin(renderPass, subpass, nullptr, -1); } + CC_INLINE void begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer) { begin(renderPass, subpass, frameBuffer, -1); } + + CC_INLINE void updateBuffer(Buffer *buff, const void *data) { updateBuffer(buff, data, buff->getSize()); } CC_INLINE void execute(const CommandBufferList &cmdBuffs, uint32_t count) { execute(cmdBuffs.data(), count); } CC_INLINE void updateBuffer(Buffer *buff, const void *data) { updateBuffer(buff, data, buff->getSize()); } @@ -52,6 +57,12 @@ public: CC_INLINE void bindDescriptorSet(uint set, DescriptorSet *descriptorSet, const vector &dynamicOffsets) { bindDescriptorSet(set, descriptorSet, static_cast(dynamicOffsets.size()), dynamicOffsets.data()); } + CC_INLINE void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil) { + beginRenderPass(renderPass, fbo, renderArea, colors, depth, stencil, false); + } + CC_INLINE void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const ColorList &colors, float depth, int stencil) { + beginRenderPass(renderPass, fbo, renderArea, colors.data(), depth, stencil); + } CC_INLINE void copyBuffersToTexture(const BufferDataList &buffers, Texture *texture, const BufferTextureCopyList ®ions) { copyBuffersToTexture(buffers.data(), texture, regions.data(), static_cast(regions.size())); } diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp index c7c74df245..9d0ba678d6 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp @@ -105,7 +105,7 @@ void GLES2CommandBuffer::end() { } } -void GLES2CommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) { +void GLES2CommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) { _isInRenderPass = true; GLES2CmdBeginRenderPass *cmd = _cmdAllocator->beginRenderPassCmdPool.alloc(); diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h index 9be10f740b..d196f191b0 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h @@ -44,7 +44,7 @@ public: virtual void begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer, int submitIndex) override; virtual void end() override; - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) override; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) override; virtual void endRenderPass() override; virtual void bindPipelineState(PipelineState *pso) override; virtual void bindDescriptorSet(uint set, DescriptorSet *descriptorSet, uint dynamicOffsetCount, const uint *dynamicOffsets) override; diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp index c17466f43a..c3800c0deb 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp @@ -1408,6 +1408,10 @@ void GLES2CmdFuncBeginRenderPass(GLES2Device *device, GLES2GPURenderPass *gpuRen invalidAttachments[numAttachments++] = (gpuFramebuffer->isOffscreen ? GL_COLOR_ATTACHMENT0 + j : GL_COLOR_EXT); break; } + default:; + } + } + } // for if (gpuRenderPass->depthStencilAttachment.format != Format::UNKNOWN) { bool hasDepth = GFX_FORMAT_INFOS[(int)gpuRenderPass->depthStencilAttachment.format].hasDepth; diff --git a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp index 3acc3fa674..d04b951ad3 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp @@ -20,7 +20,7 @@ GLES2PrimaryCommandBuffer::GLES2PrimaryCommandBuffer(Device *device) GLES2PrimaryCommandBuffer::~GLES2PrimaryCommandBuffer() { } -void GLES2PrimaryCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) { +void GLES2PrimaryCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) { _isInRenderPass = true; GLES2GPURenderPass *gpuRenderPass = ((GLES2RenderPass *)renderPass)->gpuRenderPass(); GLES2GPUFramebuffer *gpuFramebuffer = ((GLES2Framebuffer *)fbo)->gpuFBO(); diff --git a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h index 223bb9d7dc..30a8a4623d 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h @@ -13,7 +13,7 @@ public: GLES2PrimaryCommandBuffer(Device *device); ~GLES2PrimaryCommandBuffer(); - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) override; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) override; virtual void endRenderPass() override; virtual void draw(InputAssembler *ia) override; virtual void updateBuffer(Buffer *buff, const void *data, uint size) override; diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp index 40d90e3830..06fe0b9f80 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp @@ -105,7 +105,7 @@ void GLES3CommandBuffer::end() { } } -void GLES3CommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) { +void GLES3CommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) { _isInRenderPass = true; GLES3CmdBeginRenderPass *cmd = _cmdAllocator->beginRenderPassCmdPool.alloc(); diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h index f2873a1c36..8a50b96bd0 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h @@ -43,7 +43,7 @@ public: virtual void begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer, int submitIndex) override; virtual void end() override; - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) override; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) override; virtual void endRenderPass() override; virtual void bindPipelineState(PipelineState *pso) override; virtual void bindDescriptorSet(uint set, DescriptorSet *descriptorSet, uint dynamicOffsetCount, const uint *dynamicOffsets) override; diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp index 6ebf5e60b8..dcb901a5f4 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp @@ -1516,6 +1516,10 @@ void GLES3CmdFuncBeginRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRen invalidAttachments[numAttachments++] = (gpuFramebuffer->isOffscreen ? GL_COLOR_ATTACHMENT0 + j : GL_COLOR); break; } + default:; + } + } + } // for if (gpuRenderPass->depthStencilAttachment.format != Format::UNKNOWN) { bool hasDepth = GFX_FORMAT_INFOS[(int)gpuRenderPass->depthStencilAttachment.format].hasDepth; diff --git a/native/cocos/renderer/gfx-gles3/GLES3Context.mm b/native/cocos/renderer/gfx-gles3/GLES3Context.mm index 4f49ad2013..66d989045f 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Context.mm +++ b/native/cocos/renderer/gfx-gles3/GLES3Context.mm @@ -29,8 +29,6 @@ THE SOFTWARE. #import -#import - namespace cc { namespace gfx { diff --git a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp index 84838e08a2..18e42f9add 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp @@ -20,7 +20,7 @@ GLES3PrimaryCommandBuffer::GLES3PrimaryCommandBuffer(Device *device) GLES3PrimaryCommandBuffer::~GLES3PrimaryCommandBuffer() { } -void GLES3PrimaryCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) { +void GLES3PrimaryCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) { _isInRenderPass = true; GLES3GPURenderPass *gpuRenderPass = ((GLES3RenderPass *)renderPass)->gpuRenderPass(); GLES3GPUFramebuffer *gpuFramebuffer = ((GLES3Framebuffer *)fbo)->gpuFBO(); diff --git a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h index 4ec36a41be..1431fe9683 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h @@ -13,7 +13,7 @@ public: GLES3PrimaryCommandBuffer(Device *device); ~GLES3PrimaryCommandBuffer(); - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) override; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) override; virtual void endRenderPass() override; virtual void draw(InputAssembler *ia) override; virtual void updateBuffer(Buffer *buff, const void *data, uint size) override; diff --git a/native/cocos/renderer/gfx-metal/MTLBuffer.h b/native/cocos/renderer/gfx-metal/MTLBuffer.h index 0e2219256b..d244b5a00e 100644 --- a/native/cocos/renderer/gfx-metal/MTLBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLBuffer.h @@ -44,6 +44,8 @@ public: virtual void resize(uint size) override; virtual void update(void *buffer, uint offset) override; + void encodeBuffer(CCMTLRenderCommandEncoder &encoder, uint offset, uint binding, ShaderStageFlags stages); + CC_INLINE id getMTLBuffer() const { return _mtlBuffer; } CC_INLINE MTLIndexType getIndexType() const { return _indexType; } CC_INLINE bool isDrawIndirectByIndex() const { return _isDrawIndirectByIndex; } diff --git a/native/cocos/renderer/gfx-metal/MTLBuffer.mm b/native/cocos/renderer/gfx-metal/MTLBuffer.mm index 485b33aa96..8d380e596f 100644 --- a/native/cocos/renderer/gfx-metal/MTLBuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLBuffer.mm @@ -208,10 +208,8 @@ void CCMTLBuffer::resizeBuffer(uint8_t **buffer, uint size, uint oldSize) { status.bufferSize -= oldSize; } -void CCMTLBuffer::update(void *buffer, uint size) -{ - if (_isBufferView) - { +void CCMTLBuffer::update(void *buffer, uint size) { + if (_isBufferView) { CC_LOG_WARNING("Cannot update a buffer view."); return; } diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h index 5479519e4d..8f081b3c00 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h @@ -51,7 +51,7 @@ public: virtual void destroy() override; virtual void begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer, int submitIndex) override; virtual void end() override; - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) override; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) override; virtual void endRenderPass() override; virtual void bindPipelineState(PipelineState *pso) override; virtual void bindDescriptorSet(uint set, DescriptorSet *descriptorSet, uint dynamicOffsetCount, const uint *dynamicOffsets) override; diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm index efeaf8b4bd..fbe9ed8849 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm @@ -77,30 +77,13 @@ id CCMTLCommandBuffer::getCurrentDrawable() return _currDrawable; } -bool CCMTLCommandBuffer::isRenderingEntireDrawable(const Rect &rect, const CCMTLRenderPass *renderPass) -{ - const int num = renderPass->getColorRenderTargetNums(); - if (num == 0) - { - return true; - } - const auto &renderTargetSize = renderPass->getRenderTargetSizes()[0]; - return rect.x == 0 && rect.y == 0 && rect.width == renderTargetSize.x && rect.height == renderTargetSize.y; -} - void CCMTLCommandBuffer::begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer, int submitIndex) { if (_commandBufferBegan) return; - - cbAutoReleasePool = [[NSAutoreleasePool alloc] init]; - - _isSubCB = renderPass != nullptr; - if (!_isSubCB) - { - // Sub command buffer for parallel shouldn't request any command buffer - _mtlCommandBuffer = [[_mtlCommandQueue commandBuffer] retain]; - [_mtlCommandBuffer enqueue]; - } + + _mtlCommandBuffer = [_mtlCommandQueue commandBuffer]; + [_mtlCommandBuffer retain]; + [_mtlCommandBuffer enqueue]; _numTriangles = 0; _numDrawCalls = 0; _numInstances = 0; @@ -118,30 +101,27 @@ void CCMTLCommandBuffer::end() { if (!_commandBufferBegan) return; _commandBufferBegan = false; - - // End encoding for sub encoder of a parallel encoder - if (_isSubCB) - { - _commandEncoder.endEncoding(); - } if (_currDrawable) { [_currDrawable release]; _currDrawable = nil; } - [cbAutoReleasePool release]; - cbAutoReleasePool = nullptr; } -void CCMTLCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) +bool CCMTLCommandBuffer::isRenderingEntireDrawable(const Rect &rect, const CCMTLRenderPass *renderPass) { - // Sub CommandBuffer should call begin render pass - if (_isSubCB) + const int num = renderPass->getColorRenderTargetNums(); + if (num == 0) { - return; + return true; } - + const auto &renderTargetSize = renderPass->getRenderTargetSizes()[0]; + return rect.x == 0 && rect.y == 0 && rect.width == renderTargetSize.x && rect.height == renderTargetSize.y; +} + +void CCMTLCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) +{ auto isOffscreen = static_cast(fbo)->isOffscreen(); if (!isOffscreen) { @@ -203,17 +183,6 @@ void CCMTLCommandBuffer::endRenderPass() } } -void CCMTLCommandBuffer::execute(const CommandBuffer *const *commandBuffs, uint32_t count) -{ - for (uint i = 0; i < count; ++i) - { - auto commandBuffer = static_cast(commandBuffs[i]); - _numDrawCalls += commandBuffer->_numDrawCalls; - _numInstances += commandBuffer->_numInstances; - _numTriangles += commandBuffer->_numTriangles; - } -} - void CCMTLCommandBuffer::bindPipelineState(PipelineState *pso) { _gpuPipelineState = static_cast(pso)->getGPUPipelineState(); @@ -468,6 +437,11 @@ void CCMTLCommandBuffer::draw(InputAssembler *ia) } } } + + } + else if (_type == CommandBufferType::SECONDARY) + { + CC_LOG_ERROR("CommandBufferType::SECONDARY not implemented."); } else { @@ -564,6 +538,17 @@ void CCMTLCommandBuffer::copyBuffersToTexture(const uint8_t *const *buffers, Tex [encoder endEncoding]; } +void CCMTLCommandBuffer::execute(const CommandBuffer *const *commandBuffs, uint32_t count) +{ + for (uint i = 0; i < count; ++i) + { + auto commandBuffer = static_cast(commandBuffs[i]); + _numDrawCalls += commandBuffer->_numDrawCalls; + _numInstances += commandBuffer->_numInstances; + _numTriangles += commandBuffer->_numTriangles; + } +} + void CCMTLCommandBuffer::bindDescriptorSets() { auto &vertexBuffers = _inputAssembler->getVertexBuffers(); diff --git a/native/cocos/renderer/gfx-metal/MTLDevice.h b/native/cocos/renderer/gfx-metal/MTLDevice.h index 21b4fa01b2..098846288b 100644 --- a/native/cocos/renderer/gfx-metal/MTLDevice.h +++ b/native/cocos/renderer/gfx-metal/MTLDevice.h @@ -53,22 +53,6 @@ public: using Device::createPipelineState; using Device::copyBuffersToTexture; - using Device::createCommandBuffer; - using Device::createFence; - using Device::createQueue; - using Device::createBuffer; - using Device::createTexture; - using Device::createSampler; - using Device::createShader; - using Device::createInputAssembler; - using Device::createRenderPass; - using Device::createFramebuffer; - using Device::createDescriptorSet; - using Device::createDescriptorSetLayout; - using Device::createPipelineLayout; - using Device::createPipelineState; - using Device::copyBuffersToTexture; - virtual bool initialize(const DeviceInfo &info) override; virtual void destroy() override; virtual void resize(uint width, uint height) override; @@ -103,20 +87,6 @@ protected: virtual PipelineLayout *createPipelineLayout() override; virtual PipelineState *createPipelineState() override; virtual void copyBuffersToTexture(const uint8_t *const *buffers, Texture *dst, const BufferTextureCopy *regions, uint count) override; - virtual void blitBuffer(void *srcBuffer, uint offset, uint size, void *dstBuffer); - - CC_INLINE CCMTLStateCache *getStateCache() const { return _stateCache; } - CC_INLINE void *getMTLCommandQueue() const { return _mtlCommandQueue; } - CC_INLINE void *getMTLLayer() const { return _mtlLayer; } - CC_INLINE void *getMTLDevice() const { return _mtlDevice; } - CC_INLINE uint getMaximumSamplerUnits() const { return _maxSamplerUnits; } - CC_INLINE uint getMaximumColorRenderTargets() const { return _maxColorRenderTargets; } - CC_INLINE uint getMaximumBufferBindingIndex() const { return _maxBufferBindingIndex; } - CC_INLINE bool isIndirectCommandBufferSupported() const { return _icbSuppored; } - CC_INLINE bool isIndirectDrawSupported() const { return _indirectDrawSupported; } - CC_INLINE CCMTLGPUStagingBufferPool *gpuStagingBufferPool() const { return _gpuStagingBufferPool; } - CC_INLINE bool isSamplerDescriptorCompareFunctionSupported() const { return _isSamplerDescriptorCompareFunctionSupported; } - CC_INLINE void *getDSSTexture() const { return _dssTex; } private: void onMemoryWarning(); diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp index 40da997607..66ff45f2a6 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp @@ -126,7 +126,7 @@ void CCVKCommandBuffer::end() { ((CCVKDevice *)_device)->gpuDevice()->getCommandBufferPool(std::this_thread::get_id())->yield(_gpuCommandBuffer); } -void CCVKCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) { +void CCVKCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) { _curGPUFBO = ((CCVKFramebuffer *)fbo)->gpuFBO(); CCVKGPURenderPass *gpuRenderPass = ((CCVKRenderPass *)renderPass)->gpuRenderPass(); VkFramebuffer framebuffer = _curGPUFBO->vkFramebuffer; @@ -172,7 +172,7 @@ void CCVKCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo passBeginInfo.clearValueCount = clearValues.size(); passBeginInfo.pClearValues = clearValues.data(); passBeginInfo.renderArea = {{(int)renderArea.x, (int)renderArea.y}, {renderArea.width, renderArea.height}}; - vkCmdBeginRenderPass(_gpuCommandBuffer->vkCommandBuffer, &passBeginInfo, + vkCmdBeginRenderPass(_gpuCommandBuffer->vkCommandBuffer, &passBeginInfo, fromSecondaryCB ? VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS : VK_SUBPASS_CONTENTS_INLINE); if (!fromSecondaryCB) { diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h index 15dd88a555..fa78142f4c 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h @@ -42,7 +42,7 @@ public: virtual void begin(RenderPass *renderPass, uint subpass, Framebuffer *frameBuffer, int submitIndex) override; virtual void end() override; - virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, const CommandBuffer *const *cmdBuffs, uint32_t count) override; + virtual void beginRenderPass(RenderPass *renderPass, Framebuffer *fbo, const Rect &renderArea, const Color *colors, float depth, int stencil, bool fromSecondaryCB) override; virtual void endRenderPass() override; virtual void bindPipelineState(PipelineState *pso) override; virtual void bindDescriptorSet(uint set, DescriptorSet *descriptorSet, uint dynamicOffsetCount, const uint *dynamicOffsets) override; diff --git a/native/cocos/renderer/gfx-vulkan/VKCommands.cpp b/native/cocos/renderer/gfx-vulkan/VKCommands.cpp index b191d77869..c59d0a9d6c 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommands.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKCommands.cpp @@ -385,6 +385,33 @@ void CCVKCmdFuncCreateDescriptorSetLayout(CCVKDevice *device, CCVKGPUDescriptorS VK_CHECK(vkCreateDescriptorSetLayout(gpuDevice->vkDevice, &setCreateInfo, nullptr, &gpuDescriptorSetLayout->vkDescriptorSetLayout)); gpuDescriptorSetLayout->pool.link(gpuDevice, gpuDescriptorSetLayout->maxSetsPerPool, gpuDescriptorSetLayout->vkBindings, gpuDescriptorSetLayout->vkDescriptorSetLayout); + + if (gpuDevice->useDescriptorUpdateTemplate) { + const vector &bindings = gpuDescriptorSetLayout->vkBindings; + uint bindingCount = bindings.size(); + if (!bindingCount) return; + + vector entries(bindingCount); + for (size_t j = 0u, k = 0u; j < bindingCount; j++) { + const VkDescriptorSetLayoutBinding &binding = bindings[j]; + if (binding.descriptorType != VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT) { + entries[j].dstBinding = binding.binding; + entries[j].dstArrayElement = 0; + entries[j].descriptorCount = binding.descriptorCount; + entries[j].descriptorType = binding.descriptorType; + entries[j].offset = sizeof(CCVKDescriptorInfo) * k; + entries[j].stride = sizeof(CCVKDescriptorInfo); + k += binding.descriptorCount; + } // TODO: inline UBOs + } + + VkDescriptorUpdateTemplateCreateInfo createInfo = {VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO}; + createInfo.descriptorUpdateEntryCount = bindingCount; + createInfo.pDescriptorUpdateEntries = entries.data(); + createInfo.templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET; + createInfo.descriptorSetLayout = gpuDescriptorSetLayout->vkDescriptorSetLayout; + VK_CHECK(vkCreateDescriptorUpdateTemplateKHR(gpuDevice->vkDevice, &createInfo, nullptr, &gpuDescriptorSetLayout->vkDescriptorUpdateTemplate)); + } } void CCVKCmdFuncCreatePipelineLayout(CCVKDevice *device, CCVKGPUPipelineLayout *gpuPipelineLayout) { @@ -842,11 +869,6 @@ void CCVKCmdFuncDestroyFramebuffer(CCVKGPUDevice *gpuDevice, CCVKGPUFramebuffer } void CCVKCmdFuncDestroyDescriptorSetLayout(CCVKGPUDevice *gpuDevice, CCVKGPUDescriptorSetLayout *gpuDescriptorSetLayout) { - if (gpuDescriptorSetLayout->defaultDescriptorSet != VK_NULL_HANDLE) { - gpuDescriptorSetLayout->pool.yield(gpuDescriptorSetLayout->defaultDescriptorSet); - gpuDescriptorSetLayout->defaultDescriptorSet = VK_NULL_HANDLE; - } - if (gpuDescriptorSetLayout->vkDescriptorUpdateTemplate != VK_NULL_HANDLE) { vkDestroyDescriptorUpdateTemplateKHR(gpuDevice->vkDevice, gpuDescriptorSetLayout->vkDescriptorUpdateTemplate, nullptr); gpuDescriptorSetLayout->vkDescriptorUpdateTemplate = VK_NULL_HANDLE; diff --git a/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp b/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp index 081a90a64c..c3a14b548a 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKDescriptorSet.cpp @@ -47,7 +47,6 @@ bool CCVKDescriptorSet::initialize(const DescriptorSetInfo &info) { _layout = info.layout->getSetLayouts()[info.setIndex]; - CCVKGPUPipelineLayout *gpuPipelineLayout = ((CCVKPipelineLayout *)info.layout)->gpuPipelineLayout(); CCVKGPUDescriptorSetLayout *gpuDescriptorSetLayout = ((CCVKDescriptorSetLayout *)_layout)->gpuDescriptorSetLayout(); const uint bindingCount = gpuDescriptorSetLayout->bindings.size(); const uint descriptorCount = gpuDescriptorSetLayout->descriptorCount; @@ -68,13 +67,15 @@ bool CCVKDescriptorSet::initialize(const DescriptorSetInfo &info) { CCVKGPUDevice *gpuDevice = ((CCVKDevice *)_device)->gpuDevice(); if (gpuDevice->useDescriptorUpdateTemplate) { - _gpuDescriptorSet->pUpdateTemplate = &gpuPipelineLayout->vkDescriptorUpdateTemplates[info.setIndex]; + _gpuDescriptorSet->pUpdateTemplate = &gpuDescriptorSetLayout->vkDescriptorUpdateTemplate; } _gpuDescriptorSet->instances.resize(gpuDevice->backBufferCount); for (size_t t = 0u; t < gpuDevice->backBufferCount; ++t) { CCVKGPUDescriptorSet::DescriptorSetInstance &instance = _gpuDescriptorSet->instances[t]; - instance.vkDescriptorSet = gpuDescriptorSetLayout->pool.request(); + if (bindingCount) { // don't create resources if not needed + instance.vkDescriptorSet = gpuDescriptorSetLayout->pool.request(); + } instance.descriptorInfos.resize(descriptorCount, {}); for (size_t i = 0u, k = 0u; i < bindingCount; ++i) { @@ -155,7 +156,7 @@ void CCVKDescriptorSet::destroy() { } } - if (gpuDescriptorSetLayout) { + if (gpuDescriptorSetLayout && instance.vkDescriptorSet) { gpuDescriptorSetLayout->pool.yield(instance.vkDescriptorSet); } } diff --git a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h index d962232654..3ddd4ace8b 100644 --- a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h +++ b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h @@ -302,9 +302,6 @@ public: uint curBackBufferIndex = 0u; uint backBufferCount = 3u; - uint curBackBufferIndex = 0u; - uint backBufferCount = 3u; - bool useDescriptorUpdateTemplate = false; bool useMultiDrawIndirect = false; @@ -316,10 +313,10 @@ public: CCVKGPUSwapchain *swapchain = nullptr; // reference - /* */ + /* * using CommandBufferPools = tbb::concurrent_unordered_map< std::thread::id, CCVKGPUCommandBufferPool *, std::hash>; - /* * + /* */ using CommandBufferPools = unordered_map; std::mutex mutex; /* */ @@ -528,6 +525,7 @@ public: vector vkBindings; VkDescriptorSetLayout vkDescriptorSetLayout = VK_NULL_HANDLE; + VkDescriptorUpdateTemplate vkDescriptorUpdateTemplate = VK_NULL_HANDLE; vector bindingIndices; vector descriptorIndices; @@ -566,13 +564,6 @@ public: return hash & ((1 << 10) - 1); } - CC_INLINE uint getHash(uint queueFamilyIndex) { - return (queueFamilyIndex << 10) | _device->curBackBufferIndex; - } - CC_INLINE uint getBackBufferIndex(uint hash) { - return hash & ((1 << 10) - 1); - } - void request(CCVKGPUCommandBuffer *gpuCommandBuffer) { uint hash = getHash(gpuCommandBuffer->queueFamilyIndex); @@ -905,6 +896,33 @@ private: } } + void erase(CCVKGPUBuffer *gpuBuffer) { + for (uint i = 0u; i < _device->backBufferCount; ++i) { + if (_buffersToBeUpdated[i].count(gpuBuffer)) { + _buffersToBeUpdated[i].erase(gpuBuffer); + } + } + } + + void flush() { + unordered_map &buffers = _buffersToBeUpdated[_device->curBackBufferIndex]; + for (unordered_map::iterator it = buffers.begin(); it != buffers.end(); ++it) { + update(it->first, it->second.src, it->second.size); + } + buffers.clear(); + } + +private: + struct BufferUpdate { + const void *src = nullptr; + size_t size = 0u; + }; + uint8_t *update(CCVKGPUBuffer *gpuBuffer, const void *src, size_t size) { + uint8_t *dst = gpuBuffer->mappedData + _device->curBackBufferIndex * gpuBuffer->instanceSize; + memcpy(dst, src, size); + return dst; + } + CCVKGPUDevice *_device = nullptr; vector> _setsToBeUpdated; };