Просмотр исходного кода

i965: Fix fast depth clear values on Broadwell.

Broadwell's 3DSTATE_CLEAR_PARAMS packet expects a floating point value
regardless of format.  This means we need to stop converting it to
UNORM.

Storing the value as float would make sense, but since we already have a
uint32_t field, this patch continues shoehorning it into that.  In a
sense, this makes mt->depth_clear_value the DWord you emit in the
packet, rather than the clear value itself.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
tags/mesa-10.2-rc1
Kenneth Graunke 11 лет назад
Родитель
Сommit
8e0a0e4d30
1 измененных файлов: 4 добавлений и 1 удалений
  1. 4
    1
      src/mesa/drivers/dri/i965/brw_clear.c

+ 4
- 1
src/mesa/drivers/dri/i965/brw_clear.c Просмотреть файл

@@ -160,7 +160,10 @@ brw_fast_clear_depth(struct gl_context *ctx)
/* FALLTHROUGH */

default:
depth_clear_value = fb->_DepthMax * ctx->Depth.Clear;
if (brw->gen >= 8)
depth_clear_value = float_as_int(ctx->Depth.Clear);
else
depth_clear_value = fb->_DepthMax * ctx->Depth.Clear;
break;
}


Загрузка…
Отмена
Сохранить