* Create a 3D context.
*/
struct ilo_3d *
-ilo_3d_create(struct ilo_cp *cp, int gen, int gt)
+ilo_3d_create(struct ilo_cp *cp, const struct ilo_dev_info *dev)
{
struct ilo_3d *hw3d;
list_inithead(&hw3d->prim_generated_queries);
list_inithead(&hw3d->prim_emitted_queries);
- hw3d->pipeline = ilo_3d_pipeline_create(cp, gen, gt);
+ hw3d->pipeline = ilo_3d_pipeline_create(cp, dev);
if (!hw3d->pipeline) {
FREE(hw3d);
return NULL;
};
struct ilo_3d *
-ilo_3d_create(struct ilo_cp *cp, int gen, int gt);
+ilo_3d_create(struct ilo_cp *cp, const struct ilo_dev_info *dev);
void
ilo_3d_destroy(struct ilo_3d *hw3d);
};
struct ilo_3d_pipeline *
-ilo_3d_pipeline_create(struct ilo_cp *cp, int gen, int gt)
+ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev)
{
struct ilo_3d_pipeline *p;
int i;
return NULL;
p->cp = cp;
- p->gen = gen;
+ p->dev = dev;
- switch (p->gen) {
+ switch (p->dev->gen) {
case ILO_GEN(6):
ilo_3d_pipeline_init_gen6(p);
break;
break;
}
- p->gpe.gen = p->gen;
- p->gpe.gt = gt;
-
p->invalidate_flags = ILO_3D_PIPELINE_INVALIDATE_ALL;
p->workaround_bo = p->cp->winsys->alloc_buffer(p->cp->winsys,
handle_invalid_batch_bo(struct ilo_3d_pipeline *p, bool unset)
{
if (p->invalidate_flags & ILO_3D_PIPELINE_INVALIDATE_BATCH_BO) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
p->state.has_gen6_wa_pipe_control = false;
if (unset)
*/
struct ilo_3d_pipeline {
struct ilo_cp *cp;
- int gen;
-
- struct ilo_gpe gpe;
+ const struct ilo_dev_info *dev;
uint32_t invalidate_flags;
};
struct ilo_3d_pipeline *
-ilo_3d_pipeline_create(struct ilo_cp *cp, int gen, int gt);
+ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev);
void
ilo_3d_pipeline_destroy(struct ilo_3d_pipeline *pipeline);
static void
init_brw(struct brw_context *brw, struct ilo_3d_pipeline *p)
{
- brw->intel.gen = ILO_GEN_GET_MAJOR(p->gen);
+ brw->intel.gen = ILO_GEN_GET_MAJOR(p->dev->gen);
brw->intel.batch.bo_dst.virtual = p->cp->bo->get_virtual(p->cp->bo);
brw->intel.batch.bo = &brw->intel.batch.bo_dst;
}
gen6_wa_pipe_control_post_sync(struct ilo_3d_pipeline *p,
bool caller_post_sync)
{
- assert(p->gen == ILO_GEN(6));
+ assert(p->dev->gen == ILO_GEN(6));
/* emit once */
if (p->state.has_gen6_wa_pipe_control)
*
* The workaround below necessitates this workaround.
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_CS_STALL |
PIPE_CONTROL_STALL_AT_SCOREBOARD,
NULL, 0, false, p->cp);
* "Before a PIPE_CONTROL with Write Cache Flush Enable =1, a
* PIPE_CONTROL with any non-zero post-sync-op is required."
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_WRITE_IMMEDIATE,
p->workaround_bo, 0, false, p->cp);
}
static void
gen6_wa_pipe_control_wm_multisample_flush(struct ilo_3d_pipeline *p)
{
- assert(p->gen == ILO_GEN(6));
+ assert(p->dev->gen == ILO_GEN(6));
gen6_wa_pipe_control_post_sync(p, false);
* requires driver to send a PIPE_CONTROL with a CS stall along with a
* Depth Flush prior to this command."
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
PIPE_CONTROL_CS_STALL,
0, 0, false, p->cp);
static void
gen6_wa_pipe_control_wm_depth_flush(struct ilo_3d_pipeline *p)
{
- assert(p->gen == ILO_GEN(6));
+ assert(p->dev->gen == ILO_GEN(6));
gen6_wa_pipe_control_post_sync(p, false);
* to emit a sequence of PIPE_CONTROLs prior to emitting depth related
* commands.
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL,
NULL, 0, false, p->cp);
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_CACHE_FLUSH,
NULL, 0, false, p->cp);
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL,
NULL, 0, false, p->cp);
}
static void
gen6_wa_pipe_control_wm_max_threads_stall(struct ilo_3d_pipeline *p)
{
- assert(p->gen == ILO_GEN(6));
+ assert(p->dev->gen == ILO_GEN(6));
/* the post-sync workaround should cover this already */
if (p->state.has_gen6_wa_pipe_control)
* field set (DW1 Bit 1), must be issued prior to any change to the
* value in this field (Maximum Number of Threads in 3DSTATE_WM)"
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_STALL_AT_SCOREBOARD,
NULL, 0, false, p->cp);
static void
gen6_wa_pipe_control_vs_const_flush(struct ilo_3d_pipeline *p)
{
- assert(p->gen == ILO_GEN(6));
+ assert(p->dev->gen == ILO_GEN(6));
gen6_wa_pipe_control_post_sync(p, false);
* PIPE_CONTROL after 3DSTATE_CONSTANT_VS so that the command is kept being
* buffered by VS FF, to the point that the FF dies.
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL |
PIPE_CONTROL_INSTRUCTION_FLUSH |
PIPE_CONTROL_STATE_CACHE_INVALIDATE,
{
/* PIPELINE_SELECT */
if (session->hw_ctx_changed) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_PIPELINE_SELECT(&p->gpe, 0x0, p->cp);
+ p->gen6_PIPELINE_SELECT(p->dev, 0x0, p->cp);
}
}
{
/* STATE_SIP */
if (session->hw_ctx_changed) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_STATE_SIP(&p->gpe, 0, p->cp);
+ p->gen6_STATE_SIP(p->dev, 0, p->cp);
}
}
{
/* STATE_BASE_ADDRESS */
if (session->state_bo_changed || session->instruction_bo_changed) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_STATE_BASE_ADDRESS(&p->gpe,
+ p->gen6_STATE_BASE_ADDRESS(p->dev,
NULL, p->cp->bo, p->cp->bo, NULL, ilo->shader_cache->bo,
0, 0, 0, 0, p->cp);
gs_total_size = 0;
}
- p->gen6_3DSTATE_URB(&p->gpe, vs_total_size, gs_total_size,
+ p->gen6_3DSTATE_URB(p->dev, vs_total_size, gs_total_size,
vs_entry_size, gs_entry_size, p->cp);
/*
{
/* 3DSTATE_VIEWPORT_STATE_POINTERS */
if (session->viewport_state_changed) {
- p->gen6_3DSTATE_VIEWPORT_STATE_POINTERS(&p->gpe,
+ p->gen6_3DSTATE_VIEWPORT_STATE_POINTERS(p->dev,
p->state.CLIP_VIEWPORT,
p->state.SF_VIEWPORT,
p->state.CC_VIEWPORT, p->cp);
if (session->cc_state_blend_changed ||
session->cc_state_dsa_changed ||
session->cc_state_cc_changed) {
- p->gen6_3DSTATE_CC_STATE_POINTERS(&p->gpe,
+ p->gen6_3DSTATE_CC_STATE_POINTERS(p->dev,
p->state.BLEND_STATE,
p->state.DEPTH_STENCIL_STATE,
p->state.COLOR_CALC_STATE, p->cp);
if (session->sampler_state_vs_changed ||
session->sampler_state_gs_changed ||
session->sampler_state_fs_changed) {
- p->gen6_3DSTATE_SAMPLER_STATE_POINTERS(&p->gpe,
+ p->gen6_3DSTATE_SAMPLER_STATE_POINTERS(p->dev,
p->state.vs.SAMPLER_STATE,
0,
p->state.wm.SAMPLER_STATE, p->cp);
{
/* 3DSTATE_SCISSOR_STATE_POINTERS */
if (session->scissor_state_changed) {
- p->gen6_3DSTATE_SCISSOR_STATE_POINTERS(&p->gpe,
+ p->gen6_3DSTATE_SCISSOR_STATE_POINTERS(p->dev,
p->state.SCISSOR_RECT, p->cp);
}
if (session->binding_table_vs_changed ||
session->binding_table_gs_changed ||
session->binding_table_fs_changed) {
- p->gen6_3DSTATE_BINDING_TABLE_POINTERS(&p->gpe,
+ p->gen6_3DSTATE_BINDING_TABLE_POINTERS(p->dev,
p->state.vs.BINDING_TABLE_STATE,
p->state.gs.BINDING_TABLE_STATE,
p->state.wm.BINDING_TABLE_STATE, p->cp);
{
/* 3DSTATE_INDEX_BUFFER */
if (DIRTY(INDEX_BUFFER)) {
- p->gen6_3DSTATE_INDEX_BUFFER(&p->gpe,
+ p->gen6_3DSTATE_INDEX_BUFFER(p->dev,
&ilo->index_buffer, false, p->cp);
}
/* 3DSTATE_VERTEX_BUFFERS */
if (DIRTY(VERTEX_BUFFERS)) {
- p->gen6_3DSTATE_VERTEX_BUFFERS(&p->gpe,
+ p->gen6_3DSTATE_VERTEX_BUFFERS(p->dev,
ilo->vertex_buffers.buffers, NULL,
(1 << ilo->vertex_buffers.num_buffers) - 1, p->cp);
}
prepend_generate_ids = (info->has_instanceid || info->has_vertexid);
}
- p->gen6_3DSTATE_VERTEX_ELEMENTS(&p->gpe,
+ p->gen6_3DSTATE_VERTEX_ELEMENTS(p->dev,
ive->elements, ive->num_elements,
last_velement_edgeflag, prepend_generate_ids, p->cp);
}
{
/* 3DSTATE_VF_STATISTICS */
if (session->hw_ctx_changed)
- p->gen6_3DSTATE_VF_STATISTICS(&p->gpe, false, p->cp);
+ p->gen6_3DSTATE_VF_STATISTICS(p->dev, false, p->cp);
}
void
struct gen6_pipeline_session *session)
{
/* 3DPRIMITIVE */
- p->gen6_3DPRIMITIVE(&p->gpe, session->info, false, p->cp);
+ p->gen6_3DPRIMITIVE(p->dev, session->info, false, p->cp);
p->state.has_gen6_wa_pipe_control = false;
}
* the classic i965 does this in upload_vs_state(), citing a spec that I
* cannot find
*/
- if (emit_3dstate_vs && p->gen == ILO_GEN(6))
+ if (emit_3dstate_vs && p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
/* 3DSTATE_CONSTANT_VS */
if (emit_3dstate_constant_vs) {
- p->gen6_3DSTATE_CONSTANT_VS(&p->gpe,
+ p->gen6_3DSTATE_CONSTANT_VS(p->dev,
&p->state.vs.PUSH_CONSTANT_BUFFER,
&p->state.vs.PUSH_CONSTANT_BUFFER_size,
1, p->cp);
const struct ilo_shader *vs = (ilo->vs)? ilo->vs->shader : NULL;
const int num_samplers = ilo->samplers[PIPE_SHADER_VERTEX].num_samplers;
- p->gen6_3DSTATE_VS(&p->gpe,
+ p->gen6_3DSTATE_VS(p->dev,
vs, ilo->max_vs_threads, num_samplers, p->cp);
}
- if (emit_3dstate_constant_vs && p->gen == ILO_GEN(6))
+ if (emit_3dstate_constant_vs && p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_vs_const_flush(p);
}
{
/* 3DSTATE_CONSTANT_GS */
if (session->pcb_state_gs_changed)
- p->gen6_3DSTATE_CONSTANT_GS(&p->gpe, NULL, NULL, 0, p->cp);
+ p->gen6_3DSTATE_CONSTANT_GS(p->dev, NULL, NULL, 0, p->cp);
/* 3DSTATE_GS */
if (DIRTY(GS) || DIRTY(VS) || session->prim_changed) {
if (gs)
assert(!gs->pcb.clip_state_size);
- p->gen6_3DSTATE_GS(&p->gpe,
+ p->gen6_3DSTATE_GS(p->dev,
gs, ilo->max_gs_threads, vs,
(vs) ? vs->cache_offset + vs->gs_offsets[num_vertices - 1] : 0,
p->cp);
max_svbi = count;
}
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_3DSTATE_GS_SVB_INDEX(&p->gpe,
+ p->gen6_3DSTATE_GS_SVB_INDEX(p->dev,
0, p->state.so_num_vertices, max_svbi,
false, p->cp);
* 0xFFFFFFFF in order to not cause overflow in that SVBI."
*/
for (i = 1; i < 4; i++) {
- p->gen6_3DSTATE_GS_SVB_INDEX(&p->gpe,
+ p->gen6_3DSTATE_GS_SVB_INDEX(p->dev,
i, 0, 0xffffffff, false, p->cp);
}
}
(x1 <= 0.0f && x2 >= (float) ilo->framebuffer.width &&
y1 <= 0.0f && y2 >= (float) ilo->framebuffer.height);
- p->gen6_3DSTATE_CLIP(&p->gpe,
+ p->gen6_3DSTATE_CLIP(p->dev,
ilo->rasterizer,
(ilo->fs && ilo->fs->shader->in.has_linear_interp),
enable_guardband, 1, p->cp);
(ilo->gs)? ilo->gs->shader :
(ilo->vs)? ilo->vs->shader : NULL;
- p->gen6_3DSTATE_SF(&p->gpe,
+ p->gen6_3DSTATE_SF(p->dev,
ilo->rasterizer, fs, last_sh, p->cp);
}
}
{
/* 3DSTATE_DRAWING_RECTANGLE */
if (DIRTY(FRAMEBUFFER)) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_3DSTATE_DRAWING_RECTANGLE(&p->gpe, 0, 0,
+ p->gen6_3DSTATE_DRAWING_RECTANGLE(p->dev, 0, 0,
ilo->framebuffer.width, ilo->framebuffer.height, p->cp);
}
}
{
/* 3DSTATE_CONSTANT_PS */
if (session->pcb_state_fs_changed)
- p->gen6_3DSTATE_CONSTANT_PS(&p->gpe, NULL, NULL, 0, p->cp);
+ p->gen6_3DSTATE_CONSTANT_PS(p->dev, NULL, NULL, 0, p->cp);
/* 3DSTATE_WM */
if (DIRTY(FS) || DIRTY(FRAGMENT_SAMPLERS) ||
if (fs)
assert(!fs->pcb.clip_state_size);
- if (p->gen == ILO_GEN(6) && session->hw_ctx_changed)
+ if (p->dev->gen == ILO_GEN(6) && session->hw_ctx_changed)
gen6_wa_pipe_control_wm_max_threads_stall(p);
- p->gen6_3DSTATE_WM(&p->gpe,
+ p->gen6_3DSTATE_WM(p->dev,
fs, ilo->max_wm_threads, num_samplers,
ilo->rasterizer, dual_blend, cc_may_kill, p->cp);
}
packed_sample_pos = (num_samples > 1) ?
&p->packed_sample_position_4x : &p->packed_sample_position_1x;
- if (p->gen == ILO_GEN(6)) {
+ if (p->dev->gen == ILO_GEN(6)) {
gen6_wa_pipe_control_post_sync(p, false);
gen6_wa_pipe_control_wm_multisample_flush(p);
}
- p->gen6_3DSTATE_MULTISAMPLE(&p->gpe, num_samples, packed_sample_pos,
+ p->gen6_3DSTATE_MULTISAMPLE(p->dev, num_samples, packed_sample_pos,
ilo->rasterizer->half_pixel_center, p->cp);
- p->gen6_3DSTATE_SAMPLE_MASK(&p->gpe,
+ p->gen6_3DSTATE_SAMPLE_MASK(p->dev,
(num_samples > 1) ? ilo->sample_mask : 0x1, p->cp);
}
}
{
/* 3DSTATE_DEPTH_BUFFER and 3DSTATE_CLEAR_PARAMS */
if (DIRTY(FRAMEBUFFER)) {
- if (p->gen == ILO_GEN(6)) {
+ if (p->dev->gen == ILO_GEN(6)) {
gen6_wa_pipe_control_post_sync(p, false);
gen6_wa_pipe_control_wm_depth_flush(p);
}
- p->gen6_3DSTATE_DEPTH_BUFFER(&p->gpe,
+ p->gen6_3DSTATE_DEPTH_BUFFER(p->dev,
ilo->framebuffer.zsbuf, false, p->cp);
/* TODO */
- p->gen6_3DSTATE_CLEAR_PARAMS(&p->gpe, 0, p->cp);
+ p->gen6_3DSTATE_CLEAR_PARAMS(p->dev, 0, p->cp);
}
}
/* 3DSTATE_POLY_STIPPLE_PATTERN and 3DSTATE_POLY_STIPPLE_OFFSET */
if ((DIRTY(RASTERIZER) || DIRTY(POLY_STIPPLE)) &&
ilo->rasterizer->poly_stipple_enable) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_3DSTATE_POLY_STIPPLE_PATTERN(&p->gpe,
+ p->gen6_3DSTATE_POLY_STIPPLE_PATTERN(p->dev,
&ilo->poly_stipple, p->cp);
- p->gen6_3DSTATE_POLY_STIPPLE_OFFSET(&p->gpe, 0, 0, p->cp);
+ p->gen6_3DSTATE_POLY_STIPPLE_OFFSET(p->dev, 0, 0, p->cp);
}
/* 3DSTATE_LINE_STIPPLE */
if (DIRTY(RASTERIZER) && ilo->rasterizer->line_stipple_enable) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_3DSTATE_LINE_STIPPLE(&p->gpe,
+ p->gen6_3DSTATE_LINE_STIPPLE(p->dev,
ilo->rasterizer->line_stipple_pattern,
ilo->rasterizer->line_stipple_factor + 1, p->cp);
}
/* 3DSTATE_AA_LINE_PARAMETERS */
if (DIRTY(RASTERIZER) && ilo->rasterizer->line_smooth) {
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_3DSTATE_AA_LINE_PARAMETERS(&p->gpe, p->cp);
+ p->gen6_3DSTATE_AA_LINE_PARAMETERS(p->dev, p->cp);
}
}
struct gen6_pipeline_session *session)
{
/* SF_CLIP_VIEWPORT and CC_VIEWPORT */
- if (p->gen >= ILO_GEN(7) && DIRTY(VIEWPORT)) {
- p->state.SF_CLIP_VIEWPORT = p->gen7_SF_CLIP_VIEWPORT(&p->gpe,
+ if (p->dev->gen >= ILO_GEN(7) && DIRTY(VIEWPORT)) {
+ p->state.SF_CLIP_VIEWPORT = p->gen7_SF_CLIP_VIEWPORT(p->dev,
&ilo->viewport, 1, p->cp);
- p->state.CC_VIEWPORT = p->gen6_CC_VIEWPORT(&p->gpe,
+ p->state.CC_VIEWPORT = p->gen6_CC_VIEWPORT(p->dev,
&ilo->viewport, 1, p->cp);
session->viewport_state_changed = true;
}
/* SF_VIEWPORT, CLIP_VIEWPORT, and CC_VIEWPORT */
else if (DIRTY(VIEWPORT)) {
- p->state.CLIP_VIEWPORT = p->gen6_CLIP_VIEWPORT(&p->gpe,
+ p->state.CLIP_VIEWPORT = p->gen6_CLIP_VIEWPORT(p->dev,
&ilo->viewport, 1, p->cp);
- p->state.SF_VIEWPORT = p->gen6_SF_VIEWPORT(&p->gpe,
+ p->state.SF_VIEWPORT = p->gen6_SF_VIEWPORT(p->dev,
&ilo->viewport, 1, p->cp);
- p->state.CC_VIEWPORT = p->gen6_CC_VIEWPORT(&p->gpe,
+ p->state.CC_VIEWPORT = p->gen6_CC_VIEWPORT(p->dev,
&ilo->viewport, 1, p->cp);
session->viewport_state_changed = true;
{
/* BLEND_STATE */
if (DIRTY(BLEND) || DIRTY(FRAMEBUFFER) || DIRTY(DEPTH_STENCIL_ALPHA)) {
- p->state.BLEND_STATE = p->gen6_BLEND_STATE(&p->gpe,
+ p->state.BLEND_STATE = p->gen6_BLEND_STATE(p->dev,
ilo->blend, &ilo->framebuffer,
&ilo->depth_stencil_alpha->alpha, p->cp);
/* COLOR_CALC_STATE */
if (DIRTY(DEPTH_STENCIL_ALPHA) || DIRTY(STENCIL_REF) || DIRTY(BLEND_COLOR)) {
- p->state.COLOR_CALC_STATE = p->gen6_COLOR_CALC_STATE(&p->gpe,
+ p->state.COLOR_CALC_STATE = p->gen6_COLOR_CALC_STATE(p->dev,
&ilo->stencil_ref,
ilo->depth_stencil_alpha->alpha.ref_value,
&ilo->blend_color, p->cp);
/* DEPTH_STENCIL_STATE */
if (DIRTY(DEPTH_STENCIL_ALPHA)) {
p->state.DEPTH_STENCIL_STATE =
- p->gen6_DEPTH_STENCIL_STATE(&p->gpe,
+ p->gen6_DEPTH_STENCIL_STATE(p->dev,
ilo->depth_stencil_alpha, p->cp);
session->cc_state_dsa_changed = true;
{
/* SCISSOR_RECT */
if (DIRTY(SCISSOR)) {
- p->state.SCISSOR_RECT = p->gen6_SCISSOR_RECT(&p->gpe,
+ p->state.SCISSOR_RECT = p->gen6_SCISSOR_RECT(p->dev,
&ilo->scissor, 1, p->cp);
session->scissor_state_changed = true;
assert(surface);
surface_state[i] =
- p->gen6_surf_SURFACE_STATE(&p->gpe, surface, p->cp);
+ p->gen6_surf_SURFACE_STATE(p->dev, surface, p->cp);
}
/*
null_surface.height = ilo->framebuffer.height;
surface_state[i] =
- p->gen6_surf_SURFACE_STATE(&p->gpe, &null_surface, p->cp);
+ p->gen6_surf_SURFACE_STATE(p->dev, &null_surface, p->cp);
i++;
}
ilo->stream_output_targets.targets;
const int num_so_targets = ilo->stream_output_targets.num_targets;
- if (p->gen != ILO_GEN(6))
+ if (p->dev->gen != ILO_GEN(6))
return;
/* SURFACE_STATEs for stream output targets */
(target < num_so_targets) ? so_targets[target] : NULL;
if (so_target) {
- surface_state[i] = p->gen6_so_SURFACE_STATE(&p->gpe,
+ surface_state[i] = p->gen6_so_SURFACE_STATE(p->dev,
so_target, so_info, i, p->cp);
}
else {
for (i = 0; i < num_views; i++) {
if (views[i]) {
surface_state[i] =
- p->gen6_view_SURFACE_STATE(&p->gpe, views[i], p->cp);
+ p->gen6_view_SURFACE_STATE(p->dev, views[i], p->cp);
}
else {
surface_state[i] = 0;
for (i = 0; i < num_buffers; i++) {
if (buffers[i].buffer) {
surface_state[i] =
- p->gen6_cbuf_SURFACE_STATE(&p->gpe, &buffers[i], p->cp);
+ p->gen6_cbuf_SURFACE_STATE(p->dev, &buffers[i], p->cp);
}
else {
surface_state[i] = 0;
if (size < session->num_surfaces[shader_type])
size = session->num_surfaces[shader_type];
- *binding_table_state = p->gen6_BINDING_TABLE_STATE(&p->gpe,
+ *binding_table_state = p->gen6_BINDING_TABLE_STATE(p->dev,
surface_state, size, p->cp);
*binding_table_state_size = size;
}
for (i = 0; i < num_samplers; i++) {
border_color_state[i] = (samplers[i]) ?
- p->gen6_SAMPLER_BORDER_COLOR_STATE(&p->gpe,
+ p->gen6_SAMPLER_BORDER_COLOR_STATE(p->dev,
&samplers[i]->border_color, p->cp) : 0;
}
}
/* should we take the minimum of num_samplers and num_views? */
- *sampler_state = p->gen6_SAMPLER_STATE(&p->gpe,
+ *sampler_state = p->gen6_SAMPLER_STATE(p->dev,
samplers, views,
border_color_state,
MIN2(num_samplers, num_views), p->cp);
p->state.vs.PUSH_CONSTANT_BUFFER_size = vs->pcb.clip_state_size;
p->state.vs.PUSH_CONSTANT_BUFFER =
- p->gen6_push_constant_buffer(&p->gpe,
+ p->gen6_push_constant_buffer(p->dev,
p->state.vs.PUSH_CONSTANT_BUFFER_size, &pcb, p->cp);
memcpy(pcb, &ilo->clip, vs->pcb.clip_state_size);
void
ilo_3d_pipeline_emit_flush_gen6(struct ilo_3d_pipeline *p)
{
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_INSTRUCTION_FLUSH |
PIPE_CONTROL_WRITE_FLUSH |
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
ilo_3d_pipeline_emit_write_timestamp_gen6(struct ilo_3d_pipeline *p,
struct intel_bo *bo, int index)
{
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, true);
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_WRITE_TIMESTAMP,
bo, index * sizeof(uint64_t) | PIPE_CONTROL_GLOBAL_GTT_WRITE,
true, p->cp);
ilo_3d_pipeline_emit_write_depth_count_gen6(struct ilo_3d_pipeline *p,
struct intel_bo *bo, int index)
{
- if (p->gen == ILO_GEN(6))
+ if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL |
PIPE_CONTROL_WRITE_DEPTH_COUNT,
bo, index * sizeof(uint64_t) | PIPE_CONTROL_GLOBAL_GTT_WRITE,
}
if (count)
- size += gen6->estimate_command_size(&p->gpe, cmd, count);
+ size += gen6->estimate_command_size(p->dev, cmd, count);
}
return size;
int i;
for (i = 0; i < Elements(static_states); i++) {
- static_size += gen6->estimate_state_size(&p->gpe,
+ static_size += gen6->estimate_state_size(p->dev,
static_states[i].state,
static_states[i].count);
}
}
if (count) {
- size += gen6->estimate_state_size(&p->gpe,
+ size += gen6->estimate_state_size(p->dev,
ILO_GPE_GEN6_SURFACE_STATE, count);
}
for (shader_type = 0; shader_type < PIPE_SHADER_TYPES; shader_type++) {
count = ilo->samplers[shader_type].num_samplers;
if (count) {
- size += gen6->estimate_state_size(&p->gpe,
+ size += gen6->estimate_state_size(p->dev,
ILO_GPE_GEN6_SAMPLER_BORDER_COLOR_STATE, count);
- size += gen6->estimate_state_size(&p->gpe,
+ size += gen6->estimate_state_size(p->dev,
ILO_GPE_GEN6_SAMPLER_STATE, count);
}
}
if (ilo->vs && ilo->vs->shader->pcb.clip_state_size) {
const int pcb_size = ilo->vs->shader->pcb.clip_state_size;
- size += gen6->estimate_state_size(&p->gpe,
+ size += gen6->estimate_state_size(p->dev,
ILO_GPE_GEN6_PUSH_CONSTANT_BUFFER, pcb_size);
}
}
break;
case ILO_3D_PIPELINE_FLUSH:
- size = gen6->estimate_command_size(&p->gpe,
+ size = gen6->estimate_command_size(p->dev,
ILO_GPE_GEN6_PIPE_CONTROL, 1) * 3;
break;
case ILO_3D_PIPELINE_WRITE_TIMESTAMP:
- size = gen6->estimate_command_size(&p->gpe,
+ size = gen6->estimate_command_size(p->dev,
ILO_GPE_GEN6_PIPE_CONTROL, 1) * 2;
break;
case ILO_3D_PIPELINE_WRITE_DEPTH_COUNT:
- size = gen6->estimate_command_size(&p->gpe,
+ size = gen6->estimate_command_size(p->dev,
ILO_GPE_GEN6_PIPE_CONTROL, 1) * 3;
break;
default:
struct intel_bo *bo = NULL;
uint32_t dw1 = PIPE_CONTROL_CS_STALL;
- assert(p->gen == ILO_GEN(7));
+ assert(p->dev->gen == ILO_GEN(7));
/* emit once */
if (p->state.has_gen6_wa_pipe_control)
bo = p->workaround_bo;
}
- p->gen6_PIPE_CONTROL(&p->gpe, dw1, bo, 0, false, p->cp);
+ p->gen6_PIPE_CONTROL(p->dev, dw1, bo, 0, false, p->cp);
}
static void
gen7_wa_pipe_control_vs_depth_stall(struct ilo_3d_pipeline *p)
{
- assert(p->gen == ILO_GEN(7));
+ assert(p->dev->gen == ILO_GEN(7));
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 106:
* 3DSTATE_SAMPLER_STATE_POINTER_VS command. Only one PIPE_CONTROL
* needs to be sent before any combination of VS associated 3DSTATE."
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL |
PIPE_CONTROL_WRITE_IMMEDIATE,
p->workaround_bo, 0, false, p->cp);
gen7_wa_pipe_control_wm_depth_stall(struct ilo_3d_pipeline *p,
bool change_depth_buffer)
{
- assert(p->gen == ILO_GEN(7));
+ assert(p->dev->gen == ILO_GEN(7));
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 276:
* guarantee that the pipeline from WM onwards is already flushed
* (e.g., via a preceding MI_FLUSH)."
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL,
NULL, 0, false, p->cp);
if (!change_depth_buffer)
return;
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_CACHE_FLUSH,
NULL, 0, false, p->cp);
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL,
NULL, 0, false, p->cp);
}
static void
gen7_wa_pipe_control_wm_max_threads_stall(struct ilo_3d_pipeline *p)
{
- assert(p->gen == ILO_GEN(7));
+ assert(p->dev->gen == ILO_GEN(7));
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 286:
* between 3DPRIMITIVE commands, a PIPE_CONTROL command with Stall at
* Pixel Scoreboard set is required to be issued."
*/
- p->gen6_PIPE_CONTROL(&p->gpe,
+ p->gen6_PIPE_CONTROL(p->dev,
PIPE_CONTROL_STALL_AT_SCOREBOARD,
NULL, 0, false, p->cp);
gen7_wa_pipe_control_vs_depth_stall(p);
- p->gen7_3DSTATE_URB_VS(&p->gpe,
+ p->gen7_3DSTATE_URB_VS(p->dev,
offset, vs_total_size, vs_entry_size, p->cp);
- p->gen7_3DSTATE_URB_GS(&p->gpe, offset, 0, 0, p->cp);
- p->gen7_3DSTATE_URB_HS(&p->gpe, offset, 0, 0, p->cp);
- p->gen7_3DSTATE_URB_DS(&p->gpe, offset, 0, 0, p->cp);
+ p->gen7_3DSTATE_URB_GS(p->dev, offset, 0, 0, p->cp);
+ p->gen7_3DSTATE_URB_HS(p->dev, offset, 0, 0, p->cp);
+ p->gen7_3DSTATE_URB_DS(p->dev, offset, 0, 0, p->cp);
}
}
* push constant buffers are only allowed to take up at most the first
* 16KB of the URB
*/
- p->gen7_3DSTATE_PUSH_CONSTANT_ALLOC_VS(&p->gpe,
+ p->gen7_3DSTATE_PUSH_CONSTANT_ALLOC_VS(p->dev,
0, 8192, p->cp);
- p->gen7_3DSTATE_PUSH_CONSTANT_ALLOC_PS(&p->gpe,
+ p->gen7_3DSTATE_PUSH_CONSTANT_ALLOC_PS(p->dev,
8192, 8192, p->cp);
gen7_wa_pipe_control_cs_stall(p, true, true);
{
/* 3DSTATE_VIEWPORT_STATE_POINTERS_{CC,SF_CLIP} */
if (session->viewport_state_changed) {
- p->gen7_3DSTATE_VIEWPORT_STATE_POINTERS_CC(&p->gpe,
+ p->gen7_3DSTATE_VIEWPORT_STATE_POINTERS_CC(p->dev,
p->state.CC_VIEWPORT, p->cp);
- p->gen7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP(&p->gpe,
+ p->gen7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP(p->dev,
p->state.SF_CLIP_VIEWPORT, p->cp);
}
}
{
/* 3DSTATE_BLEND_STATE_POINTERS */
if (session->cc_state_blend_changed) {
- p->gen7_3DSTATE_BLEND_STATE_POINTERS(&p->gpe,
+ p->gen7_3DSTATE_BLEND_STATE_POINTERS(p->dev,
p->state.BLEND_STATE, p->cp);
}
/* 3DSTATE_CC_STATE_POINTERS */
if (session->cc_state_cc_changed) {
- p->gen7_3DSTATE_CC_STATE_POINTERS(&p->gpe,
+ p->gen7_3DSTATE_CC_STATE_POINTERS(p->dev,
p->state.COLOR_CALC_STATE, p->cp);
}
/* 3DSTATE_DEPTH_STENCIL_STATE_POINTERS */
if (session->cc_state_dsa_changed) {
- p->gen7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS(&p->gpe,
+ p->gen7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS(p->dev,
p->state.DEPTH_STENCIL_STATE, p->cp);
}
}
/* 3DSTATE_BINDING_TABLE_POINTERS_VS */
if (emit_3dstate_binding_table) {
- p->gen7_3DSTATE_BINDING_TABLE_POINTERS_VS(&p->gpe,
+ p->gen7_3DSTATE_BINDING_TABLE_POINTERS_VS(p->dev,
p->state.vs.BINDING_TABLE_STATE, p->cp);
}
/* 3DSTATE_SAMPLER_STATE_POINTERS_VS */
if (emit_3dstate_sampler_state) {
- p->gen7_3DSTATE_SAMPLER_STATE_POINTERS_VS(&p->gpe,
+ p->gen7_3DSTATE_SAMPLER_STATE_POINTERS_VS(p->dev,
p->state.vs.SAMPLER_STATE, p->cp);
}
{
/* 3DSTATE_CONSTANT_HS and 3DSTATE_HS */
if (session->hw_ctx_changed) {
- p->gen7_3DSTATE_CONSTANT_HS(&p->gpe, 0, 0, 0, p->cp);
- p->gen7_3DSTATE_HS(&p->gpe, NULL, 0, 0, p->cp);
+ p->gen7_3DSTATE_CONSTANT_HS(p->dev, 0, 0, 0, p->cp);
+ p->gen7_3DSTATE_HS(p->dev, NULL, 0, 0, p->cp);
}
/* 3DSTATE_BINDING_TABLE_POINTERS_HS */
if (session->hw_ctx_changed)
- p->gen7_3DSTATE_BINDING_TABLE_POINTERS_HS(&p->gpe, 0, p->cp);
+ p->gen7_3DSTATE_BINDING_TABLE_POINTERS_HS(p->dev, 0, p->cp);
}
static void
{
/* 3DSTATE_TE */
if (session->hw_ctx_changed)
- p->gen7_3DSTATE_TE(&p->gpe, p->cp);
+ p->gen7_3DSTATE_TE(p->dev, p->cp);
}
static void
{
/* 3DSTATE_CONSTANT_DS and 3DSTATE_DS */
if (session->hw_ctx_changed) {
- p->gen7_3DSTATE_CONSTANT_DS(&p->gpe, 0, 0, 0, p->cp);
- p->gen7_3DSTATE_DS(&p->gpe, NULL, 0, 0, p->cp);
+ p->gen7_3DSTATE_CONSTANT_DS(p->dev, 0, 0, 0, p->cp);
+ p->gen7_3DSTATE_DS(p->dev, NULL, 0, 0, p->cp);
}
/* 3DSTATE_BINDING_TABLE_POINTERS_DS */
if (session->hw_ctx_changed)
- p->gen7_3DSTATE_BINDING_TABLE_POINTERS_DS(&p->gpe, 0, p->cp);
+ p->gen7_3DSTATE_BINDING_TABLE_POINTERS_DS(p->dev, 0, p->cp);
}
{
/* 3DSTATE_CONSTANT_GS and 3DSTATE_GS */
if (session->hw_ctx_changed) {
- p->gen6_3DSTATE_CONSTANT_GS(&p->gpe, 0, 0, 0, p->cp);
- p->gen7_3DSTATE_GS(&p->gpe, NULL, 0, 0, p->cp);
+ p->gen6_3DSTATE_CONSTANT_GS(p->dev, 0, 0, 0, p->cp);
+ p->gen7_3DSTATE_GS(p->dev, NULL, 0, 0, p->cp);
}
/* 3DSTATE_BINDING_TABLE_POINTERS_GS */
if (session->binding_table_gs_changed) {
- p->gen7_3DSTATE_BINDING_TABLE_POINTERS_GS(&p->gpe,
+ p->gen7_3DSTATE_BINDING_TABLE_POINTERS_GS(p->dev,
p->state.gs.BINDING_TABLE_STATE, p->cp);
}
}
int i;
for (i = 0; i < 4; i++)
- p->gen7_3DSTATE_SO_BUFFER(&p->gpe, i, false, p->cp);
+ p->gen7_3DSTATE_SO_BUFFER(p->dev, i, false, p->cp);
- p->gen7_3DSTATE_SO_DECL_LIST(&p->gpe, p->cp);
+ p->gen7_3DSTATE_SO_DECL_LIST(p->dev, p->cp);
}
- p->gen7_3DSTATE_STREAMOUT(&p->gpe, false, false, false, p->cp);
+ p->gen7_3DSTATE_STREAMOUT(p->dev, false, false, false, p->cp);
}
}
(ilo->gs)? ilo->gs->shader :
(ilo->vs)? ilo->vs->shader : NULL;
- p->gen7_3DSTATE_SBE(&p->gpe,
+ p->gen7_3DSTATE_SBE(p->dev,
ilo->rasterizer, fs, last_sh, p->cp);
}
if (DIRTY(RASTERIZER) || DIRTY(FRAMEBUFFER)) {
gen7_wa_pipe_control_cs_stall(p, true, true);
- p->gen7_3DSTATE_SF(&p->gpe,
+ p->gen7_3DSTATE_SF(p->dev,
ilo->rasterizer, ilo->framebuffer.zsbuf, p->cp);
}
}
if (fs)
assert(!fs->pcb.clip_state_size);
- if (p->gen == ILO_GEN(7) && session->hw_ctx_changed)
+ if (p->dev->gen == ILO_GEN(7) && session->hw_ctx_changed)
gen7_wa_pipe_control_wm_max_threads_stall(p);
- p->gen7_3DSTATE_WM(&p->gpe,
+ p->gen7_3DSTATE_WM(p->dev,
fs, ilo->rasterizer, cc_may_kill, p->cp);
}
/* 3DSTATE_BINDING_TABLE_POINTERS_PS */
if (session->binding_table_fs_changed) {
- p->gen7_3DSTATE_BINDING_TABLE_POINTERS_PS(&p->gpe,
+ p->gen7_3DSTATE_BINDING_TABLE_POINTERS_PS(p->dev,
p->state.wm.BINDING_TABLE_STATE, p->cp);
}
/* 3DSTATE_SAMPLER_STATE_POINTERS_PS */
if (session->sampler_state_fs_changed) {
- p->gen7_3DSTATE_SAMPLER_STATE_POINTERS_PS(&p->gpe,
+ p->gen7_3DSTATE_SAMPLER_STATE_POINTERS_PS(p->dev,
p->state.wm.SAMPLER_STATE, p->cp);
}
/* 3DSTATE_CONSTANT_PS */
if (session->pcb_state_fs_changed)
- p->gen6_3DSTATE_CONSTANT_PS(&p->gpe, NULL, NULL, 0, p->cp);
+ p->gen6_3DSTATE_CONSTANT_PS(p->dev, NULL, NULL, 0, p->cp);
/* 3DSTATE_PS */
if (DIRTY(FS) || DIRTY(FRAGMENT_SAMPLERS) ||
if (fs)
assert(!fs->pcb.clip_state_size);
- p->gen7_3DSTATE_PS(&p->gpe,
+ p->gen7_3DSTATE_PS(p->dev,
fs, ilo->max_wm_threads, num_samplers,
dual_blend, p->cp);
}
/* 3DSTATE_SCISSOR_STATE_POINTERS */
if (session->scissor_state_changed) {
- p->gen6_3DSTATE_SCISSOR_STATE_POINTERS(&p->gpe,
+ p->gen6_3DSTATE_SCISSOR_STATE_POINTERS(p->dev,
p->state.SCISSOR_RECT, p->cp);
}
/* 3DSTATE_DEPTH_BUFFER and 3DSTATE_CLEAR_PARAMS */
if (DIRTY(FRAMEBUFFER) || DIRTY(DEPTH_STENCIL_ALPHA) ||
session->state_bo_changed) {
- p->gen7_3DSTATE_DEPTH_BUFFER(&p->gpe,
+ p->gen7_3DSTATE_DEPTH_BUFFER(p->dev,
ilo->framebuffer.zsbuf,
ilo->depth_stencil_alpha,
false, p->cp);
/* TODO */
- p->gen6_3DSTATE_CLEAR_PARAMS(&p->gpe, 0, p->cp);
+ p->gen6_3DSTATE_CLEAR_PARAMS(p->dev, 0, p->cp);
}
}
(num_samples > 1) ? &p->packed_sample_position_4x :
&p->packed_sample_position_1x;
- p->gen6_3DSTATE_MULTISAMPLE(&p->gpe, num_samples, packed_sample_pos,
+ p->gen6_3DSTATE_MULTISAMPLE(p->dev, num_samples, packed_sample_pos,
ilo->rasterizer->half_pixel_center, p->cp);
- p->gen7_3DSTATE_SAMPLE_MASK(&p->gpe,
+ p->gen7_3DSTATE_SAMPLE_MASK(p->dev,
(num_samples > 1) ? ilo->sample_mask : 0x1,
num_samples, p->cp);
}
}
if (count) {
- size += gen7->estimate_command_size(&p->gpe,
+ size += gen7->estimate_command_size(p->dev,
cmd, count);
}
}
int i;
for (i = 0; i < Elements(static_states); i++) {
- static_size += gen7->estimate_state_size(&p->gpe,
+ static_size += gen7->estimate_state_size(p->dev,
static_states[i].state,
static_states[i].count);
}
}
if (count) {
- size += gen7->estimate_state_size(&p->gpe,
+ size += gen7->estimate_state_size(p->dev,
ILO_GPE_GEN7_SURFACE_STATE, count);
}
for (shader_type = 0; shader_type < PIPE_SHADER_TYPES; shader_type++) {
count = ilo->samplers[shader_type].num_samplers;
if (count) {
- size += gen7->estimate_state_size(&p->gpe,
+ size += gen7->estimate_state_size(p->dev,
ILO_GPE_GEN7_SAMPLER_BORDER_COLOR_STATE, count);
- size += gen7->estimate_state_size(&p->gpe,
+ size += gen7->estimate_state_size(p->dev,
ILO_GPE_GEN7_SAMPLER_STATE, count);
}
}
if (ilo->vs && ilo->vs->shader->pcb.clip_state_size) {
const int pcb_size = ilo->vs->shader->pcb.clip_state_size;
- size += gen7->estimate_state_size(&p->gpe,
+ size += gen7->estimate_state_size(p->dev,
ILO_GPE_GEN7_PUSH_CONSTANT_BUFFER, pcb_size);
}
case ILO_3D_PIPELINE_FLUSH:
case ILO_3D_PIPELINE_WRITE_TIMESTAMP:
case ILO_3D_PIPELINE_WRITE_DEPTH_COUNT:
- size = gen7->estimate_command_size(&p->gpe,
+ size = gen7->estimate_command_size(p->dev,
ILO_GPE_GEN7_PIPE_CONTROL, 1);
break;
default:
ilo->cp = ilo_cp_create(ilo->winsys, is->dev.has_llc);
ilo->shader_cache = ilo_shader_cache_create(ilo->winsys);
if (ilo->cp)
- ilo->hw3d = ilo_3d_create(ilo->cp, ilo->dev->gen, ilo->dev->gt);
+ ilo->hw3d = ilo_3d_create(ilo->cp, ilo->dev);
if (!ilo->cp || !ilo->shader_cache || !ilo->hw3d) {
ilo_context_destroy(&ilo->base);
}
static void
-gen6_emit_STATE_BASE_ADDRESS(const struct ilo_gpe *gpe,
+gen6_emit_STATE_BASE_ADDRESS(const struct ilo_dev_info *dev,
struct intel_bo *general_state_bo,
struct intel_bo *surface_state_bo,
struct intel_bo *dynamic_state_bo,
const uint32_t cmd = ILO_GPE_CMD(0x0, 0x1, 0x01);
const uint8_t cmd_len = 10;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/* 4K-page aligned */
assert(((general_state_size | dynamic_state_size |
}
static void
-gen6_emit_STATE_SIP(const struct ilo_gpe *gpe,
+gen6_emit_STATE_SIP(const struct ilo_dev_info *dev,
uint32_t sip,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x0, 0x1, 0x02);
const uint8_t cmd_len = 2;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
ilo_cp_begin(cp, cmd_len | (cmd_len - 2));
ilo_cp_write(cp, cmd);
}
static void
-gen6_emit_3DSTATE_VF_STATISTICS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_VF_STATISTICS(const struct ilo_dev_info *dev,
bool enable,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x1, 0x0, 0x0b);
const uint8_t cmd_len = 1;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | enable);
}
static void
-gen6_emit_PIPELINE_SELECT(const struct ilo_gpe *gpe,
+gen6_emit_PIPELINE_SELECT(const struct ilo_dev_info *dev,
int pipeline,
struct ilo_cp *cp)
{
const int cmd = ILO_GPE_CMD(0x1, 0x1, 0x04);
const uint8_t cmd_len = 1;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/* 3D or media */
assert(pipeline == 0x0 || pipeline == 0x1);
}
static void
-gen6_emit_MEDIA_VFE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_MEDIA_VFE_STATE(const struct ilo_dev_info *dev,
int max_threads, int num_urb_entries,
int urb_entry_size,
struct ilo_cp *cp)
const uint8_t cmd_len = 8;
uint32_t dw2, dw4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
dw2 = (max_threads - 1) << 16 |
num_urb_entries << 8 |
}
static void
-gen6_emit_MEDIA_CURBE_LOAD(const struct ilo_gpe *gpe,
+gen6_emit_MEDIA_CURBE_LOAD(const struct ilo_dev_info *dev,
uint32_t buf, int size,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x2, 0x0, 0x01);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(buf % 32 == 0);
/* gen6_emit_push_constant_buffer() allocates buffers in 256-bit units */
}
static void
-gen6_emit_MEDIA_INTERFACE_DESCRIPTOR_LOAD(const struct ilo_gpe *gpe,
+gen6_emit_MEDIA_INTERFACE_DESCRIPTOR_LOAD(const struct ilo_dev_info *dev,
uint32_t offset, int num_ids,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x2, 0x0, 0x02);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(offset % 32 == 0);
}
static void
-gen6_emit_MEDIA_GATEWAY_STATE(const struct ilo_gpe *gpe,
+gen6_emit_MEDIA_GATEWAY_STATE(const struct ilo_dev_info *dev,
int id, int byte, int thread_count,
struct ilo_cp *cp)
{
const uint8_t cmd_len = 2;
uint32_t dw1;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
dw1 = id << 16 |
byte << 8 |
}
static void
-gen6_emit_MEDIA_STATE_FLUSH(const struct ilo_gpe *gpe,
+gen6_emit_MEDIA_STATE_FLUSH(const struct ilo_dev_info *dev,
int thread_count_water_mark,
int barrier_mask,
struct ilo_cp *cp)
const uint8_t cmd_len = 2;
uint32_t dw1;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
dw1 = thread_count_water_mark << 16 |
barrier_mask;
}
static void
-gen6_emit_MEDIA_OBJECT_WALKER(const struct ilo_gpe *gpe,
+gen6_emit_MEDIA_OBJECT_WALKER(const struct ilo_dev_info *dev,
struct ilo_cp *cp)
{
assert(!"MEDIA_OBJECT_WALKER unsupported");
}
static void
-gen6_emit_3DSTATE_BINDING_TABLE_POINTERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_BINDING_TABLE_POINTERS(const struct ilo_dev_info *dev,
uint32_t vs_binding_table,
uint32_t gs_binding_table,
uint32_t ps_binding_table,
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x01);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2) |
}
static void
-gen6_emit_3DSTATE_SAMPLER_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_SAMPLER_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t vs_sampler_state,
uint32_t gs_sampler_state,
uint32_t ps_sampler_state,
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x02);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2) |
}
static void
-gen6_emit_3DSTATE_URB(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_URB(const struct ilo_dev_info *dev,
int vs_total_size, int gs_total_size,
int vs_entry_size, int gs_entry_size,
struct ilo_cp *cp)
int vs_alloc_size, gs_alloc_size;
int vs_num_entries, gs_num_entries;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
/* in 1024-bit URB rows */
vs_alloc_size = (vs_entry_size + row_size - 1) / row_size;
}
static void
-gen6_emit_3DSTATE_VERTEX_BUFFERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_VERTEX_BUFFERS(const struct ilo_dev_info *dev,
const struct pipe_vertex_buffer *vbuffers,
const int *instance_divisors,
uint32_t vbuffer_mask,
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x08);
uint8_t cmd_len;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 82:
else
dw |= GEN6_VB0_ACCESS_VERTEXDATA;
- if (gpe->gen >= ILO_GEN(7))
+ if (dev->gen >= ILO_GEN(7))
dw |= GEN7_VB0_ADDRESS_MODIFYENABLE;
/* use null vb if there is no buffer or the stride is out of range */
}
static void
-gen6_emit_3DSTATE_VERTEX_ELEMENTS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_VERTEX_ELEMENTS(const struct ilo_dev_info *dev,
const struct pipe_vertex_element *velements,
int num_velements,
bool last_velement_edgeflag,
uint8_t cmd_len;
int format, i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 93:
}
static void
-gen6_emit_3DSTATE_INDEX_BUFFER(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_INDEX_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_index_buffer *ib,
bool enable_cut_index,
struct ilo_cp *cp)
uint32_t start_offset, end_offset;
int format;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
if (!res)
return;
}
static void
-gen6_emit_3DSTATE_VIEWPORT_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_VIEWPORT_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t clip_viewport,
uint32_t sf_viewport,
uint32_t cc_viewport,
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x0d);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2) |
}
static void
-gen6_emit_3DSTATE_CC_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_CC_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t blend_state,
uint32_t depth_stencil_state,
uint32_t color_calc_state,
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x0e);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static void
-gen6_emit_3DSTATE_SCISSOR_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_SCISSOR_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t scissor_rect,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x0f);
const uint8_t cmd_len = 2;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static void
-gen6_emit_3DSTATE_VS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_VS(const struct ilo_dev_info *dev,
const struct ilo_shader *vs,
int max_threads, int num_samplers,
struct ilo_cp *cp)
uint32_t dw2, dw4, dw5;
int vue_read_len;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
if (!vs) {
ilo_cp_begin(cp, cmd_len);
dw5 = GEN6_VS_STATISTICS_ENABLE |
GEN6_VS_ENABLE;
- if (gpe->gen >= ILO_GEN(7.5))
+ if (dev->gen >= ILO_GEN(7.5))
dw5 |= (max_threads - 1) << HSW_VS_MAX_THREADS_SHIFT;
else
dw5 |= (max_threads - 1) << GEN6_VS_MAX_THREADS_SHIFT;
}
static void
-gen6_emit_3DSTATE_GS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_GS(const struct ilo_dev_info *dev,
const struct ilo_shader *gs,
int max_threads, const struct ilo_shader *vs,
uint32_t vs_offset,
uint32_t dw1, dw2, dw4, dw5, dw6;
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
if (!gs && (!vs || !vs->stream_output)) {
dw1 = 0;
}
static void
-gen6_emit_3DSTATE_CLIP(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_CLIP(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
bool has_linear_interp,
bool enable_guardband,
const uint8_t cmd_len = 4;
uint32_t dw1, dw2, dw3;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
if (!rasterizer) {
ilo_cp_begin(cp, cmd_len);
dw1 = GEN6_CLIP_STATISTICS_ENABLE;
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 219:
*
* Fill in DW2 to DW7 of 3DSTATE_SF.
*/
void
-ilo_gpe_gen6_fill_3dstate_sf_raster(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_3dstate_sf_raster(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
int num_samples,
enum pipe_format depth_format,
float offset_const, offset_scale, offset_clamp;
int format, line_width, point_width;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(num_dwords == 6);
if (!rasterizer) {
GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
/* XXX GEN6 path seems to work fine for GEN7 */
- if (false && gpe->gen >= ILO_GEN(7)) {
+ if (false && dev->gen >= ILO_GEN(7)) {
dw[0] |= format << GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT;
/*
}
}
else {
- if (gpe->gen >= ILO_GEN(7))
+ if (dev->gen >= ILO_GEN(7))
dw[0] |= format << GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT;
if (rasterizer->offset_tri)
* Fill in DW1 and DW8 to DW19 of 3DSTATE_SF.
*/
void
-ilo_gpe_gen6_fill_3dstate_sf_sbe(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_3dstate_sf_sbe(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct ilo_shader *fs,
const struct ilo_shader *last_sh,
int vue_offset, vue_len;
int dst, max_src, i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(num_dwords == 13);
if (!fs) {
- if (gpe->gen >= ILO_GEN(7))
+ if (dev->gen >= ILO_GEN(7))
dw[0] = 1 << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT;
else
dw[0] = 1 << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT;
assert(fs->in.count <= 32);
assert(vue_offset % 2 == 0);
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
dw[0] = fs->in.count << GEN7_SBE_NUM_OUTPUTS_SHIFT |
(vue_len + 1) / 2 << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
vue_offset / 2 << GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT;
}
static void
-gen6_emit_3DSTATE_SF(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_SF(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct ilo_shader *fs,
const struct ilo_shader *last_sh,
const uint8_t cmd_len = 20;
uint32_t dw_raster[6], dw_sbe[13];
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
- ilo_gpe_gen6_fill_3dstate_sf_raster(gpe, rasterizer,
+ ilo_gpe_gen6_fill_3dstate_sf_raster(dev, rasterizer,
1, PIPE_FORMAT_NONE, false, dw_raster, Elements(dw_raster));
- ilo_gpe_gen6_fill_3dstate_sf_sbe(gpe, rasterizer,
+ ilo_gpe_gen6_fill_3dstate_sf_sbe(dev, rasterizer,
fs, last_sh, dw_sbe, Elements(dw_sbe));
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_WM(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_WM(const struct ilo_dev_info *dev,
const struct ilo_shader *fs,
int max_threads, int num_samplers,
const struct pipe_rasterizer_state *rasterizer,
const int num_samples = 1;
uint32_t dw2, dw4, dw5, dw6;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
if (!fs) {
ilo_cp_begin(cp, cmd_len);
}
static unsigned
-gen6_fill_3dstate_constant(const struct ilo_gpe *gpe,
+gen6_fill_3dstate_constant(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs, int max_read_length,
uint32_t *dw, int num_dwords)
}
static void
-gen6_emit_3DSTATE_CONSTANT_VS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_CONSTANT_VS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
const uint8_t cmd_len = 5;
uint32_t buf_dw[4], buf_enabled;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_bufs <= 4);
/*
* "The sum of all four read length fields (each incremented to
* represent the actual read length) must be less than or equal to 32"
*/
- buf_enabled = gen6_fill_3dstate_constant(gpe,
+ buf_enabled = gen6_fill_3dstate_constant(dev,
bufs, sizes, num_bufs, 32, buf_dw, Elements(buf_dw));
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_CONSTANT_GS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_CONSTANT_GS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
const uint8_t cmd_len = 5;
uint32_t buf_dw[4], buf_enabled;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_bufs <= 4);
/*
* "The sum of all four read length fields (each incremented to
* represent the actual read length) must be less than or equal to 64"
*/
- buf_enabled = gen6_fill_3dstate_constant(gpe,
+ buf_enabled = gen6_fill_3dstate_constant(dev,
bufs, sizes, num_bufs, 64, buf_dw, Elements(buf_dw));
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_CONSTANT_PS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_CONSTANT_PS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
const uint8_t cmd_len = 5;
uint32_t buf_dw[4], buf_enabled;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_bufs <= 4);
/*
* "The sum of all four read length fields (each incremented to
* represent the actual read length) must be less than or equal to 64"
*/
- buf_enabled = gen6_fill_3dstate_constant(gpe,
+ buf_enabled = gen6_fill_3dstate_constant(dev,
bufs, sizes, num_bufs, 64, buf_dw, Elements(buf_dw));
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_SAMPLE_MASK(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_SAMPLE_MASK(const struct ilo_dev_info *dev,
unsigned sample_mask,
struct ilo_cp *cp)
{
const uint8_t cmd_len = 2;
const unsigned valid_mask = 0xf;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
sample_mask &= valid_mask;
}
static void
-gen6_emit_3DSTATE_DRAWING_RECTANGLE(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_DRAWING_RECTANGLE(const struct ilo_dev_info *dev,
unsigned x, unsigned y,
unsigned width, unsigned height,
struct ilo_cp *cp)
unsigned ymax = y + height - 1;
int rect_limit;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
rect_limit = 16383;
}
else {
}
static int
-gen6_get_depth_buffer_format(const struct ilo_gpe *gpe,
+gen6_get_depth_buffer_format(const struct ilo_dev_info *dev,
enum pipe_format format,
bool hiz,
bool separate_stencil,
{
int depth_format;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
*has_depth = true;
*has_stencil = false;
}
void
-ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
const struct pipe_depth_stencil_alpha_state *dsa,
bool hiz,
struct ilo_cp *cp)
{
- const uint32_t cmd = (gpe->gen >= ILO_GEN(7)) ?
+ const uint32_t cmd = (dev->gen >= ILO_GEN(7)) ?
ILO_GPE_CMD(0x3, 0x0, 0x05) : ILO_GPE_CMD(0x3, 0x1, 0x05);
const uint8_t cmd_len = 7;
- const int max_2d_size = (gpe->gen >= ILO_GEN(7)) ? 16384 : 8192;
+ const int max_2d_size = (dev->gen >= ILO_GEN(7)) ? 16384 : 8192;
struct ilo_resource *res;
uint32_t dw1, dw3;
uint32_t slice_offset, x_offset, y_offset;
int surface_type, depth_format, width, height;
bool separate_stencil, has_depth, has_stencil;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
separate_stencil = true;
}
else {
}
if (surface) {
- depth_format = gen6_get_depth_buffer_format(gpe,
+ depth_format = gen6_get_depth_buffer_format(dev,
surface->format, hiz, separate_stencil, &has_depth, &has_stencil);
}
else {
BRW_DEPTHFORMAT_D32_FLOAT << 18;
/* Y-tiled */
- if (gpe->gen == ILO_GEN(6)) {
+ if (dev->gen == ILO_GEN(6)) {
dw1 |= 1 << 27 |
1 << 26;
}
* XXX Skip the check for gen6, which seems to be fine. We need to make
* sure that does not happen eventually.
*/
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
assert((x_offset & 7) == 0 && (y_offset & 7) == 0);
x_offset &= ~7;
y_offset &= ~7;
depth_format << 18 |
(res->bo_stride - 1);
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
if (has_depth) {
if (dsa->depth.writemask)
dw1 |= 1 << 28;
}
static void
-gen6_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
bool hiz,
struct ilo_cp *cp)
{
- ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(gpe, surface, NULL, hiz, cp);
+ ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(dev, surface, NULL, hiz, cp);
}
static void
-gen6_emit_3DSTATE_POLY_STIPPLE_OFFSET(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_POLY_STIPPLE_OFFSET(const struct ilo_dev_info *dev,
int x_offset, int y_offset,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x1, 0x06);
const uint8_t cmd_len = 2;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(x_offset >= 0 && x_offset <= 31);
assert(y_offset >= 0 && y_offset <= 31);
}
static void
-gen6_emit_3DSTATE_POLY_STIPPLE_PATTERN(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_POLY_STIPPLE_PATTERN(const struct ilo_dev_info *dev,
const struct pipe_poly_stipple *pattern,
struct ilo_cp *cp)
{
const uint8_t cmd_len = 33;
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(Elements(pattern->stipple) == 32);
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_LINE_STIPPLE(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_LINE_STIPPLE(const struct ilo_dev_info *dev,
unsigned pattern, unsigned factor,
struct ilo_cp *cp)
{
const uint8_t cmd_len = 3;
unsigned inverse;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert((pattern & 0xffff) == pattern);
assert(factor >= 1 && factor <= 256);
ilo_cp_write(cp, cmd | (cmd_len - 2));
ilo_cp_write(cp, pattern);
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
/* in U1.16 */
inverse = (unsigned) (65536.0f / factor);
ilo_cp_write(cp, inverse << 15 | factor);
}
static void
-gen6_emit_3DSTATE_AA_LINE_PARAMETERS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_AA_LINE_PARAMETERS(const struct ilo_dev_info *dev,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x1, 0x0a);
const uint8_t cmd_len = 3;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static void
-gen6_emit_3DSTATE_GS_SVB_INDEX(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_GS_SVB_INDEX(const struct ilo_dev_info *dev,
int index, unsigned svbi,
unsigned max_svbi,
bool load_vertex_count,
const uint8_t cmd_len = 4;
uint32_t dw1;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(index >= 0 && index < 4);
dw1 = index << SVB_INDEX_SHIFT;
}
static void
-gen6_emit_3DSTATE_MULTISAMPLE(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_MULTISAMPLE(const struct ilo_dev_info *dev,
int num_samples,
const uint32_t *packed_sample_pos,
bool pixel_location_center,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x1, 0x0d);
- const uint8_t cmd_len = (gpe->gen >= ILO_GEN(7)) ? 4 : 3;
+ const uint8_t cmd_len = (dev->gen >= ILO_GEN(7)) ? 4 : 3;
uint32_t dw1, dw2, dw3;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
dw1 = (pixel_location_center) ?
MS_PIXEL_LOCATION_CENTER : MS_PIXEL_LOCATION_UPPER_LEFT;
dw3 = 0;
break;
case 8:
- assert(gpe->gen >= ILO_GEN(7));
+ assert(dev->gen >= ILO_GEN(7));
dw1 |= MS_NUMSAMPLES_8;
dw2 = packed_sample_pos[0];
dw3 = packed_sample_pos[1];
ilo_cp_write(cp, cmd | (cmd_len - 2));
ilo_cp_write(cp, dw1);
ilo_cp_write(cp, dw2);
- if (gpe->gen >= ILO_GEN(7))
+ if (dev->gen >= ILO_GEN(7))
ilo_cp_write(cp, dw3);
ilo_cp_end(cp);
}
static void
-gen6_emit_3DSTATE_STENCIL_BUFFER(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_STENCIL_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp)
{
- const uint32_t cmd = (gpe->gen >= ILO_GEN(7)) ?
+ const uint32_t cmd = (dev->gen >= ILO_GEN(7)) ?
ILO_GPE_CMD(0x3, 0x0, 0x06) :
ILO_GPE_CMD(0x3, 0x1, 0x0e);
const uint8_t cmd_len = 3;
uint32_t slice_offset;
int pitch;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
if (!surface) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_HIER_DEPTH_BUFFER(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_HIER_DEPTH_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp)
{
- const uint32_t cmd = (gpe->gen >= ILO_GEN(7)) ?
+ const uint32_t cmd = (dev->gen >= ILO_GEN(7)) ?
ILO_GPE_CMD(0x3, 0x0, 0x07) :
ILO_GPE_CMD(0x3, 0x1, 0x0f);
const uint8_t cmd_len = 3;
struct ilo_resource *res;
uint32_t slice_offset;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
if (!surface) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen6_emit_3DSTATE_CLEAR_PARAMS(const struct ilo_gpe *gpe,
+gen6_emit_3DSTATE_CLEAR_PARAMS(const struct ilo_dev_info *dev,
uint32_t clear_val,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x1, 0x10);
const uint8_t cmd_len = 2;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2) |
}
static void
-gen6_emit_PIPE_CONTROL(const struct ilo_gpe *gpe,
+gen6_emit_PIPE_CONTROL(const struct ilo_dev_info *dev,
uint32_t dw1,
struct intel_bo *bo, uint32_t bo_offset,
bool write_qword,
const uint32_t read_domains = INTEL_DOMAIN_INSTRUCTION;
const uint32_t write_domain = INTEL_DOMAIN_INSTRUCTION;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
if (dw1 & PIPE_CONTROL_CS_STALL) {
/*
PIPE_CONTROL_WRITE_DEPTH_COUNT |
PIPE_CONTROL_WRITE_TIMESTAMP;
- if (gpe->gen == ILO_GEN(6))
+ if (dev->gen == ILO_GEN(6))
bit_test |= PIPE_CONTROL_INTERRUPT_ENABLE;
assert(dw1 & bit_test);
}
static void
-gen6_emit_3DPRIMITIVE(const struct ilo_gpe *gpe,
+gen6_emit_3DPRIMITIVE(const struct ilo_dev_info *dev,
const struct pipe_draw_info *info,
bool rectlist,
struct ilo_cp *cp)
GEN4_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM :
GEN4_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2) |
}
static uint32_t
-gen6_emit_INTERFACE_DESCRIPTOR_DATA(const struct ilo_gpe *gpe,
+gen6_emit_INTERFACE_DESCRIPTOR_DATA(const struct ilo_dev_info *dev,
const struct ilo_shader **cs,
uint32_t *sampler_state,
int *num_samplers,
uint32_t state_offset, *dw;
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
dw = ilo_cp_steal_ptr(cp, "INTERFACE_DESCRIPTOR_DATA",
state_len, state_align, &state_offset);
}
void
-ilo_gpe_gen6_fill_SF_VIEWPORT(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_SF_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
uint32_t *dw, int num_dwords)
{
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(num_dwords == 8 * num_viewports);
for (i = 0; i < num_viewports; i++) {
}
void
-ilo_gpe_gen6_fill_CLIP_VIEWPORT(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_CLIP_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
uint32_t *dw, int num_dwords)
{
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(num_dwords == 4 * num_viewports);
/*
*/
const float xscale = fabs(vp->scale[0]);
const float yscale = fabs(vp->scale[1]);
- const int max_extent = (gpe->gen >= ILO_GEN(7)) ? 32768 : 16384;
+ const int max_extent = (dev->gen >= ILO_GEN(7)) ? 32768 : 16384;
const int half_len = 8192 / 2;
int center_x = (int) vp->translate[0];
int center_y = (int) vp->translate[1];
}
static void
-gen6_fill_CC_VIEWPORT(const struct ilo_gpe *gpe,
+gen6_fill_CC_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
uint32_t *dw, int num_dwords)
{
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
assert(num_dwords == 2 * num_viewports);
for (i = 0; i < num_viewports; i++) {
}
static uint32_t
-gen6_emit_SF_VIEWPORT(const struct ilo_gpe *gpe,
+gen6_emit_SF_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp)
const int state_len = 8 * num_viewports;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 262:
dw = ilo_cp_steal_ptr(cp, "SF_VIEWPORT",
state_len, state_align, &state_offset);
- ilo_gpe_gen6_fill_SF_VIEWPORT(gpe,
+ ilo_gpe_gen6_fill_SF_VIEWPORT(dev,
viewports, num_viewports, dw, state_len);
return state_offset;
}
static uint32_t
-gen6_emit_CLIP_VIEWPORT(const struct ilo_gpe *gpe,
+gen6_emit_CLIP_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp)
const int state_len = 4 * num_viewports;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 193:
dw = ilo_cp_steal_ptr(cp, "CLIP_VIEWPORT",
state_len, state_align, &state_offset);
- ilo_gpe_gen6_fill_CLIP_VIEWPORT(gpe,
+ ilo_gpe_gen6_fill_CLIP_VIEWPORT(dev,
viewports, num_viewports, dw, state_len);
return state_offset;
}
static uint32_t
-gen6_emit_CC_VIEWPORT(const struct ilo_gpe *gpe,
+gen6_emit_CC_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp)
const int state_len = 2 * num_viewports;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 385:
dw = ilo_cp_steal_ptr(cp, "CC_VIEWPORT",
state_len, state_align, &state_offset);
- gen6_fill_CC_VIEWPORT(gpe, viewports, num_viewports, dw, state_len);
+ gen6_fill_CC_VIEWPORT(dev, viewports, num_viewports, dw, state_len);
return state_offset;
}
static uint32_t
-gen6_emit_COLOR_CALC_STATE(const struct ilo_gpe *gpe,
+gen6_emit_COLOR_CALC_STATE(const struct ilo_dev_info *dev,
const struct pipe_stencil_ref *stencil_ref,
float alpha_ref,
const struct pipe_blend_color *blend_color,
const int state_len = 6;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
dw = ilo_cp_steal_ptr(cp, "COLOR_CALC_STATE",
state_len, state_align, &state_offset);
}
static uint32_t
-gen6_emit_BLEND_STATE(const struct ilo_gpe *gpe,
+gen6_emit_BLEND_STATE(const struct ilo_dev_info *dev,
const struct pipe_blend_state *blend,
const struct pipe_framebuffer_state *framebuffer,
const struct pipe_alpha_state *alpha,
uint32_t state_offset, *dw;
int num_targets, i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 376:
dw[1] |= 1 << 30;
}
- if (gpe->gen >= ILO_GEN(7))
+ if (dev->gen >= ILO_GEN(7))
dw[1] |= 1 << 29;
}
}
static uint32_t
-gen6_emit_DEPTH_STENCIL_STATE(const struct ilo_gpe *gpe,
+gen6_emit_DEPTH_STENCIL_STATE(const struct ilo_dev_info *dev,
const struct pipe_depth_stencil_alpha_state *dsa,
struct ilo_cp *cp)
{
const int state_len = 3;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
dw = ilo_cp_steal_ptr(cp, "DEPTH_STENCIL_STATE",
state_len, state_align, &state_offset);
}
static uint32_t
-gen6_emit_SCISSOR_RECT(const struct ilo_gpe *gpe,
+gen6_emit_SCISSOR_RECT(const struct ilo_dev_info *dev,
const struct pipe_scissor_state *scissors,
int num_scissors,
struct ilo_cp *cp)
uint32_t state_offset, *dw;
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 263:
}
static uint32_t
-gen6_emit_BINDING_TABLE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_BINDING_TABLE_STATE(const struct ilo_dev_info *dev,
uint32_t *surface_states,
int num_surface_states,
struct ilo_cp *cp)
const int state_len = num_surface_states;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 4 part 1, page 69:
}
static void
-gen6_fill_null_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_fill_null_SURFACE_STATE(const struct ilo_dev_info *dev,
unsigned width, unsigned height,
unsigned depth, unsigned lod,
uint32_t *dw, int num_dwords)
{
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_dwords == 6);
/*
}
static void
-gen6_fill_buffer_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_fill_buffer_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct ilo_resource *res,
unsigned offset, unsigned size,
unsigned struct_size,
int width, height, depth, pitch;
int surface_format, num_entries;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_dwords == 6);
/*
}
static void
-gen6_fill_normal_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_fill_normal_SURFACE_STATE(const struct ilo_dev_info *dev,
struct ilo_resource *res,
enum pipe_format format,
unsigned first_level, unsigned num_levels,
int width, height, depth, pitch, lod;
unsigned layer_offset, x_offset, y_offset;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_dwords == 6);
surface_type = ilo_gpe_gen6_translate_texture(res->base.target);
}
static uint32_t
-gen6_emit_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_SURFACE_STATE(const struct ilo_dev_info *dev,
struct intel_bo *bo, bool for_render,
const uint32_t *dw, int num_dwords,
struct ilo_cp *cp)
uint32_t state_offset;
uint32_t read_domains, write_domain;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(num_dwords == state_len);
if (for_render) {
}
static uint32_t
-gen6_emit_surf_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_surf_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp)
{
struct intel_bo *bo;
uint32_t dw[6];
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
if (surface && surface->texture) {
struct ilo_resource *res = ilo_resource(surface->texture);
* classic i965 sets render_cache_rw for constant buffers and sol
* surfaces but not render buffers. Why?
*/
- gen6_fill_normal_SURFACE_STATE(gpe, res, surface->format,
+ gen6_fill_normal_SURFACE_STATE(dev, res, surface->format,
surface->u.tex.level, 1,
surface->u.tex.first_layer,
surface->u.tex.last_layer - surface->u.tex.first_layer + 1,
}
else {
bo = NULL;
- gen6_fill_null_SURFACE_STATE(gpe,
+ gen6_fill_null_SURFACE_STATE(dev,
surface->width, surface->height, 1, 0, dw, Elements(dw));
}
- return gen6_emit_SURFACE_STATE(gpe, bo, true, dw, Elements(dw), cp);
+ return gen6_emit_SURFACE_STATE(dev, bo, true, dw, Elements(dw), cp);
}
static uint32_t
-gen6_emit_view_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_view_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_sampler_view *view,
struct ilo_cp *cp)
{
struct ilo_resource *res = ilo_resource(view->texture);
uint32_t dw[6];
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
- gen6_fill_normal_SURFACE_STATE(gpe, res, view->format,
+ gen6_fill_normal_SURFACE_STATE(dev, res, view->format,
view->u.tex.first_level,
view->u.tex.last_level - view->u.tex.first_level + 1,
view->u.tex.first_layer,
view->u.tex.last_layer - view->u.tex.first_layer + 1,
false, false, dw, Elements(dw));
- return gen6_emit_SURFACE_STATE(gpe, res->bo, false, dw, Elements(dw), cp);
+ return gen6_emit_SURFACE_STATE(dev, res->bo, false, dw, Elements(dw), cp);
}
static uint32_t
-gen6_emit_cbuf_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_cbuf_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_constant_buffer *cbuf,
struct ilo_cp *cp)
{
struct ilo_resource *res = ilo_resource(cbuf->buffer);
uint32_t dw[6];
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
- gen6_fill_buffer_SURFACE_STATE(gpe, res,
+ gen6_fill_buffer_SURFACE_STATE(dev, res,
cbuf->buffer_offset, cbuf->buffer_size,
util_format_get_blocksize(elem_format), elem_format,
false, false, dw, Elements(dw));
- return gen6_emit_SURFACE_STATE(gpe, res->bo, false, dw, Elements(dw), cp);
+ return gen6_emit_SURFACE_STATE(dev, res->bo, false, dw, Elements(dw), cp);
}
static uint32_t
-gen6_emit_so_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen6_emit_so_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_stream_output_target *so,
const struct pipe_stream_output_info *so_info,
int so_index,
enum pipe_format elem_format;
uint32_t dw[6];
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
bo_offset = so->buffer_offset + so_info->output[so_index].dst_offset * 4;
struct_size = so_info->stride[so_info->output[so_index].output_buffer] * 4;
break;
}
- gen6_fill_buffer_SURFACE_STATE(gpe, res, bo_offset, so->buffer_size,
+ gen6_fill_buffer_SURFACE_STATE(dev, res, bo_offset, so->buffer_size,
struct_size, elem_format, false, true, dw, Elements(dw));
- return gen6_emit_SURFACE_STATE(gpe, res->bo, false, dw, Elements(dw), cp);
+ return gen6_emit_SURFACE_STATE(dev, res->bo, false, dw, Elements(dw), cp);
}
static uint32_t
-gen6_emit_SAMPLER_STATE(const struct ilo_gpe *gpe,
+gen6_emit_SAMPLER_STATE(const struct ilo_dev_info *dev,
const struct pipe_sampler_state **samplers,
const struct pipe_sampler_view **sampler_views,
const uint32_t *sampler_border_colors,
uint32_t state_offset, *dw;
int i;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
/*
* From the Sandy Bridge PRM, volume 4 part 1, page 101:
* As a way to work around that, we set Base to view->u.tex.first_level
* on GEN6.
*/
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
const float scale = 256.0f;
/* [-16.0, 16.0) in S4.8 */
assert(mip_filter == BRW_MIPFILTER_NONE);
}
- if (gpe->gen >= ILO_GEN(7)) {
+ if (dev->gen >= ILO_GEN(7)) {
dw[0] = 1 << 28 |
base_level << 22 |
mip_filter << 20 |
}
static uint32_t
-gen6_emit_SAMPLER_BORDER_COLOR_STATE(const struct ilo_gpe *gpe,
+gen6_emit_SAMPLER_BORDER_COLOR_STATE(const struct ilo_dev_info *dev,
const union pipe_color_union *color,
struct ilo_cp *cp)
{
color->f[0], color->f[1], color->f[2], color->f[3],
};
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
dw = ilo_cp_steal_ptr(cp, "SAMPLER_BORDER_COLOR_STATE",
state_len, state_align, &state_offset);
}
static uint32_t
-gen6_emit_push_constant_buffer(const struct ilo_gpe *gpe,
+gen6_emit_push_constant_buffer(const struct ilo_dev_info *dev,
int size, void **pcb,
struct ilo_cp *cp)
{
uint32_t state_offset;
char *buf;
- ILO_GPE_VALID_GEN(gpe, 6, 7);
+ ILO_GPE_VALID_GEN(dev, 6, 7);
buf = ilo_cp_steal_ptr(cp, "PUSH_CONSTANT_BUFFER",
state_len, state_align, &state_offset);
}
static int
-gen6_estimate_command_size(const struct ilo_gpe *gpe,
+gen6_estimate_command_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen6_command cmd,
int arg)
{
const int body = gen6_command_size_table[arg].body;
const int count = arg;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(cmd < ILO_GPE_GEN6_COMMAND_COUNT);
return (likely(count)) ? header + body * count : 0;
}
static int
-gen6_estimate_state_size(const struct ilo_gpe *gpe,
+gen6_estimate_state_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen6_state state,
int arg)
{
const int count = arg;
int estimate;
- ILO_GPE_VALID_GEN(gpe, 6, 6);
+ ILO_GPE_VALID_GEN(dev, 6, 6);
assert(state < ILO_GPE_GEN6_STATE_COUNT);
if (likely(count)) {
#include "ilo_common.h"
-#define ILO_GPE_VALID_GEN(gpe, min_gen, max_gen) \
- assert((gpe)->gen >= ILO_GEN(min_gen) && (gpe)->gen <= ILO_GEN(max_gen))
+#define ILO_GPE_VALID_GEN(dev, min_gen, max_gen) \
+ assert((dev)->gen >= ILO_GEN(min_gen) && (dev)->gen <= ILO_GEN(max_gen))
#define ILO_GPE_CMD(pipeline, op, subop) \
(0x3 << 29 | (pipeline) << 27 | (op) << 24 | (subop) << 16)
-struct ilo_gpe {
- int gen;
- int gt;
-};
-
/**
* Commands that GEN6 GPE could emit.
*/
struct ilo_shader;
typedef void
-(*ilo_gpe_gen6_STATE_BASE_ADDRESS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_STATE_BASE_ADDRESS)(const struct ilo_dev_info *dev,
struct intel_bo *general_state_bo,
struct intel_bo *surface_state_bo,
struct intel_bo *dynamic_state_bo,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_STATE_SIP)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_STATE_SIP)(const struct ilo_dev_info *dev,
uint32_t sip,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_VF_STATISTICS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_VF_STATISTICS)(const struct ilo_dev_info *dev,
bool enable,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_PIPELINE_SELECT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_PIPELINE_SELECT)(const struct ilo_dev_info *dev,
int pipeline,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_MEDIA_VFE_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_MEDIA_VFE_STATE)(const struct ilo_dev_info *dev,
int max_threads, int num_urb_entries,
int urb_entry_size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_MEDIA_CURBE_LOAD)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_MEDIA_CURBE_LOAD)(const struct ilo_dev_info *dev,
uint32_t buf, int size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_MEDIA_INTERFACE_DESCRIPTOR_LOAD)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_MEDIA_INTERFACE_DESCRIPTOR_LOAD)(const struct ilo_dev_info *dev,
uint32_t offset, int num_ids,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_MEDIA_GATEWAY_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_MEDIA_GATEWAY_STATE)(const struct ilo_dev_info *dev,
int id, int byte, int thread_count,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_MEDIA_STATE_FLUSH)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_MEDIA_STATE_FLUSH)(const struct ilo_dev_info *dev,
int thread_count_water_mark,
int barrier_mask,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_MEDIA_OBJECT_WALKER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_MEDIA_OBJECT_WALKER)(const struct ilo_dev_info *dev,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_BINDING_TABLE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_BINDING_TABLE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t vs_binding_table,
uint32_t gs_binding_table,
uint32_t ps_binding_table,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_SAMPLER_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_SAMPLER_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t vs_sampler_state,
uint32_t gs_sampler_state,
uint32_t ps_sampler_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_URB)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_URB)(const struct ilo_dev_info *dev,
int vs_total_size, int gs_total_size,
int vs_entry_size, int gs_entry_size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_VERTEX_BUFFERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_VERTEX_BUFFERS)(const struct ilo_dev_info *dev,
const struct pipe_vertex_buffer *vbuffers,
const int *instance_divisors,
uint32_t vbuffer_mask,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_VERTEX_ELEMENTS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_VERTEX_ELEMENTS)(const struct ilo_dev_info *dev,
const struct pipe_vertex_element *velements,
int num_elements,
bool last_velement_edgeflag,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_INDEX_BUFFER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_INDEX_BUFFER)(const struct ilo_dev_info *dev,
const struct pipe_index_buffer *ib,
bool enable_cut_index,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_VIEWPORT_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_VIEWPORT_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t clip_viewport,
uint32_t sf_viewport,
uint32_t cc_viewport,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_CC_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_CC_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t blend_state,
uint32_t depth_stencil_state,
uint32_t color_calc_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_SCISSOR_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_SCISSOR_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t scissor_rect,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_VS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_VS)(const struct ilo_dev_info *dev,
const struct ilo_shader *vs,
int max_threads, int num_samplers,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_GS)(const struct ilo_dev_info *dev,
const struct ilo_shader *gs,
int max_threads, const struct ilo_shader *vs,
uint32_t vs_offset,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_CLIP)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_CLIP)(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
bool has_linear_interp,
bool enable_guardband,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_SF)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_SF)(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct ilo_shader *fs,
const struct ilo_shader *last_sh,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_WM)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_WM)(const struct ilo_dev_info *dev,
const struct ilo_shader *fs,
int max_threads, int num_samplers,
const struct pipe_rasterizer_state *rasterizer,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_CONSTANT_VS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_CONSTANT_VS)(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_CONSTANT_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_CONSTANT_GS)(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_CONSTANT_PS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_CONSTANT_PS)(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_SAMPLE_MASK)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_SAMPLE_MASK)(const struct ilo_dev_info *dev,
unsigned sample_mask,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_DRAWING_RECTANGLE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_DRAWING_RECTANGLE)(const struct ilo_dev_info *dev,
unsigned x, unsigned y,
unsigned width, unsigned height,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_DEPTH_BUFFER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_DEPTH_BUFFER)(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
bool hiz,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_POLY_STIPPLE_OFFSET)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_POLY_STIPPLE_OFFSET)(const struct ilo_dev_info *dev,
int x_offset, int y_offset,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_POLY_STIPPLE_PATTERN)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_POLY_STIPPLE_PATTERN)(const struct ilo_dev_info *dev,
const struct pipe_poly_stipple *pattern,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_LINE_STIPPLE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_LINE_STIPPLE)(const struct ilo_dev_info *dev,
unsigned pattern, unsigned factor,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_AA_LINE_PARAMETERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_AA_LINE_PARAMETERS)(const struct ilo_dev_info *dev,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_GS_SVB_INDEX)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_GS_SVB_INDEX)(const struct ilo_dev_info *dev,
int index, unsigned svbi,
unsigned max_svbi,
bool load_vertex_count,
typedef void
-(*ilo_gpe_gen6_3DSTATE_MULTISAMPLE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_MULTISAMPLE)(const struct ilo_dev_info *dev,
int num_samples,
const uint32_t *packed_sample_pos,
bool pixel_location_center,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_STENCIL_BUFFER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_STENCIL_BUFFER)(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_HIER_DEPTH_BUFFER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_HIER_DEPTH_BUFFER)(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DSTATE_CLEAR_PARAMS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DSTATE_CLEAR_PARAMS)(const struct ilo_dev_info *dev,
uint32_t clear_val,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_PIPE_CONTROL)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_PIPE_CONTROL)(const struct ilo_dev_info *dev,
uint32_t dw1,
struct intel_bo *bo, uint32_t bo_offset,
bool write_qword,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen6_3DPRIMITIVE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_3DPRIMITIVE)(const struct ilo_dev_info *dev,
const struct pipe_draw_info *info,
bool rectlist,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_INTERFACE_DESCRIPTOR_DATA)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_INTERFACE_DESCRIPTOR_DATA)(const struct ilo_dev_info *dev,
const struct ilo_shader **cs,
uint32_t *sampler_state,
int *num_samplers,
int num_ids,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_SF_VIEWPORT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_SF_VIEWPORT)(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_CLIP_VIEWPORT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_CLIP_VIEWPORT)(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_CC_VIEWPORT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_CC_VIEWPORT)(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_COLOR_CALC_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_COLOR_CALC_STATE)(const struct ilo_dev_info *dev,
const struct pipe_stencil_ref *stencil_ref,
float alpha_ref,
const struct pipe_blend_color *blend_color,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_BLEND_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_BLEND_STATE)(const struct ilo_dev_info *dev,
const struct pipe_blend_state *blend,
const struct pipe_framebuffer_state *framebuffer,
const struct pipe_alpha_state *alpha,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_DEPTH_STENCIL_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_DEPTH_STENCIL_STATE)(const struct ilo_dev_info *dev,
const struct pipe_depth_stencil_alpha_state *dsa,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_SCISSOR_RECT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_SCISSOR_RECT)(const struct ilo_dev_info *dev,
const struct pipe_scissor_state *scissors,
int num_scissors,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_BINDING_TABLE_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_BINDING_TABLE_STATE)(const struct ilo_dev_info *dev,
uint32_t *surface_states,
int num_surface_states,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_surf_SURFACE_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_surf_SURFACE_STATE)(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_view_SURFACE_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_view_SURFACE_STATE)(const struct ilo_dev_info *dev,
const struct pipe_sampler_view *view,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_cbuf_SURFACE_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_cbuf_SURFACE_STATE)(const struct ilo_dev_info *dev,
const struct pipe_constant_buffer *cbuf,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_so_SURFACE_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_so_SURFACE_STATE)(const struct ilo_dev_info *dev,
const struct pipe_stream_output_target *so,
const struct pipe_stream_output_info *so_info,
int so_index,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_SAMPLER_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_SAMPLER_STATE)(const struct ilo_dev_info *dev,
const struct pipe_sampler_state **samplers,
const struct pipe_sampler_view **sampler_views,
const uint32_t *sampler_border_colors,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_SAMPLER_BORDER_COLOR_STATE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_SAMPLER_BORDER_COLOR_STATE)(const struct ilo_dev_info *dev,
const union pipe_color_union *color,
struct ilo_cp *cp);
typedef uint32_t
-(*ilo_gpe_gen6_push_constant_buffer)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen6_push_constant_buffer)(const struct ilo_dev_info *dev,
int size, void **pcb,
struct ilo_cp *cp);
* between states.
*/
struct ilo_gpe_gen6 {
- int (*estimate_command_size)(const struct ilo_gpe *gpe,
+ int (*estimate_command_size)(const struct ilo_dev_info *dev,
enum ilo_gpe_gen6_command cmd,
int arg);
- int (*estimate_state_size)(const struct ilo_gpe *gpe,
+ int (*estimate_state_size)(const struct ilo_dev_info *dev,
enum ilo_gpe_gen6_state state,
int arg);
ilo_gpe_gen6_translate_texture(enum pipe_texture_target target);
void
-ilo_gpe_gen6_fill_3dstate_sf_raster(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_3dstate_sf_raster(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
int num_samples,
enum pipe_format depth_format,
uint32_t *dw, int num_dwords);
void
-ilo_gpe_gen6_fill_3dstate_sf_sbe(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_3dstate_sf_sbe(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct ilo_shader *fs,
const struct ilo_shader *last_sh,
uint32_t *dw, int num_dwords);
void
-ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
const struct pipe_depth_stencil_alpha_state *dsa,
bool hiz,
struct ilo_cp *cp);
void
-ilo_gpe_gen6_fill_SF_VIEWPORT(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_SF_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
uint32_t *dw, int num_dwords);
void
-ilo_gpe_gen6_fill_CLIP_VIEWPORT(const struct ilo_gpe *gpe,
+ilo_gpe_gen6_fill_CLIP_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
uint32_t *dw, int num_dwords);
#include "ilo_gpe_gen7.h"
static void
-gen7_emit_GPGPU_WALKER(const struct ilo_gpe *gpe,
+gen7_emit_GPGPU_WALKER(const struct ilo_dev_info *dev,
struct ilo_cp *cp)
{
assert(!"GPGPU_WALKER unsupported");
}
static void
-gen7_emit_3DSTATE_CLEAR_PARAMS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CLEAR_PARAMS(const struct ilo_dev_info *dev,
uint32_t clear_val,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x04);
const uint8_t cmd_len = 3;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static void
-gen7_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_DEPTH_BUFFER(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
const struct pipe_depth_stencil_alpha_state *dsa,
bool hiz,
struct ilo_cp *cp)
{
- ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(gpe, surface, dsa, hiz, cp);
+ ilo_gpe_gen6_emit_3DSTATE_DEPTH_BUFFER(dev, surface, dsa, hiz, cp);
}
static void
-gen7_emit_3dstate_pointer(const struct ilo_gpe *gpe,
+gen7_emit_3dstate_pointer(const struct ilo_dev_info *dev,
int subop, uint32_t pointer,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, subop);
const uint8_t cmd_len = 2;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static void
-gen7_emit_3DSTATE_CC_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CC_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t color_calc_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x0e, color_calc_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x0e, color_calc_state, cp);
}
static void
-gen7_emit_3DSTATE_GS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_GS(const struct ilo_dev_info *dev,
const struct ilo_shader *gs,
int max_threads, int num_samplers,
struct ilo_cp *cp)
const uint8_t cmd_len = 7;
uint32_t dw2, dw4, dw5;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
if (!gs) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen7_emit_3DSTATE_SF(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SF(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct pipe_surface *zs_surf,
struct ilo_cp *cp)
const uint8_t cmd_len = 7;
uint32_t dw[6];
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
- ilo_gpe_gen6_fill_3dstate_sf_raster(gpe, rasterizer,
+ ilo_gpe_gen6_fill_3dstate_sf_raster(dev, rasterizer,
1, (zs_surf) ? zs_surf->format : PIPE_FORMAT_NONE, true,
dw, Elements(dw));
}
static void
-gen7_emit_3DSTATE_WM(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_WM(const struct ilo_dev_info *dev,
const struct ilo_shader *fs,
const struct pipe_rasterizer_state *rasterizer,
bool cc_may_kill,
const int num_samples = 1;
uint32_t dw1, dw2;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
dw1 = GEN7_WM_STATISTICS_ENABLE |
GEN7_WM_LINE_AA_WIDTH_2_0;
}
static void
-gen7_emit_3dstate_constant(const struct ilo_gpe *gpe,
+gen7_emit_3dstate_constant(const struct ilo_dev_info *dev,
int subop,
const uint32_t *bufs, const int *sizes,
int num_bufs,
uint32_t dw[6];
int total_read_length, i;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
/* VS, HS, DS, GS, and PS variants */
assert(subop >= 0x15 && subop <= 0x1a && subop != 0x18);
}
static void
-gen7_emit_3DSTATE_CONSTANT_VS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CONSTANT_VS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_constant(gpe, 0x15, bufs, sizes, num_bufs, cp);
+ gen7_emit_3dstate_constant(dev, 0x15, bufs, sizes, num_bufs, cp);
}
static void
-gen7_emit_3DSTATE_CONSTANT_GS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CONSTANT_GS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_constant(gpe, 0x16, bufs, sizes, num_bufs, cp);
+ gen7_emit_3dstate_constant(dev, 0x16, bufs, sizes, num_bufs, cp);
}
static void
-gen7_emit_3DSTATE_CONSTANT_PS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CONSTANT_PS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_constant(gpe, 0x17, bufs, sizes, num_bufs, cp);
+ gen7_emit_3dstate_constant(dev, 0x17, bufs, sizes, num_bufs, cp);
}
static void
-gen7_emit_3DSTATE_SAMPLE_MASK(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SAMPLE_MASK(const struct ilo_dev_info *dev,
unsigned sample_mask,
int num_samples,
struct ilo_cp *cp)
const uint8_t cmd_len = 2;
const unsigned valid_mask = ((1 << num_samples) - 1) | 0x1;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 294:
}
static void
-gen7_emit_3DSTATE_CONSTANT_HS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CONSTANT_HS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_constant(gpe, 0x19, bufs, sizes, num_bufs, cp);
+ gen7_emit_3dstate_constant(dev, 0x19, bufs, sizes, num_bufs, cp);
}
static void
-gen7_emit_3DSTATE_CONSTANT_DS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_CONSTANT_DS(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_constant(gpe, 0x1a, bufs, sizes, num_bufs, cp);
+ gen7_emit_3dstate_constant(dev, 0x1a, bufs, sizes, num_bufs, cp);
}
static void
-gen7_emit_3DSTATE_HS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_HS(const struct ilo_dev_info *dev,
const struct ilo_shader *hs,
int max_threads, int num_samplers,
struct ilo_cp *cp)
const uint8_t cmd_len = 7;
uint32_t dw1, dw2, dw5;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
if (!hs) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen7_emit_3DSTATE_TE(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_TE(const struct ilo_dev_info *dev,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x1c);
const uint8_t cmd_len = 4;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static void
-gen7_emit_3DSTATE_DS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_DS(const struct ilo_dev_info *dev,
const struct ilo_shader *ds,
int max_threads, int num_samplers,
struct ilo_cp *cp)
const uint8_t cmd_len = 6;
uint32_t dw2, dw4, dw5;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
if (!ds) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen7_emit_3DSTATE_STREAMOUT(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_STREAMOUT(const struct ilo_dev_info *dev,
bool enable,
bool rasterizer_discard,
bool flatshade_first,
uint32_t dw1, dw2;
int i;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
if (!enable) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen7_emit_3DSTATE_SBE(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SBE(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct ilo_shader *fs,
const struct ilo_shader *last_sh,
const uint8_t cmd_len = 14;
uint32_t dw[13];
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
- ilo_gpe_gen6_fill_3dstate_sf_sbe(gpe, rasterizer,
+ ilo_gpe_gen6_fill_3dstate_sf_sbe(dev, rasterizer,
fs, last_sh, dw, Elements(dw));
ilo_cp_begin(cp, cmd_len);
}
static void
-gen7_emit_3DSTATE_PS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_PS(const struct ilo_dev_info *dev,
const struct ilo_shader *fs,
int max_threads, int num_samplers,
bool dual_blend,
const uint8_t cmd_len = 8;
uint32_t dw2, dw4, dw5;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 286:
}
static void
-gen7_emit_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP(const struct ilo_dev_info *dev,
uint32_t sf_clip_viewport,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x21, sf_clip_viewport, cp);
+ gen7_emit_3dstate_pointer(dev, 0x21, sf_clip_viewport, cp);
}
static void
-gen7_emit_3DSTATE_VIEWPORT_STATE_POINTERS_CC(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_VIEWPORT_STATE_POINTERS_CC(const struct ilo_dev_info *dev,
uint32_t cc_viewport,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x23, cc_viewport, cp);
+ gen7_emit_3dstate_pointer(dev, 0x23, cc_viewport, cp);
}
static void
-gen7_emit_3DSTATE_BLEND_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_BLEND_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t blend_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x24, blend_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x24, blend_state, cp);
}
static void
-gen7_emit_3DSTATE_DEPTH_STENCIL_STATE_POINTERS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_DEPTH_STENCIL_STATE_POINTERS(const struct ilo_dev_info *dev,
uint32_t depth_stencil_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x25, depth_stencil_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x25, depth_stencil_state, cp);
}
static void
-gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_VS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_VS(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x26, binding_table, cp);
+ gen7_emit_3dstate_pointer(dev, 0x26, binding_table, cp);
}
static void
-gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_HS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_HS(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x27, binding_table, cp);
+ gen7_emit_3dstate_pointer(dev, 0x27, binding_table, cp);
}
static void
-gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_DS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_DS(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x28, binding_table, cp);
+ gen7_emit_3dstate_pointer(dev, 0x28, binding_table, cp);
}
static void
-gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_GS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_GS(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x29, binding_table, cp);
+ gen7_emit_3dstate_pointer(dev, 0x29, binding_table, cp);
}
static void
-gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_PS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_BINDING_TABLE_POINTERS_PS(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x2a, binding_table, cp);
+ gen7_emit_3dstate_pointer(dev, 0x2a, binding_table, cp);
}
static void
-gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_VS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_VS(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x2b, sampler_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x2b, sampler_state, cp);
}
static void
-gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_HS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_HS(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x2c, sampler_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x2c, sampler_state, cp);
}
static void
-gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_DS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_DS(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x2d, sampler_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x2d, sampler_state, cp);
}
static void
-gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_GS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_GS(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x2e, sampler_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x2e, sampler_state, cp);
}
static void
-gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_PS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SAMPLER_STATE_POINTERS_PS(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_pointer(gpe, 0x2f, sampler_state, cp);
+ gen7_emit_3dstate_pointer(dev, 0x2f, sampler_state, cp);
}
static void
-gen7_emit_3dstate_urb(const struct ilo_gpe *gpe,
+gen7_emit_3dstate_urb(const struct ilo_dev_info *dev,
int subop, int offset, int size,
int entry_size,
struct ilo_cp *cp)
const int row_size = 64; /* 512 bits */
int alloc_size, num_entries;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
/* VS, HS, DS, and GS variants */
assert(subop >= 0x30 && subop <= 0x33);
switch (subop) {
case 0x30: /* 3DSTATE_URB_VS */
assert(num_entries >= 32);
- if (gpe->gt == 2 && num_entries > 704)
+ if (dev->gt == 2 && num_entries > 704)
num_entries = 704;
- else if (gpe->gt == 1 && num_entries > 512)
+ else if (dev->gt == 1 && num_entries > 512)
num_entries = 512;
break;
case 0x32: /* 3DSTATE_URB_DS */
}
static void
-gen7_emit_3DSTATE_URB_VS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_URB_VS(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_urb(gpe, 0x30, offset, size, entry_size, cp);
+ gen7_emit_3dstate_urb(dev, 0x30, offset, size, entry_size, cp);
}
static void
-gen7_emit_3DSTATE_URB_HS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_URB_HS(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_urb(gpe, 0x31, offset, size, entry_size, cp);
+ gen7_emit_3dstate_urb(dev, 0x31, offset, size, entry_size, cp);
}
static void
-gen7_emit_3DSTATE_URB_DS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_URB_DS(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_urb(gpe, 0x32, offset, size, entry_size, cp);
+ gen7_emit_3dstate_urb(dev, 0x32, offset, size, entry_size, cp);
}
static void
-gen7_emit_3DSTATE_URB_GS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_URB_GS(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_urb(gpe, 0x33, offset, size, entry_size, cp);
+ gen7_emit_3dstate_urb(dev, 0x33, offset, size, entry_size, cp);
}
static void
-gen7_emit_3dstate_push_constant_alloc(const struct ilo_gpe *gpe,
+gen7_emit_3dstate_push_constant_alloc(const struct ilo_dev_info *dev,
int subop, int offset, int size,
struct ilo_cp *cp)
{
const uint8_t cmd_len = 2;
int end;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
/* VS, HS, DS, GS, and PS variants */
assert(subop >= 0x12 && subop <= 0x16);
}
static void
-gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_VS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_VS(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_push_constant_alloc(gpe, 0x12, offset, size, cp);
+ gen7_emit_3dstate_push_constant_alloc(dev, 0x12, offset, size, cp);
}
static void
-gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_HS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_HS(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_push_constant_alloc(gpe, 0x13, offset, size, cp);
+ gen7_emit_3dstate_push_constant_alloc(dev, 0x13, offset, size, cp);
}
static void
-gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_DS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_DS(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_push_constant_alloc(gpe, 0x14, offset, size, cp);
+ gen7_emit_3dstate_push_constant_alloc(dev, 0x14, offset, size, cp);
}
static void
-gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_GS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_GS(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_push_constant_alloc(gpe, 0x15, offset, size, cp);
+ gen7_emit_3dstate_push_constant_alloc(dev, 0x15, offset, size, cp);
}
static void
-gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_PS(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_PUSH_CONSTANT_ALLOC_PS(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp)
{
- gen7_emit_3dstate_push_constant_alloc(gpe, 0x16, offset, size, cp);
+ gen7_emit_3dstate_push_constant_alloc(dev, 0x16, offset, size, cp);
}
static void
-gen7_emit_3DSTATE_SO_DECL_LIST(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SO_DECL_LIST(const struct ilo_dev_info *dev,
struct ilo_cp *cp)
{
const uint32_t cmd = ILO_GPE_CMD(0x3, 0x1, 0x17);
uint16_t decls[128];
int num_decls, i;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
memset(decls, 0, sizeof(decls));
num_decls = 0;
}
static void
-gen7_emit_3DSTATE_SO_BUFFER(const struct ilo_gpe *gpe,
+gen7_emit_3DSTATE_SO_BUFFER(const struct ilo_dev_info *dev,
int index,
bool enable,
struct ilo_cp *cp)
const uint8_t cmd_len = 4;
int start, end;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
if (!enable) {
ilo_cp_begin(cp, cmd_len);
}
static void
-gen7_emit_3DPRIMITIVE(const struct ilo_gpe *gpe,
+gen7_emit_3DPRIMITIVE(const struct ilo_dev_info *dev,
const struct pipe_draw_info *info,
bool rectlist,
struct ilo_cp *cp)
GEN7_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM :
GEN7_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
}
static uint32_t
-gen7_emit_SF_CLIP_VIEWPORT(const struct ilo_gpe *gpe,
+gen7_emit_SF_CLIP_VIEWPORT(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp)
uint32_t state_offset, *dw;
int i;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
/*
* From the Ivy Bridge PRM, volume 2 part 1, page 270:
for (i = 0; i < num_viewports; i++) {
const struct pipe_viewport_state *vp = &viewports[i];
- ilo_gpe_gen6_fill_SF_VIEWPORT(gpe, vp, 1, dw, 8);
+ ilo_gpe_gen6_fill_SF_VIEWPORT(dev, vp, 1, dw, 8);
- ilo_gpe_gen6_fill_CLIP_VIEWPORT(gpe, vp, 1, dw + 8, 4);
+ ilo_gpe_gen6_fill_CLIP_VIEWPORT(dev, vp, 1, dw + 8, 4);
dw[12] = 0;
dw[13] = 0;
}
static void
-gen7_fill_null_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_fill_null_SURFACE_STATE(const struct ilo_dev_info *dev,
unsigned width, unsigned height,
unsigned depth, unsigned lod,
uint32_t *dw, int num_dwords)
{
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
assert(num_dwords == 8);
/*
}
static void
-gen7_fill_buffer_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_fill_buffer_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct ilo_resource *res,
unsigned offset, unsigned size,
unsigned struct_size,
int width, height, depth, pitch;
int surface_type, surface_format, num_entries;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
assert(num_dwords == 8);
surface_type = (structured) ? 5 : BRW_SURFACE_BUFFER;
}
static void
-gen7_fill_normal_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_fill_normal_SURFACE_STATE(const struct ilo_dev_info *dev,
struct ilo_resource *res,
enum pipe_format format,
unsigned first_level, unsigned num_levels,
int width, height, depth, pitch, lod;
unsigned layer_offset, x_offset, y_offset;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
assert(num_dwords == 8);
surface_type = ilo_gpe_gen6_translate_texture(res->base.target);
}
static uint32_t
-gen7_emit_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_emit_SURFACE_STATE(const struct ilo_dev_info *dev,
struct intel_bo *bo, bool for_render,
const uint32_t *dw, int num_dwords,
struct ilo_cp *cp)
uint32_t state_offset;
uint32_t read_domains, write_domain;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
assert(num_dwords == state_len);
if (for_render) {
}
static uint32_t
-gen7_emit_surf_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_emit_surf_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
struct ilo_cp *cp)
{
struct intel_bo *bo;
uint32_t dw[8];
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
if (surface && surface->texture) {
struct ilo_resource *res = ilo_resource(surface->texture);
* classic i965 sets render_cache_rw for constant buffers and sol
* surfaces but not render buffers. Why?
*/
- gen7_fill_normal_SURFACE_STATE(gpe, res, surface->format,
+ gen7_fill_normal_SURFACE_STATE(dev, res, surface->format,
surface->u.tex.level, 1,
surface->u.tex.first_layer,
surface->u.tex.last_layer - surface->u.tex.first_layer + 1,
}
else {
bo = NULL;
- gen7_fill_null_SURFACE_STATE(gpe,
+ gen7_fill_null_SURFACE_STATE(dev,
surface->width, surface->height, 1, 0, dw, Elements(dw));
}
- return gen7_emit_SURFACE_STATE(gpe, bo, true, dw, Elements(dw), cp);
+ return gen7_emit_SURFACE_STATE(dev, bo, true, dw, Elements(dw), cp);
}
static uint32_t
-gen7_emit_view_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_emit_view_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_sampler_view *view,
struct ilo_cp *cp)
{
struct ilo_resource *res = ilo_resource(view->texture);
uint32_t dw[8];
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
- gen7_fill_normal_SURFACE_STATE(gpe, res, view->format,
+ gen7_fill_normal_SURFACE_STATE(dev, res, view->format,
view->u.tex.first_level,
view->u.tex.last_level - view->u.tex.first_level + 1,
view->u.tex.first_layer,
view->u.tex.last_layer - view->u.tex.first_layer + 1,
false, false, dw, Elements(dw));
- return gen7_emit_SURFACE_STATE(gpe, res->bo, false, dw, Elements(dw), cp);
+ return gen7_emit_SURFACE_STATE(dev, res->bo, false, dw, Elements(dw), cp);
}
static uint32_t
-gen7_emit_cbuf_SURFACE_STATE(const struct ilo_gpe *gpe,
+gen7_emit_cbuf_SURFACE_STATE(const struct ilo_dev_info *dev,
const struct pipe_constant_buffer *cbuf,
struct ilo_cp *cp)
{
struct ilo_resource *res = ilo_resource(cbuf->buffer);
uint32_t dw[8];
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
- gen7_fill_buffer_SURFACE_STATE(gpe, res,
+ gen7_fill_buffer_SURFACE_STATE(dev, res,
cbuf->buffer_offset, cbuf->buffer_size,
util_format_get_blocksize(elem_format), elem_format,
false, false, dw, Elements(dw));
- return gen7_emit_SURFACE_STATE(gpe, res->bo, false, dw, Elements(dw), cp);
+ return gen7_emit_SURFACE_STATE(dev, res->bo, false, dw, Elements(dw), cp);
}
static uint32_t
-gen7_emit_SAMPLER_BORDER_COLOR_STATE(const struct ilo_gpe *gpe,
+gen7_emit_SAMPLER_BORDER_COLOR_STATE(const struct ilo_dev_info *dev,
const union pipe_color_union *color,
struct ilo_cp *cp)
{
const int state_len = 4;
uint32_t state_offset, *dw;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
dw = ilo_cp_steal_ptr(cp, "SAMPLER_BORDER_COLOR_STATE",
state_len, state_align, &state_offset);
}
static int
-gen7_estimate_command_size(const struct ilo_gpe *gpe,
+gen7_estimate_command_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen7_command cmd,
int arg)
{
const int body = gen7_command_size_table[cmd].body;
const int count = arg;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
assert(cmd < ILO_GPE_GEN7_COMMAND_COUNT);
return (likely(count)) ? header + body * count : 0;
}
static int
-gen7_estimate_state_size(const struct ilo_gpe *gpe,
- enum ilo_gpe_gen7_state state,
- int arg)
+gen7_estimate_state_size(const struct ilo_dev_info *dev,
+ enum ilo_gpe_gen7_state state,
+ int arg)
{
static const struct {
int alignment;
const int count = arg;
int estimate;
- ILO_GPE_VALID_GEN(gpe, 7, 7);
+ ILO_GPE_VALID_GEN(dev, 7, 7);
assert(state < ILO_GPE_GEN7_STATE_COUNT);
if (likely(count)) {
typedef ilo_gpe_gen6_MEDIA_STATE_FLUSH ilo_gpe_gen7_MEDIA_STATE_FLUSH;
typedef void
-(*ilo_gpe_gen7_GPGPU_WALKER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_GPGPU_WALKER)(const struct ilo_dev_info *dev,
struct ilo_cp *cp);
typedef ilo_gpe_gen6_3DSTATE_CLEAR_PARAMS ilo_gpe_gen7_3DSTATE_CLEAR_PARAMS;
typedef void
-(*ilo_gpe_gen7_3DSTATE_DEPTH_BUFFER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_DEPTH_BUFFER)(const struct ilo_dev_info *dev,
const struct pipe_surface *surface,
const struct pipe_depth_stencil_alpha_state *dsa,
bool hiz,
typedef ilo_gpe_gen6_3DSTATE_INDEX_BUFFER ilo_gpe_gen7_3DSTATE_INDEX_BUFFER;
typedef void
-(*ilo_gpe_gen7_3DSTATE_CC_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_CC_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t color_calc_state,
struct ilo_cp *cp);
typedef ilo_gpe_gen6_3DSTATE_VS ilo_gpe_gen7_3DSTATE_VS;
typedef void
-(*ilo_gpe_gen7_3DSTATE_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_GS)(const struct ilo_dev_info *dev,
const struct ilo_shader *gs,
int max_threads, int num_samplers,
struct ilo_cp *cp);
typedef ilo_gpe_gen6_3DSTATE_CLIP ilo_gpe_gen7_3DSTATE_CLIP;
typedef void
-(*ilo_gpe_gen7_3DSTATE_SF)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SF)(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct pipe_surface *zs_surf,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_WM)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_WM)(const struct ilo_dev_info *dev,
const struct ilo_shader *fs,
const struct pipe_rasterizer_state *rasterizer,
bool cc_may_kill,
typedef ilo_gpe_gen6_3DSTATE_CONSTANT_PS ilo_gpe_gen7_3DSTATE_CONSTANT_PS;
typedef void
-(*ilo_gpe_gen7_3DSTATE_SAMPLE_MASK)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SAMPLE_MASK)(const struct ilo_dev_info *dev,
unsigned sample_mask,
int num_samples,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_CONSTANT_HS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_CONSTANT_HS)(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_CONSTANT_DS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_CONSTANT_DS)(const struct ilo_dev_info *dev,
const uint32_t *bufs, const int *sizes,
int num_bufs,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_HS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_HS)(const struct ilo_dev_info *dev,
const struct ilo_shader *hs,
int max_threads, int num_samplers,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_TE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_TE)(const struct ilo_dev_info *dev,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_DS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_DS)(const struct ilo_dev_info *dev,
const struct ilo_shader *ds,
int max_threads, int num_samplers,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_STREAMOUT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_STREAMOUT)(const struct ilo_dev_info *dev,
bool enable,
bool rasterizer_discard,
bool flatshade_first,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SBE)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SBE)(const struct ilo_dev_info *dev,
const struct pipe_rasterizer_state *rasterizer,
const struct ilo_shader *fs,
const struct ilo_shader *last_sh,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_PS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_PS)(const struct ilo_dev_info *dev,
const struct ilo_shader *fs,
int max_threads, int num_samplers,
bool dual_blend,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP)(const struct ilo_dev_info *dev,
uint32_t viewport,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_VIEWPORT_STATE_POINTERS_CC)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_VIEWPORT_STATE_POINTERS_CC)(const struct ilo_dev_info *dev,
uint32_t viewport,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_BLEND_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_BLEND_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t blend,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS)(const struct ilo_dev_info *dev,
uint32_t depth_stencil,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_VS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_VS)(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_HS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_HS)(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_DS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_DS)(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_GS)(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_PS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_BINDING_TABLE_POINTERS_PS)(const struct ilo_dev_info *dev,
uint32_t binding_table,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_VS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_VS)(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_HS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_HS)(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_DS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_DS)(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_GS)(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_PS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SAMPLER_STATE_POINTERS_PS)(const struct ilo_dev_info *dev,
uint32_t sampler_state,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_URB_VS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_URB_VS)(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_URB_HS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_URB_HS)(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_URB_DS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_URB_DS)(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_URB_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_URB_GS)(const struct ilo_dev_info *dev,
int offset, int size, int entry_size,
struct ilo_cp *cp);
typedef ilo_gpe_gen6_3DSTATE_MULTISAMPLE ilo_gpe_gen7_3DSTATE_MULTISAMPLE;
typedef void
-(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_VS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_VS)(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_HS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_HS)(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_DS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_DS)(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_GS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_GS)(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_PS)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_PUSH_CONSTANT_ALLOC_PS)(const struct ilo_dev_info *dev,
int offset, int size,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SO_DECL_LIST)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SO_DECL_LIST)(const struct ilo_dev_info *dev,
struct ilo_cp *cp);
typedef void
-(*ilo_gpe_gen7_3DSTATE_SO_BUFFER)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_3DSTATE_SO_BUFFER)(const struct ilo_dev_info *dev,
int index,
bool enable,
struct ilo_cp *cp);
typedef ilo_gpe_gen6_INTERFACE_DESCRIPTOR_DATA ilo_gpe_gen7_INTERFACE_DESCRIPTOR_DATA;
typedef uint32_t
-(*ilo_gpe_gen7_SF_CLIP_VIEWPORT)(const struct ilo_gpe *gpe,
+(*ilo_gpe_gen7_SF_CLIP_VIEWPORT)(const struct ilo_dev_info *dev,
const struct pipe_viewport_state *viewports,
int num_viewports,
struct ilo_cp *cp);
* \see ilo_gpe_gen6
*/
struct ilo_gpe_gen7 {
- int (*estimate_command_size)(const struct ilo_gpe *gpe,
+ int (*estimate_command_size)(const struct ilo_dev_info *dev,
enum ilo_gpe_gen7_command cmd,
int arg);
- int (*estimate_state_size)(const struct ilo_gpe *gpe,
+ int (*estimate_state_size)(const struct ilo_dev_info *dev,
enum ilo_gpe_gen7_state state,
int arg);