Replace the hard-coded 0's with the context clamp value.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
<li>GL_ARB_framebuffer_sRGB on freedreno</li>
<li>GL_ARB_texture_rg on freedreno</li>
<li>GL_EXT_packed_float on freedreno</li>
+<li>GL_EXT_polygon_offset_clamp on i965</li>
<li>GL_EXT_texture_shared_exponent on freedreno</li>
<li>GL_EXT_texture_snorm on freedreno</li>
</ul>
OUT_BATCH(dw4);
OUT_BATCH_F(ctx->Polygon.OffsetUnits * 2); /* constant. copied from gen4 */
OUT_BATCH_F(ctx->Polygon.OffsetFactor); /* scale */
- OUT_BATCH_F(0.0); /* XXX: global depth offset clamp */
+ OUT_BATCH_F(ctx->Polygon.OffsetClamp); /* global depth offset clamp */
for (i = 0; i < 8; i++) {
OUT_BATCH(attr_overrides[i * 2] | attr_overrides[i * 2 + 1] << 16);
}
OUT_BATCH(dw3);
OUT_BATCH_F(ctx->Polygon.OffsetUnits * 2); /* constant. copied from gen4 */
OUT_BATCH_F(ctx->Polygon.OffsetFactor); /* scale */
- OUT_BATCH_F(0.0); /* XXX: global depth offset clamp */
+ OUT_BATCH_F(ctx->Polygon.OffsetClamp); /* global depth offset clamp */
ADVANCE_BATCH();
}
OUT_BATCH(dw1);
OUT_BATCH_F(ctx->Polygon.OffsetUnits * 2); /* constant. copied from gen4 */
OUT_BATCH_F(ctx->Polygon.OffsetFactor); /* scale */
- OUT_BATCH_F(0.0);
+ OUT_BATCH_F(ctx->Polygon.OffsetClamp); /* global depth offset clamp */
ADVANCE_BATCH();
}
ctx->Extensions.ARB_texture_gather = true;
ctx->Extensions.ARB_conditional_render_inverted = true;
ctx->Extensions.AMD_vertex_shader_layer = true;
+ ctx->Extensions.EXT_polygon_offset_clamp = true;
/* Test if the kernel has the ioctl. */
if (drm_intel_reg_read(brw->bufmgr, TIMESTAMP, &dummy) == 0)