Compare commits
20 Commits
mesa-18.3.
...
mesa-18.3.
Author | SHA1 | Date | |
---|---|---|---|
|
b28aa1178a | ||
|
bb4bbb5c2d | ||
|
ce6a9169f0 | ||
|
bcc8332606 | ||
|
ace4860a4f | ||
|
41671f5dc0 | ||
|
ec659efcba | ||
|
a1f6ae4e27 | ||
|
a32c568d39 | ||
|
d575455be6 | ||
|
7d8a9087ae | ||
|
5598426132 | ||
|
35e9cd3428 | ||
|
1a905e4c5b | ||
|
6b9b7ce38c | ||
|
02566b9725 | ||
|
825cb76860 | ||
|
a941399117 | ||
|
f7040d9107 | ||
|
b8502f1517 |
2
bin/.cherry-ignore
Normal file
2
bin/.cherry-ignore
Normal file
@@ -0,0 +1,2 @@
|
||||
# fixes: Commit was squashed into the respective offenders
|
||||
c02390f8fcd367c7350db568feabb2f062efca14 egl/wayland: rather obvious build fix
|
@@ -691,7 +691,7 @@ radv_query_opaque_metadata(struct radv_device *device,
|
||||
si_make_texture_descriptor(device, image, false,
|
||||
(VkImageViewType)image->type, image->vk_format,
|
||||
&fixedmapping, 0, image->info.levels - 1, 0,
|
||||
image->info.array_size,
|
||||
image->info.array_size - 1,
|
||||
image->info.width, image->info.height,
|
||||
image->info.depth,
|
||||
desc, NULL);
|
||||
@@ -1175,8 +1175,6 @@ radv_image_view_init(struct radv_image_view *iview,
|
||||
if (device->physical_device->rad_info.chip_class >= GFX9 &&
|
||||
vk_format_is_compressed(image->vk_format) &&
|
||||
!vk_format_is_compressed(iview->vk_format)) {
|
||||
unsigned rounded_img_w = util_next_power_of_two(iview->extent.width);
|
||||
unsigned rounded_img_h = util_next_power_of_two(iview->extent.height);
|
||||
unsigned lvl_width = radv_minify(image->info.width , range->baseMipLevel);
|
||||
unsigned lvl_height = radv_minify(image->info.height, range->baseMipLevel);
|
||||
|
||||
@@ -1186,8 +1184,8 @@ radv_image_view_init(struct radv_image_view *iview,
|
||||
lvl_width <<= range->baseMipLevel;
|
||||
lvl_height <<= range->baseMipLevel;
|
||||
|
||||
iview->extent.width = CLAMP(lvl_width, iview->extent.width, rounded_img_w);
|
||||
iview->extent.height = CLAMP(lvl_height, iview->extent.height, rounded_img_h);
|
||||
iview->extent.width = CLAMP(lvl_width, iview->extent.width, iview->image->surface.u.gfx9.surf_pitch);
|
||||
iview->extent.height = CLAMP(lvl_height, iview->extent.height, iview->image->surface.u.gfx9.surf_height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -304,8 +304,12 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned virt_alignment = alignment;
|
||||
if (size >= ws->info.pte_fragment_size)
|
||||
virt_alignment = MAX2(virt_alignment, ws->info.pte_fragment_size);
|
||||
|
||||
r = amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general,
|
||||
size, alignment, 0, &va, &va_handle,
|
||||
size, virt_alignment, 0, &va, &va_handle,
|
||||
(flags & RADEON_FLAG_32BIT ? AMDGPU_VA_RANGE_32_BIT : 0) |
|
||||
AMDGPU_VA_RANGE_HIGH);
|
||||
if (r)
|
||||
|
@@ -360,13 +360,20 @@ read_xfb(struct blob_reader *metadata, struct gl_shader_program *shProg)
|
||||
if (xfb_stage == ~0u)
|
||||
return;
|
||||
|
||||
if (shProg->TransformFeedback.VaryingNames) {
|
||||
for (unsigned i = 0; i < shProg->TransformFeedback.NumVarying; ++i)
|
||||
free(shProg->TransformFeedback.VaryingNames[i]);
|
||||
}
|
||||
|
||||
/* Data set by glTransformFeedbackVaryings. */
|
||||
shProg->TransformFeedback.BufferMode = blob_read_uint32(metadata);
|
||||
blob_copy_bytes(metadata, &shProg->TransformFeedback.BufferStride,
|
||||
sizeof(shProg->TransformFeedback.BufferStride));
|
||||
shProg->TransformFeedback.NumVarying = blob_read_uint32(metadata);
|
||||
|
||||
shProg->TransformFeedback.VaryingNames = (char **)
|
||||
malloc(shProg->TransformFeedback.NumVarying * sizeof(GLchar *));
|
||||
realloc(shProg->TransformFeedback.VaryingNames,
|
||||
shProg->TransformFeedback.NumVarying * sizeof(GLchar *));
|
||||
/* Note, malloc used with VaryingNames. */
|
||||
for (unsigned i = 0; i < shProg->TransformFeedback.NumVarying; i++)
|
||||
shProg->TransformFeedback.VaryingNames[i] =
|
||||
|
@@ -1127,13 +1127,22 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
||||
if (dri2_dpy->fd == -1) {
|
||||
_eglLog(_EGL_WARNING, "wayland-egl: could not open %s (%s)",
|
||||
dri2_dpy->device_name, strerror(errno));
|
||||
free(dri2_dpy->device_name);
|
||||
dri2_dpy->device_name = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (drmGetNodeTypeFromFd(dri2_dpy->fd) == DRM_NODE_RENDER) {
|
||||
dri2_dpy->authenticated = true;
|
||||
} else {
|
||||
drmGetMagic(dri2_dpy->fd, &magic);
|
||||
if (drmGetMagic(dri2_dpy->fd, &magic)) {
|
||||
close(dri2_dpy->fd);
|
||||
dri2_dpy->fd = -1;
|
||||
free(dri2_dpy->device_name);
|
||||
dri2_dpy->device_name = NULL;
|
||||
_eglLog(_EGL_WARNING, "wayland-egl: drmGetMagic failed");
|
||||
return;
|
||||
}
|
||||
wl_drm_authenticate(dri2_dpy->wl_drm, magic);
|
||||
}
|
||||
}
|
||||
|
@@ -1310,6 +1310,12 @@ static struct pb_buffer *amdgpu_bo_from_handle(struct radeon_winsys *rws,
|
||||
if (bo) {
|
||||
p_atomic_inc(&bo->base.reference.count);
|
||||
simple_mtx_unlock(&ws->bo_export_table_lock);
|
||||
|
||||
/* Release the buffer handle, because we don't need it anymore.
|
||||
* This function is returning an existing buffer, which has its own
|
||||
* handle.
|
||||
*/
|
||||
amdgpu_bo_free(result.buf_handle);
|
||||
return &bo->base;
|
||||
}
|
||||
|
||||
|
@@ -280,6 +280,12 @@ amdgpu_winsys_create(int fd, const struct pipe_screen_config *config,
|
||||
if (ws) {
|
||||
pipe_reference(NULL, &ws->reference);
|
||||
simple_mtx_unlock(&dev_tab_mutex);
|
||||
|
||||
/* Release the device handle, because we don't need it anymore.
|
||||
* This function is returning an existing winsys instance, which
|
||||
* has its own device handle.
|
||||
*/
|
||||
amdgpu_device_deinitialize(dev);
|
||||
return &ws->base;
|
||||
}
|
||||
|
||||
|
@@ -636,7 +636,7 @@ VkResult anv_CreateInstance(
|
||||
}
|
||||
|
||||
if (instance->app_info.api_version == 0)
|
||||
anv_EnumerateInstanceVersion(&instance->app_info.api_version);
|
||||
instance->app_info.api_version = VK_API_VERSION_1_0;
|
||||
|
||||
instance->enabled_extensions = enabled_extensions;
|
||||
|
||||
|
@@ -446,6 +446,9 @@ anv_pipeline_hash_graphics(struct anv_pipeline *pipeline,
|
||||
if (layout)
|
||||
_mesa_sha1_update(&ctx, layout->sha1, sizeof(layout->sha1));
|
||||
|
||||
const bool rba = pipeline->device->robust_buffer_access;
|
||||
_mesa_sha1_update(&ctx, &rba, sizeof(rba));
|
||||
|
||||
for (unsigned s = 0; s < MESA_SHADER_STAGES; s++) {
|
||||
if (stages[s].entrypoint)
|
||||
anv_pipeline_hash_shader(&ctx, &stages[s]);
|
||||
@@ -466,6 +469,9 @@ anv_pipeline_hash_compute(struct anv_pipeline *pipeline,
|
||||
if (layout)
|
||||
_mesa_sha1_update(&ctx, layout->sha1, sizeof(layout->sha1));
|
||||
|
||||
const bool rba = pipeline->device->robust_buffer_access;
|
||||
_mesa_sha1_update(&ctx, &rba, sizeof(rba));
|
||||
|
||||
anv_pipeline_hash_shader(&ctx, stage);
|
||||
|
||||
_mesa_sha1_final(&ctx, sha1_out);
|
||||
|
@@ -40,7 +40,7 @@ libglapi = shared_library(
|
||||
'glapi',
|
||||
[files_mapi_glapi, files_mapi_util, shared_glapi_mapi_tmp_h],
|
||||
c_args : [
|
||||
c_msvc_compat_args, '-DMAPI_MODE_GLAPI',
|
||||
c_msvc_compat_args, c_vis_args, '-DMAPI_MODE_GLAPI',
|
||||
'-DMAPI_ABI_HEADER="@0@"'.format(shared_glapi_mapi_tmp_h.full_path()),
|
||||
],
|
||||
link_args : [ld_args_gc_sections],
|
||||
|
@@ -900,8 +900,7 @@ select_tex_image(const struct gl_texture_object *texObj, GLenum target,
|
||||
|
||||
/**
|
||||
* Error-check the offset and size arguments to
|
||||
* glGet[Compressed]TextureSubImage(). Also checks if the specified
|
||||
* texture image is missing.
|
||||
* glGet[Compressed]TextureSubImage().
|
||||
* \return true if error, false if no error.
|
||||
*/
|
||||
static bool
|
||||
@@ -913,6 +912,7 @@ dimensions_error_check(struct gl_context *ctx,
|
||||
const char *caller)
|
||||
{
|
||||
const struct gl_texture_image *texImage;
|
||||
GLuint imageWidth = 0, imageHeight = 0, imageDepth = 0;
|
||||
|
||||
if (xoffset < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(xoffset = %d)", caller, xoffset);
|
||||
@@ -981,82 +981,44 @@ dimensions_error_check(struct gl_context *ctx,
|
||||
"%s(zoffset + depth = %d)", caller, zoffset + depth);
|
||||
return true;
|
||||
}
|
||||
/* According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"):
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by GetTextureImage if the
|
||||
* effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY ,
|
||||
* and the texture object is not cube complete or cube array complete,
|
||||
* respectively."
|
||||
*
|
||||
* This applies also to GetTextureSubImage, GetCompressedTexImage,
|
||||
* GetCompressedTextureImage, and GetnCompressedTexImage.
|
||||
*/
|
||||
if (!_mesa_cube_complete(texObj)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(cube incomplete)", caller);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
; /* nothing */
|
||||
}
|
||||
|
||||
texImage = select_tex_image(texObj, target, level, zoffset);
|
||||
if (!texImage) {
|
||||
/* Trying to return a non-defined level is a valid operation per se, as
|
||||
* OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries") does not
|
||||
* handle this case as an error.
|
||||
*
|
||||
* Rather, we need to look at section 8.22 ("Texture State and Proxy
|
||||
* State"):
|
||||
*
|
||||
* "Each initial texture image is null. It has zero width, height, and
|
||||
* depth, internal format RGBA, or R8 for buffer textures, component
|
||||
* sizes set to zero and component types set to NONE, the compressed
|
||||
* flag set to FALSE, a zero compressed size, and the bound buffer
|
||||
* object name is zero."
|
||||
*
|
||||
* This means we need to assume the image for the non-defined level is
|
||||
* an empty image. With this assumption, we can go back to section
|
||||
* 8.11.4 and checking again the errors:
|
||||
*
|
||||
* "An INVALID_VALUE error is generated if xoffset + width is greater
|
||||
* than the texture’s width, yoffset + height is greater than the
|
||||
* texture’s height, or zoffset + depth is greater than the texture’s
|
||||
* depth."
|
||||
*
|
||||
* Thus why we return INVALID_VALUE.
|
||||
*/
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(missing image)", caller);
|
||||
return true;
|
||||
if (texImage) {
|
||||
imageWidth = texImage->Width;
|
||||
imageHeight = texImage->Height;
|
||||
imageDepth = texImage->Depth;
|
||||
}
|
||||
|
||||
if (xoffset + width > texImage->Width) {
|
||||
if (xoffset + width > imageWidth) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(xoffset %d + width %d > %u)",
|
||||
caller, xoffset, width, texImage->Width);
|
||||
caller, xoffset, width, imageWidth);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (yoffset + height > texImage->Height) {
|
||||
if (yoffset + height > imageHeight) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(yoffset %d + height %d > %u)",
|
||||
caller, yoffset, height, texImage->Height);
|
||||
caller, yoffset, height, imageHeight);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (target != GL_TEXTURE_CUBE_MAP) {
|
||||
/* Cube map error checking was done above */
|
||||
if (zoffset + depth > texImage->Depth) {
|
||||
if (zoffset + depth > imageDepth) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(zoffset %d + depth %d > %u)",
|
||||
caller, zoffset, depth, texImage->Depth);
|
||||
caller, zoffset, depth, imageDepth);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Extra checks for compressed textures */
|
||||
{
|
||||
if (texImage) {
|
||||
GLuint bw, bh, bd;
|
||||
_mesa_get_format_block_size_3d(texImage->TexFormat, &bw, &bh, &bd);
|
||||
if (bw > 1 || bh > 1 || bd > 1) {
|
||||
@@ -1162,53 +1124,15 @@ pbo_error_check(struct gl_context *ctx, GLenum target,
|
||||
|
||||
|
||||
/**
|
||||
* Do error checking for all (non-compressed) get-texture-image functions.
|
||||
* \return true if any error, false if no errors.
|
||||
* Do teximage-related error checking for getting uncompressed images.
|
||||
* \return true if there was an error
|
||||
*/
|
||||
static bool
|
||||
getteximage_error_check(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, GLsizei bufSize,
|
||||
GLvoid *pixels, const char *caller)
|
||||
teximage_error_check(struct gl_context *ctx,
|
||||
struct gl_texture_image *texImage,
|
||||
GLenum format, const char *caller)
|
||||
{
|
||||
struct gl_texture_image *texImage;
|
||||
GLenum baseFormat, err;
|
||||
GLint maxLevels;
|
||||
|
||||
assert(texObj);
|
||||
|
||||
if (texObj->Target == 0) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid texture)", caller);
|
||||
return true;
|
||||
}
|
||||
|
||||
maxLevels = _mesa_max_texture_levels(ctx, target);
|
||||
if (level < 0 || level >= maxLevels) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(level = %d)", caller, level);
|
||||
return true;
|
||||
}
|
||||
|
||||
err = _mesa_error_check_format_and_type(ctx, format, type);
|
||||
if (err != GL_NO_ERROR) {
|
||||
_mesa_error(ctx, err, "%s(format/type)", caller);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dimensions_error_check(ctx, texObj, target, level,
|
||||
xoffset, yoffset, zoffset,
|
||||
width, height, depth, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pbo_error_check(ctx, target, width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
texImage = select_tex_image(texObj, target, level, zoffset);
|
||||
GLenum baseFormat;
|
||||
assert(texImage);
|
||||
|
||||
/*
|
||||
@@ -1241,8 +1165,8 @@ getteximage_error_check(struct gl_context *ctx,
|
||||
return true;
|
||||
}
|
||||
else if (_mesa_is_stencil_format(format)
|
||||
&& !_mesa_is_depthstencil_format(baseFormat)
|
||||
&& !_mesa_is_stencil_format(baseFormat)) {
|
||||
&& !_mesa_is_depthstencil_format(baseFormat)
|
||||
&& !_mesa_is_stencil_format(baseFormat)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(format mismatch)", caller);
|
||||
return true;
|
||||
@@ -1271,6 +1195,142 @@ getteximage_error_check(struct gl_context *ctx,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do common teximage-related error checking for getting uncompressed images.
|
||||
* \return true if there was an error
|
||||
*/
|
||||
static bool
|
||||
common_error_check(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target, GLint level,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, GLsizei bufSize,
|
||||
GLvoid *pixels, const char *caller)
|
||||
{
|
||||
GLenum err;
|
||||
GLint maxLevels;
|
||||
|
||||
if (texObj->Target == 0) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid texture)", caller);
|
||||
return true;
|
||||
}
|
||||
|
||||
maxLevels = _mesa_max_texture_levels(ctx, target);
|
||||
if (level < 0 || level >= maxLevels) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(level = %d)", caller, level);
|
||||
return true;
|
||||
}
|
||||
|
||||
err = _mesa_error_check_format_and_type(ctx, format, type);
|
||||
if (err != GL_NO_ERROR) {
|
||||
_mesa_error(ctx, err, "%s(format/type)", caller);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"):
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by GetTextureImage if the
|
||||
* effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY ,
|
||||
* and the texture object is not cube complete or cube array complete,
|
||||
* respectively."
|
||||
*
|
||||
* This applies also to GetTextureSubImage, GetCompressedTexImage,
|
||||
* GetCompressedTextureImage, and GetnCompressedTexImage.
|
||||
*/
|
||||
if (target == GL_TEXTURE_CUBE_MAP && !_mesa_cube_complete(texObj)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(cube incomplete)", caller);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do error checking for all (non-compressed) get-texture-image functions.
|
||||
* \return true if any error, false if no errors.
|
||||
*/
|
||||
static bool
|
||||
getteximage_error_check(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target, GLint level,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, GLsizei bufSize,
|
||||
GLvoid *pixels, const char *caller)
|
||||
{
|
||||
struct gl_texture_image *texImage;
|
||||
|
||||
assert(texObj);
|
||||
|
||||
if (common_error_check(ctx, texObj, target, level, width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (width == 0 || height == 0 || depth == 0) {
|
||||
/* Not an error, but nothing to do. Return 'true' so that the
|
||||
* caller simply returns.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pbo_error_check(ctx, target, width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
texImage = select_tex_image(texObj, target, level, 0);
|
||||
if (teximage_error_check(ctx, texImage, format, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do error checking for all (non-compressed) get-texture-image functions.
|
||||
* \return true if any error, false if no errors.
|
||||
*/
|
||||
static bool
|
||||
gettexsubimage_error_check(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, GLsizei bufSize,
|
||||
GLvoid *pixels, const char *caller)
|
||||
{
|
||||
struct gl_texture_image *texImage;
|
||||
|
||||
assert(texObj);
|
||||
|
||||
if (common_error_check(ctx, texObj, target, level, width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dimensions_error_check(ctx, texObj, target, level,
|
||||
xoffset, yoffset, zoffset,
|
||||
width, height, depth, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pbo_error_check(ctx, target, width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
texImage = select_tex_image(texObj, target, level, zoffset);
|
||||
if (teximage_error_check(ctx, texImage, format, caller)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the width, height and depth of a texture image.
|
||||
* This function must be resilient to bad parameter values since
|
||||
@@ -1399,7 +1459,7 @@ _mesa_GetnTexImageARB(GLenum target, GLint level, GLenum format, GLenum type,
|
||||
get_texture_image_dims(texObj, target, level, &width, &height, &depth);
|
||||
|
||||
if (getteximage_error_check(ctx, texObj, target, level,
|
||||
0, 0, 0, width, height, depth,
|
||||
width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return;
|
||||
}
|
||||
@@ -1430,7 +1490,7 @@ _mesa_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type,
|
||||
get_texture_image_dims(texObj, target, level, &width, &height, &depth);
|
||||
|
||||
if (getteximage_error_check(ctx, texObj, target, level,
|
||||
0, 0, 0, width, height, depth,
|
||||
width, height, depth,
|
||||
format, type, INT_MAX, pixels, caller)) {
|
||||
return;
|
||||
}
|
||||
@@ -1464,7 +1524,7 @@ _mesa_GetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type,
|
||||
&width, &height, &depth);
|
||||
|
||||
if (getteximage_error_check(ctx, texObj, texObj->Target, level,
|
||||
0, 0, 0, width, height, depth,
|
||||
width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return;
|
||||
}
|
||||
@@ -1497,9 +1557,10 @@ _mesa_GetTextureSubImage(GLuint texture, GLint level,
|
||||
return;
|
||||
}
|
||||
|
||||
if (getteximage_error_check(ctx, texObj, texObj->Target, level,
|
||||
xoffset, yoffset, zoffset, width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
if (gettexsubimage_error_check(ctx, texObj, texObj->Target, level,
|
||||
xoffset, yoffset, zoffset,
|
||||
width, height, depth,
|
||||
format, type, bufSize, pixels, caller)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -954,8 +954,8 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
||||
/* We only need/want to wait on semaphores once. After that, we're
|
||||
* guaranteed ordering since it all happens on the same queue.
|
||||
*/
|
||||
submit_info.waitSemaphoreCount = pPresentInfo->waitSemaphoreCount,
|
||||
submit_info.pWaitSemaphores = pPresentInfo->pWaitSemaphores,
|
||||
submit_info.waitSemaphoreCount = pPresentInfo->waitSemaphoreCount;
|
||||
submit_info.pWaitSemaphores = pPresentInfo->pWaitSemaphores;
|
||||
|
||||
/* Set up the pWaitDstStageMasks */
|
||||
stage_flags = vk_alloc(&swapchain->alloc,
|
||||
|
@@ -1062,6 +1062,8 @@ wsi_display_swapchain_destroy(struct wsi_swapchain *drv_chain,
|
||||
|
||||
for (uint32_t i = 0; i < chain->base.image_count; i++)
|
||||
wsi_display_image_finish(drv_chain, allocator, &chain->images[i]);
|
||||
|
||||
wsi_swapchain_finish(&chain->base);
|
||||
vk_free(allocator, chain);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user