[Mesa-dev] [PATCH 07/20] radeonsi: fix cubemaps viewed as 2D
Nicolai Hähnle
nhaehnle at gmail.com
Thu Sep 1 14:38:53 UTC 2016
On 29.08.2016 17:28, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This fixes: GL43-CTS.texture_view.view_sampling
>
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/gallium/drivers/radeonsi/si_state.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 25dfe26..026aded 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -1603,20 +1603,27 @@ static unsigned si_tex_compare(unsigned compare)
> }
> }
>
> static unsigned si_tex_dim(unsigned res_target, unsigned view_target,
> unsigned nr_samples)
> {
> if (view_target == PIPE_TEXTURE_CUBE ||
> view_target == PIPE_TEXTURE_CUBE_ARRAY)
> res_target = view_target;
>
> + /* If interpretting cubemaps as something else, set 2D_ARRAY. */
Spelling: interpreting
> + if ((res_target == PIPE_TEXTURE_CUBE ||
> + res_target == PIPE_TEXTURE_CUBE_ARRAY) &&
> + view_target != PIPE_TEXTURE_CUBE &&
> + view_target != PIPE_TEXTURE_CUBE_ARRAY)
> + res_target = PIPE_TEXTURE_2D_ARRAY;
IMO this should be merged with the if-statement above.
Either way, patches 1-7:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> +
> switch (res_target) {
> default:
> case PIPE_TEXTURE_1D:
> return V_008F1C_SQ_RSRC_IMG_1D;
> case PIPE_TEXTURE_1D_ARRAY:
> return V_008F1C_SQ_RSRC_IMG_1D_ARRAY;
> case PIPE_TEXTURE_2D:
> case PIPE_TEXTURE_RECT:
> return nr_samples > 1 ? V_008F1C_SQ_RSRC_IMG_2D_MSAA :
> V_008F1C_SQ_RSRC_IMG_2D;
>
More information about the mesa-dev
mailing list