Commit fce93869 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Rename WINED3DUSAGE_PRIVATE to WINED3DUSAGE_CS.

Which is really what it means nowadays: resources created by the CS. It has mostly implications WRT thread safety. In particular, the flag doesn't mean that the resource doesn't participate in memory accounting (that was split into WINED3DUSAGE_VIDMEM_ACCOUNTING by 723cd0a4), nor that it isn't checked for Reset purposes (we use parent == NULL for that).
parent fbf81662
...@@ -7771,7 +7771,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl ...@@ -7771,7 +7771,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl
desc.format = src_texture->resource.format->id; desc.format = src_texture->resource.format->id;
desc.multisample_type = src_texture->resource.multisample_type; desc.multisample_type = src_texture->resource.multisample_type;
desc.multisample_quality = src_texture->resource.multisample_quality; desc.multisample_quality = src_texture->resource.multisample_quality;
desc.usage = WINED3DUSAGE_PRIVATE; desc.usage = WINED3DUSAGE_CS;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = WINED3D_RESOURCE_ACCESS_GPU; desc.access = WINED3D_RESOURCE_ACCESS_GPU;
desc.width = wined3d_texture_get_level_width(src_texture, src_level); desc.width = wined3d_texture_get_level_width(src_texture, src_level);
......
...@@ -13487,7 +13487,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli ...@@ -13487,7 +13487,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
desc.format = src_texture->resource.format->id; desc.format = src_texture->resource.format->id;
desc.multisample_type = src_texture->resource.multisample_type; desc.multisample_type = src_texture->resource.multisample_type;
desc.multisample_quality = src_texture->resource.multisample_quality; desc.multisample_quality = src_texture->resource.multisample_quality;
desc.usage = WINED3DUSAGE_PRIVATE; desc.usage = WINED3DUSAGE_CS;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = WINED3D_RESOURCE_ACCESS_GPU; desc.access = WINED3D_RESOURCE_ACCESS_GPU;
desc.width = wined3d_texture_get_level_width(src_texture, src_level); desc.width = wined3d_texture_get_level_width(src_texture, src_level);
......
...@@ -35,7 +35,7 @@ static void resource_check_usage(uint32_t usage, unsigned int access) ...@@ -35,7 +35,7 @@ static void resource_check_usage(uint32_t usage, unsigned int access)
| WINED3DUSAGE_OVERLAY | WINED3DUSAGE_OVERLAY
| WINED3DUSAGE_SCRATCH | WINED3DUSAGE_SCRATCH
| WINED3DUSAGE_MANAGED | WINED3DUSAGE_MANAGED
| WINED3DUSAGE_PRIVATE | WINED3DUSAGE_CS
| WINED3DUSAGE_LEGACY_CUBEMAP | WINED3DUSAGE_LEGACY_CUBEMAP
| ~WINED3DUSAGE_MASK; | ~WINED3DUSAGE_MASK;
...@@ -222,7 +222,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * ...@@ -222,7 +222,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
adapter_adjust_memory(device->adapter, size); adapter_adjust_memory(device->adapter, size);
} }
if (!(usage & WINED3DUSAGE_PRIVATE)) if (!(usage & WINED3DUSAGE_CS))
device_resource_add(device, resource); device_resource_add(device, resource);
return WINED3D_OK; return WINED3D_OK;
...@@ -248,7 +248,7 @@ void resource_cleanup(struct wined3d_resource *resource) ...@@ -248,7 +248,7 @@ void resource_cleanup(struct wined3d_resource *resource)
adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size); adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);
} }
if (!(resource->usage & WINED3DUSAGE_PRIVATE)) if (!(resource->usage & WINED3DUSAGE_CS))
device_resource_released(resource->device, resource); device_resource_released(resource->device, resource);
wined3d_resource_reference(resource); wined3d_resource_reference(resource);
......
...@@ -271,7 +271,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr ...@@ -271,7 +271,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
desc.format = dst_format->id; desc.format = dst_format->id;
desc.multisample_type = WINED3D_MULTISAMPLE_NONE; desc.multisample_type = WINED3D_MULTISAMPLE_NONE;
desc.multisample_quality = 0; desc.multisample_quality = 0;
desc.usage = WINED3DUSAGE_SCRATCH | WINED3DUSAGE_PRIVATE; desc.usage = WINED3DUSAGE_SCRATCH | WINED3DUSAGE_CS;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; desc.access = WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
desc.width = wined3d_texture_get_level_width(src_texture, texture_level); desc.width = wined3d_texture_get_level_width(src_texture, texture_level);
......
...@@ -418,7 +418,7 @@ static void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_cont ...@@ -418,7 +418,7 @@ static void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_cont
desc.format = resolve_format_id; desc.format = resolve_format_id;
desc.multisample_type = src_texture->resource.multisample_type; desc.multisample_type = src_texture->resource.multisample_type;
desc.multisample_quality = src_texture->resource.multisample_quality; desc.multisample_quality = src_texture->resource.multisample_quality;
desc.usage = WINED3DUSAGE_PRIVATE; desc.usage = WINED3DUSAGE_CS;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = WINED3D_RESOURCE_ACCESS_GPU; desc.access = WINED3D_RESOURCE_ACCESS_GPU;
desc.width = wined3d_texture_get_level_width(src_texture, src_level); desc.width = wined3d_texture_get_level_width(src_texture, src_level);
...@@ -457,7 +457,7 @@ static void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_cont ...@@ -457,7 +457,7 @@ static void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_cont
desc.format = resolve_format_id; desc.format = resolve_format_id;
desc.multisample_type = dst_texture->resource.multisample_type; desc.multisample_type = dst_texture->resource.multisample_type;
desc.multisample_quality = dst_texture->resource.multisample_quality; desc.multisample_quality = dst_texture->resource.multisample_quality;
desc.usage = WINED3DUSAGE_PRIVATE; desc.usage = WINED3DUSAGE_CS;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = WINED3D_RESOURCE_ACCESS_GPU; desc.access = WINED3D_RESOURCE_ACCESS_GPU;
desc.width = wined3d_texture_get_level_width(dst_texture, dst_level); desc.width = wined3d_texture_get_level_width(dst_texture, dst_level);
...@@ -6298,7 +6298,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit ...@@ -6298,7 +6298,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
desc.format = src_texture->resource.format->id; desc.format = src_texture->resource.format->id;
desc.multisample_type = src_texture->resource.multisample_type; desc.multisample_type = src_texture->resource.multisample_type;
desc.multisample_quality = src_texture->resource.multisample_quality; desc.multisample_quality = src_texture->resource.multisample_quality;
desc.usage = WINED3DUSAGE_PRIVATE; desc.usage = WINED3DUSAGE_CS;
desc.bind_flags = 0; desc.bind_flags = 0;
desc.access = WINED3D_RESOURCE_ACCESS_GPU; desc.access = WINED3D_RESOURCE_ACCESS_GPU;
desc.width = wined3d_texture_get_level_width(src_texture, src_level); desc.width = wined3d_texture_get_level_width(src_texture, src_level);
......
...@@ -930,7 +930,7 @@ enum wined3d_memory_segment_group ...@@ -930,7 +930,7 @@ enum wined3d_memory_segment_group
#define WINED3DUSAGE_MASK 0x10007bf0 #define WINED3DUSAGE_MASK 0x10007bf0
#define WINED3DUSAGE_SCRATCH 0x00400000 #define WINED3DUSAGE_SCRATCH 0x00400000
#define WINED3DUSAGE_PRIVATE 0x00800000 #define WINED3DUSAGE_CS 0x00800000
#define WINED3DUSAGE_LEGACY_CUBEMAP 0x01000000 #define WINED3DUSAGE_LEGACY_CUBEMAP 0x01000000
#define WINED3DUSAGE_OWNDC 0x02000000 #define WINED3DUSAGE_OWNDC 0x02000000
#define WINED3DUSAGE_STATICDECL 0x04000000 #define WINED3DUSAGE_STATICDECL 0x04000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment