Lines Matching refs:base
71 This->base.base.device = pParams->device; /* Early fill this field in case of failure */
101 This->base.info.screen = pParams->device->screen;
102 This->base.info.target = PIPE_TEXTURE_2D;
103 This->base.info.width0 = pDesc->Width;
104 This->base.info.height0 = pDesc->Height;
105 This->base.info.depth0 = 1;
106 This->base.info.last_level = 0;
107 This->base.info.array_size = 1;
108 This->base.info.nr_samples = multisample_type;
109 This->base.info.nr_storage_samples = multisample_type;
110 This->base.info.usage = PIPE_USAGE_DEFAULT;
111 This->base.info.bind = PIPE_BIND_SAMPLER_VIEW; /* StretchRect */
114 This->base.info.bind |= PIPE_BIND_RENDER_TARGET;
118 This->base.info.bind = d3d9_get_pipe_depth_format_bindings(pDesc->Format);
120 This->base.info.bind |= PIPE_BIND_SAMPLER_VIEW;
123 This->base.info.flags = 0;
124 This->base.info.format = d3d9_to_pipe_format_checked(This->base.info.screen,
126 This->base.info.target,
127 This->base.info.nr_samples,
128 This->base.info.bind,
132 if (This->base.info.format == PIPE_FORMAT_NONE && pDesc->Format != D3DFMT_NULL)
136 const unsigned w = util_format_get_blockwidth(This->base.info.format);
137 const unsigned h = util_format_get_blockheight(This->base.info.format);
144 This->format_internal = d3d9_to_pipe_format_checked(This->base.info.screen,
146 This->base.info.target,
147 This->base.info.nr_samples,
148 This->base.info.bind,
151 if (This->base.info.format != This->format_internal ||
172 nine_format_get_level_alloc_size(This->base.info.format,
180 hr = NineResource9_ctor(&This->base, pParams, pResource,
195 This->stride = nine_format_get_stride(This->base.info.format, pDesc->Width);
197 if (This->base.resource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
198 This->base.resource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
200 if (This->base.resource && (pDesc->Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)))
204 if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET))
215 bool is_worker = nine_context_is_worker(This->base.base.device);
219 struct pipe_context *pipe = nine_context_get_pipe_multithread(This->base.base.device);
228 nine_csmt_process(This->base.base.device);
235 nine_pointer_strongrelease(This->base.base.device->allocator,
242 nine_free_worker(This->base.base.device->allocator, This->data);
244 nine_free(This->base.base.device->allocator, This->data);
248 nine_free_worker(This->base.base.device->allocator, This->data_internal);
250 nine_free(This->base.base.device->allocator, This->data_internal);
252 NineResource9_dtor(&This->base);
259 struct pipe_screen *screen = NineDevice9_GetScreen(This->base.base.device);
260 struct pipe_resource *resource = This->base.resource;
279 pipe = nine_context_get_pipe_acquire(This->base.base.device);
291 nine_context_get_pipe_release(This->base.base.device);
307 "Level=%u(%u), Layer=%u\n", This, This->base.resource, This->data,
313 This->base.resource &&
314 (This->base.resource->flags & NINE_RESOURCE_FLAG_LOCKABLE),
317 if (!This->base.base.container)
319 NineUnknown_QueryInterface(This->base.base.container, ref, (void **)&tex);
344 NineUnknown(This)->container : &NineUnknown(This)->device->base,
356 NineBaseTexture9(This->base.base.container);
360 if (This->base.pool == D3DPOOL_MANAGED)
363 if (This->base.usage & D3DUSAGE_AUTOGENMIPMAP)
389 assert (This->base.pool != D3DPOOL_MANAGED ||
393 if (This->base.pool == D3DPOOL_DEFAULT)
404 NineTexture9(This->base.base.container);
409 NineCubeTexture9(This->base.base.container);
432 struct pipe_resource *resource = This->base.resource;
452 user_assert(This->base.pool != D3DPOOL_DEFAULT ||
463 util_format_is_compressed(This->base.info.format)) {
464 const unsigned w = util_format_get_blockwidth(This->base.info.format);
465 const unsigned h = util_format_get_blockheight(This->base.info.format);
494 nine_csmt_process(This->base.base.device);
497 enum pipe_format format = This->base.info.format;
499 uint8_t *data = nine_get_pointer(This->base.base.device->allocator, This->data_internal ? This->data_internal : This->data);
521 bool no_refs = !p_atomic_read(&This->base.base.bind) &&
522 !(This->base.base.container && p_atomic_read(&This->base.base.container->bind));
529 pipe = nine_context_get_pipe_acquire(This->base.base.device);
531 pipe = NineDevice9_GetPipe(This->base.base.device);
536 nine_context_get_pipe_release(This->base.base.device);
563 pipe = nine_context_get_pipe_acquire(This->base.base.device);
565 nine_context_get_pipe_release(This->base.base.device);
571 nine_pointer_weakrelease(This->base.base.device->allocator, This->data_internal);
573 (void) util_format_translate(This->base.info.format,
574 nine_get_pointer(This->base.base.device->allocator, This->data),
578 nine_get_pointer(This->base.base.device->allocator, This->data_internal),
582 nine_pointer_weakrelease(This->base.base.device->allocator, This->data);
583 nine_pointer_strongrelease(This->base.base.device->allocator, This->data_internal);
590 nine_context_box_upload(This->base.base.device,
593 This->base.resource,
597 nine_get_pointer(This->base.base.device->allocator, This->data_internal),
601 nine_pointer_delayedstrongrelease(This->base.base.device->allocator, This->data_internal, &This->pending_uploads_counter);
604 nine_pointer_weakrelease(This->base.base.device->allocator, This->data);
652 struct pipe_resource *r_dst = This->base.resource;
656 assert(This->base.pool == D3DPOOL_DEFAULT &&
657 From->base.pool == D3DPOOL_SYSTEMMEM);
686 nine_get_pointer(This->base.base.device->allocator, This->data_internal),
689 From->base.info.format,
690 nine_get_pointer(This->base.base.device->allocator, From->data),
694 nine_pointer_weakrelease(This->base.base.device->allocator, From->data);
695 nine_pointer_strongrelease(This->base.base.device->allocator, This->data_internal);
698 nine_context_box_upload(This->base.base.device,
704 From->base.info.format,
705 nine_get_pointer(This->base.base.device->allocator, From->data),
709 nine_pointer_delayedstrongrelease(This->base.base.device->allocator, From->data, &From->pending_uploads_counter);
713 NineTexture9(From->base.base.container);
722 nine_csmt_process(This->base.base.device);
733 struct pipe_resource *r_src = From->base.resource;
739 assert(This->base.pool == D3DPOOL_SYSTEMMEM &&
740 From->base.pool == D3DPOOL_DEFAULT);
749 nine_csmt_process(This->base.base.device);
751 pipe = NineDevice9_GetPipe(This->base.base.device);
755 p_dst = nine_get_pointer(This->base.base.device->allocator, This->data);
759 util_copy_rect(p_dst, This->base.info.format,
767 nine_pointer_weakrelease(This->base.base.device->allocator, This->data);
778 struct pipe_resource *res = This->base.resource;
783 assert(This->base.pool == D3DPOOL_MANAGED);
798 nine_context_box_upload(This->base.base.device,
805 nine_get_pointer(This->base.base.device->allocator, This->data),
809 nine_pointer_delayedstrongrelease(This->base.base.device->allocator, This->data, &This->pending_uploads_counter);
819 if (surf->base.base.bind) \
820 nine_csmt_process(surf->base.base.device);
828 assert(This->base.pool == D3DPOOL_MANAGED);
830 pipe_resource_reference(&This->base.resource, resource);
851 pipe_resource_reference(&This->base.resource, resource);
853 This->desc.Width = This->base.info.width0 = resource->width0;
854 This->desc.Height = This->base.info.height0 = resource->height0;
855 This->base.info.nr_samples = resource->nr_samples;
856 This->base.info.nr_storage_samples = resource->nr_storage_samples;
858 This->stride = nine_format_get_stride(This->base.info.format,