blorp_emit(batch, GENX(3DSTATE_WM), wm);
blorp_emit(batch, GENX(3DSTATE_PS), ps) {
- if (params->src.addr.buffer) {
+ if (params->src.enabled) {
ps.SamplerCount = 1; /* Up to 4 samplers */
ps.BindingTableEntryCount = 2;
} else {
blorp_emit(batch, GENX(3DSTATE_PS_EXTRA), psx) {
psx.PixelShaderValid = true;
- if (params->src.addr.buffer)
+ if (params->src.enabled)
psx.PixelShaderKillsPixel = true;
psx.AttributeEnable = prog_data->num_varying_inputs > 0;
if (prog_data)
wm.ThreadDispatchEnable = true;
- if (params->src.addr.buffer)
+ if (params->src.enabled)
wm.PixelShaderKillPixel = true;
if (params->dst.surf.samples > 1) {
ps._16PixelDispatchEnable = true;
}
- if (params->src.addr.buffer)
+ if (params->src.enabled)
ps.SamplerCount = 1; /* Up to 4 samplers */
switch (params->fast_clear_op) {
wm.NumberofSFOutputAttributes = prog_data->num_varying_inputs;
}
- if (params->src.addr.buffer) {
+ if (params->src.enabled) {
wm.SamplerCount = 1; /* Up to 4 samplers */
wm.PixelShaderKillPixel = true; /* TODO: temporarily smash on */
}
blorp_emit(batch, GENX(3DSTATE_DEPTH_BUFFER), db) {
#if GEN_GEN >= 7
- db.DepthWriteEnable = params->depth.addr.buffer != NULL;
- db.StencilWriteEnable = params->stencil.addr.buffer != NULL;
+ db.DepthWriteEnable = params->depth.enabled;
+ db.StencilWriteEnable = params->stencil.enabled;
#endif
#if GEN_GEN <= 6
db.SeparateStencilBufferEnable = true;
#endif
- if (params->depth.addr.buffer) {
+ if (params->depth.enabled) {
db.SurfaceFormat = params->depth_format;
db.SurfaceType = isl_to_gen_ds_surftype[params->depth.surf.dim];
db.SurfaceBaseAddress = params->depth.addr;
db.DepthBufferMOCS = mocs;
- } else if (params->stencil.addr.buffer) {
+ } else if (params->stencil.enabled) {
db.SurfaceFormat = D32_FLOAT;
db.SurfaceType = isl_to_gen_ds_surftype[params->stencil.surf.dim];
}
blorp_emit(batch, GENX(3DSTATE_STENCIL_BUFFER), sb) {
- if (params->stencil.addr.buffer) {
+ if (params->stencil.enabled) {
#if GEN_GEN >= 8 || GEN_IS_HASWELL
sb.StencilBufferEnable = true;
#endif
struct GENX(DEPTH_STENCIL_STATE) ds = { 0 };
#endif
- if (params->depth.addr.buffer) {
+ if (params->depth.enabled) {
ds.DepthBufferWriteEnable = true;
switch (params->hiz_op) {
}
}
- if (params->stencil.addr.buffer) {
+ if (params->stencil.enabled) {
ds.StencilBufferWriteEnable = true;
ds.StencilTestEnable = true;
ds.DoubleSidedStencilEnable = false;
const unsigned ss_size = GENX(RENDER_SURFACE_STATE_length) * 4;
const unsigned ss_align = GENX(RENDER_SURFACE_STATE_length) > 8 ? 64 : 32;
- unsigned num_surfaces = 1 + (params->src.addr.buffer != NULL);
+ unsigned num_surfaces = 1 + params->src.enabled;
blorp_alloc_binding_table(batch, num_surfaces, ss_size, ss_align,
&bind_offset, surface_offsets, surface_maps);
blorp_emit_surface_state(batch, ¶ms->dst,
surface_maps[BLORP_RENDERBUFFER_BT_INDEX],
surface_offsets[BLORP_RENDERBUFFER_BT_INDEX], true);
- if (params->src.addr.buffer) {
+ if (params->src.enabled) {
blorp_emit_surface_state(batch, ¶ms->src,
surface_maps[BLORP_TEXTURE_BT_INDEX],
surface_offsets[BLORP_TEXTURE_BT_INDEX], false);
if (params->wm_prog_data)
blorp_emit_surface_states(batch, params);
- if (params->src.addr.buffer)
+ if (params->src.enabled)
blorp_emit_sampler_state(batch, params);
blorp_emit_3dstate_multisample(batch, params);