brw_emit_gpgpu_walker(struct brw_context *brw)
{
const struct brw_cs_prog_data *prog_data = brw->cs.prog_data;
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const GLuint *num_groups = brw->compute.num_work_groups;
uint32_t indirect_flag;
OUT_BATCH(0); /* Indirect Data Length */
OUT_BATCH(0); /* Indirect Data Start Address */
}
- assert(thread_width_max <= brw->max_cs_threads);
+ assert(thread_width_max <= devinfo->max_cs_threads);
OUT_BATCH(SET_FIELD(simd_size / 16, GPGPU_WALKER_SIMD_SIZE) |
SET_FIELD(thread_width_max - 1, GPGPU_WALKER_THREAD_WIDTH_MAX));
OUT_BATCH(0); /* Thread Group ID Starting X */
{
struct gl_context *ctx = &brw->ctx;
const struct intel_screen *screen = brw->screen;
- const struct gen_device_info *devinfo = &screen->devinfo;
+ struct gen_device_info *devinfo = &brw->screen->devinfo;
/* FINISHME: Do this for all platforms that the kernel supports */
if (brw->is_cherryview &&
screen->subslice_total > 0 && screen->eu_total > 0) {
/* Logical CS threads = EUs per subslice * 7 threads per EU */
- brw->max_cs_threads = screen->eu_total / screen->subslice_total * 7;
+ uint32_t max_cs_threads = screen->eu_total / screen->subslice_total * 7;
/* Fuse configurations may give more threads than expected, never less. */
- if (brw->max_cs_threads < devinfo->max_cs_threads)
- brw->max_cs_threads = devinfo->max_cs_threads;
- } else {
- brw->max_cs_threads = devinfo->max_cs_threads;
+ if (max_cs_threads > devinfo->max_cs_threads)
+ devinfo->max_cs_threads = max_cs_threads;
}
/* Maximum number of scalar compute shader invocations that can be run in
* threads. With SIMD32 and 64 threads, Haswell still provides twice the
* required the number of invocation needed for ARB_compute_shader.
*/
- const unsigned max_threads = MIN2(64, brw->max_cs_threads);
+ const unsigned max_threads = MIN2(64, devinfo->max_cs_threads);
const uint32_t max_invocations = 32 * max_threads;
ctx->Const.MaxComputeWorkGroupSize[0] = max_invocations;
ctx->Const.MaxComputeWorkGroupSize[1] = max_invocations;
if (brw->gen >= 6)
brw_blorp_init(brw);
- brw->max_vs_threads = devinfo->max_vs_threads;
- brw->max_hs_threads = devinfo->max_hs_threads;
- brw->max_ds_threads = devinfo->max_ds_threads;
- brw->max_gs_threads = devinfo->max_gs_threads;
- brw->max_wm_threads = devinfo->max_wm_threads;
brw->urb.size = devinfo->urb.size;
- brw->urb.min_vs_entries = devinfo->urb.min_vs_entries;
- brw->urb.max_vs_entries = devinfo->urb.max_vs_entries;
- brw->urb.max_hs_entries = devinfo->urb.max_hs_entries;
- brw->urb.max_ds_entries = devinfo->urb.max_ds_entries;
- brw->urb.max_gs_entries = devinfo->urb.max_gs_entries;
if (brw->gen == 6)
brw->urb.gs_present = false;
*/
int num_samples;
- /**
- * Platform specific constants containing the maximum number of threads
- * for each pipeline stage.
- */
- unsigned max_vs_threads;
- unsigned max_hs_threads;
- unsigned max_ds_threads;
- unsigned max_gs_threads;
- unsigned max_wm_threads;
- unsigned max_cs_threads;
-
/* BRW_NEW_URB_ALLOCATIONS:
*/
struct {
bool constrained;
- GLuint min_vs_entries; /* Minimum number of VS entries */
- GLuint max_vs_entries; /* Maximum number of VS entries */
- GLuint max_hs_entries; /* Maximum number of HS entries */
- GLuint max_ds_entries; /* Maximum number of DS entries */
- GLuint max_gs_entries; /* Maximum number of GS entries */
-
GLuint nr_vs_entries;
GLuint nr_hs_entries;
GLuint nr_ds_entries;
struct brw_compute_program *cp,
struct brw_cs_prog_key *key)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct gl_context *ctx = &brw->ctx;
const GLuint *program;
void *mem_ctx = ralloc_context(NULL);
prog_data.base.total_shared = prog->Comp.SharedSize;
}
- assign_cs_binding_table_offsets(&brw->screen->devinfo, prog,
+ assign_cs_binding_table_offsets(devinfo, prog,
&cp->program.Base, &prog_data);
/* Allocate the references to the uniforms that will end up in the
* number of threads per subslice.
*/
const unsigned scratch_ids_per_subslice =
- brw->is_haswell ? 16 * 8 : brw->max_cs_threads;
+ brw->is_haswell ? 16 * 8 : devinfo->max_cs_threads;
brw_alloc_stage_scratch(brw, &brw->cs.base,
prog_data.base.total_scratch,
struct brw_gs_prog_key *key)
{
struct brw_compiler *compiler = brw->screen->compiler;
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct brw_stage_state *stage_state = &brw->gs.base;
struct brw_gs_prog_data prog_data;
bool start_busy = false;
memset(&prog_data, 0, sizeof(prog_data));
- assign_gs_binding_table_offsets(&brw->screen->devinfo, prog,
+ assign_gs_binding_table_offsets(devinfo, prog,
&gp->program.Base, &prog_data);
/* Allocate the references to the uniforms that will end up in the
((1 << gp->program.Base.CullDistanceArraySize) - 1) <<
gp->program.Base.ClipDistanceArraySize;
- brw_compute_vue_map(&brw->screen->devinfo,
+ brw_compute_vue_map(devinfo,
&prog_data.base.vue_map, outputs_written,
prog->SeparateShader);
/* Scratch space is used for register spilling */
brw_alloc_stage_scratch(brw, stage_state,
prog_data.base.base.total_scratch,
- brw->max_gs_threads);
+ devinfo->max_gs_threads);
brw_upload_cache(&brw->cache, BRW_CACHE_GS_PROG,
key, sizeof(*key),
/* Scratch space is used for register spilling */
brw_alloc_stage_scratch(brw, stage_state,
prog_data.base.base.total_scratch,
- brw->max_hs_threads);
+ devinfo->max_hs_threads);
brw_upload_cache(&brw->cache, BRW_CACHE_TCS_PROG,
key, sizeof(*key),
/* Scratch space is used for register spilling */
brw_alloc_stage_scratch(brw, stage_state,
prog_data.base.base.total_scratch,
- brw->max_ds_threads);
+ devinfo->max_ds_threads);
brw_upload_cache(&brw->cache, BRW_CACHE_TES_PROG,
key, sizeof(*key),
struct brw_vs_prog_key *key)
{
const struct brw_compiler *compiler = brw->screen->compiler;
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
GLuint program_size;
const GLuint *program;
struct brw_vs_prog_data prog_data;
mem_ctx = ralloc_context(NULL);
brw_assign_common_binding_table_offsets(MESA_SHADER_VERTEX,
- &brw->screen->devinfo,
+ devinfo,
prog, &vp->program.Base,
&prog_data.base.base, 0);
((1 << vp->program.Base.CullDistanceArraySize) - 1) <<
vp->program.Base.ClipDistanceArraySize;
- brw_compute_vue_map(&brw->screen->devinfo,
+ brw_compute_vue_map(devinfo,
&prog_data.base.vue_map, outputs_written,
prog ? prog->SeparateShader ||
prog->_LinkedShaders[MESA_SHADER_TESS_EVAL]
/* Scratch space is used for register spilling */
brw_alloc_stage_scratch(brw, &brw->vs.base,
prog_data.base.base.total_scratch,
- brw->max_vs_threads);
+ devinfo->max_vs_threads);
brw_upload_cache(&brw->cache, BRW_CACHE_VS_PROG,
key, sizeof(struct brw_vs_prog_key),
static void
brw_upload_vs_unit(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct brw_stage_state *stage_state = &brw->vs.base;
struct brw_vs_unit_state *vs;
vs->thread4.urb_entry_allocation_size = brw->urb.vsize - 1;
vs->thread4.max_threads = CLAMP(brw->urb.nr_vs_entries / 2,
- 1, brw->max_vs_threads) - 1;
+ 1, devinfo->max_vs_threads) - 1;
if (brw->gen == 5)
vs->vs5.sampler_count = 0; /* hardware requirement */
struct brw_fragment_program *fp,
struct brw_wm_prog_key *key)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct gl_context *ctx = &brw->ctx;
void *mem_ctx = ralloc_context(NULL);
struct brw_wm_prog_data prog_data;
if (!prog)
prog_data.base.use_alt_mode = true;
- assign_fs_binding_table_offsets(&brw->screen->devinfo, prog,
+ assign_fs_binding_table_offsets(devinfo, prog,
&fp->program.Base, key, &prog_data);
/* Allocate the references to the uniforms that will end up in the
brw_alloc_stage_scratch(brw, &brw->wm.base,
prog_data.base.total_scratch,
- brw->max_wm_threads);
+ devinfo->max_wm_threads);
if (unlikely(INTEL_DEBUG & DEBUG_WM))
fprintf(stderr, "\n");
static void
brw_upload_wm_unit(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct gl_context *ctx = &brw->ctx;
/* BRW_NEW_FRAGMENT_PROGRAM */
const struct gl_fragment_program *fp = brw->fragment_program;
wm->wm5.program_uses_killpixel =
prog_data->uses_kill || ctx->Color.AlphaEnabled;
- wm->wm5.max_threads = brw->max_wm_threads - 1;
+ wm->wm5.max_threads = devinfo->max_wm_threads - 1;
/* _NEW_BUFFERS | _NEW_COLOR */
if (brw_color_buffer_write_enabled(brw) ||
},
.emit = brw_upload_wm_unit,
};
-
static void
upload_gs_state_for_tf(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
+
BEGIN_BATCH(7);
OUT_BATCH(_3DSTATE_GS << 16 | (7 - 2));
OUT_BATCH(brw->ff_gs.prog_offset);
OUT_BATCH(0); /* no scratch space */
OUT_BATCH((2 << GEN6_GS_DISPATCH_START_GRF_SHIFT) |
(brw->ff_gs.prog_data->urb_read_length << GEN6_GS_URB_READ_LENGTH_SHIFT));
- OUT_BATCH(((brw->max_gs_threads - 1) << GEN6_GS_MAX_THREADS_SHIFT) |
+ OUT_BATCH(((devinfo->max_gs_threads - 1) << GEN6_GS_MAX_THREADS_SHIFT) |
GEN6_GS_STATISTICS_ENABLE |
GEN6_GS_SO_STATISTICS_ENABLE |
GEN6_GS_RENDERING_ENABLE);
static void
upload_gs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
/* BRW_NEW_GEOMETRY_PROGRAM */
bool active = brw->geometry_program;
/* BRW_NEW_GS_PROG_DATA */
(prog_data->base.dispatch_grf_start_reg <<
GEN6_GS_DISPATCH_START_GRF_SHIFT));
- OUT_BATCH(((brw->max_gs_threads - 1) << GEN6_GS_MAX_THREADS_SHIFT) |
+ OUT_BATCH(((devinfo->max_gs_threads - 1) << GEN6_GS_MAX_THREADS_SHIFT) |
GEN6_GS_STATISTICS_ENABLE |
GEN6_GS_SO_STATISTICS_ENABLE |
GEN6_GS_RENDERING_ENABLE);
{
int nr_vs_entries, nr_gs_entries;
int total_urb_size = brw->urb.size * 1024; /* in bytes */
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
/* Calculate how many entries fit in each stage's section of the URB */
if (gs_present) {
}
/* Then clamp to the maximum allowed by the hardware */
- if (nr_vs_entries > brw->urb.max_vs_entries)
- nr_vs_entries = brw->urb.max_vs_entries;
+ if (nr_vs_entries > devinfo->urb.max_vs_entries)
+ nr_vs_entries = devinfo->urb.max_vs_entries;
- if (nr_gs_entries > brw->urb.max_gs_entries)
- nr_gs_entries = brw->urb.max_gs_entries;
+ if (nr_gs_entries > devinfo->urb.max_gs_entries)
+ nr_gs_entries = devinfo->urb.max_gs_entries;
/* Finally, both must be a multiple of 4 (see 3DSTATE_URB in the PRM). */
brw->urb.nr_vs_entries = ROUND_DOWN_TO(nr_vs_entries, 4);
brw->urb.nr_gs_entries = ROUND_DOWN_TO(nr_gs_entries, 4);
- assert(brw->urb.nr_vs_entries >= brw->urb.min_vs_entries);
+ assert(brw->urb.nr_vs_entries >= devinfo->urb.min_vs_entries);
assert(brw->urb.nr_vs_entries % 4 == 0);
assert(brw->urb.nr_gs_entries % 4 == 0);
assert(vs_size <= 5);
static void
upload_vs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const struct brw_stage_state *stage_state = &brw->vs.base;
uint32_t floating_point_mode = 0;
(brw->vs.prog_data->base.urb_read_length << GEN6_VS_URB_READ_LENGTH_SHIFT) |
(0 << GEN6_VS_URB_ENTRY_READ_OFFSET_SHIFT));
- OUT_BATCH(((brw->max_vs_threads - 1) << GEN6_VS_MAX_THREADS_SHIFT) |
+ OUT_BATCH(((devinfo->max_vs_threads - 1) << GEN6_VS_MAX_THREADS_SHIFT) |
GEN6_VS_STATISTICS_ENABLE |
GEN6_VS_ENABLE);
ADVANCE_BATCH();
bool line_stipple_enable, bool polygon_stipple_enable,
bool statistic_enable)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
uint32_t dw2, dw4, dw5, dw6, ksp0, ksp2;
/* We can't fold this into gen6_upload_wm_push_constants(), because
dw2 |= ((prog_data->base.binding_table.size_bytes / 4) <<
GEN6_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT);
- dw5 |= (brw->max_wm_threads - 1) << GEN6_WM_MAX_THREADS_SHIFT;
+ dw5 |= (devinfo->max_wm_threads - 1) << GEN6_WM_MAX_THREADS_SHIFT;
if (prog_data->dispatch_8)
dw5 |= GEN6_WM_8_DISPATCH_ENABLE;
const uint32_t vfe_gpgpu_mode =
brw->gen == 7 ? SET_FIELD(1, GEN7_MEDIA_VFE_STATE_GPGPU_MODE) : 0;
const uint32_t subslices = MAX2(brw->screen->subslice_total, 1);
- OUT_BATCH(SET_FIELD(brw->max_cs_threads * subslices - 1,
+ OUT_BATCH(SET_FIELD(devinfo->max_cs_threads * subslices - 1,
MEDIA_VFE_STATE_MAX_THREADS) |
SET_FIELD(vfe_num_urb_entries, MEDIA_VFE_STATE_URB_ENTRIES) |
SET_FIELD(1, MEDIA_VFE_STATE_RESET_GTW_TIMER) |
brw->gen >= 8 ?
SET_FIELD(cs_prog_data->threads, GEN8_MEDIA_GPGPU_THREAD_COUNT) :
SET_FIELD(cs_prog_data->threads, MEDIA_GPGPU_THREAD_COUNT);
- assert(cs_prog_data->threads <= brw->max_cs_threads);
+ assert(cs_prog_data->threads <= devinfo->max_cs_threads);
const uint32_t slm_size =
encode_slm_size(devinfo->gen, prog_data->total_shared);
static void
gen7_upload_ds_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const struct brw_stage_state *stage_state = &brw->tes.base;
/* BRW_NEW_TESS_PROGRAMS */
bool active = brw->tess_eval_program;
const struct brw_vue_prog_data *vue_prog_data = &tes_prog_data->base;
const struct brw_stage_prog_data *prog_data = &vue_prog_data->base;
- const unsigned thread_count = (brw->max_ds_threads - 1) <<
+ const unsigned thread_count = (devinfo->max_ds_threads - 1) <<
(brw->is_haswell ? HSW_DS_MAX_THREADS_SHIFT : GEN7_DS_MAX_THREADS_SHIFT);
if (active) {
static void
upload_gs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const struct brw_stage_state *stage_state = &brw->gs.base;
const int max_threads_shift = brw->is_haswell ?
HSW_GS_MAX_THREADS_SHIFT : GEN6_GS_MAX_THREADS_SHIFT;
* Bridge this will get the order close to correct but not perfect.
*/
uint32_t dw5 =
- ((brw->max_gs_threads - 1) << max_threads_shift) |
+ ((devinfo->max_gs_threads - 1) << max_threads_shift) |
(brw->gs.prog_data->control_data_header_size_hwords <<
GEN7_GS_CONTROL_DATA_HEADER_SIZE_SHIFT) |
((brw->gs.prog_data->invocations - 1) <<
static void
gen7_upload_hs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const struct brw_stage_state *stage_state = &brw->tcs.base;
/* BRW_NEW_TESS_PROGRAMS */
bool active = brw->tess_eval_program;
GEN7_HS_SAMPLER_COUNT) |
SET_FIELD(prog_data->base.binding_table.size_bytes / 4,
GEN7_HS_BINDING_TABLE_ENTRY_COUNT) |
- (brw->max_hs_threads - 1));
+ (devinfo->max_hs_threads - 1));
OUT_BATCH(GEN7_HS_ENABLE |
GEN7_HS_STATISTICS_ENABLE |
SET_FIELD(brw->tcs.prog_data->instances - 1,
* greater than or equal to 192."
*/
unsigned vs_min_entries =
- tess_present && brw->gen == 8 ? 192 : brw->urb.min_vs_entries;
+ tess_present && brw->gen == 8 ? 192 : devinfo->urb.min_vs_entries;
/* Min VS Entries isn't a multiple of 8 on Cherryview/Broxton; round up */
vs_min_entries = ALIGN(vs_min_entries, vs_granularity);
unsigned vs_chunks =
DIV_ROUND_UP(vs_min_entries * vs_entry_size_bytes, chunk_size_bytes);
unsigned vs_wants =
- DIV_ROUND_UP(brw->urb.max_vs_entries * vs_entry_size_bytes,
+ DIV_ROUND_UP(devinfo->urb.max_vs_entries * vs_entry_size_bytes,
chunk_size_bytes) - vs_chunks;
unsigned gs_chunks = 0;
*/
gs_chunks = DIV_ROUND_UP(MAX2(gs_granularity, 2) * gs_entry_size_bytes,
chunk_size_bytes);
- gs_wants = DIV_ROUND_UP(brw->urb.max_gs_entries * gs_entry_size_bytes,
+ gs_wants = DIV_ROUND_UP(devinfo->urb.max_gs_entries * gs_entry_size_bytes,
chunk_size_bytes) - gs_chunks;
}
DIV_ROUND_UP(devinfo->urb.min_ds_entries * ds_entry_size_bytes,
chunk_size_bytes);
ds_wants =
- DIV_ROUND_UP(brw->urb.max_ds_entries * ds_entry_size_bytes,
+ DIV_ROUND_UP(devinfo->urb.max_ds_entries * ds_entry_size_bytes,
chunk_size_bytes) - ds_chunks;
}
/* Since we rounded up when computing *_wants, this may be slightly more
* than the maximum allowed amount, so correct for that.
*/
- nr_vs_entries = MIN2(nr_vs_entries, brw->urb.max_vs_entries);
- nr_hs_entries = MIN2(nr_hs_entries, brw->urb.max_hs_entries);
- nr_ds_entries = MIN2(nr_ds_entries, brw->urb.max_ds_entries);
- nr_gs_entries = MIN2(nr_gs_entries, brw->urb.max_gs_entries);
+ nr_vs_entries = MIN2(nr_vs_entries, devinfo->urb.max_vs_entries);
+ nr_hs_entries = MIN2(nr_hs_entries, devinfo->urb.max_hs_entries);
+ nr_ds_entries = MIN2(nr_ds_entries, devinfo->urb.max_ds_entries);
+ nr_gs_entries = MIN2(nr_gs_entries, devinfo->urb.max_gs_entries);
/* Ensure that we program a multiple of the granularity. */
nr_vs_entries = ROUND_DOWN_TO(nr_vs_entries, vs_granularity);
static void
upload_vs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const struct brw_stage_state *stage_state = &brw->vs.base;
uint32_t floating_point_mode = 0;
const int max_threads_shift = brw->is_haswell ?
(prog_data->urb_read_length << GEN6_VS_URB_READ_LENGTH_SHIFT) |
(0 << GEN6_VS_URB_ENTRY_READ_OFFSET_SHIFT));
- OUT_BATCH(((brw->max_vs_threads - 1) << max_threads_shift) |
+ OUT_BATCH(((devinfo->max_vs_threads - 1) << max_threads_shift) |
GEN6_VS_STATISTICS_ENABLE |
GEN6_VS_ENABLE);
ADVANCE_BATCH();
bool enable_dual_src_blend, unsigned sample_mask,
unsigned fast_clear_op)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
uint32_t dw2, dw4, dw5, ksp0, ksp2;
const int max_threads_shift = brw->is_haswell ?
HSW_PS_MAX_THREADS_SHIFT : IVB_PS_MAX_THREADS_SHIFT;
if (brw->is_haswell)
dw4 |= SET_FIELD(sample_mask, HSW_PS_SAMPLE_MASK);
- dw4 |= (brw->max_wm_threads - 1) << max_threads_shift;
+ dw4 |= (devinfo->max_wm_threads - 1) << max_threads_shift;
if (prog_data->base.nr_params > 0)
dw4 |= GEN7_PS_PUSH_CONSTANT_ENABLE;
static void
gen8_upload_ds_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct gl_context *ctx = &brw->ctx;
const struct brw_stage_state *stage_state = &brw->tes.base;
/* BRW_NEW_TESS_PROGRAMS */
OUT_BATCH(GEN7_DS_ENABLE |
GEN7_DS_STATISTICS_ENABLE |
- (brw->max_ds_threads - 1) << HSW_DS_MAX_THREADS_SHIFT |
+ (devinfo->max_ds_threads - 1) << HSW_DS_MAX_THREADS_SHIFT |
(vue_prog_data->dispatch_mode == DISPATCH_MODE_SIMD8 ?
GEN7_DS_SIMD8_DISPATCH_ENABLE : 0) |
(tes_prog_data->domain == BRW_TESS_DOMAIN_TRI ?
static void
gen8_upload_gs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct gl_context *ctx = &brw->ctx;
const struct brw_stage_state *stage_state = &brw->gs.base;
/* BRW_NEW_GEOMETRY_PROGRAM */
}
if (brw->gen < 9)
- dw7 |= (brw->max_gs_threads / 2 - 1) << HSW_GS_MAX_THREADS_SHIFT;
+ dw7 |= (devinfo->max_gs_threads / 2 - 1) << HSW_GS_MAX_THREADS_SHIFT;
else
- dw8 |= brw->max_gs_threads - 1;
+ dw8 |= devinfo->max_gs_threads - 1;
/* DW7 */
OUT_BATCH(dw7);
static void
gen8_upload_hs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
const struct brw_stage_state *stage_state = &brw->tcs.base;
/* BRW_NEW_TESS_PROGRAMS */
bool active = brw->tess_eval_program;
GEN7_HS_BINDING_TABLE_ENTRY_COUNT));
OUT_BATCH(GEN7_HS_ENABLE |
GEN7_HS_STATISTICS_ENABLE |
- (brw->max_hs_threads - 1) << GEN8_HS_MAX_THREADS_SHIFT |
+ (devinfo->max_hs_threads - 1) << GEN8_HS_MAX_THREADS_SHIFT |
SET_FIELD(brw->tcs.prog_data->instances - 1,
GEN7_HS_INSTANCE_COUNT));
OUT_BATCH(stage_state->prog_offset);
static void
upload_vs_state(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct gl_context *ctx = &brw->ctx;
const struct brw_stage_state *stage_state = &brw->vs.base;
uint32_t floating_point_mode = 0;
uint32_t simd8_enable = prog_data->dispatch_mode == DISPATCH_MODE_SIMD8 ?
GEN8_VS_SIMD8_ENABLE : 0;
- OUT_BATCH(((brw->max_vs_threads - 1) << HSW_VS_MAX_THREADS_SHIFT) |
+ OUT_BATCH(((devinfo->max_vs_threads - 1) << HSW_VS_MAX_THREADS_SHIFT) |
GEN6_VS_STATISTICS_ENABLE |
simd8_enable |
GEN6_VS_ENABLE);