Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gl error 1280 on GMA950 #9

Closed
asd963 opened this issue Jul 13, 2013 · 6 comments

Comments

@asd963
Copy link

commented Jul 13, 2013

vdpauinfo:
display: :0.0 screen: 0
[VS] Software VDPAU backend library initialized
[VS] error (VdpDeviceCreateX11): gl error 1280
Error creating VDPAU device: 25

VGA compatible controller: Intel Corporation Mobile 945GSE Express Integrated Graphics Controller (rev 03)

@i-rinat

This comment has been minimized.

Copy link
Owner

commented Jul 14, 2013

Which version of mesa do you have? Post here output of glxinfo, please.

@asd963

This comment has been minimized.

Copy link
Author

commented Jul 14, 2013

http://pastebin.com/xcri1f9e

mesa 9.1.4 on archlinux

@i-rinat

This comment has been minimized.

Copy link
Owner

commented Jul 14, 2013

I use texture swizzle feature to create single-channel textures. Mesa 8.0.5 just ignored that on gma950, but 9.1.4 reports an error. Anyway texture swizzles are slow and I have plans to use GL shaders, so it will be fixed someday. For now you can try to apply patch below:

diff --git a/vdpau-soft.c b/vdpau-soft.c
index 031003d..18f275c 100644
--- a/vdpau-soft.c
+++ b/vdpau-soft.c
@@ -2110,11 +2110,6 @@ softVdpBitmapSurfaceCreate(VdpDevice device, VdpRGBAFormat rgba_format, uint32_t
         glx_context_pop();
         return VDP_STATUS_ERROR;
     }
-    if (VDP_RGBA_FORMAT_A8 == rgba_format) {
-        // map red channel to alpha
-        GLint swizzle_mask[] = {GL_ONE, GL_ONE, GL_ONE, GL_RED};
-        glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle_mask);
-    }

     gl_error = glGetError();
     glx_context_pop();
@@ -2996,15 +2991,10 @@ softVdpDeviceCreateX11(Display *display_orig, int screen, VdpDevice *device,
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_ONE);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_ONE);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_ONE);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_RED);
     glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, watermark_width, watermark_height, 0, GL_RED,
                  GL_UNSIGNED_BYTE, watermark_data);

I haven't tested it. I think, VDP_RGBA_FORMAT_A8 may become broken, it is used for either OSD or subtitles in mplayer.

@asd963

This comment has been minimized.

Copy link
Author

commented Jul 14, 2013

It works, thanks. Flashplayer works a little faster but still is slow, and vdpau in mplayer display only one frame (I'm using xv anyway)

@i-rinat

This comment has been minimized.

Copy link
Owner

commented Jul 14, 2013

Flashplayer works a little faster but still is slow

that's because now library does colorspace conversion with libswscale rather than with GL shader. Don't know, will it be faster or not, but that's on the list.

@i-rinat

This comment has been minimized.

Copy link
Owner

commented Jan 7, 2014

Fixed in 066f10d and 8326be9

does colorspace conversion with libswscale rather than with GL shader. Don't know, will it be faster or not

BTW, looks like libswscale is faster. On Intel HD4000 shader-based conversion a little bit faster, but on GMA950 + Atom N270, shader conversion three times slower.

@i-rinat i-rinat closed this Jan 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.