Bug 27896

Summary: gallium/{llvm,soft}pipe: should set MaxNativeParameters to nonzero
Product: Mesa Reporter: Török Edwin <edwin+bugs>
Component: OtherAssignee: Jose Fonseca <jfonseca>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Török Edwin 2010-04-29 07:54:41 UTC
WoW crashes when runder under wine+d3d if MaxNativeParameters is zero (the default). It crashes on swrastc, softpipe, and llvmpipe.

This patch works around the crash, but it changes the default parameter for all drivers:
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 1707e22..d8c5dba 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -477,7 +477,7 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
    prog->MaxNativeAttribs = 0;
    prog->MaxNativeTemps = 0;
    prog->MaxNativeAddressRegs = 0;
- prog->MaxNativeParameters = 0;
+ prog->MaxNativeParameters = 256;
 }

There should be a way to set these limits in gallium/llvmpipe, and the other software drivers that support shaders.

P.S.: I think bugzilla needs a Drivers/Gallium/llvmpipe component.
Comment 1 Jose Fonseca 2010-04-29 09:57:46 UTC
Hi Török,

Thanks. We've detected this issue earlier and I'm working on a patch already.
Comment 2 Brian Paul 2010-05-07 08:17:15 UTC
Is WoW working now since Jose's fix?  Can we close this bug?
Comment 3 Török Edwin 2010-05-07 08:18:38 UTC
(In reply to comment #2)
> Is WoW working now since Jose's fix?  Can we close this bug?

Haven't tested yet, will probably test tomorrow morning.
Comment 4 Török Edwin 2010-05-08 03:04:25 UTC
Yep, works @2-3 fps in default d3d mode.
With -opengl it says no 3D acceleration found, don't know if its a wine or mesa issue:
err:wgl:X11DRV_wglCreatePbufferARB ((nil)): unexpected iPixelFormat(0) <= 0, returns NULL         
err:wgl:X11DRV_wglCreatePbufferARB ((nil)): unexpected iPixelFormat(0) <= 0, returns NULL

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.