Lines Matching refs:templ

120             const struct pipe_resource *templ)
129 assert(templ->format == d3d12_emulated_vtx_format(templ->format));
131 switch (templ->usage) {
154 if (templ->bind & PIPE_BIND_SAMPLER_VIEW)
159 buf = bufmgr->create_buffer(bufmgr, templ->width0, &buf_desc);
170 const struct pipe_resource *templ,
176 res->mip_levels = templ->last_level + 1;
177 res->dxgi_format = d3d12_get_format(templ->format);
182 desc.Width = templ->width0;
183 desc.Height = templ->height0;
184 desc.DepthOrArraySize = templ->array_size;
185 desc.MipLevels = templ->last_level + 1;
187 desc.SampleDesc.Count = MAX2(templ->nr_samples, 1);
193 switch (templ->target) {
217 desc.DepthOrArraySize = templ->depth0;
224 if (templ->bind & PIPE_BIND_SHADER_BUFFER)
227 if (templ->bind & PIPE_BIND_RENDER_TARGET)
230 if (templ->bind & PIPE_BIND_DEPTH_STENCIL) {
240 if (screen->support_shader_images && templ->nr_samples <= 1) {
249 desc.Format = d3d12_get_typeless_format(templ->format);
253 if (templ->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_LINEAR))
285 if (screen->winsys && (templ->bind & PIPE_BIND_DISPLAY_TARGET)) {
290 templ->width0,
291 templ->height0,
348 const struct pipe_resource *templ,
354 res->base.b = *templ;
356 res->overall_format = templ->format;
362 templ->usage == PIPE_USAGE_STAGING ? "STAGING " :"",
363 util_format_name(templ->format), templ->nr_samples,
364 templ->width0, templ->height0, templ->depth0,
365 templ->array_size, templ->last_level);
371 if (templ->target == PIPE_BUFFER && !heap) {
372 ret = init_buffer(screen, res, templ);
374 ret = init_texture(screen, res, templ, heap, placed_offset);
384 templ->usage == PIPE_USAGE_DEFAULT &&
385 templ->target == PIPE_BUFFER);
396 const struct pipe_resource *templ)
402 return d3d12_resource_create_or_place(d3d12_screen(pscreen), res, templ, nullptr, 0);
407 const struct pipe_resource *templ,
420 if (templ && templ->next) {
421 struct d3d12_resource* next = d3d12_resource(templ->next);
423 res->base.b = *templ;
470 assert(templ);
473 return d3d12_resource_create_or_place(screen, res, templ, d3d12_heap, handle->offset);
481 if (templ && handle->format != templ->format) {
539 if (templ) {
541 (templ->target == PIPE_TEXTURE_CUBE ||
542 templ->target == PIPE_TEXTURE_CUBE_ARRAY)) {
547 res->base.b.target = templ->target;
550 unsigned templ_samples = MAX2(templ->nr_samples, 1);
551 if (res->base.b.target != templ->target ||
552 footprint->Width != templ->width0 ||
553 footprint->Height != templ->height0 ||
554 footprint->Depth != templ->depth0 ||
555 res->base.b.array_size != templ->array_size ||
557 res->base.b.last_level != templ->last_level) {
562 res->base.b.target, templ->target,
563 footprint->Width, templ->width0,
564 footprint->Height, templ->height0,
565 footprint->Depth, templ->depth0,
566 res->base.b.array_size, templ->array_size,
568 res->base.b.last_level + 1, templ->last_level + 1);
571 if (templ->target != PIPE_BUFFER) {
572 if ((footprint->Format != d3d12_get_format(templ->format) &&
573 footprint->Format != d3d12_get_typeless_format(templ->format)) ||
579 d3d12_get_format(templ->format),
580 d3d12_get_typeless_format(templ->format),
592 if (templ->bind & ~res->base.b.bind) {
597 res->base.b.format = templ->format;
616 if (!templ)
692 struct pipe_resource templ;
693 memset(&templ, 0, sizeof(templ));
695 templ.target = PIPE_BUFFER;
697 templ.target = (input_desc.DepthOrArraySize > 1) ? PIPE_TEXTURE_2D_ARRAY : PIPE_TEXTURE_2D;
700 templ.format = d3d12_get_pipe_format(input_desc.Format);
701 templ.width0 = input_desc.Width;
702 templ.height0 = input_desc.Height;
703 templ.depth0 = input_desc.DepthOrArraySize;
704 templ.array_size = input_desc.DepthOrArraySize;
705 templ.flags = 0;
709 &templ,
904 const struct pipe_resource *templ,
914 whandle.format = templ->format;
918 return d3d12_resource_from_handle(pscreen, templ, &whandle, 0);