shader: Address feedback
This commit is contained in:
parent
080857b60e
commit
f69d0b91ff
|
@ -341,7 +341,7 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct
|
||||||
if (!ctx.profile.xfb_varyings.empty()) {
|
if (!ctx.profile.xfb_varyings.empty()) {
|
||||||
ctx.AddCapability(spv::Capability::TransformFeedback);
|
ctx.AddCapability(spv::Capability::TransformFeedback);
|
||||||
}
|
}
|
||||||
if (info.uses_derivates) {
|
if (info.uses_derivatives) {
|
||||||
ctx.AddCapability(spv::Capability::DerivativeControl);
|
ctx.AddCapability(spv::Capability::DerivativeControl);
|
||||||
}
|
}
|
||||||
// TODO: Track this usage
|
// TODO: Track this usage
|
||||||
|
|
|
@ -404,10 +404,7 @@ Id EmitIsHelperInvocation(EmitContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Id EmitYDirection(EmitContext& ctx) {
|
Id EmitYDirection(EmitContext& ctx) {
|
||||||
if (ctx.profile.y_negate) {
|
return ctx.Constant(ctx.F32[1], ctx.profile.y_negate ? -1.0f : 1.0f);
|
||||||
return ctx.Constant(ctx.F32[1], -1.0f);
|
|
||||||
}
|
|
||||||
return ctx.Constant(ctx.F32[1], 1.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Id EmitLoadLocal(EmitContext& ctx, Id word_offset) {
|
Id EmitLoadLocal(EmitContext& ctx, Id word_offset) {
|
||||||
|
|
|
@ -534,7 +534,7 @@ void VisitUsages(Info& info, IR::Inst& inst) {
|
||||||
case IR::Opcode::DPdyFine:
|
case IR::Opcode::DPdyFine:
|
||||||
case IR::Opcode::DPdxCoarse:
|
case IR::Opcode::DPdxCoarse:
|
||||||
case IR::Opcode::DPdyCoarse:
|
case IR::Opcode::DPdyCoarse:
|
||||||
info.uses_derivates = true;
|
info.uses_derivatives = true;
|
||||||
break;
|
break;
|
||||||
case IR::Opcode::LoadStorageU8:
|
case IR::Opcode::LoadStorageU8:
|
||||||
case IR::Opcode::LoadStorageS8:
|
case IR::Opcode::LoadStorageS8:
|
||||||
|
|
|
@ -147,7 +147,7 @@ struct Info {
|
||||||
bool uses_subgroup_vote{};
|
bool uses_subgroup_vote{};
|
||||||
bool uses_subgroup_mask{};
|
bool uses_subgroup_mask{};
|
||||||
bool uses_fswzadd{};
|
bool uses_fswzadd{};
|
||||||
bool uses_derivates{};
|
bool uses_derivatives{};
|
||||||
bool uses_typeless_image_reads{};
|
bool uses_typeless_image_reads{};
|
||||||
bool uses_typeless_image_writes{};
|
bool uses_typeless_image_writes{};
|
||||||
bool uses_shared_increment{};
|
bool uses_shared_increment{};
|
||||||
|
|
Loading…
Reference in New Issue