Closed CounterPillow closed 7 years ago
Works fine on nvidia.
According to #intel-gfx on freenode:
<Kayden> CounterPillow: sure looks like an app bug to me
<Kayden> CounterPillow: they're calling glBufferData(GL_PIXEL_UNPACK_BUFFER, -24576, 0, GL_STREAM_DRAW)
<Kayden> size of -24576 (< 0) is causing a GL error...
<Kayden> then, glTexSubImage2D dies because the PBO is sized wrong
<Kayden> so, no image
maybe nvidia accepts values lower than 0 as 0.
I'm seeing: glBufferData(GL_PIXEL_UNPACK_BUFFER, -24576, 0, GL_STREAM_DRAW) which raises a GL_INVALID_VALUE error due to the negative size, and fails to create a proper PBO, so glTexSubImage2D later fails with an out of bounds PBO access, and you get no image.
I don't think you mean to be supplying a negative size...
Oh, turns out I was testing the wrong thing. Can reproduce on nvidia.
so, @haasn suggests this
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index 9cc889b401..f1c73f3797 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -3268,7 +3268,7 @@ static bool pass_upload_image(struct gl_video *p, struct mp_image *mpi, uint64_t
.tex = plane->tex,
.src = mpi->planes[n],
.invalidate = true,
- .stride = mpi->stride[n],
+ .stride = abs(mpi->stride[n]),
};
struct dr_buffer *mapped = gl_find_dr_buffer(p, mpi->planes[n]);
while it gets rid of the opengl errors, it does produce a really messed up picture
I have a workaround queued. It was probably broken by haasn's previous refactor to this code.
mpv version and platform
Linux 4.13.9, mesa 17.2.4, Intel GPU
Reproduction steps
--no-config --opengl-pbo=yes
--no-config
Expected behavior
Video plays
Actual behavior
OpenGL errors occur, no video plays
Log file
https://0x0.st/szkA.log
Sample files
https://0x0.st/szkN.AVI
which is from https://hackaday.io/project/27427-camera-badge-for-supercon-2017 (avi_rgb565.AVI)