/third_party/mesa3d/src/gallium/drivers/r300/ |
H A D | r300_texture_desc.c | 83 static boolean r300_texture_macro_switch(struct r300_resource *tex, in r300_texture_macro_switch() argument 90 if (tex->b.nr_samples > 1) { in r300_texture_macro_switch() 94 tile = r300_get_pixel_alignment(tex->b.format, tex->b.nr_samples, in r300_texture_macro_switch() 95 tex->tex.microtile, RADEON_LAYOUT_TILED, dim, 0); in r300_texture_macro_switch() 97 texdim = u_minify(tex->tex.width0, level); in r300_texture_macro_switch() 99 texdim = u_minify(tex->tex in r300_texture_macro_switch() 114 r300_texture_get_stride(struct r300_screen *screen, struct r300_resource *tex, unsigned level) r300_texture_get_stride() argument 151 r300_texture_get_nblocksy(struct r300_resource *tex, unsigned level, boolean *out_aligned_for_cbzb) r300_texture_get_nblocksy() argument 212 r300_setup_miptree(struct r300_screen *screen, struct r300_resource *tex, boolean align_for_cbzb) r300_setup_miptree() argument 270 r300_setup_flags(struct r300_resource *tex) r300_setup_flags() argument 284 r300_setup_cbzb_flags(struct r300_screen *rscreen, struct r300_resource *tex) r300_setup_cbzb_flags() argument 314 r300_setup_hyperz_properties(struct r300_screen *screen, struct r300_resource *tex) r300_setup_hyperz_properties() argument 414 r300_setup_cmask_properties(struct r300_screen *screen, struct r300_resource *tex) r300_setup_cmask_properties() argument 467 r300_setup_tiling(struct r300_screen *screen, struct r300_resource *tex) r300_setup_tiling() argument 524 r300_tex_print_info(struct r300_resource *tex, const char *func) r300_tex_print_info() argument 540 r300_texture_desc_init(struct r300_screen *rscreen, struct r300_resource *tex, const struct pipe_resource *base) r300_texture_desc_init() argument 633 r300_texture_get_offset(struct r300_resource *tex, unsigned level, unsigned layer) r300_texture_get_offset() argument [all...] |
H A D | r300_texture.c | 905 struct r300_resource *tex, in r300_texture_setup_format_state() 912 struct pipe_resource *pt = &tex->b; in r300_texture_setup_format_state() 913 struct r300_texture_desc *desc = &tex->tex; in r300_texture_setup_format_state() 991 struct r300_resource *tex = r300_resource(surf->base.texture); in r300_texture_setup_fb_state() local 992 unsigned level = surf->base.u.tex.level; in r300_texture_setup_fb_state() 994 r300_stride_to_width(surf->base.format, tex->tex.stride_in_bytes[level]); in r300_texture_setup_fb_state() 1000 R300_DEPTHMACROTILE(tex->tex in r300_texture_setup_fb_state() 904 r300_texture_setup_format_state(struct r300_screen *screen, struct r300_resource *tex, enum pipe_format format, unsigned level, unsigned width0_override, unsigned height0_override, struct r300_texture_format_state *out) r300_texture_setup_format_state() argument 1029 struct r300_resource* tex = (struct r300_resource*)texture; r300_resource_get_handle() local 1051 struct r300_resource *tex = NULL; r300_texture_create_object() local 1199 struct r300_resource* tex = r300_resource(texture); r300_create_surface_custom() local [all...] |
/third_party/mesa3d/src/compiler/nir/ |
H A D | nir_lower_tex.c | 100 project_src(nir_builder *b, nir_tex_instr *tex) in project_src() argument 103 int proj_index = nir_tex_instr_src_index(tex, nir_tex_src_projector); in project_src() 107 b->cursor = nir_before_instr(&tex->instr); in project_src() 110 nir_frcp(b, nir_ssa_for_src(b, tex->src[proj_index].src, 1)); in project_src() 113 for (unsigned i = 0; i < tex->num_srcs; i++) { in project_src() 114 switch (tex->src[i].src_type) { in project_src() 122 nir_ssa_for_src(b, tex->src[i].src, nir_tex_instr_src_size(tex, i)); in project_src() 128 if (tex->is_array && tex in project_src() 164 lower_offset(nir_builder *b, nir_tex_instr *tex) lower_offset() argument 220 lower_rect(nir_builder *b, nir_tex_instr *tex) lower_rect() argument 241 lower_rect_tex_scale(nir_builder *b, nir_tex_instr *tex) lower_rect_tex_scale() argument 259 lower_lod(nir_builder *b, nir_tex_instr *tex, nir_ssa_def *lod) lower_lod() argument 285 lower_implicit_lod(nir_builder *b, nir_tex_instr *tex) lower_implicit_lod() argument 292 lower_zero_lod(nir_builder *b, nir_tex_instr *tex) lower_zero_lod() argument 306 sample_plane(nir_builder *b, nir_tex_instr *tex, int plane, const nir_lower_tex_options *options) sample_plane() argument 345 convert_yuv_to_rgb(nir_builder *b, nir_tex_instr *tex, nir_ssa_def *y, nir_ssa_def *u, nir_ssa_def *v, nir_ssa_def *a, const nir_lower_tex_options *options, unsigned texture_index) convert_yuv_to_rgb() argument 401 lower_y_uv_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_y_uv_external() argument 420 lower_y_u_v_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_y_u_v_external() argument 440 lower_yx_xuxv_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_yx_xuxv_external() argument 459 lower_xy_uxvx_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_xy_uxvx_external() argument 478 lower_ayuv_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_ayuv_external() argument 496 lower_y41x_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_y41x_external() argument 514 lower_xyuv_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_xyuv_external() argument 532 lower_yuv_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_yuv_external() argument 550 lower_yu_yv_external(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options, unsigned texture_index) lower_yu_yv_external() argument 572 replace_gradient_with_lod(nir_builder *b, nir_ssa_def *lod, nir_tex_instr *tex) replace_gradient_with_lod() argument 591 lower_gradient_cube_map(nir_builder *b, nir_tex_instr *tex) lower_gradient_cube_map() argument 738 lower_gradient(nir_builder *b, nir_tex_instr *tex) lower_gradient() argument 798 lower_tex_to_txd(nir_builder *b, nir_tex_instr *tex) lower_tex_to_txd() argument 837 lower_txb_to_txl(nir_builder *b, nir_tex_instr *tex) lower_txb_to_txl() argument 876 saturate_src(nir_builder *b, nir_tex_instr *tex, unsigned sat_mask) saturate_src() argument 949 swizzle_tg4_broadcom(nir_builder *b, nir_tex_instr *tex) swizzle_tg4_broadcom() argument 964 swizzle_result(nir_builder *b, nir_tex_instr *tex, const uint8_t swizzle[4]) swizzle_result() argument 1004 linearize_srgb_result(nir_builder *b, nir_tex_instr *tex) linearize_srgb_result() argument 1036 lower_tex_packing(nir_builder *b, nir_tex_instr *tex, const nir_lower_tex_options *options) lower_tex_packing() argument 1104 lower_array_layer_round_even(nir_builder *b, nir_tex_instr *tex) lower_array_layer_round_even() argument 1125 sampler_index_lt(nir_tex_instr *tex, unsigned max) sampler_index_lt() argument 1144 lower_tg4_offsets(nir_builder *b, nir_tex_instr *tex) lower_tg4_offsets() argument 1201 nir_lower_txs_lod(nir_builder *b, nir_tex_instr *tex) nir_lower_txs_lod() argument 1247 nir_lower_txs_cube_array(nir_builder *b, nir_tex_instr *tex) nir_lower_txs_cube_array() argument 1266 nir_lower_ms_txf_to_fragment_fetch(nir_builder *b, nir_tex_instr *tex) nir_lower_ms_txf_to_fragment_fetch() argument 1315 nir_lower_samples_identical_to_fragment_fetch(nir_builder *b, nir_tex_instr *tex) nir_lower_samples_identical_to_fragment_fetch() argument 1330 nir_lower_lod_zero_width(nir_builder *b, nir_tex_instr *tex) nir_lower_lod_zero_width() argument 1372 nir_tex_instr *tex = nir_instr_as_tex(instr); nir_lower_tex_block() local [all...] |
H A D | nir_lower_drawpixels.c | 38 nir_variable *texcoord, *texcoord_const, *scale, *bias, *tex, *pixelmap; member 120 nir_tex_instr *tex; in lower_color() local 132 if (!state->tex) { in lower_color() 133 state->tex = in lower_color() 135 state->tex->data.binding = state->options->drawpix_sampler; in lower_color() 136 state->tex->data.explicit_binding = true; in lower_color() 137 state->tex->data.how_declared = nir_var_hidden; in lower_color() 140 nir_deref_instr *tex_deref = nir_build_deref_var(b, state->tex); in lower_color() 145 tex = nir_tex_instr_create(state->shader, 3); in lower_color() 146 tex in lower_color() [all...] |
H A D | nir_lower_input_attachments.c | 104 nir_tex_instr *tex = nir_tex_instr_create(b->shader, 3 + multisampled); in try_lower_input_load() local 106 tex->op = nir_texop_txf; in try_lower_input_load() 107 tex->sampler_dim = image_dim; in try_lower_input_load() 109 tex->dest_type = in try_lower_input_load() 111 tex->is_array = true; in try_lower_input_load() 112 tex->is_shadow = false; in try_lower_input_load() 113 tex->is_sparse = load->intrinsic == nir_intrinsic_image_deref_sparse_load; in try_lower_input_load() 115 tex->texture_index = 0; in try_lower_input_load() 116 tex->sampler_index = 0; in try_lower_input_load() 118 tex in try_lower_input_load() 155 try_lower_input_texop(nir_builder *b, nir_tex_instr *tex, const nir_input_attachment_options *options) try_lower_input_texop() argument 186 nir_tex_instr *tex = nir_instr_as_tex(instr); lower_input_attachments_instr() local [all...] |
H A D | nir_builtin_builder.c | 334 nir_get_texture_size(nir_builder *b, nir_tex_instr *tex) in nir_get_texture_size() argument 336 b->cursor = nir_before_instr(&tex->instr); in nir_get_texture_size() 341 for (unsigned i = 0; i < tex->num_srcs; i++) { in nir_get_texture_size() 342 if (tex->src[i].src_type == nir_tex_src_texture_deref || in nir_get_texture_size() 343 tex->src[i].src_type == nir_tex_src_sampler_deref || in nir_get_texture_size() 344 tex->src[i].src_type == nir_tex_src_texture_offset || in nir_get_texture_size() 345 tex->src[i].src_type == nir_tex_src_sampler_offset || in nir_get_texture_size() 346 tex->src[i].src_type == nir_tex_src_texture_handle || in nir_get_texture_size() 347 tex->src[i].src_type == nir_tex_src_sampler_handle) in nir_get_texture_size() 353 txs->sampler_dim = tex in nir_get_texture_size() 386 nir_get_texture_lod(nir_builder *b, nir_tex_instr *tex) nir_get_texture_lod() argument [all...] |
H A D | nir_lower_tex_shadow.c | 35 /* To be consistent we also want to lower tex when we lower anything, in nir_lower_tex_shadow_filter() 38 nir_tex_instr *tex = nir_instr_as_tex(instr); in nir_lower_tex_shadow_filter() 39 if (tex->op != nir_texop_txb && in nir_lower_tex_shadow_filter() 40 tex->op != nir_texop_txl && in nir_lower_tex_shadow_filter() 41 tex->op != nir_texop_txd && in nir_lower_tex_shadow_filter() 42 tex->op != nir_texop_tex) in nir_lower_tex_shadow_filter() 45 return tex->is_shadow; in nir_lower_tex_shadow_filter() 79 nir_tex_instr *tex = nir_instr_as_tex(instr); in nir_lower_tex_shadow_impl() local 82 unsigned num_components = nir_tex_instr_result_size(tex); in nir_lower_tex_shadow_impl() 85 tex in nir_lower_tex_shadow_impl() [all...] |
/third_party/mesa3d/src/gallium/drivers/r600/sfn/ |
H A D | sfn_nir_lower_tex.cpp | 33 static bool lower_coord_shift_normalized(nir_builder *b, nir_tex_instr *tex) in lower_coord_shift_normalized() argument 35 b->cursor = nir_before_instr(&tex->instr); in lower_coord_shift_normalized() 37 nir_ssa_def * size = nir_i2f32(b, nir_get_texture_size(b, tex)); in lower_coord_shift_normalized() 40 int coord_index = nir_tex_instr_src_index(tex, nir_tex_src_coord); in lower_coord_shift_normalized() 42 if (unlikely(tex->array_is_lowered_cube)) { in lower_coord_shift_normalized() 43 auto corr2 = nir_fadd(b, nir_channels(b, tex->src[coord_index].src.ssa, 3), in lower_coord_shift_normalized() 47 b, tex->src[coord_index].src.ssa, 2)); in lower_coord_shift_normalized() 51 tex->src[coord_index].src.ssa); in lower_coord_shift_normalized() 54 nir_instr_rewrite_src(&tex->instr, &tex in lower_coord_shift_normalized() 59 lower_coord_shift_unnormalized(nir_builder *b, nir_tex_instr *tex) lower_coord_shift_unnormalized() argument 88 nir_tex_instr *tex = nir_instr_as_tex(instr); r600_nir_lower_int_tg4_impl() local 140 lower_txl_txf_array_or_cube(nir_builder *b, nir_tex_instr *tex) lower_txl_txf_array_or_cube() argument 205 nir_tex_instr *tex = nir_instr_as_tex(instr); r600_nir_lower_txl_txf_array_or_cube_impl() local 257 auto tex = nir_instr_as_tex(instr); r600_nir_lower_cube_to_2darray_impl() local [all...] |
H A D | sfn_instr_tex.cpp | 275 auto tex = new TexInstr( opcode, dest, dest_swz, src, sampler_id, res_id, nullptr); in from_string() local 285 tex->read_tex_coord_normalitazion(next_token); in from_string() 287 tex->set_tex_param(next_token); in from_string() 291 return tex; in from_string() 317 unreachable("Unknown token in tex param"); in set_tex_param() 321 bool TexInstr::from_nir(nir_tex_instr *tex, Shader& shader) in from_nir() argument 323 Inputs src(*tex, shader.value_factory()); in from_nir() 325 if (tex->sampler_dim == GLSL_SAMPLER_DIM_BUF) { in from_nir() 326 switch (tex->op) { in from_nir() 328 return emit_tex_txs(tex, sr in from_nir() 385 emit_tex_tex(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_tex_tex() argument 412 emit_tex_txl_txb(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_tex_txl_txb() argument 438 emit_tex_txf(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_tex_txf() argument 489 emit_buf_txf(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_buf_txf() argument 533 emit_tex_tex_ms_direct(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_tex_tex_ms_direct() argument 571 emit_tex_tex_ms(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_tex_tex_ms() argument 675 emit_tex_txd(nir_tex_instr *tex, Inputs& src, Shader& shader) emit_tex_txd() argument 762 emit_tex_txs(nir_tex_instr *tex, Inputs& src, RegisterVec4::Swizzle dest_swz, Shader& shader) emit_tex_txs() argument 814 emit_tex_tg4(nir_tex_instr* tex, Inputs& src , Shader& shader) emit_tex_tg4() argument 882 r600::sfn_log << SfnLog::tex << "emit literal offsets\\n"; emit_tex_tg4() member in r600::SfnLog 1053 emit_tex_lod(nir_tex_instr* tex, Inputs& src, Shader& shader) emit_tex_lod() argument [all...] |
/third_party/mesa3d/src/gallium/drivers/i915/ |
H A D | i915_resource_texture.c | 120 i915_texture_set_level_info(struct i915_texture *tex, unsigned level, in i915_texture_set_level_info() argument 123 assert(level < ARRAY_SIZE(tex->nr_images)); in i915_texture_set_level_info() 125 assert(!tex->image_offset[level]); in i915_texture_set_level_info() 127 tex->nr_images[level] = nr_images; in i915_texture_set_level_info() 128 tex->image_offset[level] = MALLOC(nr_images * sizeof(struct offset_pair)); in i915_texture_set_level_info() 129 tex->image_offset[level][0].nblocksx = 0; in i915_texture_set_level_info() 130 tex->image_offset[level][0].nblocksy = 0; in i915_texture_set_level_info() 134 i915_texture_offset(const struct i915_texture *tex, unsigned level, in i915_texture_offset() argument 138 x = tex->image_offset[level][layer].nblocksx * in i915_texture_offset() 139 util_format_get_blocksize(tex in i915_texture_offset() 146 i915_texture_set_image_offset(struct i915_texture *tex, unsigned level, unsigned img, unsigned nblocksx, unsigned nblocksy) i915_texture_set_image_offset() argument 164 i915_texture_tiling(struct i915_screen *is, struct i915_texture *tex) i915_texture_tiling() argument 189 i9x5_scanout_layout(struct i915_texture *tex) i9x5_scanout_layout() argument 226 i9x5_display_target_layout(struct i915_texture *tex) i9x5_display_target_layout() argument 258 i9x5_special_layout(struct i915_texture *tex) i9x5_special_layout() argument 325 i9x5_texture_layout_cube(struct i915_texture *tex) i9x5_texture_layout_cube() argument 361 i915_texture_layout_2d(struct i915_texture *tex) i915_texture_layout_2d() argument 389 i915_texture_layout_3d(struct i915_texture *tex) i915_texture_layout_3d() argument 434 i915_texture_layout(struct i915_texture *tex) i915_texture_layout() argument 462 i945_texture_layout_2d(struct i915_texture *tex) i945_texture_layout_2d() argument 525 i945_texture_layout_3d(struct i915_texture *tex) i945_texture_layout_3d() argument 642 i945_texture_layout_cube(struct i915_texture *tex) i945_texture_layout_cube() argument 738 i945_texture_layout(struct i915_texture *tex) i945_texture_layout() argument 778 struct i915_texture *tex = i915_texture(texture); i915_resource_get_handle() local 791 struct i915_texture *tex = i915_texture(resource); i915_texture_transfer_map() local 870 struct i915_texture *tex = i915_texture(itransfer->b.resource); i915_texture_transfer_unmap() local 918 struct i915_texture *tex = CALLOC_STRUCT(i915_texture); i915_texture_create() local 974 struct i915_texture *tex; i915_texture_from_handle() local [all...] |
/third_party/mesa3d/src/gallium/drivers/radeonsi/ |
H A D | si_texture.c | 131 static unsigned si_texture_get_offset(struct si_screen *sscreen, struct si_texture *tex, in si_texture_get_offset() argument 137 if (tex->surface.is_linear) { in si_texture_get_offset() 138 pitch = tex->surface.u.gfx9.pitch[level]; in si_texture_get_offset() 140 pitch = tex->surface.u.gfx9.surf_pitch; in si_texture_get_offset() 143 *stride = pitch * tex->surface.bpe; in si_texture_get_offset() 144 *layer_stride = tex->surface.u.gfx9.surf_slice_size; in si_texture_get_offset() 151 return tex->surface.u.gfx9.surf_offset + box->z * tex->surface.u.gfx9.surf_slice_size + in si_texture_get_offset() 152 tex->surface.u.gfx9.offset[level] + in si_texture_get_offset() 153 (box->y / tex in si_texture_get_offset() 324 si_eliminate_fast_color_clear(struct si_context *sctx, struct si_texture *tex, bool *ctx_flushed) si_eliminate_fast_color_clear() argument 343 si_texture_discard_cmask(struct si_screen *sscreen, struct si_texture *tex) si_texture_discard_cmask() argument 366 si_can_disable_dcc(struct si_texture *tex) si_can_disable_dcc() argument 376 si_texture_discard_dcc(struct si_screen *sscreen, struct si_texture *tex) si_texture_discard_dcc() argument 410 si_texture_disable_dcc(struct si_context *sctx, struct si_texture *tex) si_texture_disable_dcc() argument 427 si_reallocate_texture_inplace(struct si_context *sctx, struct si_texture *tex, unsigned new_bind_flag, bool invalidate_storage) si_reallocate_texture_inplace() argument 530 si_set_tex_bo_metadata(struct si_screen *sscreen, struct si_texture *tex) si_set_tex_bo_metadata() argument 556 si_displayable_dcc_needs_explicit_flush(struct si_texture *tex) si_displayable_dcc_needs_explicit_flush() argument 583 struct si_texture *tex = (struct si_texture *)resource; si_resource_get_param() local 664 struct si_texture *tex = (struct si_texture *)resource; si_texture_get_handle() local 827 si_print_texture_info(struct si_screen *sscreen, struct si_texture *tex, struct u_log_context *log) si_print_texture_info() argument 921 struct si_texture *tex; si_texture_create_object() local 1317 struct si_texture *tex = si_texture_create_with_modifier() local 1348 struct si_texture *tex = (struct si_texture *)res; si_texture_commit() local 1542 struct si_texture *tex; si_texture_from_winsys_buffer() local 1673 struct si_auxiliary_texture *tex = CALLOC_STRUCT_CL(si_auxiliary_texture); si_texture_from_handle() local 1693 struct si_texture *tex = (struct si_texture *)texture; si_init_flushed_depth_texture() local 1794 si_can_invalidate_texture(struct si_screen *sscreen, struct si_texture *tex, unsigned transfer_usage, const struct pipe_box *box) si_can_invalidate_texture() argument 1803 si_texture_invalidate_storage(struct si_context *sctx, struct si_texture *tex) si_texture_invalidate_storage() argument 1827 struct si_texture *tex = (struct si_texture *)texture; si_texture_transfer_map() local 1963 struct si_texture *tex = (struct si_texture *)texture; si_texture_transfer_unmap() local 2064 vi_dcc_formats_are_incompatible(struct pipe_resource *tex, unsigned level, enum pipe_format view_format) vi_dcc_formats_are_incompatible() argument 2075 vi_disable_dcc_if_incompatible_format(struct si_context *sctx, struct pipe_resource *tex, unsigned level, enum pipe_format view_format) vi_disable_dcc_if_incompatible_format() argument 2085 si_create_surface(struct pipe_context *pipe, struct pipe_resource *tex, const struct pipe_surface *templ) si_create_surface() argument 2273 struct si_texture *tex = (struct si_texture *)resource; si_check_resource_capability() local [all...] |
H A D | si_blit.c | 154 surf_tmpl.u.tex.level = level; in si_blit_dbcb_copy() 160 surf_tmpl.u.tex.first_layer = layer; in si_blit_dbcb_copy() 161 surf_tmpl.u.tex.last_layer = layer; in si_blit_dbcb_copy() 224 surf_tmpl.u.tex.level = level; in si_blit_decompress_zs_planes_in_place() 232 surf_tmpl.u.tex.first_layer = layer; in si_blit_decompress_zs_planes_in_place() 233 surf_tmpl.u.tex.last_layer = layer; in si_blit_decompress_zs_planes_in_place() 292 static void si_decompress_depth(struct si_context *sctx, struct si_texture *tex, in si_decompress_depth() argument 303 levels_z = level_mask & tex->dirty_level_mask; in si_decompress_depth() 306 if (si_can_sample_zs(tex, false)) in si_decompress_depth() 313 levels_s = level_mask & tex in si_decompress_depth() 419 struct si_texture *tex; si_decompress_sampler_depth_textures() local 443 si_blit_decompress_color(struct si_context *sctx, struct si_texture *tex, unsigned first_level, unsigned last_level, unsigned first_layer, unsigned last_layer, bool need_dcc_decompress, bool need_fmask_expand) si_blit_decompress_color() argument 552 si_decompress_color_texture(struct si_context *sctx, struct si_texture *tex, unsigned first_level, unsigned last_level, bool need_fmask_expand) si_decompress_color_texture() argument 574 struct si_texture *tex; si_decompress_sampler_color_textures() local 595 struct si_texture *tex; si_decompress_image_color_textures() local 609 si_check_render_feedback_texture(struct si_context *sctx, struct si_texture *tex, unsigned first_level, unsigned last_level, unsigned first_layer, unsigned last_layer) si_check_render_feedback_texture() argument 645 struct si_texture *tex; si_check_render_feedback_textures() local 667 struct si_texture *tex; si_check_render_feedback_images() local 686 struct si_texture *tex; si_check_render_feedback_resident_textures() local 703 struct si_texture *tex; si_check_render_feedback_resident_images() local 749 struct si_texture *tex = (struct si_texture *)view->texture; si_decompress_resident_textures() local 759 struct si_texture *tex = (struct si_texture *)view->texture; si_decompress_resident_textures() local 772 struct si_texture *tex = (struct si_texture *)view->resource; si_decompress_resident_images() local 845 si_decompress_subresource(struct pipe_context *ctx, struct pipe_resource *tex, unsigned planes, unsigned level, unsigned first_layer, unsigned last_layer, bool need_fmask_expand) si_decompress_subresource() argument 1249 si_generate_mipmap(struct pipe_context *ctx, struct pipe_resource *tex, enum pipe_format format, unsigned base_level, unsigned last_level, unsigned first_layer, unsigned last_layer) si_generate_mipmap() argument 1283 struct si_texture *tex = (struct si_texture *)res; si_flush_resource() local 1308 si_decompress_dcc(struct si_context *sctx, struct si_texture *tex) si_decompress_dcc() argument [all...] |
/third_party/mesa3d/src/broadcom/vulkan/ |
H A D | v3dvx_image.c | 48 v3dvx_pack(image_view->texture_shader_state[index], TEXTURE_SHADER_STATE, tex) { in pack_texture_shader_state_helper() 50 tex.level_0_is_strictly_uif = in pack_texture_shader_state_helper() 54 tex.level_0_xor_enable = (image->slices[0].tiling == V3D_TILING_UIF_XOR); in pack_texture_shader_state_helper() 56 if (tex.level_0_is_strictly_uif) in pack_texture_shader_state_helper() 57 tex.level_0_ub_pad = image->slices[0].ub_pad; in pack_texture_shader_state_helper() 62 tex.uif_xor_disable = false; in pack_texture_shader_state_helper() 63 if (tex.uif_xor_disable || in pack_texture_shader_state_helper() 64 tex.level_0_is_strictly_uif) { in pack_texture_shader_state_helper() 65 tex.extended = true; in pack_texture_shader_state_helper() 68 tex in pack_texture_shader_state_helper() [all...] |
/third_party/mesa3d/src/gallium/drivers/svga/ |
H A D | svga_resource_texture.h | 153 struct svga_texture *tex = (struct svga_texture *)resource; in svga_texture() local 154 assert(tex == NULL || tex->b.target != PIPE_BUFFER); in svga_texture() 155 return tex; in svga_texture() 173 svga_age_texture_view(struct svga_texture *tex, unsigned level) in svga_age_texture_view() argument 175 assert(level < ARRAY_SIZE(tex->view_age)); in svga_age_texture_view() 176 tex->view_age[level] = ++(tex->age); in svga_age_texture_view() 182 check_face_level(const struct svga_texture *tex, in check_face_level() argument 185 if (tex in check_face_level() 203 svga_define_texture_level(struct svga_texture *tex, unsigned face,unsigned level) svga_define_texture_level() argument 212 svga_is_texture_level_defined(const struct svga_texture *tex, unsigned face, unsigned level) svga_is_texture_level_defined() argument 221 svga_set_texture_rendered_to(struct svga_texture *tex) svga_set_texture_rendered_to() argument 228 svga_clear_texture_rendered_to(struct svga_texture *tex) svga_clear_texture_rendered_to() argument 234 svga_was_texture_rendered_to(const struct svga_texture *tex) svga_was_texture_rendered_to() argument 240 svga_set_texture_dirty(struct svga_texture *tex, unsigned face, unsigned level) svga_set_texture_dirty() argument 248 svga_clear_texture_dirty(struct svga_texture *tex) svga_clear_texture_dirty() argument 257 svga_is_texture_dirty(const struct svga_texture *tex, unsigned face, unsigned level) svga_is_texture_dirty() argument [all...] |
H A D | svga_resource_texture.c | 243 struct svga_texture *tex, in readback_texture_surface() 249 tex->surface_state = SVGA_SURFACE_STATE_UPDATED; in readback_texture_surface() 334 struct svga_texture *tex = svga_texture(texture); in svga_texture_transfer_map_direct() local 335 struct svga_winsys_surface *surf = tex->handle; in svga_texture_transfer_map_direct() 343 if (!svga->swc->force_coherent || tex->imported) { in svga_texture_transfer_map_direct() 345 readback_texture_surface(svga, tex, surf); in svga_texture_transfer_map_direct() 353 svga_clear_texture_rendered_to(tex); in svga_texture_transfer_map_direct() 358 if (svga_is_texture_dirty(tex, st->slice, level)) { in svga_texture_transfer_map_direct() 432 baseLevelSize.width = tex->b.width0; in svga_texture_transfer_map_direct() 433 baseLevelSize.height = tex in svga_texture_transfer_map_direct() 242 readback_texture_surface(struct svga_context *svga, struct svga_texture *tex, struct svga_winsys_surface *surf) readback_texture_surface() argument 478 struct svga_texture *tex = svga_texture(texture); svga_texture_transfer_map() local 691 struct svga_texture *tex = svga_texture(texture); svga_texture_transfer_unmap_dma() local 719 struct svga_texture *tex = svga_texture(transfer->resource); svga_texture_transfer_unmap_direct() local 782 struct svga_texture *tex = svga_texture(transfer->resource); svga_texture_transfer_unmap() local 830 struct svga_texture *tex; svga_texture_create() local 1148 struct svga_texture *tex; svga_texture_from_handle() local 1238 struct svga_texture *tex = svga_texture(pt); svga_texture_generate_mipmap() local 1407 struct svga_texture *tex = svga_texture(texture); svga_texture_transfer_map_upload() local 1447 struct svga_texture *tex = svga_texture(texture); svga_texture_transfer_unmap_upload() local [all...] |
H A D | svga_surface.c | 183 struct svga_texture *tex, in svga_texture_view_surface() 209 key->size.width = u_minify(tex->b.width0, start_mip); in svga_texture_view_surface() 210 key->size.height = u_minify(tex->b.height0, start_mip); in svga_texture_view_surface() 211 key->size.depth = zslice_pick < 0 ? u_minify(tex->b.depth0, start_mip) : 1; in svga_texture_view_surface() 217 key->sampleCount = tex->b.nr_samples > 1 ? tex->b.nr_samples : 0; in svga_texture_view_surface() 224 if (tex->b.target == PIPE_TEXTURE_CUBE && layer_pick < 0) { in svga_texture_view_surface() 227 } else if (tex->b.target == PIPE_TEXTURE_1D_ARRAY || in svga_texture_view_surface() 228 tex->b.target == PIPE_TEXTURE_2D_ARRAY) { in svga_texture_view_surface() 237 if (cacheable && tex in svga_texture_view_surface() 182 svga_texture_view_surface(struct svga_context *svga, struct svga_texture *tex, unsigned bind_flags, SVGA3dSurfaceAllFlags flags, SVGA3dSurfaceFormat format, unsigned start_mip, unsigned num_mip, int layer_pick, unsigned num_layers, int zslice_pick, boolean cacheable, struct svga_host_surface_cache_key *key) svga_texture_view_surface() argument 290 struct svga_texture *tex = svga_texture(pt); svga_create_surface_view() local 471 struct svga_texture *tex = svga_texture(s->base.texture); create_backed_surface_view() local 723 struct svga_texture *tex = svga_texture(surf->texture); svga_mark_surface_dirty() local 785 struct svga_texture *tex = svga_texture(surf->texture); svga_propagate_surface() local 913 struct svga_texture *tex = svga_texture(surf->texture); svga_surface_needs_propagation() local [all...] |
/third_party/mesa3d/src/microsoft/compiler/ |
H A D | dxil_nir_lower_int_samplers.c | 35 nir_tex_instr *tex = nir_instr_as_tex(instr); in lower_sample_to_txf_for_integer_tex_filter() 36 if (tex->op != nir_texop_tex && in lower_sample_to_txf_for_integer_tex_filter() 37 tex->op != nir_texop_txb && in lower_sample_to_txf_for_integer_tex_filter() 38 tex->op != nir_texop_txl && in lower_sample_to_txf_for_integer_tex_filter() 39 tex->op != nir_texop_txd) in lower_sample_to_txf_for_integer_tex_filter() 42 return (tex->dest_type & (nir_type_int | nir_type_uint)); in lower_sample_to_txf_for_integer_tex_filter() 46 dx_get_texture_lod(nir_builder *b, nir_tex_instr *tex) in dx_get_texture_lod() argument 51 for (unsigned i = 0; i < tex->num_srcs; i++) { in dx_get_texture_lod() 52 if (tex->src[i].src_type == nir_tex_src_coord || in dx_get_texture_lod() 53 tex in dx_get_texture_lod() 217 load_bordercolor(nir_builder *b, nir_tex_instr *tex, dxil_wrap_sampler_state *active_state, const dxil_texture_swizzle_state *tex_swizzle) load_bordercolor() argument 253 create_txf_from_tex(nir_builder *b, nir_tex_instr *tex) create_txf_from_tex() argument 295 load_texel(nir_builder *b, nir_tex_instr *tex, wrap_lower_param_t *params) load_texel() argument 331 evalute_active_lod(nir_builder *b, nir_tex_instr *tex, lod_params *params) evalute_active_lod() argument 422 nir_tex_instr *tex = nir_instr_as_tex(instr); lower_sample_to_txf_for_integer_tex_impl() local [all...] |
/third_party/mesa3d/src/gallium/winsys/amdgpu/drm/ |
H A D | amdgpu_surface.c | 31 static int amdgpu_surface_sanity(const struct pipe_resource *tex) in amdgpu_surface_sanity() argument 33 switch (tex->target) { in amdgpu_surface_sanity() 35 if (tex->height0 > 1) in amdgpu_surface_sanity() 40 if (tex->depth0 > 1 || tex->array_size > 1) in amdgpu_surface_sanity() 44 if (tex->array_size > 1) in amdgpu_surface_sanity() 48 if (tex->height0 > 1) in amdgpu_surface_sanity() 54 if (tex->depth0 > 1) in amdgpu_surface_sanity() 64 const struct pipe_resource *tex, in amdgpu_surface_init() 72 r = amdgpu_surface_sanity(tex); in amdgpu_surface_init() 63 amdgpu_surface_init(struct radeon_winsys *rws, const struct pipe_resource *tex, uint64_t flags, unsigned bpe, enum radeon_surf_mode mode, struct radeon_surf *surf) amdgpu_surface_init() argument [all...] |
/third_party/mesa3d/src/freedreno/ir3/ |
H A D | ir3_nir_lower_tex_prefetch.c | 27 * A pass which detects tex instructions which are candidate to be executed 108 has_src(nir_tex_instr *tex, nir_tex_src_type type) in has_src() argument 110 return nir_tex_instr_src_index(tex, type) >= 0; in has_src() 114 ok_bindless_src(nir_tex_instr *tex, nir_tex_src_type type) in ok_bindless_src() argument 116 int idx = nir_tex_instr_src_index(tex, type); in ok_bindless_src() 118 nir_intrinsic_instr *bindless = ir3_bindless_resource(tex->src[idx].src); in ok_bindless_src() 128 * Check that we will be able to encode the tex/samp parameters 135 ok_tex_samp(nir_tex_instr *tex) in ok_tex_samp() argument 137 if (has_src(tex, nir_tex_src_texture_handle)) { in ok_tex_samp() 140 assert(has_src(tex, nir_tex_src_sampler_handl in ok_tex_samp() 161 nir_tex_instr *tex = nir_instr_as_tex(instr); lower_tex_prefetch_block() local [all...] |
/third_party/mesa3d/src/gallium/drivers/freedreno/ |
H A D | freedreno_texture.c | 52 bind_sampler_states(struct fd_texture_stateobj *tex, unsigned start, in bind_sampler_states() argument 59 tex->samplers[p] = hwcso ? hwcso[i] : NULL; in bind_sampler_states() 60 if (tex->samplers[p]) in bind_sampler_states() 61 tex->valid_samplers |= (1 << p); in bind_sampler_states() 63 tex->valid_samplers &= ~(1 << p); in bind_sampler_states() 66 tex->num_samplers = util_last_bit(tex->valid_samplers); in bind_sampler_states() 70 set_sampler_views(struct fd_texture_stateobj *tex, unsigned start, unsigned nr, in set_sampler_views() argument 81 pipe_sampler_view_reference(&tex->textures[p], NULL); in set_sampler_views() 82 tex in set_sampler_views() 138 fd_setup_border_colors(struct fd_texture_stateobj *tex, void *ptr, unsigned offset) fd_setup_border_colors() argument [all...] |
/third_party/mesa3d/src/gallium/drivers/d3d12/ |
H A D | d3d12_surface.cpp | 100 if (tpl->u.tex.first_layer > 0) in initialize_dsv() 102 tpl->u.tex.first_layer); in initialize_dsv() 104 desc.Texture1D.MipSlice = tpl->u.tex.level; in initialize_dsv() 108 desc.Texture1DArray.MipSlice = tpl->u.tex.level; in initialize_dsv() 109 desc.Texture1DArray.FirstArraySlice = tpl->u.tex.first_layer; in initialize_dsv() 110 desc.Texture1DArray.ArraySize = tpl->u.tex.last_layer - tpl->u.tex.first_layer + 1; in initialize_dsv() 114 if (tpl->u.tex.first_layer > 0) in initialize_dsv() 116 tpl->u.tex.first_layer); in initialize_dsv() 121 if (tpl->u.tex in initialize_dsv() [all...] |
/third_party/skia/tests/ |
H A D | VkWrapTests.cpp | 50 sk_sp<GrTexture> tex = gpu->wrapBackendTexture(origBackendTex, kBorrow_GrWrapOwnership, in wrap_tex_test() local 52 REPORTER_ASSERT(reporter, tex); in wrap_tex_test() 60 sk_sp<GrTexture> tex = gpu->wrapBackendTexture( in wrap_tex_test() local 62 REPORTER_ASSERT(reporter, !tex); in wrap_tex_test() 63 tex = gpu->wrapBackendTexture( in wrap_tex_test() 65 REPORTER_ASSERT(reporter, !tex); in wrap_tex_test() 73 sk_sp<GrTexture> tex = gpu->wrapBackendTexture( in wrap_tex_test() local 75 REPORTER_ASSERT(reporter, tex); in wrap_tex_test() 76 tex = gpu->wrapBackendTexture( in wrap_tex_test() 78 REPORTER_ASSERT(reporter, !tex); in wrap_tex_test() 85 sk_sp<GrTexture> tex = gpu->wrapBackendTexture( wrap_tex_test() local 154 sk_sp<GrTexture> tex = gpu->wrapRenderableBackendTexture( wrap_trt_test() local [all...] |
/third_party/mesa3d/src/gallium/drivers/zink/ |
H A D | zink_lower_cubemap_to_array.c | 55 nir_tex_instr *tex = nir_instr_as_tex(instr); in lower_cubemap_to_array_filter() local 57 if (tex->sampler_dim != GLSL_SAMPLER_DIM_CUBE) in lower_cubemap_to_array_filter() 60 switch (tex->op) { in lower_cubemap_to_array_filter() 72 return (BITFIELD_BIT(tex->sampler_index) & (*nonseamless_cube_mask)) != 0; in lower_cubemap_to_array_filter() 142 create_array_tex_from_cube_tex(nir_builder *b, nir_tex_instr *tex, nir_ssa_def *coord, nir_texop op) in create_array_tex_from_cube_tex() argument 146 unsigned num_srcs = tex->num_srcs; in create_array_tex_from_cube_tex() 147 if (op == nir_texop_txf && nir_tex_instr_src_index(tex, nir_tex_src_comparator) != -1) in create_array_tex_from_cube_tex() 153 array_tex->is_shadow = tex->is_shadow; in create_array_tex_from_cube_tex() 154 array_tex->is_sparse = tex->is_sparse; in create_array_tex_from_cube_tex() 155 array_tex->is_new_style_shadow = tex in create_array_tex_from_cube_tex() 303 handle_cube_gather(nir_builder *b, nir_tex_instr *tex, nir_ssa_def *coord) handle_cube_gather() argument 386 rewrite_cube_var_type(nir_builder *b, nir_tex_instr *tex) rewrite_cube_var_type() argument 413 lower_tex_to_txl(nir_builder *b, nir_tex_instr *tex) lower_tex_to_txl() argument 456 lower_cube_sample(nir_builder *b, nir_tex_instr *tex) lower_cube_sample() argument 478 lower_cube_txs(nir_builder *b, nir_tex_instr *tex) lower_cube_txs() argument 496 lower_cubemap_to_array_tex(nir_builder *b, nir_tex_instr *tex) lower_cubemap_to_array_tex() argument [all...] |
/third_party/mesa3d/src/mesa/main/ |
H A D | texcompress_s3tc.c | 266 GLubyte tex[4]; in fetch_rgb_dxt1() local 267 fetch_2d_texel_rgb_dxt1(rowStride, map, i, j, tex); in fetch_rgb_dxt1() 268 texel[RCOMP] = UBYTE_TO_FLOAT(tex[RCOMP]); in fetch_rgb_dxt1() 269 texel[GCOMP] = UBYTE_TO_FLOAT(tex[GCOMP]); in fetch_rgb_dxt1() 270 texel[BCOMP] = UBYTE_TO_FLOAT(tex[BCOMP]); in fetch_rgb_dxt1() 271 texel[ACOMP] = UBYTE_TO_FLOAT(tex[ACOMP]); in fetch_rgb_dxt1() 278 GLubyte tex[4]; in fetch_rgba_dxt1() local 279 fetch_2d_texel_rgba_dxt1(rowStride, map, i, j, tex); in fetch_rgba_dxt1() 280 texel[RCOMP] = UBYTE_TO_FLOAT(tex[RCOMP]); in fetch_rgba_dxt1() 281 texel[GCOMP] = UBYTE_TO_FLOAT(tex[GCOM in fetch_rgba_dxt1() 290 GLubyte tex[4]; fetch_rgba_dxt3() local 302 GLubyte tex[4]; fetch_rgba_dxt5() local 315 GLubyte tex[4]; fetch_srgb_dxt1() local 327 GLubyte tex[4]; fetch_srgba_dxt1() local 339 GLubyte tex[4]; fetch_srgba_dxt3() local 351 GLubyte tex[4]; fetch_srgba_dxt5() local [all...] |
/third_party/mesa3d/src/amd/vulkan/ |
H A D | radv_nir_lower_ycbcr_textures.c | 45 nir_tex_instr *tex = nir_tex_instr_create(b->shader, 1); in get_texture_size() local 47 tex->op = nir_texop_txs; in get_texture_size() 48 tex->sampler_dim = glsl_get_sampler_dim(type); in get_texture_size() 49 tex->is_array = glsl_sampler_type_is_array(type); in get_texture_size() 50 tex->is_shadow = glsl_sampler_type_is_shadow(type); in get_texture_size() 51 tex->dest_type = nir_type_int32; in get_texture_size() 53 tex->src[0].src_type = nir_tex_src_texture_deref; in get_texture_size() 54 tex->src[0].src = nir_src_for_ssa(&texture->dest.ssa); in get_texture_size() 56 nir_ssa_dest_init(&tex->instr, &tex in get_texture_size() 121 nir_tex_instr *tex = nir_tex_instr_create(b->shader, old_tex->num_srcs + 1); create_plane_tex_instr_implicit() local 221 try_lower_tex_ycbcr(const struct radv_pipeline_layout *layout, nir_builder *builder, nir_tex_instr *tex) try_lower_tex_ycbcr() argument 319 nir_tex_instr *tex = nir_instr_as_tex(instr); radv_nir_lower_ycbcr_textures() local [all...] |