intel_miptree_get_dimensions_for_image(firstImage, &width, &height, &depth);
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
- 6 * 4, 32, &brw->bind.surf_offset[surf_index]);
+ 6 * 4, 32, &brw->wm.surf_offset[surf_index]);
surf[0] = (translate_tex_target(tObj->Target) << BRW_SURFACE_TYPE_SHIFT |
BRW_SURFACE_MIPMAPLAYOUT_BELOW << BRW_SURFACE_MIPLAYOUT_SHIFT |
/* Emit relocation to surface contents */
drm_intel_bo_emit_reloc(brw->intel.batch.bo,
- brw->bind.surf_offset[surf_index] + 4,
+ brw->wm.surf_offset[surf_index] + 4,
intelObj->mt->region->bo, 0,
I915_GEM_DOMAIN_SAMPLER, 0);
}
if (brw->wm.const_bo) {
drm_intel_bo_unreference(brw->wm.const_bo);
brw->wm.const_bo = NULL;
- brw->bind.surf_offset[surf_index] = 0;
+ brw->wm.surf_offset[surf_index] = 0;
brw->state.dirty.brw |= BRW_NEW_SURFACES;
}
return;
intel->vtbl.create_constant_surface(brw, brw->wm.const_bo,
params->NumParameters,
- &brw->bind.surf_offset[surf_index]);
+ &brw->wm.surf_offset[surf_index]);
brw->state.dirty.brw |= BRW_NEW_SURFACES;
}
uint32_t *surf;
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
- 6 * 4, 32, &brw->bind.surf_offset[unit]);
+ 6 * 4, 32, &brw->wm.surf_offset[unit]);
surf[0] = (BRW_SURFACE_NULL << BRW_SURFACE_TYPE_SHIFT |
BRW_SURFACEFORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT);
region = irb->mt->region;
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
- 6 * 4, 32, &brw->bind.surf_offset[unit]);
+ 6 * 4, 32, &brw->wm.surf_offset[unit]);
switch (rb_format) {
case MESA_FORMAT_SARGB8:
}
drm_intel_bo_emit_reloc(brw->intel.batch.bo,
- brw->bind.surf_offset[unit] + 4,
+ brw->wm.surf_offset[unit] + 4,
region->bo,
surf[1] - region->bo->offset,
I915_GEM_DOMAIN_RENDER,
if (texUnit->_ReallyEnabled) {
brw->intel.vtbl.update_texture_surface(ctx, i);
} else {
- brw->bind.surf_offset[surf] = 0;
+ brw->wm.surf_offset[surf] = 0;
}
/* For now, just mirror the texture setup to the VS slots. */
brw->vs.surf_offset[SURF_INDEX_VS_TEXTURE(i)] =
- brw->bind.surf_offset[surf];
+ brw->wm.surf_offset[surf];
}
brw->state.dirty.brw |= BRW_NEW_SURFACES;
* numbers to surface state objects.
*/
static void
-brw_upload_binding_table(struct brw_context *brw)
+brw_upload_wm_binding_table(struct brw_context *brw)
{
uint32_t *bind;
int i;
*/
bind = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE,
sizeof(uint32_t) * BRW_MAX_SURFACES,
- 32, &brw->bind.bo_offset);
+ 32, &brw->wm.bind_bo_offset);
/* BRW_NEW_SURFACES */
for (i = 0; i < BRW_MAX_SURFACES; i++) {
- bind[i] = brw->bind.surf_offset[i];
+ bind[i] = brw->wm.surf_offset[i];
}
brw->state.dirty.brw |= BRW_NEW_PS_BINDING_TABLE;
}
-const struct brw_tracked_state brw_binding_table = {
+const struct brw_tracked_state brw_wm_binding_table = {
.dirty = {
.mesa = 0,
.brw = (BRW_NEW_BATCH |
BRW_NEW_SURFACES),
.cache = 0
},
- .emit = brw_upload_binding_table,
+ .emit = brw_upload_wm_binding_table,
};
void
intel_miptree_get_dimensions_for_image(firstImage, &width, &height, &depth);
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
- sizeof(*surf), 32, &brw->bind.surf_offset[surf_index]);
+ sizeof(*surf), 32, &brw->wm.surf_offset[surf_index]);
memset(surf, 0, sizeof(*surf));
if (mt->align_h == 4)
/* Emit relocation to surface contents */
drm_intel_bo_emit_reloc(brw->intel.batch.bo,
- brw->bind.surf_offset[surf_index] +
+ brw->wm.surf_offset[surf_index] +
offsetof(struct gen7_surface_state, ss1),
intelObj->mt->region->bo, 0,
I915_GEM_DOMAIN_SAMPLER, 0);
struct gen7_surface_state *surf;
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
- sizeof(*surf), 32, &brw->bind.surf_offset[unit]);
+ sizeof(*surf), 32, &brw->wm.surf_offset[unit]);
memset(surf, 0, sizeof(*surf));
surf->ss0.surface_type = BRW_SURFACE_NULL;
gl_format rb_format = intel_rb_format(irb);
surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
- sizeof(*surf), 32, &brw->bind.surf_offset[unit]);
+ sizeof(*surf), 32, &brw->wm.surf_offset[unit]);
memset(surf, 0, sizeof(*surf));
if (irb->mt->align_h == 4)
surf->ss3.pitch = (region->pitch * region->cpp) - 1;
drm_intel_bo_emit_reloc(brw->intel.batch.bo,
- brw->bind.surf_offset[unit] +
+ brw->wm.surf_offset[unit] +
offsetof(struct gen7_surface_state, ss1),
region->bo,
surf->ss1.base_addr - region->bo->offset,