mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
asahi: Use a 2D Array texture for array render targets
Fixes KHR-GLES31.core.geometry_shader.layered_framebuffer.blending_support with eMRT forced. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
87a7b239e1
commit
c87095e518
1 changed files with 5 additions and 4 deletions
|
|
@ -1073,12 +1073,13 @@ image_view_for_surface(struct pipe_surface *surf)
|
|||
static struct pipe_sampler_view
|
||||
sampler_view_for_surface(struct pipe_surface *surf)
|
||||
{
|
||||
bool layered = surf->u.tex.last_layer > surf->u.tex.first_layer;
|
||||
|
||||
return (struct pipe_sampler_view){
|
||||
/* To reduce shader variants, we always use a 2D
|
||||
* texture. For reloads of arrays and cube maps, we
|
||||
* map a single layer as a 2D image.
|
||||
/* To reduce shader variants, we always use a 2D texture. For reloads of
|
||||
* arrays and cube maps, we map a single layer as a 2D image.
|
||||
*/
|
||||
.target = PIPE_TEXTURE_2D,
|
||||
.target = layered ? PIPE_TEXTURE_2D_ARRAY : PIPE_TEXTURE_2D,
|
||||
.swizzle_r = PIPE_SWIZZLE_X,
|
||||
.swizzle_g = PIPE_SWIZZLE_Y,
|
||||
.swizzle_b = PIPE_SWIZZLE_Z,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue