Commit e040c618 authored by Jonah Ryan-Davis's avatar Jonah Ryan-Davis Committed by Commit Bot

Pass along correct texture type for video textures on Mac/ANGLE.

Historically, CGL on Mac always requests TEXTURE_RECTANGLE for GL
textures. However, ANGLE's new SwiftShader and Metal backends request
TEXTURE_2D to be used. This needs to be forwarded to the video
decode accelerator on Mac.

Bug: chromium:1122647
Bug: angleproject:4846
Bug: chromium:1099978
Bug: chromium:1099979
Bug: chromium:1119939
Change-Id: Ic9696046eda29c4b86ce09d7b36c3c81eddae828
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380097Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarYuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Cr-Commit-Position: refs/heads/master@{#802808}
parent 12fdba10
...@@ -769,7 +769,6 @@ crbug.com/1114284 [ linux swiftshader passthrough google-0xffff ] conformance/un ...@@ -769,7 +769,6 @@ crbug.com/1114284 [ linux swiftshader passthrough google-0xffff ] conformance/un
crbug.com/1099960 [ mac swiftshader passthrough ] conformance/context/context-no-alpha-fbo-with-alpha.html [ Failure ] crbug.com/1099960 [ mac swiftshader passthrough ] conformance/context/context-no-alpha-fbo-with-alpha.html [ Failure ]
crbug.com/1099960 [ mac swiftshader passthrough ] conformance/rendering/color-mask-preserved-during-implicit-clears.html [ Failure ] crbug.com/1099960 [ mac swiftshader passthrough ] conformance/rendering/color-mask-preserved-during-implicit-clears.html [ Failure ]
crbug.com/1099960 [ mac swiftshader passthrough ] conformance/rendering/scissor-rect-repeated-rendering.html [ Failure ] crbug.com/1099960 [ mac swiftshader passthrough ] conformance/rendering/scissor-rect-repeated-rendering.html [ Failure ]
crbug.com/1119939 [ mac swiftshader passthrough ] conformance/textures/misc/texture-upload-size.html [ Failure ]
crbug.com/1099960 [ mac swiftshader-gl no-passthrough ] conformance/context/context-no-alpha-fbo-with-alpha.html [ Failure ] crbug.com/1099960 [ mac swiftshader-gl no-passthrough ] conformance/context/context-no-alpha-fbo-with-alpha.html [ Failure ]
crbug.com/1099960 [ mac swiftshader-gl no-passthrough ] conformance/rendering/color-mask-preserved-during-implicit-clears.html [ Failure ] crbug.com/1099960 [ mac swiftshader-gl no-passthrough ] conformance/rendering/color-mask-preserved-during-implicit-clears.html [ Failure ]
crbug.com/1099960 [ mac swiftshader-gl no-passthrough ] conformance/rendering/scissor-rect-repeated-rendering.html [ Failure ] crbug.com/1099960 [ mac swiftshader-gl no-passthrough ] conformance/rendering/scissor-rect-repeated-rendering.html [ Failure ]
...@@ -812,7 +811,6 @@ crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bit ...@@ -812,7 +811,6 @@ crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bit
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ]
crbug.com/1119939 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-alpha-alpha-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ]
...@@ -821,13 +819,11 @@ crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bit ...@@ -821,13 +819,11 @@ crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bit
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/gl-pixelstorei.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/gl-pixelstorei.html [ Failure ]
crbug.com/1119939 [ mac swiftshader passthrough ] conformance/textures/misc/tex-video-using-tex-unit-non-zero.html [ Failure ]
crbug.com/1102991 [ mac swiftshader passthrough ] conformance/textures/misc/tex-image-and-sub-image-2d-with-array-buffer-view.html [ RetryOnFailure ] crbug.com/1102991 [ mac swiftshader passthrough ] conformance/textures/misc/tex-image-and-sub-image-2d-with-array-buffer-view.html [ RetryOnFailure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texparameter-test.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texparameter-test.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texture-corner-case-videos.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texture-corner-case-videos.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texture-npot-video.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texture-npot-video.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texture-video-transparent.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/misc/texture-video-transparent.html [ Failure ]
crbug.com/1119939 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ]
crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac swiftshader passthrough ] conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ]
...@@ -880,28 +876,24 @@ crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image ...@@ -880,28 +876,24 @@ crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_byte.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ]
crbug.com/1119939 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-alpha-alpha-unsigned_byte.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance-luminance-unsigned_byte.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_byte.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_byte.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Skip ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Skip ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/canvas-teximage-after-multiple-drawimages.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/gl-pixelstorei.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/gl-pixelstorei.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/tex-image-webgl.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/tex-image-webgl.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/tex-input-validation.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/tex-input-validation.html [ Failure ]
crbug.com/1119939 [ mac metal passthrough ] conformance/textures/misc/tex-video-using-tex-unit-non-zero.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texparameter-test.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texparameter-test.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-active-bind-2.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-active-bind-2.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-active-bind.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-active-bind.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-corner-case-videos.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-corner-case-videos.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-npot-video.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-npot-video.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-npot.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-npot.html [ Failure ]
crbug.com/1119939 [ mac metal passthrough ] conformance/textures/misc/texture-upload-size.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-video-transparent.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/misc/texture-video-transparent.html [ Failure ]
crbug.com/1119939 [ mac metal passthrough ] conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ]
crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ] crbug.com/angleproject/4846 [ mac metal passthrough ] conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ]
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "base/trace_event/process_memory_dump.h" #include "base/trace_event/process_memory_dump.h"
#include "base/version.h" #include "base/version.h"
#include "components/crash/core/common/crash_key.h" #include "components/crash/core/common/crash_key.h"
#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
#include "media/base/limits.h" #include "media/base/limits.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "media/filters/vp9_parser.h" #include "media/filters/vp9_parser.h"
...@@ -1260,7 +1261,8 @@ void VTVideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_id) { ...@@ -1260,7 +1261,8 @@ void VTVideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_id) {
// Drop references to allow the underlying buffer to be released. // Drop references to allow the underlying buffer to be released.
PictureInfo* picture_info = it->second.get(); PictureInfo* picture_info = it->second.get();
gl_client_.bind_image.Run(picture_info->client_texture_id, gl_client_.bind_image.Run(picture_info->client_texture_id,
GL_TEXTURE_RECTANGLE_ARB, nullptr, false); gpu::GetPlatformSpecificTextureTarget(), nullptr,
false);
picture_info->gl_image = nullptr; picture_info->gl_image = nullptr;
picture_info->bitstream_id = 0; picture_info->bitstream_id = 0;
...@@ -1455,7 +1457,7 @@ bool VTVideoDecodeAccelerator::ProcessFrame(const Frame& frame) { ...@@ -1455,7 +1457,7 @@ bool VTVideoDecodeAccelerator::ProcessFrame(const Frame& frame) {
<< frame.image_size.ToString() << ")"; << frame.image_size.ToString() << ")";
client_->ProvidePictureBuffers(kNumPictureBuffers, PIXEL_FORMAT_UNKNOWN, client_->ProvidePictureBuffers(kNumPictureBuffers, PIXEL_FORMAT_UNKNOWN,
1, frame.image_size, 1, frame.image_size,
GL_TEXTURE_RECTANGLE_ARB); gpu::GetPlatformSpecificTextureTarget());
return false; return false;
} }
if (!SendFrame(frame)) if (!SendFrame(frame))
...@@ -1496,7 +1498,8 @@ bool VTVideoDecodeAccelerator::SendFrame(const Frame& frame) { ...@@ -1496,7 +1498,8 @@ bool VTVideoDecodeAccelerator::SendFrame(const Frame& frame) {
gl_image->SetColorSpaceForYUVToRGBConversion(color_space); gl_image->SetColorSpaceForYUVToRGBConversion(color_space);
if (!gl_client_.bind_image.Run(picture_info->client_texture_id, if (!gl_client_.bind_image.Run(picture_info->client_texture_id,
GL_TEXTURE_RECTANGLE_ARB, gl_image, false)) { gpu::GetPlatformSpecificTextureTarget(),
gl_image, false)) {
DLOG(ERROR) << "Failed to bind image"; DLOG(ERROR) << "Failed to bind image";
NotifyError(PLATFORM_FAILURE, SFT_PLATFORM_ERROR); NotifyError(PLATFORM_FAILURE, SFT_PLATFORM_ERROR);
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment