* Keith Whitwell <keithw@vmware.com>
*/
-#include "main/glheader.h"
#include "main/macros.h"
#include "main/enums.h"
/* Begin the compilation:
*/
- brw_init_compile(brw, &c.func, mem_ctx);
+ brw_init_codegen(brw->intelScreen->devinfo, &c.func, mem_ctx);
c.func.single_program_flow = 1;
/* Calculate interpolants for triangle and line rasterization.
*/
-static void
+void
brw_upload_clip_prog(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
struct brw_clip_prog_key key;
+ if (!brw_state_dirty(brw,
+ _NEW_BUFFERS |
+ _NEW_LIGHT |
+ _NEW_POLYGON |
+ _NEW_TRANSFORM,
+ BRW_NEW_BLORP |
+ BRW_NEW_INTERPOLATION_MAP |
+ BRW_NEW_REDUCED_PRIMITIVE |
+ BRW_NEW_VUE_MAP_GEOM_OUT))
+ return;
+
memset(&key, 0, sizeof(key));
/* Populate the key:
/* _NEW_POLYGON, _NEW_BUFFERS */
key.offset_units = ctx->Polygon.OffsetUnits * ctx->DrawBuffer->_MRD * 2;
key.offset_factor = ctx->Polygon.OffsetFactor * ctx->DrawBuffer->_MRD;
+ key.offset_clamp = ctx->Polygon.OffsetClamp * ctx->DrawBuffer->_MRD;
}
if (!ctx->Polygon._FrontBit) {
compile_clip_prog( brw, &key );
}
}
-
-
-const struct brw_tracked_state brw_clip_prog = {
- .dirty = {
- .mesa = _NEW_BUFFERS |
- _NEW_LIGHT |
- _NEW_POLYGON |
- _NEW_TRANSFORM,
- .brw = BRW_NEW_INTERPOLATION_MAP |
- BRW_NEW_REDUCED_PRIMITIVE |
- BRW_NEW_VUE_MAP_GEOM_OUT,
- },
- .emit = brw_upload_clip_prog
-};