Commit Graph

44152 Commits

Author SHA1 Message Date
Dave Airlie c1159eea54 r600g: remote ctx arg to block/range macros.
These aren't used anymore.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02 14:40:40 +10:00
Dave Airlie 8782fdc1db r600g: avoid copying unnecessary pieces of a block.
This just avoids copying stuff if its going to modify the number of dwords
later anyways.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02 14:29:37 +10:00
Dave Airlie 9eb86f89a9 r600g: optimise state setting in r600_draw_vbo.
This drop the r600_draw_vbo CPU usage on a run of nexuiz from 1.40% to 0.72%
in sysprof for me on my Fusion APU.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02 14:22:42 +10:00
Dave Airlie 8fcafeb475 r600g: force new evergreen blocks for large range.
This range was 76 dwords long, the 75th dword changes, the first 60 or so
don't. split the block so it emits less often.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02 14:22:42 +10:00
Brian Paul 57242715cb st/mesa: add format table entry for GL_RGB9_E5
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=37839
2011-06-01 16:25:42 -06:00
Nathan Kidd f3652f0983 glapi: Make xserver location error more helpful
glx code hasn't lived under xserver/GL for a long time now.

Signed-off-by: Nathan Kidd <nkidd@opentext.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-01 08:30:59 -06:00
Marek Olšák b9e9df78a0 mesa: queries of non-existent FBO attachments should return INVALID_OPERATION
OpenGL 4.0 Compatibility, page 449:

If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, no
framebuffer is bound to target. In this case querying pname FRAMEBUFFER_-
ATTACHMENT_OBJECT_NAME will return zero, and all other queries will generate
an INVALID_OPERATION error.

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-06-01 16:07:58 +02:00
Marek Olšák d69dc2e203 mesa: UseShaderProgramEXT and Uniform* shouldn't be allowed inside Begin/End
I couldn't find this being required by the spec.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-06-01 16:03:26 +02:00
Marek Olšák 37a85b1830 r300g: remove unused debug option DBG_UPLOAD
And renumber the options.
2011-06-01 04:47:41 +02:00
Alex Deucher c5903ed454 r600c: add support for llano
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-31 18:10:01 -04:00
Alex Deucher 414cd5df50 r600g: add llano support
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-31 18:10:01 -04:00
Eric Anholt c331b3123e i965/fs: Use the embedded compare in SEL on gen6+.
This avoids the extra CMP and the predication on SEL, so in addition
to one less instruction, it makes scheduling less constrained.

Improves glbenchmark Egypt performance 0.6% +/- 0.2% (n=3).  Reduces
FS instruction count across affected shaders in shader-db by 1.3%
without regressing any.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-31 12:23:50 -07:00
Benjamin Franzke 089aa313b4 wayland-drm: Check visual for being NULL 2011-05-31 15:13:37 -04:00
Benjamin Franzke fc5aec9342 Fiuxp make tarballs for wayland-egl/drm 2011-05-31 15:13:37 -04:00
Benjamin Franzke a7cd65fb38 st/egl: Fix udev linkage when egl_dri2 is not build 2011-05-31 15:13:37 -04:00
Benjamin Franzke aa87a938fb egl_dri2: Fix usage of bool values 2011-05-31 15:13:36 -04:00
Benjamin Franzke 5bf6cc95c1 wayland-egl: Remove left-over headers and struct 2011-05-31 15:13:36 -04:00
Eric Anholt f04765922c i965: Remove brw_surface_state struct that is now unused.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:29 -07:00
Eric Anholt ee643b23ff i965: Switch brw_state_dump to using bitshifting for surface state.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:29 -07:00
Eric Anholt e764f10ea5 i965: Replace struct with bit shifting for WM null surfaces.
Reduces compiled size of brw_wm_surface_state.o another 1.9%.

Overall, this brw_wm_surface_state reduction series cuts
firefox-talos-gfx runtime by 0.68% +/- 0.42% (n=6).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:29 -07:00
Eric Anholt 9bdc44a528 i965: Replace struct with bit shifting for WM pull constant surfaces.
This reduces compiled size (4.7% of brw_wm_surface_state.o).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:28 -07:00
Eric Anholt ac11c01dde i965: Replace struct with bit shifting for WM render target surfaces.
This massively reduces compiled size (6.7% of brw_wm_surface_state.o).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:28 -07:00
Eric Anholt ae5c1fceba i965: Replace structs with bitfield shifting for WM texture surfaces.
This massively reduces compiled size (4.9% of brw_wm_surface_state.o).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:28 -07:00
Eric Anholt 7d437b1f7f i965: Add defines for surface state setup using bitfield shifting.
It turns out that gcc is just awful at generating code for
brw_structs.h style state setup, and using bitshifting on u32s
generates better code while being similarly readable (and more
verifiable compared to the specs, using the INTEL_MASK macro).
2011-05-31 12:07:28 -07:00
Eric Anholt 3412069e23 i965: Don't compute brw->wm.input_size_masks when it's unused.
It's only used in the old fragment program path, to avoid projection
when w is always 1.  We do want to do this in the new path pre-gen6
too, but we'll probably do it through the ir.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-31 12:07:28 -07:00
Eric Anholt bcbb1a536f i965: Drop a gratuitous "if" that the compiler didn't eliminate at -O2.
Oddly, this increases compiled code size.  (marking the 'if' as likely
also increases code size, but not as much).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:28 -07:00
Eric Anholt d1946f5348 i965: Move prepare_wm_surfaces texobj declarations inside of _ReallyEnabled.
Interestingly, the compiler wasn't doing this for us at -O2, so we
were doing the computation for every non-_ReallyEnabled unit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-31 12:07:28 -07:00
Ian Romanick f29bc77572 intel: Remove unused NO_TILE macro
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-05-31 11:46:29 -07:00
Marek Olšák b1246cf13b r300g: set squared microtiling for the dummy zbuffer
The pitch of 4 is allowed for squared microtiling only.
2011-05-31 18:19:27 +02:00
Alex Deucher b5518834e3 r600g: cs init fixes
- all asics need to emit CONTEXT_CONTROL
- all r6xx asics need to emit 3D_START_CMDBUF

The ddx and r600c already do this. r600g should as well.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-31 10:43:31 -04:00
Marek Olšák c4175c811e r300g: log when getting unsupported texture format 2011-05-31 15:20:38 +02:00
Dave Airlie d2ede5e648 gallium: include limits.h in p_config.h
We are getting inconsistent methods for endian detection (same answer when
it works, just doesn't work on some platforms) depending on whether __GLIBC__
is defined, which of course depends on include ordering before p_config.h

Just make p_config.h include limits.h to solve this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-31 17:28:48 +10:00
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