From: Marek Olšák Date: Wed, 6 Jan 2016 15:03:38 +0000 (+0100) Subject: radeonsi: read SPI_PS_INPUT_ADDR from LLVM if it returns it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a53628f45787370636b3b0a0c7d29cb80e1ada7;p=mesa.git radeonsi: read SPI_PS_INPUT_ADDR from LLVM if it returns it Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 68ce3871b7e..85203e046fc 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3875,7 +3875,7 @@ void si_shader_binary_read_config(struct radeon_shader_binary *binary, conf->spi_ps_input_ena = value; break; case R_0286D0_SPI_PS_INPUT_ADDR: - /* Not used yet, but will be in the future */ + conf->spi_ps_input_addr = value; break; case R_0286E8_SPI_TMPRING_SIZE: case R_00B860_COMPUTE_TMPRING_SIZE: @@ -3895,6 +3895,9 @@ void si_shader_binary_read_config(struct radeon_shader_binary *binary, } break; } + + if (!conf->spi_ps_input_addr) + conf->spi_ps_input_addr = conf->spi_ps_input_ena; } } diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 0d6a45a319a..04b977af943 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -260,6 +260,7 @@ struct si_shader_config { unsigned num_vgprs; unsigned lds_size; unsigned spi_ps_input_ena; + unsigned spi_ps_input_addr; unsigned float_mode; unsigned scratch_bytes_per_wave; unsigned rsrc1; diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 59511c67ed0..6e656b07ca1 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -527,7 +527,8 @@ static void si_shader_ps(struct si_shader *shader) spi_shader_col_format = V_028714_SPI_SHADER_32_R; si_pm4_set_reg(pm4, R_0286CC_SPI_PS_INPUT_ENA, input_ena); - si_pm4_set_reg(pm4, R_0286D0_SPI_PS_INPUT_ADDR, input_ena); + si_pm4_set_reg(pm4, R_0286D0_SPI_PS_INPUT_ADDR, + shader->config.spi_ps_input_addr); /* Set interpolation controls. */ has_centroid = G_0286CC_PERSP_CENTROID_ENA(shader->config.spi_ps_input_ena) ||