shader: Address feedback

This commit is contained in:
FernandoS27 2021-04-18 09:07:48 +02:00 committed by ameerj
parent 080857b60e
commit f69d0b91ff
4 changed files with 4 additions and 7 deletions

View file

@ -341,7 +341,7 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct
if (!ctx.profile.xfb_varyings.empty()) {
ctx.AddCapability(spv::Capability::TransformFeedback);
}
if (info.uses_derivates) {
if (info.uses_derivatives) {
ctx.AddCapability(spv::Capability::DerivativeControl);
}
// TODO: Track this usage

View file

@ -404,10 +404,7 @@ Id EmitIsHelperInvocation(EmitContext& ctx) {
}
Id EmitYDirection(EmitContext& ctx) {
if (ctx.profile.y_negate) {
return ctx.Constant(ctx.F32[1], -1.0f);
}
return ctx.Constant(ctx.F32[1], 1.0f);
return ctx.Constant(ctx.F32[1], ctx.profile.y_negate ? -1.0f : 1.0f);
}
Id EmitLoadLocal(EmitContext& ctx, Id word_offset) {