proper placement of clip distance init
Some checks failed
eden-build / source (pull_request) Has been skipped
eden-build / linux (pull_request) Successful in 22m41s
eden-build / android (pull_request) Has been cancelled
eden-build / windows (msvc) (pull_request) Has been cancelled
eden-license / license-header (pull_request_target) Failing after 16s

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-04-21 15:32:23 -04:00
parent 09663c9a10
commit 622d9c8348
Signed by: crueter
GPG key ID: A5A7629F109C8FD1
3 changed files with 15 additions and 9 deletions

View file

@ -285,6 +285,10 @@ if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
add_definitions(-DHAS_NCE=1)
endif()
if (YUZU_LOG_BY_LINE)
add_definitions(-DYUZU_LOG_BY_LINE=1)
endif()
# Configure C++ standard
# ===========================

View file

@ -54,14 +54,6 @@ std::optional<OutAttr> OutputAttrPointer(EmitContext& ctx, IR::Attribute attr) {
}
}
for (u32 i = 0; i < ctx.profile.max_user_clip_distances; ++i) {
if (!clip_distance_written.test(i)) {
const Id idx = ctx.Const(i);
const Id element = OutputAccessChain(ctx, ctx.output_f32, ctx.clip_distances, idx);
ctx.OpStore(element, ctx.Const(0.0f));
}
}
switch (attr) {
case IR::Attribute::PointSize:
return ctx.output_point_size;

View file

@ -108,7 +108,17 @@ void EmitPrologue(EmitContext& ctx) {
ctx.OpStore(element_info.id, value);
element += num;
}
}
}
if (Sirit::ValidId(ctx.clip_distances)) {
for (u32 i = 0; i < ctx.profile.max_user_clip_distances; ++i) {
if (!clip_distance_written.test(i)) {
const Id idx = ctx.Const(i);
const Id element = ctx.OpAccessChain(ctx.output_f32, ctx.clip_distances, idx);
ctx.OpStore(element, ctx.Const(0.0f));
}
}
}
}
if (ctx.stage == Stage::VertexB || ctx.stage == Stage::Geometry) {
SetFixedPipelinePointSize(ctx);