| Summary: | [mesa_7_0_branch 855GM mesa core] glxinfo crash X | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Shuang He <shuang.he> |
| Component: | Mesa core | Assignee: | haihao <haihao.xiang> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | high | CC: | mesa-dev |
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
Cherry pick Brian's fix (40133487dbdd14456a8a4f6a5716f57a36eb1ea7er) from master to fix this issue. verified, thanks |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
System Environment: -------------------------- --Platform: 855GM, all(when reverting to software rendering) --Architecture(32-bit,64-bit,compatiblity): all --2D driver: beb72ae5aa053303f5cc419e9c9d7c6db964f160 --mesa(7_0 branch): 4b7147832678ab3014cf58da84f0962ed2b6c832 --Xserver(1.4 branch): 7982aaa7f071f9a21ad402da872d5328bd7e51ff --Drm: ba7263b8c2f8c14c647da725ecbc73fcd456d63c --Kernel: 2.6.23.1 Bug detailed description: ------------------------- this issue happens on 855GM with direct rendering this issue also happens on all other platforms when dri drivers are removed, and reverting to software rendering. on 855GM, glxinfo will crash X on other platform, after removing the dri drivers, start X, and run glxinfo will crash X seems this is caused by _mesa_new_program recursively call it self without return, and following patch can fix this: diff --git a/configs/linux-dri b/configs/linux-dri diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index e9b364e..31b317a 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -128,7 +128,7 @@ _mesa_init_driver_functions(struct dd_fu /* Vertex/fragment programs */ driver->BindProgram = NULL; - driver->NewProgram = _mesa_new_program; + driver->NewProgram = NULL; driver->DeleteProgram = _mesa_delete_program; #if FEATURE_MESA_program_debug driver->GetProgramRegister = _mesa_get_program_register; diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index a240baf..0bc9c62 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -421,12 +421,12 @@ #if FEATURE_NV_vertex_program || FEATURE #endif #if FEATURE_ARB_vertex_program - ss->DefaultVertexProgram = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0); + ss->DefaultVertexProgram = _mesa_new_program(ctx, GL_VERTEX_PROGRAM_ARB, 0); if (!ss->DefaultVertexProgram) goto cleanup; #endif #if FEATURE_ARB_fragment_program - ss->DefaultFragmentProgram = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); + ss->DefaultFragmentProgram = _mesa_new_program(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); if (!ss->DefaultFragmentProgram) goto cleanup; #endif Reproduce steps: ---------------- on 855GM just glxinfo will crash X on other platforms: 1. remove dri drivers 2. start X 3. glxinfo