Bug 6222 - Won't render until glScissor is called with an area different from the viewport
Summary: Won't render until glScissor is called with an area different from the viewport
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: 6.4
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-11 07:26 UTC by Neil Toronto
Modified: 2006-03-29 10:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix for mesa 6.4.2 (2.29 KB, patch)
2006-03-16 03:11 UTC, David Reveman
Details | Splinter Review

Description Neil Toronto 2006-03-11 07:26:10 UTC
This may or may not be specific to the Quake 3 engine.

Ubuntu Linux (Breezy), Mesa 6.4.2 (compiled from source, though the 6.3 in the
package repository exhibits this behavior), Intel 855GM.

In both Quake 3 (commercial release 1.32) and the open-source ioquake3
(icculus.org/quake3), nothing will render until glScissor is called with
arguments specifying an area different from the viewport. This happens whether
ioquake3 uses SDL or GLX for window management. (The commercial engine uses GLX.)

The following engine hack is presented to illustrate the problem:

   // set the window clipping
   qglViewport(backEnd.viewParms.viewportX, backEnd.viewParms.viewportY,
       backEnd.viewParms.viewportWidth, backEnd.viewParms.viewportHeight);

   if (!i915hack) // static qboolean
   {
       i915hack = qtrue;
       qglScissor(backEnd.viewParms.viewportX, backEnd.viewParms.viewportY,
           backEnd.viewParms.viewportWidth, backEnd.viewParms.viewportHeight - 1);
   }
   else
   {
       qglScissor(backEnd.viewParms.viewportX, backEnd.viewParms.viewportY,
           backEnd.viewParms.viewportWidth, backEnd.viewParms.viewportHeight);
   }

i915hack is a static variable - that is, doing this hack call to glScissor only
ONCE fixes the problem until the application is unloaded.

Steps to duplicate:

1) Install Quake 3
2) Run Quake 3, load a map, drop the console, type "cg_draw2d 0"
3) Reload Quake 3 from the command line with +devmap <some map>

Nothing should draw on step 3. Setting cg_draw2d to 0 keeps Quake 3 from
rendering a small scene containing the player's head model, which is scissored
around the model.

The status of this on other Quake 3 engine games is unknown.
Comment 1 David Reveman 2006-03-16 03:09:53 UTC
Having the some problem when running Xgl. It seems to be fixed in Mesa HEAD.
Comment 2 David Reveman 2006-03-16 03:11:40 UTC
Created attachment 4955 [details] [review]
Fix for mesa 6.4.2
Comment 3 Brian Paul 2006-03-30 04:39:42 UTC
I've applied this to the 6.4 branch.  Though, there probably won't be a 6.4.3
release since 6.5 is coming out.


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.