nak: Add the predicate destination to OpShfl

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26264>
This commit is contained in:
Faith Ekstrand 2023-11-17 10:16:51 -06:00 committed by Marge Bot
parent 3cc389f3da
commit c874db9381
5 changed files with 9 additions and 3 deletions

View file

@ -916,7 +916,7 @@ impl SM70Instr {
};
self.set_dst(op.dst);
self.set_pred_dst(81..84, Dst::None);
self.set_pred_dst(81..84, op.in_bounds);
self.set_reg_src(24..32, op.src);
self.set_field(
58..60,

View file

@ -922,6 +922,7 @@ impl<'a> ShaderFromNir<'a> {
b.push_op(OpShfl {
dst: scratch[0].into(),
in_bounds: Dst::None,
src: srcs[0],
lane: 1_u32.into(),
c: (0x3_u32 | 0x1c_u32 << 8).into(),
@ -952,6 +953,7 @@ impl<'a> ShaderFromNir<'a> {
b.push_op(OpShfl {
dst: scratch[0].into(),
in_bounds: Dst::None,
src: srcs[0],
lane: 2_u32.into(),
c: (0x3_u32 | 0x1c_u32 << 8).into(),
@ -1888,6 +1890,7 @@ impl<'a> ShaderFromNir<'a> {
b.push_op(OpShfl {
dst: dst.into(),
in_bounds: Dst::None,
src: data,
lane: idx,
c: 0x1f.into(),

View file

@ -2804,6 +2804,7 @@ impl fmt::Display for OpSel {
#[derive(SrcsAsSlice, DstsAsSlice)]
pub struct OpShfl {
pub dst: Dst,
pub in_bounds: Dst,
#[src_type(SSA)]
pub src: Src,
@ -2821,8 +2822,8 @@ impl fmt::Display for OpShfl {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"SHFL.{} {} {{ {}, {}, {} }}",
self.op, self.dst, self.src, self.lane, self.c
"SHFL.{} {{ {}, {} }} {{ {}, {}, {} }}",
self.op, self.dst, self.in_bounds, self.src, self.lane, self.c
)
}
}

View file

@ -544,6 +544,7 @@ nvk_get_device_properties(const struct nvk_instance *instance,
.subgroupSupportedStages = nvk_nak_stages(info),
.subgroupSupportedOperations = VK_SUBGROUP_FEATURE_BALLOT_BIT |
VK_SUBGROUP_FEATURE_BASIC_BIT |
VK_SUBGROUP_FEATURE_SHUFFLE_BIT |
VK_SUBGROUP_FEATURE_VOTE_BIT,
.subgroupQuadOperationsInAllStages = false,
.pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY,

View file

@ -143,6 +143,7 @@ nvk_physical_device_spirv_options(const struct nvk_physical_device *pdev,
.shader_viewport_index_layer = true,
.subgroup_ballot = true,
.subgroup_basic = true,
.subgroup_shuffle = true,
.subgroup_vote = true,
.tessellation = true,
.transform_feedback = true,