radeonsi: fix point sprites
[mesa.git] / src / gallium / drivers / radeonsi / si_state_shaders.c
index a40926800ddd3f51c080cf8d1628da9270569559..3827c7b662d6609282a59473e5c61f75c2c24b26 100644 (file)
@@ -376,6 +376,11 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx,
                                                       sctx->queued.named.rasterizer->multisample_enable &&
                                                       !sctx->framebuffer.cb0_is_integer;
                        }
+
+                       key->ps.poly_stipple = sctx->queued.named.rasterizer->poly_stipple_enable &&
+                                              ((sctx->current_rast_prim >= PIPE_PRIM_TRIANGLES &&
+                                                sctx->current_rast_prim <= PIPE_PRIM_POLYGON) ||
+                                               sctx->current_rast_prim >= PIPE_PRIM_TRIANGLES_ADJACENCY);
                }
                if (sctx->queued.named.dsa) {
                        key->ps.alpha_func = sctx->queued.named.dsa->alpha_func;
@@ -656,9 +661,11 @@ bcolor:
                        }
                }
 
-               if (j == vsinfo->num_outputs) {
-                       /* No corresponding output found, load defaults into input */
-                       tmp |= S_028644_OFFSET(0x20);
+               if (j == vsinfo->num_outputs & !G_028644_PT_SPRITE_TEX(tmp)) {
+                       /* No corresponding output found, load defaults into input.
+                        * Don't set any other bits.
+                        * (FLAT_SHADE=1 completely changes behavior) */
+                       tmp = S_028644_OFFSET(0x20);
                }
 
                si_pm4_set_reg(pm4,