wined3d: Move some wined3d_gl_info functions to wined3d_gl.h.

This commit is contained in:
Zebediah Figura 2022-12-22 13:28:07 -06:00 committed by Alexandre Julliard
parent bafb02efbe
commit 421f70710a
2 changed files with 32 additions and 33 deletions

View file

@ -26,6 +26,7 @@
#define WINE_GLAPI __stdcall
#include <stdbool.h>
#include <stdint.h>
#include "wine/wgl.h"
@ -308,6 +309,11 @@ struct wined3d_gl_limits
unsigned int arb_ps_temps;
};
void wined3d_gl_limits_get_texture_unit_range(const struct wined3d_gl_limits *gl_limits,
enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count);
void wined3d_gl_limits_get_uniform_block_range(const struct wined3d_gl_limits *gl_limits,
enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count);
#define WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT 0x00000001
#define WINED3D_QUIRK_GLSL_CLIP_VARYING 0x00000004
#define WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA 0x00000008
@ -338,4 +344,30 @@ struct wined3d_gl_info
void (WINE_GLAPI *p_glEnableWINE)(GLenum cap);
};
void install_gl_compat_wrapper(struct wined3d_gl_info *gl_info, enum wined3d_gl_extension ext);
void print_glsl_info_log(const struct wined3d_gl_info *gl_info, GLuint id, BOOL program);
void shader_glsl_validate_link(const struct wined3d_gl_info *gl_info, GLuint program);
GLenum wined3d_buffer_gl_binding_from_bind_flags(const struct wined3d_gl_info *gl_info, uint32_t bind_flags);
void wined3d_check_gl_call(const struct wined3d_gl_info *gl_info,
const char *file, unsigned int line, const char *name);
static inline bool wined3d_fence_supported(const struct wined3d_gl_info *gl_info)
{
return gl_info->supported[ARB_SYNC] || gl_info->supported[NV_FENCE] || gl_info->supported[APPLE_FENCE];
}
/* Checking of API calls */
/* --------------------- */
#ifndef WINE_NO_DEBUG_MSGS
#define checkGLcall(A) \
do \
{ \
if (__WINE_IS_DEBUG_ON(_ERR, &__wine_dbch_d3d) \
&& !gl_info->supported[ARB_DEBUG_OUTPUT]) \
wined3d_check_gl_call(gl_info, __FILE__, __LINE__, A); \
} while(0)
#else
#define checkGLcall(A) do {} while(0)
#endif
#endif /* __WINE_WINED3D_GL */

View file

@ -1637,22 +1637,6 @@ static inline void wined3d_colour_srgb_from_linear(struct wined3d_color *colour_
colour_srgb->a = colour->a;
}
void wined3d_check_gl_call(const struct wined3d_gl_info *gl_info,
const char *file, unsigned int line, const char *name) DECLSPEC_HIDDEN;
/* Checking of API calls */
/* --------------------- */
#ifndef WINE_NO_DEBUG_MSGS
#define checkGLcall(A) \
do { \
if (__WINE_IS_DEBUG_ON(_ERR, &__wine_dbch_d3d) \
&& !gl_info->supported[ARB_DEBUG_OUTPUT]) \
wined3d_check_gl_call(gl_info, __FILE__, __LINE__, A); \
} while(0)
#else
#define checkGLcall(A) do {} while(0)
#endif
struct wined3d_bo
{
/* client_map_count and map_ptr are accessed from both the client and CS
@ -2866,16 +2850,6 @@ enum wined3d_pci_device
CARD_INTEL_UHD630_2 = 0x3e91,
};
void wined3d_gl_limits_get_texture_unit_range(const struct wined3d_gl_limits *gl_limits,
enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count) DECLSPEC_HIDDEN;
void wined3d_gl_limits_get_uniform_block_range(const struct wined3d_gl_limits *gl_limits,
enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count) DECLSPEC_HIDDEN;
static inline BOOL wined3d_fence_supported(const struct wined3d_gl_info *gl_info)
{
return gl_info->supported[ARB_SYNC] || gl_info->supported[NV_FENCE] || gl_info->supported[APPLE_FENCE];
}
/* The driver names reflect the lowest GPU supported
* by a certain driver, so DRIVER_AMD_R300 supports
* R3xx, R4xx and R5xx GPUs. */
@ -3125,8 +3099,6 @@ UINT64 adapter_adjust_memory(struct wined3d_adapter *adapter, INT64 amount) DECL
BOOL wined3d_caps_gl_ctx_test_viewport_subpixel_bits(struct wined3d_caps_gl_ctx *ctx) DECLSPEC_HIDDEN;
bool wined3d_caps_gl_ctx_test_filling_convention(struct wined3d_caps_gl_ctx *ctx, float offset) DECLSPEC_HIDDEN;
void install_gl_compat_wrapper(struct wined3d_gl_info *gl_info, enum wined3d_gl_extension ext) DECLSPEC_HIDDEN;
enum wined3d_projection_type
{
WINED3D_PROJECTION_NONE = 0,
@ -4650,8 +4622,6 @@ static inline const struct wined3d_buffer_gl *wined3d_buffer_gl_const(const stru
return CONTAINING_RECORD(buffer, struct wined3d_buffer_gl, b);
}
GLenum wined3d_buffer_gl_binding_from_bind_flags(const struct wined3d_gl_info *gl_info,
uint32_t bind_flags) DECLSPEC_HIDDEN;
HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined3d_device *device,
const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data,
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
@ -5273,9 +5243,6 @@ struct ps_np2fixup_info {
WORD num_consts;
};
void print_glsl_info_log(const struct wined3d_gl_info *gl_info, GLuint id, BOOL program) DECLSPEC_HIDDEN;
void shader_glsl_validate_link(const struct wined3d_gl_info *gl_info, GLuint program) DECLSPEC_HIDDEN;
struct wined3d_palette
{
LONG ref;