Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,428
    • Issues 2,428
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 685
    • Merge Requests 685
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #778

Closed
Open
Created Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

glDrawBuffer crashes in case of surfaceless context

Submitted by Volker Vogelhuber

Assigned to Default DRI bug account

Link to original bug (#102574)

Description

I've created a surfaceless OpenGL context using the EGL_KHR_surfaceless_context extension together with eglGetPlatformDisplay/EGL_PLATFORM_GBM_MESA. In this scenario there seem to be no valid default framebuffer which is Ok, as I'm normally only render to FBOs with textures bound. Due to an error on my side I called glDrawBuffer with GL_FRONT_LEFT while no FBO was bound.

This result in a crash in intel_buffers.c because in intelDrawBuffer() dri2InvalidateDrawable is called with a null pointer which is not checked in dri2InvalidateDrawable() or anywhere before.

While the root cause for triggering the error is on my side, I think it may be better to raise an error instead of crashing. So I propose to add a check to brw->driContext->driDrawablePriv within intelDrawBuffer. Probably if the driDrawablePriv is nullptr one should not call intel_prepare_render either.

Mesa 17.1 with Kernel 4.9.6 on Intel Apollo Lake GPU

Version: 17.1

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None