proper placement of clip distance init
Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
c64f1994c7
commit
918d6d3514
3 changed files with 15 additions and 9 deletions
|
@ -285,6 +285,10 @@ if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
|
||||||
add_definitions(-DHAS_NCE=1)
|
add_definitions(-DHAS_NCE=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (YUZU_LOG_BY_LINE)
|
||||||
|
add_definitions(-DYUZU_LOG_BY_LINE=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Configure C++ standard
|
# Configure C++ standard
|
||||||
# ===========================
|
# ===========================
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
switch (attr) {
|
||||||
case IR::Attribute::PointSize:
|
case IR::Attribute::PointSize:
|
||||||
return ctx.output_point_size;
|
return ctx.output_point_size;
|
||||||
|
|
|
@ -109,6 +109,16 @@ void EmitPrologue(EmitContext& ctx) {
|
||||||
element += num;
|
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) {
|
if (ctx.stage == Stage::VertexB || ctx.stage == Stage::Geometry) {
|
||||||
SetFixedPipelinePointSize(ctx);
|
SetFixedPipelinePointSize(ctx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue