asahi: drop fragment face 2 defaults
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
This commit is contained in:
@@ -469,11 +469,11 @@
|
||||
|
||||
<struct name="Fragment face 2" size="4">
|
||||
<!-- If either disable is zeroed, depth is written -->
|
||||
<field name="Disable depth write" size="1" start="21" type="bool" default="true"/>
|
||||
<field name="Disable depth write" size="1" start="21" type="bool"/>
|
||||
<!-- If depth written from FS -->
|
||||
<field name="Conservative depth" size="2" start="22" type="Conservative depth" default="Unchanged"/>
|
||||
<field name="Conservative depth" size="2" start="22" type="Conservative depth"/>
|
||||
<!-- Both depth functions must pass -->
|
||||
<field name="Depth function" size="3" start="24" type="ZS Func" default="Always"/>
|
||||
<field name="Depth function" size="3" start="24" type="ZS Func"/>
|
||||
<field name="Object type" size="4" start="28" type="Object Type"/>
|
||||
</struct>
|
||||
|
||||
|
||||
@@ -150,11 +150,17 @@ agx_translate_depth_layout(enum gl_frag_depth_layout layout)
|
||||
}
|
||||
|
||||
static void
|
||||
agx_ppp_fragment_face_2(struct agx_ppp_update *ppp,
|
||||
enum agx_object_type object_type,
|
||||
struct agx_shader_info *info)
|
||||
agx_pack_fragment_face_2(struct agx_fragment_face_2_packed *out,
|
||||
enum agx_object_type object_type,
|
||||
struct agx_shader_info *info)
|
||||
{
|
||||
agx_ppp_push(ppp, FRAGMENT_FACE_2, cfg) {
|
||||
agx_pack(out, FRAGMENT_FACE_2, cfg) {
|
||||
/* These act like disables, ANDed in the hardware. Setting them like this
|
||||
* means the draw-time flag is used.
|
||||
*/
|
||||
cfg.disable_depth_write = true;
|
||||
cfg.depth_function = AGX_ZS_FUNC_ALWAYS;
|
||||
|
||||
cfg.object_type = object_type;
|
||||
cfg.conservative_depth =
|
||||
info ? agx_translate_depth_layout(info->depth_layout)
|
||||
@@ -162,6 +168,16 @@ agx_ppp_fragment_face_2(struct agx_ppp_update *ppp,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
agx_ppp_fragment_face_2(struct agx_ppp_update *ppp,
|
||||
enum agx_object_type object_type,
|
||||
struct agx_shader_info *info)
|
||||
{
|
||||
struct agx_fragment_face_2_packed packed;
|
||||
agx_pack_fragment_face_2(&packed, object_type, info);
|
||||
agx_ppp_push_packed(ppp, &packed, FRAGMENT_FACE_2);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
agx_pack_line_width(float line_width)
|
||||
{
|
||||
|
||||
@@ -2517,18 +2517,16 @@ hk_flush_ppp_state(struct hk_cmd_buffer *cmd, struct hk_cs *cs, uint8_t **out)
|
||||
}
|
||||
|
||||
if (dirty.fragment_front_face_2) {
|
||||
agx_pack(&fragment_face_2, FRAGMENT_FACE_2, cfg) {
|
||||
cfg.object_type = gfx->object_type;
|
||||
if (fs) {
|
||||
agx_pack(&fragment_face_2, FRAGMENT_FACE_2, cfg) {
|
||||
cfg.object_type = gfx->object_type;
|
||||
}
|
||||
|
||||
/* TODO: flip the default? */
|
||||
if (fs)
|
||||
cfg.conservative_depth = 0;
|
||||
}
|
||||
|
||||
if (fs)
|
||||
agx_merge(fragment_face_2, fs->frag_face, FRAGMENT_FACE_2);
|
||||
|
||||
agx_ppp_push_packed(&ppp, &fragment_face_2, FRAGMENT_FACE_2);
|
||||
agx_ppp_push_packed(&ppp, &fragment_face_2, FRAGMENT_FACE_2);
|
||||
} else {
|
||||
agx_ppp_fragment_face_2(&ppp, gfx->object_type, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (dirty.fragment_front_stencil) {
|
||||
|
||||
@@ -753,10 +753,7 @@ hk_upload_shader(struct hk_device *dev, struct hk_shader *shader)
|
||||
}
|
||||
|
||||
if (shader->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
agx_pack(&shader->frag_face, FRAGMENT_FACE_2, cfg) {
|
||||
cfg.conservative_depth =
|
||||
agx_translate_depth_layout(shader->b.info.depth_layout);
|
||||
}
|
||||
agx_pack_fragment_face_2(&shader->frag_face, 0, &shader->b.info);
|
||||
}
|
||||
|
||||
agx_pack(&shader->counts, COUNTS, cfg) {
|
||||
|
||||
Reference in New Issue
Block a user