"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/wined3d/adapter_gl.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

adapter_gl.c  (wine-5.12.tar.xz):adapter_gl.c  (wine-5.13.tar.xz)
skipping to change at line 1037 skipping to change at line 1037
} }
if ((gpu_description_override = wined3d_get_user_override_gpu_description(ve ndor, device))) if ((gpu_description_override = wined3d_get_user_override_gpu_description(ve ndor, device)))
gpu_description = gpu_description_override; gpu_description = gpu_description_override;
return gpu_description; return gpu_description;
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void fixup_extensions(struct wined3d_gl_info *gl_info, struct wined3d_cap s_gl_ctx *ctx, static void fixup_extensions(struct wined3d_gl_info *gl_info, struct wined3d_cap s_gl_ctx *ctx,
const char *gl_renderer, enum wined3d_gl_vendor gl_vendor, const char *gl_renderer, enum wined3d_gl_vendor gl_vendor)
enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device)
{ {
enum wined3d_pci_vendor card_vendor = ctx->gpu_description->vendor;
enum wined3d_pci_device device = ctx->gpu_description->device;
unsigned int i; unsigned int i;
static const struct driver_quirk static const struct driver_quirk
{ {
BOOL (*match)(const struct wined3d_gl_info *gl_info, struct wined3d_caps _gl_ctx *ctx, BOOL (*match)(const struct wined3d_gl_info *gl_info, struct wined3d_caps _gl_ctx *ctx,
const char *gl_renderer, enum wined3d_gl_vendor gl_vendor, const char *gl_renderer, enum wined3d_gl_vendor gl_vendor,
enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device dev ice); enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device dev ice);
void (*apply)(struct wined3d_gl_info *gl_info); void (*apply)(struct wined3d_gl_info *gl_info);
const char *description; const char *description;
} }
skipping to change at line 3396 skipping to change at line 3397
{ARB_CLIP_CONTROL, MAKEDWORD_VERSION(4, 5)}, {ARB_CLIP_CONTROL, MAKEDWORD_VERSION(4, 5)},
{ARB_CULL_DISTANCE, MAKEDWORD_VERSION(4, 5)}, {ARB_CULL_DISTANCE, MAKEDWORD_VERSION(4, 5)},
{ARB_DERIVATIVE_CONTROL, MAKEDWORD_VERSION(4, 5)}, {ARB_DERIVATIVE_CONTROL, MAKEDWORD_VERSION(4, 5)},
{ARB_SHADER_TEXTURE_IMAGE_SAMPLES, MAKEDWORD_VERSION(4, 5)}, {ARB_SHADER_TEXTURE_IMAGE_SAMPLES, MAKEDWORD_VERSION(4, 5)},
{ARB_TEXTURE_BARRIER, MAKEDWORD_VERSION(4, 5)}, {ARB_TEXTURE_BARRIER, MAKEDWORD_VERSION(4, 5)},
{ARB_PIPELINE_STATISTICS_QUERY, MAKEDWORD_VERSION(4, 6)}, {ARB_PIPELINE_STATISTICS_QUERY, MAKEDWORD_VERSION(4, 6)},
{ARB_POLYGON_OFFSET_CLAMP, MAKEDWORD_VERSION(4, 6)}, {ARB_POLYGON_OFFSET_CLAMP, MAKEDWORD_VERSION(4, 6)},
{ARB_TEXTURE_FILTER_ANISOTROPIC, MAKEDWORD_VERSION(4, 6)}, {ARB_TEXTURE_FILTER_ANISOTROPIC, MAKEDWORD_VERSION(4, 6)},
}; };
struct wined3d_driver_info *driver_info = &adapter->driver_info;
const char *gl_vendor_str, *gl_renderer_str, *gl_version_str; const char *gl_vendor_str, *gl_renderer_str, *gl_version_str;
const struct wined3d_gpu_description *gpu_description;
struct wined3d_gl_info *gl_info = &adapter->gl_info; struct wined3d_gl_info *gl_info = &adapter->gl_info;
DWORD gl_version, gl_ext_emul_mask;
const char *WGL_Extensions = NULL; const char *WGL_Extensions = NULL;
enum wined3d_gl_vendor gl_vendor; enum wined3d_gl_vendor gl_vendor;
DWORD gl_version, gl_ext_emul_mask;
GLint context_profile = 0; GLint context_profile = 0;
UINT64 vram_bytes = 0;
unsigned int i, j; unsigned int i, j;
HDC hdc; HDC hdc;
TRACE("adapter %p.\n", adapter); TRACE("adapter %p.\n", adapter);
gl_renderer_str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_RENDERER ); gl_renderer_str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_RENDERER );
TRACE("GL_RENDERER: %s.\n", debugstr_a(gl_renderer_str)); TRACE("GL_RENDERER: %s.\n", debugstr_a(gl_renderer_str));
if (!gl_renderer_str) if (!gl_renderer_str)
{ {
ERR("Received a NULL GL_RENDERER.\n"); ERR("Received a NULL GL_RENDERER.\n");
skipping to change at line 3832 skipping to change at line 3830
GLuint vao; GLuint vao;
GL_EXTCALL(glGenVertexArrays(1, &vao)); GL_EXTCALL(glGenVertexArrays(1, &vao));
GL_EXTCALL(glBindVertexArray(vao)); GL_EXTCALL(glBindVertexArray(vao));
checkGLcall("creating VAO"); checkGLcall("creating VAO");
} }
gl_vendor = wined3d_guess_gl_vendor(gl_info, gl_vendor_str, gl_renderer_str, gl_version_str); gl_vendor = wined3d_guess_gl_vendor(gl_info, gl_vendor_str, gl_renderer_str, gl_version_str);
TRACE("Guessed GL vendor %#x.\n", gl_vendor); TRACE("Guessed GL vendor %#x.\n", gl_vendor);
if (!(gpu_description = query_gpu_description(gl_info, &;vram_bytes))) if (!(caps_gl_ctx->gpu_description = query_gpu_description(gl_info, &caps_gl _ctx->;vram_bytes)))
{ {
enum wined3d_feature_level feature_level; enum wined3d_feature_level feature_level;
struct fragment_caps fragment_caps; struct fragment_caps fragment_caps;
enum wined3d_pci_vendor vendor; enum wined3d_pci_vendor vendor;
enum wined3d_pci_device device; enum wined3d_pci_device device;
struct shader_caps shader_caps; struct shader_caps shader_caps;
adapter->shader_backend->shader_get_caps(adapter, &shader_caps); adapter->shader_backend->shader_get_caps(adapter, &shader_caps);
adapter->fragment_pipe->get_caps(adapter, &fragment_caps); adapter->fragment_pipe->get_caps(adapter, &fragment_caps);
feature_level = feature_level_from_caps(gl_info, &shader_caps, &fragment _caps); feature_level = feature_level_from_caps(gl_info, &shader_caps, &fragment _caps);
vendor = wined3d_guess_card_vendor(gl_vendor_str, gl_renderer_str); vendor = wined3d_guess_card_vendor(gl_vendor_str, gl_renderer_str);
TRACE("Guessed vendor PCI ID 0x%04x.\n", vendor); TRACE("Guessed vendor PCI ID 0x%04x.\n", vendor);
device = wined3d_guess_card(feature_level, gl_renderer_str, &gl_vendor, &vendor); device = wined3d_guess_card(feature_level, gl_renderer_str, &gl_vendor, &vendor);
TRACE("Guessed device PCI ID 0x%04x.\n", device); TRACE("Guessed device PCI ID 0x%04x.\n", device);
if (!(gpu_description = wined3d_get_gpu_description(vendor, device))) if (!(caps_gl_ctx->gpu_description = wined3d_get_gpu_description(vendor, device)))
{ {
ERR("Card %04x:%04x not found in driver DB.\n", vendor, device); ERR("Card %04x:%04x not found in driver DB.\n", vendor, device);
return FALSE; return FALSE;
} }
} }
fixup_extensions(gl_info, caps_gl_ctx, gl_renderer_str, gl_vendor, fixup_extensions(gl_info, caps_gl_ctx, gl_renderer_str, gl_vendor);
gpu_description->vendor, gpu_description->device);
wined3d_driver_info_init(driver_info, gpu_description, vram_bytes, 0);
TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n",
driver_info->version_high, driver_info->version_low);
adapter->vram_bytes_used = 0; adapter->vram_bytes_used = 0;
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(driver_in fo->vram_bytes)); TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(caps_gl_c tx->vram_bytes));
if (gl_info->supported[EXT_MEMORY_OBJECT]) if (gl_info->supported[EXT_MEMORY_OBJECT])
{ {
GLint device_count = 0; GLint device_count = 0;
gl_info->gl_ops.gl.p_glGetIntegerv(GL_NUM_DEVICE_UUIDS_EXT, &device_coun t); gl_info->gl_ops.gl.p_glGetIntegerv(GL_NUM_DEVICE_UUIDS_EXT, &device_coun t);
if (device_count > 0) if (device_count > 0)
{ {
if (device_count > 1) if (device_count > 1)
FIXME("A set of %d devices is not supported.\n", device_count); FIXME("A set of %d devices is not supported.\n", device_count);
skipping to change at line 5137 skipping to change at line 5131
static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl,
unsigned int ordinal, unsigned int wined3d_creation_flags) unsigned int ordinal, unsigned int wined3d_creation_flags)
{ {
static const DWORD supported_gl_versions[] = static const DWORD supported_gl_versions[] =
{ {
MAKEDWORD_VERSION(4, 4), MAKEDWORD_VERSION(4, 4),
MAKEDWORD_VERSION(3, 2), MAKEDWORD_VERSION(3, 2),
MAKEDWORD_VERSION(1, 0), MAKEDWORD_VERSION(1, 0),
}; };
struct wined3d_driver_info *driver_info = &adapter_gl->a.driver_info;
struct wined3d_gl_info *gl_info = &adapter_gl->a.gl_info; struct wined3d_gl_info *gl_info = &adapter_gl->a.gl_info;
struct wined3d_caps_gl_ctx caps_gl_ctx = {0}; struct wined3d_caps_gl_ctx caps_gl_ctx = {0};
LUID primary_luid, *luid = NULL;
unsigned int i; unsigned int i;
TRACE("adapter_gl %p, ordinal %u, wined3d_creation_flags %#x.\n", TRACE("adapter_gl %p, ordinal %u, wined3d_creation_flags %#x.\n",
adapter_gl, ordinal, wined3d_creation_flags); adapter_gl, ordinal, wined3d_creation_flags);
if (!wined3d_adapter_init(&adapter_gl->a, ordinal, &wined3d_adapter_gl_ops)) if (ordinal == 0 && wined3d_get_primary_adapter_luid(&primary_luid))
luid = &primary_luid;
if (!wined3d_adapter_init(&adapter_gl->a, ordinal, luid, &wined3d_adapter_gl
_ops))
return FALSE; return FALSE;
/* Dynamically load all GL core functions */ /* Dynamically load all GL core functions */
#ifdef USE_WIN32_OPENGL #ifdef USE_WIN32_OPENGL
{ {
HMODULE mod_gl = GetModuleHandleA("opengl32.dll"); HMODULE mod_gl = GetModuleHandleA("opengl32.dll");
#define USE_GL_FUNC(f) gl_info->gl_ops.gl.p_##f = (void *)GetProcAddress(mod_gl, #f); #define USE_GL_FUNC(f) gl_info->gl_ops.gl.p_##f = (void *)GetProcAddress(mod_gl, #f);
ALL_WGL_FUNCS ALL_WGL_FUNCS
#undef USE_GL_FUNC #undef USE_GL_FUNC
gl_info->gl_ops.wgl.p_wglSwapBuffers = (void *)GetProcAddress(mod_gl, "w glSwapBuffers"); gl_info->gl_ops.wgl.p_wglSwapBuffers = (void *)GetProcAddress(mod_gl, "w glSwapBuffers");
skipping to change at line 5209 skipping to change at line 5208
} }
if (!wined3d_adapter_init_gl_caps(&adapter_gl->a, &caps_gl_ctx, wined3d_crea tion_flags)) if (!wined3d_adapter_init_gl_caps(&adapter_gl->a, &caps_gl_ctx, wined3d_crea tion_flags))
{ {
ERR("Failed to initialize GL caps for adapter %p.\n", adapter_gl); ERR("Failed to initialize GL caps for adapter %p.\n", adapter_gl);
wined3d_caps_gl_ctx_destroy(&caps_gl_ctx); wined3d_caps_gl_ctx_destroy(&caps_gl_ctx);
return FALSE; return FALSE;
} }
wined3d_adapter_gl_init_d3d_info(adapter_gl, wined3d_creation_flags); wined3d_adapter_gl_init_d3d_info(adapter_gl, wined3d_creation_flags);
if (!adapter_gl->a.d3d_info.shader_color_key) if (!adapter_gl->a.d3d_info.shader_color_key)
{ {
/* We do not want to deal with re-creating immutable texture storage /* We do not want to deal with re-creating immutable texture storage
* for colour-keying emulation. */ * for colour-keying emulation. */
WARN("Disabling ARB_texture_storage because fragment pipe doesn't suppor t colour-keying.\n"); WARN("Disabling ARB_texture_storage because fragment pipe doesn't suppor t colour-keying.\n");
gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE; gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE;
} }
wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_g
l->a.d3d_info.feature_level,
caps_gl_ctx.vram_bytes, 0);
TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n",
driver_info->version_high, driver_info->version_low);
if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER)
ERR_(winediag)("You are using the backbuffer for offscreen rendering. " ERR_(winediag)("You are using the backbuffer for offscreen rendering. "
"This is unsupported, and will be removed in a future version.\n "); "This is unsupported, and will be removed in a future version.\n ");
wined3d_adapter_init_fb_cfgs(adapter_gl, caps_gl_ctx.dc); wined3d_adapter_init_fb_cfgs(adapter_gl, caps_gl_ctx.dc);
/* We haven't found any suitable formats. This should only happen in /* We haven't found any suitable formats. This should only happen in
* case of GDI software rendering, which is pretty useless anyway. */ * case of GDI software rendering, which is pretty useless anyway. */
if (!adapter_gl->pixel_format_count) if (!adapter_gl->pixel_format_count)
{ {
WARN("No suitable pixel formats found.\n"); WARN("No suitable pixel formats found.\n");
 End of changes. 16 change blocks. 
15 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)