X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fradeonsi%2Fsi_state_binning.c;h=80b1137fd0c90b9193cc3bee9f9826e510975d5a;hb=d48a2404a227193b0e17b94ce10481f36d99430c;hp=c0f129717a45fceaba8fa653cec09e594ff543b6;hpb=2be6143032939c5c5fb6de4a44ffe3b076e1f098;p=mesa.git diff --git a/src/gallium/drivers/radeonsi/si_state_binning.c b/src/gallium/drivers/radeonsi/si_state_binning.c index c0f129717a4..80b1137fd0c 100644 --- a/src/gallium/drivers/radeonsi/si_state_binning.c +++ b/src/gallium/drivers/radeonsi/si_state_binning.c @@ -1,5 +1,6 @@ /* * Copyright 2017 Advanced Micro Devices, Inc. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,10 +24,8 @@ /* This file handles register programming of primitive binning. */ -#include "si_pipe.h" -#include "sid.h" +#include "si_build_pm4.h" #include "gfx9d.h" -#include "radeon/r600_cs.h" struct uvec2 { unsigned x, y; @@ -326,7 +325,7 @@ static struct uvec2 si_get_depth_bin_size(struct si_context *sctx) static void si_emit_dpbb_disable(struct si_context *sctx) { - struct radeon_winsys_cs *cs = sctx->b.gfx.cs; + struct radeon_winsys_cs *cs = sctx->gfx_cs; radeon_set_context_reg(cs, R_028C44_PA_SC_BINNER_CNTL_0, S_028C44_BINNING_MODE(V_028C44_DISABLE_BINNING_USE_LEGACY_SC) | @@ -335,14 +334,14 @@ static void si_emit_dpbb_disable(struct si_context *sctx) S_028060_PUNCHOUT_MODE(V_028060_FORCE_OFF)); } -void si_emit_dpbb_state(struct si_context *sctx, struct r600_atom *state) +void si_emit_dpbb_state(struct si_context *sctx) { struct si_screen *sscreen = sctx->screen; struct si_state_blend *blend = sctx->queued.named.blend; struct si_state_dsa *dsa = sctx->queued.named.dsa; unsigned db_shader_control = sctx->ps_db_shader_control; - assert(sctx->b.chip_class >= GFX9); + assert(sctx->chip_class >= GFX9); if (!sscreen->dpbb_allowed || !blend || !dsa) { si_emit_dpbb_disable(sctx); @@ -412,7 +411,7 @@ void si_emit_dpbb_state(struct si_context *sctx, struct r600_atom *state) unsigned persistent_states_per_bin; /* allowed range: [0, 31] */ unsigned fpovs_per_batch; /* allowed range: [0, 255], 0 = unlimited */ - switch (sctx->b.family) { + switch (sctx->family) { case CHIP_VEGA10: case CHIP_VEGA12: case CHIP_RAVEN: @@ -432,7 +431,7 @@ void si_emit_dpbb_state(struct si_context *sctx, struct r600_atom *state) if (bin_size.y >= 32) bin_size_extend.y = util_logbase2(bin_size.y) - 5; - struct radeon_winsys_cs *cs = sctx->b.gfx.cs; + struct radeon_winsys_cs *cs = sctx->gfx_cs; radeon_set_context_reg(cs, R_028C44_PA_SC_BINNER_CNTL_0, S_028C44_BINNING_MODE(V_028C44_BINNING_ALLOWED) | S_028C44_BIN_SIZE_X(bin_size.x == 16) |