New upstream version 19.0.3+dfsg1
This commit is contained in:
parent
3708b8e092
commit
1f1bbb3518
534 changed files with 13862 additions and 2459 deletions
|
|
@ -29,7 +29,7 @@ static bool create_pixel_pack_buffer(struct gs_stage_surface *surf)
|
|||
return false;
|
||||
|
||||
size = surf->width * surf->bytes_per_pixel;
|
||||
size = (size+3) & 0xFFFFFFFC; /* align width to 4-byte boundry */
|
||||
size = (size+3) & 0xFFFFFFFC; /* align width to 4-byte boundary */
|
||||
size *= surf->height;
|
||||
|
||||
glBufferData(GL_PIXEL_PACK_BUFFER, size, 0, GL_DYNAMIC_READ);
|
||||
|
|
@ -109,7 +109,7 @@ static bool can_stage(struct gs_stage_surface *dst, struct gs_texture_2d *src)
|
|||
#ifdef __APPLE__
|
||||
|
||||
/* Apparently for mac, PBOs won't do an asynchronous transfer unless you use
|
||||
* FBOs aong with glReadPixels, which is really dumb. */
|
||||
* FBOs along with glReadPixels, which is really dumb. */
|
||||
void device_stage_texture(gs_device_t *device, gs_stagesurf_t *dst,
|
||||
gs_texture_t *src)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -207,6 +207,9 @@ int device_create(gs_device_t **p_device, uint32_t adapter)
|
|||
struct gs_device *device = bzalloc(sizeof(struct gs_device));
|
||||
int errorcode = GS_ERROR_FAIL;
|
||||
|
||||
blog(LOG_INFO, "---------------------------------");
|
||||
blog(LOG_INFO, "Initializing OpenGL...");
|
||||
|
||||
device->plat = gl_platform_create(device, adapter);
|
||||
if (!device->plat)
|
||||
goto fail;
|
||||
|
|
@ -215,6 +218,8 @@ int device_create(gs_device_t **p_device, uint32_t adapter)
|
|||
errorcode = GS_ERROR_NOT_SUPPORTED;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
blog(LOG_INFO, "OpenGL version: %s", glGetString(GL_VERSION));
|
||||
|
||||
gl_enable(GL_CULL_FACE);
|
||||
|
||||
|
|
@ -1227,17 +1232,21 @@ static inline uint32_t get_target_height(const struct gs_device *device)
|
|||
void device_set_viewport(gs_device_t *device, int x, int y, int width,
|
||||
int height)
|
||||
{
|
||||
uint32_t base_height;
|
||||
uint32_t base_height = 0;
|
||||
int gl_y = 0;
|
||||
|
||||
/* GL uses bottom-up coordinates for viewports. We want top-down */
|
||||
if (device->cur_render_target) {
|
||||
base_height = get_target_height(device);
|
||||
} else {
|
||||
} else if (device->cur_swap) {
|
||||
uint32_t dw;
|
||||
gl_getclientsize(device->cur_swap, &dw, &base_height);
|
||||
}
|
||||
|
||||
glViewport(x, base_height - y - height, width, height);
|
||||
if (base_height)
|
||||
gl_y = base_height - y - height;
|
||||
|
||||
glViewport(x, gl_y, width, height);
|
||||
if (!gl_success("glViewport"))
|
||||
blog(LOG_ERROR, "device_set_viewport (GL) failed");
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ static inline int get_stencil_format_bits(enum gs_zstencil_format zsformat)
|
|||
}
|
||||
}
|
||||
|
||||
/* would use designated initializers but microsoft sort of sucks */
|
||||
/* would use designated initializers but Microsoft sort of sucks */
|
||||
static inline void init_dummy_pixel_format(PIXELFORMATDESCRIPTOR *pfd)
|
||||
{
|
||||
memset(pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
|
||||
|
|
|
|||
|
|
@ -366,8 +366,6 @@ extern struct gl_platform *gl_platform_create(gs_device_t *device,
|
|||
goto fail_load_gl;
|
||||
}
|
||||
|
||||
blog(LOG_INFO, "OpenGL version: %s\n", glGetString(GL_VERSION));
|
||||
|
||||
goto success;
|
||||
|
||||
fail_make_current:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue