Commit Graph

44220 Commits

Author SHA1 Message Date
Dave Airlie 0cdd82df53 r600g: add context control to start of CS
On my original R600 card this at least lets gnome shell run for a while longer
and the piglit r300-readcache test case works a lot more reliably.

Still a few more stability issues running a piglit test run though.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-31 15:42:45 +10:00
Dave Airlie 65ee7cd1df r600g: don't emit color blend register on original R600.
The original R600 doesn't have these so don't emit them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-31 10:52:07 +10:00
Marek Olšák 29ceeeba20 mesa: forbid UseProgram to be called inside Begin/End
The spec doesn't state it should be an error, but. We have this piglit test
useprogram-inside-begin that passes with this commit. No idea what's correct.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 16:26:02 +02:00
Marek Olšák 1b37a41661 st/mesa: don't use resource_copy_region for CopyPixels with conditional render
The conditional rendering should be able to kill CopyPixels.
I assume the render condition has no effect on resource_copy_region.

This fixes piglit:
- NV_conditional_render/copypixels

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:51:06 +02:00
Marek Olšák 8d45bbc422 st/mesa: conditional rendering should not kill texture decompression via blit
NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:51:03 +02:00
Marek Olšák 91e56c8897 st/mesa: CopyTex(Sub)Image should not be killed by conditional rendering
NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:51:01 +02:00
Marek Olšák ccfeb90b75 st/mesa: BlitFramebuffer should not be killed by conditional rendering
NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:50:58 +02:00
Marek Olšák c0277d9539 swrast: BlitFramebuffer should not be killed by conditional rendering
NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:50:53 +02:00
Marek Olšák 1c95c3ef9c st/mesa: GenerateMipmap should not be killed by conditional rendering
NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:50:43 +02:00
Marek Olšák 24ed0b384b st/mesa: fix typos and add some format fallbacks in format_map
Always default to DEFAULT_*_FORMATS for mandatory GL formats.
   (st_choose_format must not fail for those)
Use DEFAULT_RGBA when alpha is required instead of RGB.
Use DEFAULT_RGB otherwise.

These are more or less the remaining differences between the old code and
the new one.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:49:35 +02:00
Marek Olšák 6c638b7ca1 st/mesa: consolidate listing of depth formats
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:49:31 +02:00
Marek Olšák 26d718ff71 st/mesa: add GL_DEPTH_COMPONENT32 fallback formats
This makes D32 work again on chipsets which can't do it.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:49:27 +02:00
Marek Olšák 49d4e803d3 st/mesa: fix changing internal format via RenderbufferStorage
The problem is: The second time the function is called with a new
internal format, strb->format is usually not PIPE_FORMAT_NONE.

RenderbufferStorage(... GL_RGBA8 ...);
RenderbufferStorage(... GL_RGBA16 ...); // had no effect on the format

Broken with: fd6f2d6e57
Test: piglit/fbo-storage-completeness

NOTE: This is a candidate for the 7.10 branch.
(if fd6f2d6e57 is cherry-picked as well)

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:49:21 +02:00
Marek Olšák ff038170ff tgsi/ureg: bump the limit of immediates
Lowered indirect addressing can create lots of immediates.

Fixes piglit/glsl-fs-uniform-array-7 on r300g.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-30 10:48:03 +02:00
Marek Olšák f133ff51a2 trace: implement texture_barrier 2011-05-29 16:17:11 +02:00
Marek Olšák b9e8cb0a59 trace: implement render_condition 2011-05-29 16:17:11 +02:00
Marek Olšák 76056510bc r300g: clear can be killed by render condition
Fixes piglit:
- NV_conditional_render/clear
2011-05-29 16:17:11 +02:00
Tom Stellard aae56150f5 r300g: Fix non-dri builds
This is just a temporary solution for now until there is a better way
to share code between mesa and gallium.
2011-05-28 21:16:00 -07:00
Marek Olšák f76787b3ea r300g: fix occlusion queries when depth test is disabled or zbuffer is missing
From now on, depth test is always enabled in hardware.

