From 8682cbab3e30f8d3c089f1f7113fcd7e9e184718 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 27 Jan 2015 20:00:48 +0800 Subject: [PATCH] ilo: update outdated gen assertions for Gen8 --- src/gallium/drivers/ilo/ilo_builder_3d.h | 2 +- src/gallium/drivers/ilo/ilo_builder_3d_bottom.h | 14 +++++++------- src/gallium/drivers/ilo/ilo_builder_3d_top.h | 14 +++++++------- src/gallium/drivers/ilo/ilo_shader.c | 3 +-- src/gallium/drivers/ilo/ilo_state_3d_bottom.c | 6 +++--- src/gallium/drivers/ilo/ilo_state_3d_top.c | 8 ++++---- 6 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/gallium/drivers/ilo/ilo_builder_3d.h b/src/gallium/drivers/ilo/ilo_builder_3d.h index e37294256d0..9f80398204a 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d.h @@ -75,7 +75,7 @@ gen7_3DPRIMITIVE(struct ilo_builder *builder, ((info->indexed) ? ib->draw_start_offset : 0); uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 7, 7.5); + ILO_DEV_ASSERT(builder->dev, 7, 8); ilo_builder_batch_pointer(builder, cmd_len, &dw); diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h b/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h index 64c716d7e7e..a5cc7894162 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h @@ -48,7 +48,7 @@ gen6_3DSTATE_CLIP(struct ilo_builder *builder, uint32_t dw1, dw2, dw3, *dw; int interps; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); dw1 = rasterizer->clip.payload[0]; dw2 = rasterizer->clip.payload[1]; @@ -1029,7 +1029,7 @@ gen6_3DSTATE_DRAWING_RECTANGLE(struct ilo_builder *builder, unsigned rect_limit; uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); if (ilo_dev_gen(builder->dev) >= ILO_GEN(7)) { rect_limit = 16383; @@ -1291,7 +1291,7 @@ gen7_3DSTATE_CLEAR_PARAMS(struct ilo_builder *builder, const uint8_t cmd_len = 3; uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 7, 7.5); + ILO_DEV_ASSERT(builder->dev, 7, 8); ilo_builder_batch_pointer(builder, cmd_len, &dw); @@ -1330,7 +1330,7 @@ gen6_3DSTATE_SCISSOR_STATE_POINTERS(struct ilo_builder *builder, const uint8_t cmd_len = 2; uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); ilo_builder_batch_pointer(builder, cmd_len, &dw); @@ -1552,7 +1552,7 @@ gen6_CC_VIEWPORT(struct ilo_builder *builder, uint32_t state_offset, *dw; unsigned i; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); /* * From the Sandy Bridge PRM, volume 2 part 1, page 385: @@ -1584,7 +1584,7 @@ gen6_SCISSOR_RECT(struct ilo_builder *builder, const int state_align = 32; const int state_len = 2 * num_viewports; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); /* * From the Sandy Bridge PRM, volume 2 part 1, page 263: @@ -1609,7 +1609,7 @@ gen6_COLOR_CALC_STATE(struct ilo_builder *builder, const int state_len = 6; uint32_t state_offset, *dw; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); state_offset = ilo_builder_dynamic_pointer(builder, ILO_BUILDER_ITEM_COLOR_CALC, state_align, state_len, &dw); diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h index 04609d0b655..30c787d7f3a 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h @@ -326,7 +326,7 @@ gen75_3DSTATE_VF(struct ilo_builder *builder, const uint8_t cmd_len = 2; uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 7.5, 7.5); + ILO_DEV_ASSERT(builder->dev, 7.5, 8); ilo_builder_batch_pointer(builder, cmd_len, &dw); @@ -345,7 +345,7 @@ gen6_3DSTATE_VF_STATISTICS(struct ilo_builder *builder, const uint32_t dw0 = GEN6_RENDER_CMD(SINGLE_DW, 3DSTATE_VF_STATISTICS) | enable; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); ilo_builder_batch_write(builder, cmd_len, &dw0); } @@ -560,7 +560,7 @@ gen6_3DSTATE_VERTEX_ELEMENTS(struct ilo_builder *builder, uint32_t *dw; unsigned i; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); /* * From the Sandy Bridge PRM, volume 2 part 1, page 92: @@ -799,7 +799,7 @@ gen7_3DSTATE_TE(struct ilo_builder *builder) const uint8_t cmd_len = 4; uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 7, 7.5); + ILO_DEV_ASSERT(builder->dev, 7, 8); ilo_builder_batch_pointer(builder, cmd_len, &dw); @@ -1283,7 +1283,7 @@ gen7_3dstate_pointer(struct ilo_builder *builder, const uint8_t cmd_len = 2; uint32_t *dw; - ILO_DEV_ASSERT(builder->dev, 7, 7.5); + ILO_DEV_ASSERT(builder->dev, 7, 8); ilo_builder_batch_pointer(builder, cmd_len, &dw); @@ -1686,7 +1686,7 @@ gen6_SAMPLER_STATE(struct ilo_builder *builder, uint32_t state_offset, *dw; int i; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); /* * From the Sandy Bridge PRM, volume 4 part 1, page 101: @@ -1824,7 +1824,7 @@ gen6_push_constant_buffer(struct ilo_builder *builder, uint32_t state_offset; char *buf; - ILO_DEV_ASSERT(builder->dev, 6, 7.5); + ILO_DEV_ASSERT(builder->dev, 6, 8); state_offset = ilo_builder_dynamic_pointer(builder, ILO_BUILDER_ITEM_BLOB, state_align, state_len, (uint32_t **) &buf); diff --git a/src/gallium/drivers/ilo/ilo_shader.c b/src/gallium/drivers/ilo/ilo_shader.c index 9f21b00047c..0798ccc8186 100644 --- a/src/gallium/drivers/ilo/ilo_shader.c +++ b/src/gallium/drivers/ilo/ilo_shader.c @@ -842,8 +842,7 @@ ilo_shader_select_kernel_routing(struct ilo_shader_state *shader, int dst_len, dst_slot; /* we are constructing 3DSTATE_SBE here */ - assert(ilo_dev_gen(shader->info.dev) >= ILO_GEN(6) && - ilo_dev_gen(shader->info.dev) <= ILO_GEN(7.5)); + ILO_DEV_ASSERT(shader->info.dev, 6, 8); assert(kernel); diff --git a/src/gallium/drivers/ilo/ilo_state_3d_bottom.c b/src/gallium/drivers/ilo/ilo_state_3d_bottom.c index e6d72fe4af4..7c88d0f9006 100644 --- a/src/gallium/drivers/ilo/ilo_state_3d_bottom.c +++ b/src/gallium/drivers/ilo/ilo_state_3d_bottom.c @@ -1365,7 +1365,7 @@ ilo_gpe_set_viewport_cso(const struct ilo_dev_info *dev, const float scale_z = fabs(state->scale[2]); int min_gbx, max_gbx, min_gby, max_gby; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); viewport_get_guardband(dev, (int) state->translate[0], @@ -2058,7 +2058,7 @@ ilo_gpe_set_scissor(const struct ilo_dev_info *dev, { unsigned i; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); for (i = 0; i < num_states; i++) { uint16_t min_x, min_y, max_x, max_y; @@ -2170,7 +2170,7 @@ ilo_gpe_set_fb(const struct ilo_dev_info *dev, const struct pipe_surface *first_surf = NULL; int i; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); util_copy_framebuffer_state(&fb->state, state); diff --git a/src/gallium/drivers/ilo/ilo_state_3d_top.c b/src/gallium/drivers/ilo/ilo_state_3d_top.c index d7d64b0c2b3..40e5e9d022a 100644 --- a/src/gallium/drivers/ilo/ilo_state_3d_top.c +++ b/src/gallium/drivers/ilo/ilo_state_3d_top.c @@ -52,7 +52,7 @@ ve_init_cso(const struct ilo_dev_info *dev, }; int format; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); switch (util_format_get_nr_components(state->src_format)) { case 1: comp[1] = GEN6_VFCOMP_STORE_0; @@ -86,7 +86,7 @@ ilo_gpe_init_ve(const struct ilo_dev_info *dev, { unsigned i; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); ve->count = num_states; ve->vb_count = 0; @@ -124,7 +124,7 @@ ilo_gpe_set_ve_edgeflag(const struct ilo_dev_info *dev, { int format; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); /* * From the Sandy Bridge PRM, volume 2 part 1, page 94: @@ -180,7 +180,7 @@ ilo_gpe_init_ve_nosrc(const struct ilo_dev_info *dev, int comp0, int comp1, int comp2, int comp3, struct ilo_ve_cso *cso) { - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); STATIC_ASSERT(Elements(cso->payload) >= 2); -- 2.30.2