mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 14:18:07 +02:00
llvmpipe: don't allow texture/resource swizzles on linear path
This fixes another VMware test (dx9-stretch-formats-copy-a8r8g8b8-x8r8g8b8). Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
This commit is contained in:
parent
2b14a7658a
commit
dfb2ea3531
1 changed files with 11 additions and 1 deletions
|
|
@ -940,7 +940,9 @@ lp_linear_init_noop_sampler(struct lp_linear_sampler *samp)
|
|||
samp->base.fetch = fetch_noop;
|
||||
}
|
||||
|
||||
/* Check the variant for linear path compatibility.
|
||||
|
||||
/*
|
||||
* Check the given sampler and texture info for linear path compatibility.
|
||||
*/
|
||||
boolean
|
||||
lp_linear_check_sampler(const struct lp_sampler_static_state *sampler,
|
||||
|
|
@ -972,6 +974,14 @@ lp_linear_check_sampler(const struct lp_sampler_static_state *sampler,
|
|||
sampler->texture_state.format != PIPE_FORMAT_B8G8R8X8_UNORM)
|
||||
return FALSE;
|
||||
|
||||
/* We don't support sampler view swizzling on the linear path */
|
||||
if (sampler->texture_state.swizzle_r != PIPE_SWIZZLE_X ||
|
||||
sampler->texture_state.swizzle_g != PIPE_SWIZZLE_Y ||
|
||||
sampler->texture_state.swizzle_b != PIPE_SWIZZLE_Z ||
|
||||
sampler->texture_state.swizzle_a != PIPE_SWIZZLE_W) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue