mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 12:18:30 +09:00
[Fix, Test] (DirectVulkan, SelfTest, MG_IntegrationTest, TraceReplay): snapshot sampler/image feedback and add Program 203 diagnostics
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern "C" void mobilegl_trace_set_native_window(ANativeWindow *window);
|
||||
@@ -25,6 +26,23 @@ std::string ToString(JNIEnv* env, jstring value) {
|
||||
return out;
|
||||
}
|
||||
|
||||
std::vector<std::string> SplitSemicolonList(const std::string& value) {
|
||||
std::vector<std::string> values;
|
||||
std::size_t begin = 0;
|
||||
while (begin < value.size()) {
|
||||
const std::size_t end = value.find(';', begin);
|
||||
const std::string entry = value.substr(begin, end - begin);
|
||||
if (!entry.empty()) {
|
||||
values.push_back(entry);
|
||||
}
|
||||
if (end == std::string::npos) {
|
||||
break;
|
||||
}
|
||||
begin = end + 1;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
jobject MakeResult(JNIEnv* env, const mobilegl_trace::Result& result) {
|
||||
jclass clazz = env->FindClass("top/mobilegl/plugin/trace/TraceReplayActivity$TraceReplayResult");
|
||||
if (clazz == nullptr) {
|
||||
@@ -103,7 +121,8 @@ Java_top_mobilegl_plugin_trace_TraceReplayActivity_nativeRunTraceReplay(JNIEnv*
|
||||
jboolean usePbuffer,
|
||||
jboolean avoidAngleLlvmpipeSamplerMipmapMinFilter,
|
||||
jboolean avoidAngleLlvmpipeExplicitLodBias,
|
||||
jboolean coherentAsFlush) {
|
||||
jboolean coherentAsFlush,
|
||||
jstring texture2dDumps) {
|
||||
mobilegl_trace::Request request;
|
||||
request.tracePath = ToString(env, tracePath);
|
||||
request.goldenPath = ToString(env, goldenPath);
|
||||
@@ -115,6 +134,7 @@ Java_top_mobilegl_plugin_trace_TraceReplayActivity_nativeRunTraceReplay(JNIEnv*
|
||||
request.diffPath = ToString(env, diffPath);
|
||||
request.backend = ToString(env, backend);
|
||||
request.angleVariant = ToString(env, angleVariant);
|
||||
request.texture2dDumps = SplitSemicolonList(ToString(env, texture2dDumps));
|
||||
request.targetFrame = targetFrame;
|
||||
request.targetCall = targetCall;
|
||||
request.width = width;
|
||||
|
||||
Reference in New Issue
Block a user