mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
nvk: Support D3D sample modes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
This commit is contained in:
parent
097f8b2c7d
commit
e14b4bcb88
1 changed files with 18 additions and 0 deletions
|
|
@ -724,12 +724,16 @@ nil_to_nv9097_samples_mode(enum nil_sample_layout sample_layout)
|
|||
uint16_t nil_to_nv9097[] = {
|
||||
MODE(1X1),
|
||||
MODE(2X1),
|
||||
MODE(2X1_D3D),
|
||||
MODE(2X2),
|
||||
MODE(4X2),
|
||||
MODE(4X2_D3D),
|
||||
MODE(4X4),
|
||||
};
|
||||
#undef MODE
|
||||
assert(sample_layout < ARRAY_SIZE(nil_to_nv9097));
|
||||
assert(sample_layout == NIL_SAMPLE_LAYOUT_1X1 ||
|
||||
nil_to_nv9097[sample_layout] != 0);
|
||||
|
||||
return nil_to_nv9097[sample_layout];
|
||||
}
|
||||
|
|
@ -749,6 +753,7 @@ nvk_cmd_set_sample_layout(struct nvk_cmd_buffer *cmd,
|
|||
switch (sample_layout) {
|
||||
case NIL_SAMPLE_LAYOUT_1X1:
|
||||
case NIL_SAMPLE_LAYOUT_2X1:
|
||||
case NIL_SAMPLE_LAYOUT_2X1_D3D:
|
||||
/* These only have two modes: Single-pass or per-sample */
|
||||
P_MTHD(p, NV9097, SET_MME_SHADOW_SCRATCH(NVK_MME_SCRATCH_SAMPLE_MASKS_2PASS_0));
|
||||
P_INLINE_DATA(p, 0);
|
||||
|
|
@ -788,6 +793,19 @@ nvk_cmd_set_sample_layout(struct nvk_cmd_buffer *cmd,
|
|||
P_INLINE_DATA(p, 0x00c000c0);
|
||||
break;
|
||||
|
||||
case NIL_SAMPLE_LAYOUT_4X2_D3D:
|
||||
P_MTHD(p, NV9097, SET_MME_SHADOW_SCRATCH(NVK_MME_SCRATCH_SAMPLE_MASKS_2PASS_0));
|
||||
P_INLINE_DATA(p, 0x003a00c5);
|
||||
P_INLINE_DATA(p, 0x003a00c5);
|
||||
P_INLINE_DATA(p, 0x003a003a);
|
||||
P_INLINE_DATA(p, 0x00c500c5);
|
||||
P_MTHD(p, NV9097, SET_MME_SHADOW_SCRATCH(NVK_MME_SCRATCH_SAMPLE_MASKS_4PASS_0));
|
||||
P_INLINE_DATA(p, 0x00120081);
|
||||
P_INLINE_DATA(p, 0x00280044);
|
||||
P_INLINE_DATA(p, 0x00280012);
|
||||
P_INLINE_DATA(p, 0x00810044);
|
||||
break;
|
||||
|
||||
default:
|
||||
unreachable("Unknown sample layout");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue