gallium/u_blitter: Read MSAA z/s from sampler's .x instead of .y or .z.
u_format defines depth formats as having depth in .x, mesa/st samples for depth or stencil in .x (not making use of any other channels). util_make_fs_blit_zs() looks for depth or stencil in .x. The MSAA path was the exception looking for it in .z or .y, which was causing drivers to need to splat their values out to the other channels. This should be better on hardware that can emit shorter messages for sampling just the first channels. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13446>
This commit is contained in:
@@ -623,7 +623,8 @@ util_make_fs_blit_msaa_depth(struct pipe_context *pipe,
|
||||
enum tgsi_texture_type tgsi_tex)
|
||||
{
|
||||
return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "FLOAT",
|
||||
"POSITION", ".z", "", "");
|
||||
"POSITION", ".z", "",
|
||||
"MOV TEMP[0].z, TEMP[0].xxxx\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -637,7 +638,8 @@ util_make_fs_blit_msaa_stencil(struct pipe_context *pipe,
|
||||
enum tgsi_texture_type tgsi_tex)
|
||||
{
|
||||
return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "UINT",
|
||||
"STENCIL", ".y", "", "");
|
||||
"STENCIL", ".y", "",
|
||||
"MOV TEMP[0].y, TEMP[0].xxxx\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user