If depth test is disabled in Gallium, the hardware Z function is set to ALWAYS.

If there is no zbuffer set, the colorbuffer0 memory is set as a zbuffer
to silence the CS checker.

This fixes piglit:
- occlusion-query-discard
- NV_conditional_render/bitmap
- NV_conditional_render/drawpixels
- NV_conditional_render/vertex_array
2011-05-29 05:15:27 +02:00
Marek Olšák d18792f93d r300g: cleanup render_condition a bit 2011-05-29 05:15:27 +02:00
Marek Olšák 70b86fb273 r300g: remove fake occlusion queries (debug option) 2011-05-29 05:15:27 +02:00
Marek Olšák 2397f20b6b r300g: remove debug option DBG_FALL 2011-05-29 05:15:27 +02:00
Marek Olšák 9a3f861faf r300g: print some HyperZ debug info 2011-05-29 03:03:14 +02:00
Stéphane Marchesin fc48de4fab glx: Fix glXGetFBConfigFromVisualSGIX.
We want to check for Success, otherwise it will fail even with the right visual.

NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Antoine Labour <piman@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-27 11:58:36 -06:00
Pierre-Eric Pelloux-Prayer 4eeabd5a3d mesa: set parameter list StateFlags field in _mesa_layout_parameters()
When using _mesa_layout_parameters, all params copied in the 'layout'
output in the PASS 1 don't modify StateFlags (because they are simply
memcpy'ed).
This patch fixes the problem, assuring output gl_prog_param_list
StateFlags field is the same as the input one.

NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-27 11:58:36 -06:00
Eric Anholt 0653c450cc i965/fs: Fix up for 8752764076.
I failed to commit and squash before pushing.
2011-05-27 09:51:28 -07:00
Eric Anholt 9bd7e9c6b2 mesa: Include shader target in dumps of GLSL source.
This makes automatic parsing of MESA_GLSL=dump output easier.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 09:07:32 -07:00
Eric Anholt 8752764076 i965/fs: Do a FS compile up front at link time to produce link errors.
At glLinkShaders time, a fail() call in FS compile in 8-wide (the one
that's required to succeed, though we may relax that at some point for
pre-Ironlake performance) will now report out as a link error.
2011-05-27 09:07:32 -07:00
Eric Anholt d1f70a8a6c i965/fs: Split the GLSL IR -> FS LIR visitor to brw_fs_visitor.cpp.
We now have:
brw_fs.cpp handles calling out to everything and optimization.
brw_fs_visitor.cpp handles translating to our LIR.
brw_fs_emit.cpp handles emitting from our LIR to native code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 08:51:40 -07:00
Eric Anholt 11dd9e9c0f i965/fs: Split the BRW native code emit to brw_fs_emit.cpp
This is all separate from the visitor and the optimization passes
which feed into it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 08:51:39 -07:00
Eric Anholt b7b700aeb0 i965: Move a couple of GLSL IR -> BRW helper functions to brw_shader.cpp.
These will be used by the VS backend as well.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 08:51:30 -07:00
Eric Anholt 14b86f3c91 i965: Move non-FS-specific shader support to brw_shader.cpp.
These only existed in brw_fs.cpp because it was the only .cpp file in
the area when I wrote them.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 08:51:05 -07:00
Eric Anholt 53c89c67f3 i965: Avoid generating MOVs for assignments of expressions.
No statistically significant difference measured in 3dbenchmark
egypt/pro.  It does reduce fragment shader instructions across
shader-db by 0.3%.
2011-05-27 08:19:52 -07:00
Eric Anholt 1791857d7d i965/fs: Move the computation of register block count from unit to compile.
No net code size change, but unit update is down 0.8% code size
pre-gen6.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 08:19:27 -07:00
Eric Anholt 615117ce4e i965/fs: Track fixed GRF regs separate from allocated GRF file in scheduling.
There's an assumption here that fixed GRFs will never intersect with
the allocated GRFs.  That's true today, though it might change some
day if we decide to register-allocate the regs containing push
constants once they're dead.

