/external/mesa3d/src/gallium/drivers/i915/ |
D | i915_context.c | 56 struct i915_context *i915 = i915_context(pipe); in i915_draw_vbo() local 57 struct draw_context *draw = i915->draw; in i915_draw_vbo() 67 i915->dirty &= ~I915_NEW_VS_CONSTANTS; in i915_draw_vbo() 69 if (i915->dirty) in i915_draw_vbo() 70 i915_update_derived(i915); in i915_draw_vbo() 75 for (i = 0; i < i915->nr_vertex_buffers; i++) { in i915_draw_vbo() 76 const void *buf = i915->vertex_buffers[i].is_user_buffer ? in i915_draw_vbo() 77 i915->vertex_buffers[i].buffer.user : NULL; in i915_draw_vbo() 79 buf = i915_buffer(i915->vertex_buffers[i].buffer.resource)->data; in i915_draw_vbo() 95 if (i915->constants[PIPE_SHADER_VERTEX]) in i915_draw_vbo() [all …]
|
D | i915_state_emit.c | 53 validate_flush(struct i915_context *i915, unsigned *batch_space) in validate_flush() argument 55 *batch_space = i915->flush_dirty ? 1 : 0; in validate_flush() 59 emit_flush(struct i915_context *i915) in emit_flush() argument 67 if (i915->flush_dirty & I915_FLUSH_CACHE) in emit_flush() 69 else if (i915->flush_dirty & I915_PIPELINE_FLUSH) in emit_flush() 110 emit_invariant(struct i915_context *i915) in emit_invariant() argument 112 i915_winsys_batchbuffer_write(i915->batch, invariant_state, in emit_invariant() 117 validate_immediate(struct i915_context *i915, unsigned *batch_space) in validate_immediate() argument 123 i915->immediate_dirty; in validate_immediate() 125 if (i915->immediate_dirty & (1 << I915_IMMEDIATE_S0) && i915->vbo) in validate_immediate() [all …]
|
D | i915_state.c | 180 struct i915_context *i915 = i915_context(pipe); in i915_bind_blend_state() local 182 if (i915->blend == blend) in i915_bind_blend_state() 185 i915->blend = (struct i915_blend_state*)blend; in i915_bind_blend_state() 187 i915->dirty |= I915_NEW_BLEND; in i915_bind_blend_state() 199 struct i915_context *i915 = i915_context(pipe); in i915_set_blend_color() local 204 i915->blend_color = *blend_color; in i915_set_blend_color() 206 i915->dirty |= I915_NEW_BLEND; in i915_set_blend_color() 212 struct i915_context *i915 = i915_context(pipe); in i915_set_stencil_ref() local 214 i915->stencil_ref = *stencil_ref; in i915_set_stencil_ref() 216 i915->dirty |= I915_NEW_DEPTH_STENCIL; in i915_set_stencil_ref() [all …]
|
D | i915_state_dynamic.c | 49 static inline void set_dynamic(struct i915_context *i915, in set_dynamic() argument 53 if (i915->current.dynamic[offset] == state) in set_dynamic() 56 i915->current.dynamic[offset] = state; in set_dynamic() 57 i915->dynamic_dirty |= 1 << offset; in set_dynamic() 58 i915->hardware_dirty |= I915_HW_DYNAMIC; in set_dynamic() 63 static inline void set_dynamic_array(struct i915_context *i915, in set_dynamic_array() argument 70 if (!memcmp(src, &i915->current.dynamic[offset], dwords * 4)) in set_dynamic_array() 74 i915->current.dynamic[offset + i] = src[i]; in set_dynamic_array() 75 i915->dynamic_dirty |= 1 << (offset + i); in set_dynamic_array() 78 i915->hardware_dirty |= I915_HW_DYNAMIC; in set_dynamic_array() [all …]
|
D | i915_state_immediate.c | 42 static inline void set_immediate(struct i915_context *i915, in set_immediate() argument 46 if (i915->current.immediate[offset] == state) in set_immediate() 49 i915->current.immediate[offset] = state; in set_immediate() 50 i915->immediate_dirty |= 1 << offset; in set_immediate() 51 i915->hardware_dirty |= I915_HW_IMMEDIATE; in set_immediate() 59 static void upload_S0S1(struct i915_context *i915) in upload_S0S1() argument 65 LIS0 = i915->vbo_offset; in upload_S0S1() 68 if (i915->dirty & I915_NEW_VBO) { in upload_S0S1() 69 i915->immediate_dirty |= 1 << I915_IMMEDIATE_S0; in upload_S0S1() 70 i915->hardware_dirty |= I915_HW_IMMEDIATE; in upload_S0S1() [all …]
|
D | i915_state_static.c | 95 static void update_framebuffer(struct i915_context *i915) in update_framebuffer() argument 97 struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0]; in update_framebuffer() 98 struct pipe_surface *depth_surface = i915->framebuffer.zsbuf; in update_framebuffer() 107 i915->current.cbuf_bo = tex->buffer; in update_framebuffer() 108 i915->current.cbuf_flags = BUF_3D_ID_COLOR_BACK | in update_framebuffer() 117 i915->current.cbuf_bo = NULL; in update_framebuffer() 120 i915->static_dirty |= I915_DST_BUF_COLOR; in update_framebuffer() 132 i915->current.depth_bo = tex->buffer; in update_framebuffer() 133 i915->current.depth_flags = BUF_3D_ID_DEPTH | in update_framebuffer() 137 i915->current.depth_bo = NULL; in update_framebuffer() [all …]
|
D | i915_surface.c | 53 i915_util_blitter_save_states(struct i915_context *i915) in i915_util_blitter_save_states() argument 55 util_blitter_save_blend(i915->blitter, (void *)i915->blend); in i915_util_blitter_save_states() 56 util_blitter_save_depth_stencil_alpha(i915->blitter, (void *)i915->depth_stencil); in i915_util_blitter_save_states() 57 util_blitter_save_stencil_ref(i915->blitter, &i915->stencil_ref); in i915_util_blitter_save_states() 58 util_blitter_save_rasterizer(i915->blitter, (void *)i915->rasterizer); in i915_util_blitter_save_states() 59 util_blitter_save_fragment_shader(i915->blitter, i915->fs); in i915_util_blitter_save_states() 60 util_blitter_save_vertex_shader(i915->blitter, i915->vs); in i915_util_blitter_save_states() 61 util_blitter_save_viewport(i915->blitter, &i915->viewport); in i915_util_blitter_save_states() 62 util_blitter_save_scissor(i915->blitter, &i915->scissor); in i915_util_blitter_save_states() 63 util_blitter_save_vertex_elements(i915->blitter, i915->velems); in i915_util_blitter_save_states() [all …]
|
D | i915_prim_vbuf.c | 63 struct i915_context *i915; member 118 struct i915_context *i915 = i915_render->i915; in i915_vbuf_update_vbo_state() local 120 if (i915->vbo != i915_render->vbo || in i915_vbuf_update_vbo_state() 121 i915->vbo_offset != i915_render->vbo_hw_offset) { in i915_vbuf_update_vbo_state() 122 i915->vbo = i915_render->vbo; in i915_vbuf_update_vbo_state() 123 i915->vbo_offset = i915_render->vbo_hw_offset; in i915_vbuf_update_vbo_state() 124 i915->dirty |= I915_NEW_VBO; in i915_vbuf_update_vbo_state() 139 struct i915_context *i915 = i915_render->i915; in i915_vbuf_render_get_vertex_info() local 141 if (i915->dirty) { in i915_vbuf_render_get_vertex_info() 143 i915_update_derived(i915); in i915_vbuf_render_get_vertex_info() [all …]
|
D | i915_flush.c | 45 struct i915_context *i915 = i915_context(pipe); in i915_flush_pipe() local 48 if (!i915->batch) in i915_flush_pipe() 54 if (!fence && (i915->batch->map == i915->batch->ptr)) { in i915_flush_pipe() 66 void i915_init_flush_functions( struct i915_context *i915 ) in i915_init_flush_functions() argument 68 i915->base.flush = i915_flush_pipe; in i915_init_flush_functions() 75 void i915_flush(struct i915_context *i915, in i915_flush() argument 79 struct i915_winsys_batchbuffer *batch = i915->batch; in i915_flush() 82 i915->vbo_flushed = 1; in i915_flush() 83 i915->hardware_dirty = ~0; in i915_flush() 84 i915->immediate_dirty = ~0; in i915_flush() [all …]
|
D | i915_state_derived.c | 57 static void calculate_vertex_layout(struct i915_context *i915) in calculate_vertex_layout() argument 59 const struct i915_fragment_shader *fs = i915->fs; in calculate_vertex_layout() 107 src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_POSITION, 0); in calculate_vertex_layout() 124 src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_COLOR, 0); in calculate_vertex_layout() 131 src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_COLOR, 1); in calculate_vertex_layout() 138 src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_FOG, 0); in calculate_vertex_layout() 149 src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_POSITION, 0); in calculate_vertex_layout() 152 … src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, fs->generic_mapping[i]); in calculate_vertex_layout() 170 src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_FACE, 0); in calculate_vertex_layout() 178 if (memcmp(&i915->current.vertex_info, &vinfo, sizeof(vinfo))) { in calculate_vertex_layout() [all …]
|
D | i915_state_sampler.c | 61 static void update_map(struct i915_context *i915, 82 static void update_sampler(struct i915_context *i915, in update_sampler() argument 127 if (i915->conformance_mode > 0) { in update_sampler() 148 static void update_samplers(struct i915_context *i915) in update_samplers() argument 152 i915->current.sampler_enable_nr = 0; in update_samplers() 153 i915->current.sampler_enable_flags = 0x0; in update_samplers() 155 for (unit = 0; unit < i915->num_fragment_sampler_views && unit < i915->num_samplers; in update_samplers() 159 if (i915->fragment_sampler_views[unit]) { in update_samplers() 160 struct i915_texture *texture = i915_texture(i915->fragment_sampler_views[unit]->texture); in update_samplers() 162 update_sampler(i915, in update_samplers() [all …]
|
D | i915_prim_emit.c | 48 struct i915_context *i915; member 69 emit_hw_vertex( struct i915_context *i915, in emit_hw_vertex() argument 72 const struct vertex_info *vinfo = &i915->current.vertex_info; in emit_hw_vertex() 76 assert(!i915->dirty); in emit_hw_vertex() 133 struct i915_context *i915 = setup_stage(stage)->i915; in emit_prim() local 137 if (i915->dirty) in emit_prim() 138 i915_update_derived( i915 ); in emit_prim() 140 if (i915->hardware_dirty) in emit_prim() 141 i915_emit_hardware_state( i915 ); in emit_prim() 144 vertex_size = i915->current.vertex_info.size * 4; /* in bytes */ in emit_prim() [all …]
|
D | i915_clear.c | 48 struct i915_context *i915 = i915_context(pipe); in i915_clear_emit() local 61 struct pipe_surface *cbuf = i915->framebuffer.cbufs[0]; in i915_clear_emit() 76 if (i915->current.target_fixup_format) in i915_clear_emit() 86 struct pipe_surface *zbuf = i915->framebuffer.zsbuf; in i915_clear_emit() 107 struct pipe_surface *zbuf = i915->framebuffer.zsbuf; in i915_clear_emit() 121 if (i915->hardware_dirty) in i915_clear_emit() 122 i915_emit_hardware_state(i915); in i915_clear_emit() 127 i915_emit_hardware_state(i915); in i915_clear_emit() 128 i915->vbo_flushed = 1; in i915_clear_emit() 172 if (i915->hardware_dirty) in i915_clear_emit() [all …]
|
D | i915_batch.h | 36 (i915_winsys_batchbuffer_check(i915->batch, dwords)) 39 i915_winsys_batchbuffer_dword(i915->batch, dword) 42 i915_winsys_batchbuffer_float(i915->batch, f) 45 i915_winsys_batchbuffer_reloc(i915->batch, buf, usage, offset, false) 48 i915_winsys_batchbuffer_reloc(i915->batch, buf, usage, offset, true) 51 i915_flush(i915, fence, flags) 56 extern void i915_flush(struct i915_context *i915,
|
D | i915_query.c | 86 i915_init_query_functions(struct i915_context *i915) in i915_init_query_functions() argument 88 i915->base.create_query = i915_create_query; in i915_init_query_functions() 89 i915->base.destroy_query = i915_destroy_query; in i915_init_query_functions() 90 i915->base.begin_query = i915_begin_query; in i915_init_query_functions() 91 i915->base.end_query = i915_end_query; in i915_init_query_functions() 92 i915->base.get_query_result = i915_get_query_result; in i915_init_query_functions() 93 i915->base.set_active_query_state = i915_set_active_query_state; in i915_init_query_functions()
|
D | i915_context.h | 341 void i915_set_flush_dirty(struct i915_context *i915, unsigned flush) in i915_set_flush_dirty() argument 343 i915->hardware_dirty |= I915_HW_FLUSH; in i915_set_flush_dirty() 344 i915->flush_dirty |= flush; in i915_set_flush_dirty() 351 struct draw_stage *i915_draw_render_stage( struct i915_context *i915 ); 357 struct draw_stage *i915_draw_vbuf_stage( struct i915_context *i915 ); 363 void i915_prepare_vertex_sampling(struct i915_context *i915); 364 void i915_cleanup_vertex_sampling(struct i915_context *i915); 371 void i915_emit_hardware_state(struct i915_context *i915 ); 393 void i915_init_state_functions( struct i915_context *i915 ); 394 void i915_init_flush_functions( struct i915_context *i915 ); [all …]
|
D | i915_blit.c | 36 i915_fill_blit(struct i915_context *i915, in i915_fill_blit() argument 52 if(!i915_winsys_validate_buffers(i915->batch, &dst_buffer, 1)) { in i915_fill_blit() 54 assert(i915_winsys_validate_buffers(i915->batch, &dst_buffer, 1)); in i915_fill_blit() 85 i915_set_flush_dirty(i915, I915_FLUSH_CACHE); in i915_fill_blit() 89 i915_copy_blit(struct i915_context *i915, in i915_copy_blit() argument 113 if(!i915_winsys_validate_buffers(i915->batch, buffers, 2)) { in i915_copy_blit() 115 assert(i915_winsys_validate_buffers(i915->batch, buffers, 2)); in i915_copy_blit() 159 i915_set_flush_dirty(i915, I915_FLUSH_CACHE); in i915_copy_blit()
|
D | i915_resource.c | 37 i915_init_resource_functions(struct i915_context *i915 ) in i915_init_resource_functions() argument 39 i915->base.transfer_map = u_transfer_map_vtbl; in i915_init_resource_functions() 40 i915->base.transfer_flush_region = u_transfer_flush_region_vtbl; in i915_init_resource_functions() 41 i915->base.transfer_unmap = u_transfer_unmap_vtbl; in i915_init_resource_functions() 42 i915->base.buffer_subdata = i915_buffer_subdata; in i915_init_resource_functions() 43 i915->base.texture_subdata = u_default_texture_subdata; in i915_init_resource_functions()
|
D | i915_state_fpc.c | 35 static void update_hw_constants(struct i915_context *i915) in update_hw_constants() argument 37 i915->hardware_dirty |= I915_HW_CONSTANTS; in update_hw_constants() 50 static void update_fs(struct i915_context *i915) in update_fs() argument 52 i915->hardware_dirty |= I915_HW_PROGRAM; in update_fs()
|
/external/mesa3d/src/mesa/drivers/dri/i915/ |
D | i915_state.c | 56 struct i915_context *i915 = I915_CONTEXT(ctx); in i915_update_stencil() local 99 GLuint dw = i915->state.Ctx[reg]; \ in i915_update_stencil() 102 dirty |= dw != i915->state.Ctx[reg]; \ in i915_update_stencil() 103 i915->state.Ctx[reg] = dw; \ in i915_update_stencil() 159 I915_STATECHANGE(i915, I915_UPLOAD_CTX); in i915_update_stencil() 182 struct i915_context *i915 = I915_CONTEXT(ctx); in i915AlphaFunc() local 189 dw = i915->state.Ctx[I915_CTXREG_LIS6]; in i915AlphaFunc() 193 if (dw != i915->state.Ctx[I915_CTXREG_LIS6]) { in i915AlphaFunc() 194 i915->state.Ctx[I915_CTXREG_LIS6] = dw; in i915AlphaFunc() 195 I915_STATECHANGE(i915, I915_UPLOAD_CTX); in i915AlphaFunc() [all …]
|
D | i915_vtbl.c | 55 struct i915_context *i915 = i915_context(&intel->ctx); in i915_render_prevalidate() local 57 i915ValidateFragmentProgram(i915); in i915_render_prevalidate() 70 struct i915_context *i915 = i915_context(&intel->ctx); in i915_reduced_primitive_state() local 71 GLuint st1 = i915->state.Stipple[I915_STPREG_ST1]; in i915_reduced_primitive_state() 87 i915->intel.reduced_primitive = rprim; in i915_reduced_primitive_state() 89 if (st1 != i915->state.Stipple[I915_STPREG_ST1]) { in i915_reduced_primitive_state() 92 I915_STATECHANGE(i915, I915_UPLOAD_STIPPLE); in i915_reduced_primitive_state() 93 i915->state.Stipple[I915_STPREG_ST1] = st1; in i915_reduced_primitive_state() 104 struct i915_context *i915 = i915_context(&intel->ctx); in i915_check_vertex_size() local 105 int lis2 = i915->state.Ctx[I915_CTXREG_LIS2]; in i915_check_vertex_size() [all …]
|
D | i915_texstate.c | 143 struct i915_context *i915 = i915_context(ctx); in i915_update_tex_unit() local 149 GLuint *state = i915->state.Tex[unit], format; in i915_update_tex_unit() 158 if (i915->state.tex_buffer[unit] != NULL) { in i915_update_tex_unit() 159 drm_intel_bo_unreference(i915->state.tex_buffer[unit]); in i915_update_tex_unit() 160 i915->state.tex_buffer[unit] = NULL; in i915_update_tex_unit() 172 i915->state.tex_buffer[unit] = intelObj->mt->region->bo; in i915_update_tex_unit() 173 i915->state.tex_offset[unit] = intelObj->mt->offset; in i915_update_tex_unit() 391 I915_ACTIVESTATE(i915, I915_UPLOAD_TEX(unit), true); in i915_update_tex_unit() 395 I915_STATECHANGE(i915, I915_UPLOAD_TEX(unit)); in i915_update_tex_unit() 436 struct i915_context *i915 = i915_context(&intel->ctx); in i915UpdateTextureState() local [all …]
|
D | i915_context.h | 263 #define I915_STATECHANGE(i915, flag) \ argument 265 INTEL_FIREVERTICES( &(i915)->intel ); \ 266 (i915)->state.emitted &= ~(flag); \ 269 #define I915_ACTIVESTATE(i915, flag, mode) \ argument 271 INTEL_FIREVERTICES( &(i915)->intel ); \ 273 (i915)->state.active |= (flag); \ 275 (i915)->state.active &= ~(flag); \ 282 extern void i915InitVtbl(struct i915_context *i915); 338 extern void i915InitState(struct i915_context *i915); 353 extern void i915ValidateFragmentProgram(struct i915_context *i915);
|
D | i915_program.c | 460 i915_init_program(struct i915_context *i915, struct i915_fragment_program *p) in i915_init_program() argument 462 struct gl_context *ctx = &i915->intel.ctx; in i915_init_program() 538 i915_upload_program(struct i915_context *i915, in i915_upload_program() argument 549 if (i915->state.ProgramSize != (program_size + decl_size) || in i915_upload_program() 550 memcmp(i915->state.Program + decl_size, p->program, in i915_upload_program() 552 I915_STATECHANGE(i915, I915_UPLOAD_PROGRAM); in i915_upload_program() 553 memcpy(i915->state.Program, p->declarations, decl_size * sizeof(int)); in i915_upload_program() 554 memcpy(i915->state.Program + decl_size, p->program, in i915_upload_program() 556 i915->state.ProgramSize = decl_size + program_size; in i915_upload_program() 565 I915_ACTIVESTATE(i915, I915_UPLOAD_CONSTANTS, 1); in i915_upload_program() [all …]
|
/external/minigbm/ |
D | i915.c | 209 struct i915_device *i915 = bo->drv->priv; in i915_align_dimensions() local 233 if (i915->gen == 3) { in i915_align_dimensions() 244 if (i915->gen > 3) { in i915_align_dimensions() 253 if (i915->gen <= 3 && *stride > 8192) in i915_align_dimensions() 275 struct i915_device *i915; in i915_init() local 278 i915 = calloc(1, sizeof(*i915)); in i915_init() 279 if (!i915) in i915_init() 288 free(i915); in i915_init() 292 i915->gen = i915_get_gen(device_id); in i915_init() 296 get_param.value = &i915->has_llc; in i915_init() [all …]
|