Arm Community
Site
Search
User
Site
Search
User
Groups
Education Hub
Distinguished Ambassadors
Open Source Software and Platforms
Research Collaboration and Enablement
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello forum
Operating Systems forum
SoC Design and Simulation forum
SystemReady Forum
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Internet of Things (IoT) blog
Operating Systems blog
SoC Design and Simulation blog
Tools, Software and IDEs blog
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Graphics, Gaming, and VR forum
eglCreatePixmapSurface error 0x300a
Jump...
Cancel
Locked
Locked
Replies
8 replies
Subscribers
136 subscribers
Views
8469 views
Users
0 members are here
OpenGL ES
Mali-GPU
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
eglCreatePixmapSurface error 0x300a
jack li
over 11 years ago
Note: This was originally posted on 12th September 2012 at
http://forums.arm.com
When I try the SAMSUNG S3 run the above code, I failed.
void GLImageRenderBlux::initEGL(int width, int height, SkBitmap bitmap)
{
const EGLint attribList[] = { EGL_WIDTH, width, EGL_HEIGHT, height, EGL_NONE };
EGLConfig config;
EGLint maj;
EGLint min;
m_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
checkEGLError("eglGetDisplay");
if(m_display == EGL_NO_DISPLAY) {
LOGE("getDisplay fail!");
return ;
}
if(eglInitialize(m_display, &maj, &min) == EGL_FALSE) {
LOGE("Initialize fail");
return ;
}
config = chooseConfig(m_display);
EGLint contextAttrs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
m_context = eglCreateContext(m_display, config, EGL_NO_CONTEXT, contextAttrs);
checkEGLError("eglCreateContext");
if(m_context == EGL_NO_CONTEXT) {
LOGE("Create Context failure");
return ;
}
//
SkPixelRef* ref = bitmap.pixelRef();
SkSafeRef(ref);
ref->lockPixels();
egl_native_pixmap_t pixmap;
pixmap.version = sizeof(pixmap);
pixmap.width = width;
pixmap.height = height;
pixmap.stride = bitmap.rowBytes() / bitmap.bytesPerPixel();
pixmap.format = SkBitmap::kARGB_8888_Config;
pixmap.data = (uint8_t*)ref->pixels();
ref->unlockPixels();
m_surface = eglCreatePixmapSurface(m_display, config, &pixmap, attribList);
checkEGLError("eglCreatePixmapSurface");
if(m_surface == EGL_NO_SURFACE) {
LOGE("Create Surface failure");
return ;
}
if (!eglMakeCurrent(m_display, m_surface, m_surface, m_context)) {
LOGE("Make Current failure");
return ;
}
}
EGLConfig GLImageRenderBlux::chooseConfig(EGLDisplay display)
{
EGLConfig config;
EGLint numConfigs;
static const EGLint configAttribs[] = {
EGL_SURFACE_TYPE,
EGL_PIXMAP_BIT,
EGL_RENDERABLE_TYPE,
EGL_OPENGL_ES2_BIT,
EGL_NONE
};
eglChooseConfig(display, configAttribs, &config, 1, &numConfigs);
checkEGLError("eglPbufferConfig");
if (numConfigs != 1) {
LOGE("eglPbufferConfig failed (%d)\n", numConfigs);
}
return config;
}
Error information is as follows:
'eglCreatePixmapSurface error: EGL_BAD_NATIVE_PIXMAP (0x300a)'
'[color=#FF0000]Create Surface failure'[/color]
Does any know how to fix the problem?
Parents
Karthik Hariharakrishnan
over 11 years ago
Note: This was originally posted on 13th September 2012 at
http://forums.arm.com
Hi Likai,
There is no support for Pixmap Surfaces in Android. Could you let us know what is your application and why you would want to use Pixmap surfaces? If you need the GPU to write to CPU allocated memory that you need to access, you can so do using Android Native buffers and EGL Image extensions.
Please look at the following post for more information to see if it can help you.
http://forums.arm.com/index.php?/topic/15782-glreadpixels/
Cheers
Karthik
Cancel
Up
0
Down
Cancel
Reply
Karthik Hariharakrishnan
over 11 years ago
Note: This was originally posted on 13th September 2012 at
http://forums.arm.com
Hi Likai,
There is no support for Pixmap Surfaces in Android. Could you let us know what is your application and why you would want to use Pixmap surfaces? If you need the GPU to write to CPU allocated memory that you need to access, you can so do using Android Native buffers and EGL Image extensions.
Please look at the following post for more information to see if it can help you.
http://forums.arm.com/index.php?/topic/15782-glreadpixels/
Cheers
Karthik
Cancel
Up
0
Down
Cancel
Children
No data