This fixes a regression in 0f7325b890 in
Lightsmark from the texture instructions now containing g0 references
instead of having that be implied.  Performance is improved 15.2% +/-
3.6% (n=3).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34968
2011-05-27 08:08:23 -07:00
Eric Anholt 40540cc517 i965/fs: Add a helper function for add_dep(before, after, before->latency).
This lets us avoid a bunch of before==NULL checks in the callers.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-27 08:08:23 -07:00
Trevor Davenport 828b26b7eb nv50: fix emit_add_a16 to emit correct source reg
emit_add_a16 was using the incorrect source.
This caused adds in the form of:

   add u16 $a0 s32 $a1 u32 0x00000200

to have a source AREG of $a0 instead of $a1.

Fixes World of Warcraft in OpenGL and D3D without GLSL.
2011-05-27 10:25:40 +02:00
Brian Paul 4609e80288 mesa: s/height/depth/ in texsubimage()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=37648
2011-05-26 19:25:44 -06:00
Brian Paul e401c1f57f mesa: plug _mesa_GetObjectParameterivAPPLE into display list dispatch table 2011-05-26 19:25:44 -06:00
Brian Paul 6126d50e75 mesa: plug in GL_ARB_vertex_array_object display list functions 2011-05-26 19:25:44 -06:00
Brian Paul e00481586c mesa: more geometry shader display list functions 2011-05-26 19:25:44 -06:00
Brian Paul 3b0f431820 mesa: more transform feedback display list functions 2011-05-26 19:25:44 -06:00
Brian Paul 919e260bff mesa: make query object API functions static
Only directly referenced by the _mesa_init_queryobj_dispatch() function.
2011-05-26 19:25:44 -06:00
Brian Paul 848bcd2e8c mesa: simplify query object display list dispatch setup 2011-05-26 19:25:44 -06:00
Eric Anholt f7b3f40b70 i965: Pack the lookup and line_aa bits into the first dword of the key.
They were occupying whole 32-bit words, despite being only 10 or so
bits.  Reduces code size slightly (80/3300 bytes).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-26 10:07:38 -07:00
Eric Anholt 9a729ab4b2 i965: Remove dead shadowtex_mask entry in the WM key.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-26 10:07:38 -07:00
Eric Anholt f147599ef4 i965: Remove linear_color for GL_PERSPECTIVE_CORRECTION_HINT.
From the GL 2.1 spec:

   "Required perspective-correct interpolation for all fragment
    attributes except depth in sections 3.4.1 and 3.5.1, effectively
    making GL PERSPECTIVE CORRECT HINT a no-op."

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-26 10:07:38 -07:00
Eric Anholt c095335fa5 intel: Drop doubly irrelevant code in intelReadBuffers.
First, FBO read/draw == NULL validation happens in mesa core not
intelReadBuffers -> intel_draw_buffers.  Second, that condition is no
longer tested for in our driver since ARB_ES2_compatibility was added.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-26 08:54:29 -07:00
Eric Anholt 6d4b974e89 mesa: Flush vertices before updating drawbuffer computed state.
Otherwise, the driver is likely to draw the flushed vertices to the
new drawbuffer instead of the old one, missing the point of the flush.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-26 08:54:29 -07:00
Eric Anholt d3451f7f9c mesa: Allow NULL read/draw in complete FBOs in ARB_ES2_compatibility.
From the ARB_ES2_compatibility spec:

    "(8) How should we handle draw buffer completeness?

    RESOLVED: Remove draw/readbuffer completeness checks, and treat
    drawbuffers referring to missing attachments as if they were NONE."

Fixes arb_es2_compatibility-drawbuffers when the short-circuit for
ARB_ES2_compatibility in the previous commit is dropped.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-26 08:54:29 -07:00