[Mesa-dev] Mesa (update-reviewers-for-vmware): i965/clear: clear_value better precision
Brian Paul
brianp at vmware.com
Fri Aug 2 15:37:34 UTC 2019
Ugh, I didn't mean to do this. I'm trying to figure out how to make a
merge request with gitlab.
-Brian
On 08/02/2019 09:35 AM, GitLab Mirror wrote:
> Module: Mesa
> Branch: update-reviewers-for-vmware
> Commit: a86eccfb78092493b3999849db62613838951756
> URL: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcgit.freedesktop.org%2Fmesa%2Fmesa%2Fcommit%2F%3Fid%3Da86eccfb78092493b3999849db62613838951756&data=02%7C01%7Cbrianp%40vmware.com%7C6aa9bf59501d420b03af08d7175f0b0f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637003569293293608&sdata=bLEb7XY3mLFAkME7v8QJ0GugG%2FbzFoNONSSGTjKSfFs%3D&reserved=0
>
> Author: Sergii Romantsov <sergii.romantsov at globallogic.com>
> Date: Fri Jul 12 16:46:45 2019 +0300
>
> i965/clear: clear_value better precision
>
> Test-case with depth-clear 0.5 and format
> MESA_FORMAT_Z24_UNORM_X8_UINT fails due inconsistent
> clear-value of 0.4999997.
> Maybe its better to improve?
>
> CC: Jason Ekstrand <jason.ekstrand at intel.com>
> Fixes: 0ae9ce0f29ea (i965/clear: Quantize the depth clear value based on the format)
> Bugzilla: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.freedesktop.org%2Fshow_bug.cgi%3Fid%3D111113&data=02%7C01%7Cbrianp%40vmware.com%7C6aa9bf59501d420b03af08d7175f0b0f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637003569293293608&sdata=OD1YuhGY%2B4IZG7g8PMh%2Bk3amc6O9HjDV92pOFPd8RlE%3D&reserved=0
> Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>
> Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>
> ---
>
> src/mesa/drivers/dri/i965/brw_clear.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
> index 30e09861491..1508171da10 100644
> --- a/src/mesa/drivers/dri/i965/brw_clear.c
> +++ b/src/mesa/drivers/dri/i965/brw_clear.c
> @@ -167,7 +167,7 @@ brw_fast_clear_depth(struct gl_context *ctx)
> */
> float clear_value =
> mt->format == MESA_FORMAT_Z_FLOAT32 ? ctx->Depth.Clear :
> - (unsigned)(ctx->Depth.Clear * fb->_DepthMax) / (float)fb->_DepthMax;
> + _mesa_lroundeven(ctx->Depth.Clear * fb->_DepthMax) / (float)(fb->_DepthMax);
>
> const uint32_t num_layers = depth_att->Layered ? depth_irb->layer_count : 1;
>
>
> _______________________________________________
> mesa-commit mailing list
> mesa-commit at lists.freedesktop.org
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-commit&data=02%7C01%7Cbrianp%40vmware.com%7C6aa9bf59501d420b03af08d7175f0b0f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637003569293293608&sdata=UWAkli3USsLDpnoElsuycRJ8KTrJV%2FC0r%2FarUay7SNQ%3D&reserved=0
>
More information about the mesa-dev
mailing list