mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 18:04:21 +00:00
wined3d: Move the remaining GL-specific definitions to wined3d_gl.h.
This commit is contained in:
parent
9a73d1d647
commit
3c7f325fc9
|
@ -925,6 +925,20 @@ GLbitfield wined3d_resource_gl_map_flags(const struct wined3d_bo_gl *bo, DWORD d
|
|||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags);
|
||||
GLbitfield wined3d_resource_gl_storage_flags(const struct wined3d_resource *resource);
|
||||
|
||||
static inline void wined3d_context_gl_reference_bo(struct wined3d_context_gl *context_gl, struct wined3d_bo_gl *bo_gl)
|
||||
{
|
||||
struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device);
|
||||
|
||||
bo_gl->command_fence_id = device_gl->current_fence_id;
|
||||
}
|
||||
|
||||
static inline void wined3d_context_gl_reference_buffer(struct wined3d_context_gl *context_gl,
|
||||
struct wined3d_buffer *buffer)
|
||||
{
|
||||
if (buffer->buffer_object)
|
||||
wined3d_context_gl_reference_bo(context_gl, wined3d_bo_gl(buffer->buffer_object));
|
||||
}
|
||||
|
||||
struct gl_texture
|
||||
{
|
||||
struct wined3d_sampler_desc sampler_desc;
|
||||
|
@ -982,6 +996,14 @@ static inline GLenum wined3d_texture_gl_get_sub_resource_target(const struct win
|
|||
return texture_gl->target;
|
||||
}
|
||||
|
||||
static inline GLuint wined3d_texture_gl_get_texture_name(const struct wined3d_texture_gl *texture_gl,
|
||||
const struct wined3d_context *context, bool srgb)
|
||||
{
|
||||
if (srgb && needs_separate_srgb_gl_texture(context, &texture_gl->t))
|
||||
return texture_gl->texture_srgb.name;
|
||||
return texture_gl->texture_rgb.name;
|
||||
}
|
||||
|
||||
static inline bool wined3d_texture_gl_is_multisample_location(const struct wined3d_texture_gl *texture_gl,
|
||||
uint32_t location)
|
||||
{
|
||||
|
|
|
@ -4623,8 +4623,6 @@ uint32_t wined3d_format_pack(const struct wined3d_format *format, const struct w
|
|||
BOOL wined3d_formats_are_srgb_variants(enum wined3d_format_id format1,
|
||||
enum wined3d_format_id format2) DECLSPEC_HIDDEN;
|
||||
|
||||
#include "wined3d_gl.h"
|
||||
|
||||
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
|
||||
|
@ -4701,13 +4699,6 @@ static inline BOOL needs_srgb_write(const struct wined3d_d3d_info *d3d_info,
|
|||
&& fb->render_targets[0] && fb->render_targets[0]->format_caps & WINED3D_FORMAT_CAP_SRGB_WRITE;
|
||||
}
|
||||
|
||||
static inline GLuint wined3d_texture_gl_get_texture_name(const struct wined3d_texture_gl *texture_gl,
|
||||
const struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
return srgb && needs_separate_srgb_gl_texture(context, &texture_gl->t)
|
||||
? texture_gl->texture_srgb.name : texture_gl->texture_rgb.name;
|
||||
}
|
||||
|
||||
static inline BOOL can_use_texture_swizzle(const struct wined3d_d3d_info *d3d_info, const struct wined3d_format *format)
|
||||
{
|
||||
return d3d_info->texture_swizzle && !is_complex_fixup(format->color_fixup) && !is_scaling_fixup(format->color_fixup);
|
||||
|
@ -5080,20 +5071,6 @@ static inline bool wined3d_primitive_type_is_list(enum wined3d_primitive_type t)
|
|||
|| t == WINED3D_PT_PATCH;
|
||||
}
|
||||
|
||||
static inline void wined3d_context_gl_reference_bo(struct wined3d_context_gl *context_gl, struct wined3d_bo_gl *bo_gl)
|
||||
{
|
||||
struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device);
|
||||
|
||||
bo_gl->command_fence_id = device_gl->current_fence_id;
|
||||
}
|
||||
|
||||
static inline void wined3d_context_gl_reference_buffer(struct wined3d_context_gl *context_gl,
|
||||
struct wined3d_buffer *buffer)
|
||||
{
|
||||
if (buffer->buffer_object)
|
||||
wined3d_context_gl_reference_bo(context_gl, wined3d_bo_gl(buffer->buffer_object));
|
||||
}
|
||||
|
||||
static inline bool wined3d_map_persistent(void)
|
||||
{
|
||||
return sizeof(void *) >= sizeof(uint64_t);
|
||||
|
@ -5104,4 +5081,6 @@ static inline bool wined3d_map_persistent(void)
|
|||
|
||||
extern CRITICAL_SECTION wined3d_command_cs;
|
||||
|
||||
#include "wined3d_gl.h"
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue