Eric Anholt [Tue, 4 Aug 2009 22:27:40 +0000 (15:27 -0700)]
i965: Hook up the disassembler for INTEL_DEBUG={wm,vs}.
I was getting tired of doing the dance of INTEL_DEBUG=batch, copying it out,
and running intel-gen4disasm on it.
Eric Anholt [Tue, 4 Aug 2009 22:00:36 +0000 (15:00 -0700)]
i965: Initial import of disasm code from intel-gen4asm.
There's a bunch of stuff from gen4asm and gpu-tools that we probably want
to make into a library instead of cargo-culting it around.
Eric Anholt [Tue, 4 Aug 2009 22:29:00 +0000 (15:29 -0700)]
i965: warning fix
Brian Paul [Tue, 4 Aug 2009 22:17:09 +0000 (16:17 -0600)]
tests/getteximage: test more texture sizes, including npot
Brian Paul [Tue, 4 Aug 2009 21:36:13 +0000 (15:36 -0600)]
mesa: log the shader checksum
Brian Paul [Tue, 4 Aug 2009 21:35:48 +0000 (15:35 -0600)]
mesa: compute, print shader checksum
Brian Paul [Tue, 4 Aug 2009 21:34:59 +0000 (15:34 -0600)]
mesa: added gl_shader::SourceChecksum field (for debug purposes)
Brian Paul [Tue, 4 Aug 2009 21:33:53 +0000 (15:33 -0600)]
mesa: added _mesa_str_checksum()
Brian Paul [Tue, 4 Aug 2009 21:29:00 +0000 (15:29 -0600)]
mesa: clean-up error debug/count code
Brian Paul [Tue, 4 Aug 2009 21:28:29 +0000 (15:28 -0600)]
mesa: reset ErrorDebugCount to zero in glGetString()
Brian Paul [Tue, 4 Aug 2009 21:04:37 +0000 (15:04 -0600)]
mesa: better texture dump/debug code
Brian Paul [Tue, 4 Aug 2009 20:53:24 +0000 (14:53 -0600)]
mesa: more error message info for vertex pointer functions
Brian Paul [Tue, 4 Aug 2009 16:55:29 +0000 (10:55 -0600)]
mesa: more glGetTexImage() error checking consolidation, new assertion
Eric Anholt [Tue, 4 Aug 2009 19:39:22 +0000 (12:39 -0700)]
i965: Fix RECT shadow sampling by not losing the other texcoords.
Bug #20821
Dan Nicholson [Mon, 3 Aug 2009 15:35:43 +0000 (08:35 -0700)]
mklib: Ensure target directory exists for library
Instead of relying on the Makefile to always generate $(TOP)/$(LIB_DIR),
just have mklib handle creating the directory. This should fix any races
when using parallel make.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Michel Dänzer [Tue, 4 Aug 2009 08:57:47 +0000 (10:57 +0200)]
r300g: Slightly saner initialization of some texture / transfer fields.
Eric Anholt [Tue, 4 Aug 2009 00:55:14 +0000 (17:55 -0700)]
i965: Assert that the offset in the VBO is below the VBO size.
This avoids sending a bad buffer address to the GPU due to programmer error,
and is permitted by the ARB_vbo spec. Note that we still have the opportunity
to dereference past the end of the GPU, because we aren't clipping to a
correct _MaxElement, but that appears to be harder than it should be. This
gets us the 90% solution.
Bug #19911.
Eric Anholt [Tue, 4 Aug 2009 00:12:43 +0000 (17:12 -0700)]
i965: Even if no VS inputs are set, still load some amount of URB as required.
See comment on Vertex URB Entry Read Length for VS_STATE.
This, combined with the previous three commits, fixes #22945.
Eric Anholt [Mon, 3 Aug 2009 22:24:02 +0000 (15:24 -0700)]
i965: Make sure the VS URB size is big enough to fit a VF VUE.
This fix is just from code and docs inspection, but it may fix hangs on
some applications.
Eric Anholt [Thu, 30 Jul 2009 20:40:29 +0000 (13:40 -0700)]
i965: Don't emit bad packets when no VBs are referenced.
It appears that sometimes Mesa (and I suppose a VS could as well) emits
a program which references no vertex data, and thus we end up with
nr_enabled == 0 even though some VBs are enabled. We'd end up emitting
VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs.
Bug #22945 (wine with an uncompiled VS)
Eric Anholt [Mon, 3 Aug 2009 21:46:18 +0000 (14:46 -0700)]
i965: Calculate enabled[] and nr_enabled once and re-use the values.
The code duplication bothered me.
Robert Ellison [Mon, 3 Aug 2009 23:09:14 +0000 (17:09 -0600)]
typo fix
somehow, this change was missed on the last checkin
Robert Ellison [Mon, 3 Aug 2009 23:04:50 +0000 (17:04 -0600)]
mesa: fix up some GLAPI XML
- Added specifications for the extensions GL_APPLE_flush_buffer_range and
GL_APPLE_texture_range
- EXT_framebuffer_object.xml strangely held specifications for both
the GL_EXT_framebuffer_object extension and the GL_EXT_texture_array
extension. Split out the GL_EXT_texture_array data into its own
file.
Roland Scheidegger [Mon, 3 Aug 2009 22:21:07 +0000 (00:21 +0200)]
radeon: more fixes for compressed textures
- fix not respecting required hardware stride with compressedTexImage -
this fixes #22615.
- make sure correct stride is used in various places
- fix stored miptree never matching with a TexImage call with compressed
texture
- don't always store data with compressedtexsubimage at offset 0,
and actually use the supplied pixel data... (untested)
- make sure rows for compressed texture handling are rounded up not down
Note that trying to access stored compressed textures in hardware miptrees
from core mesa (get_compressed_teximage, swrast fallbacks) can't work correctly,
since RowStride isn't really set to anything useful, plus some places (at least
get_compressed_teximage) assume this data has native stride and no padding.
Eric Anholt [Mon, 3 Aug 2009 21:38:16 +0000 (14:38 -0700)]
radeon: Fix inverted test for disabling flushing of front buffer output.
(corresponding fix to the intel driver one)
Eric Anholt [Mon, 3 Aug 2009 21:27:41 +0000 (14:27 -0700)]
intel: Fix inverted test for disabling flushing of front buffer output.
The comment disagreed with the code, and nicely drew my eyes to what was
going wrong.
Bug #21774 (blender)
Bug #21788 (readpix)
Eric Anholt [Tue, 21 Jul 2009 18:23:18 +0000 (11:23 -0700)]
intel: Wait on the last swapbuffers to complete before queuing a new one.
This fixes jerkiness in doom3 and other apps since the kernel change to
throttle less absurdly, which led to a thundering herd of frames.
Because this is a rather minimal fix, there is at least one downside: If
the whole scene completes in one batchbuffer, we'll end up stalling the GPU.
Thanks to Michel Dänzer for suggesting using glFlush to signal frame end
instead of going to all the effort of adding a new DRI2 extension.
Alex Deucher [Mon, 3 Aug 2009 20:10:32 +0000 (16:10 -0400)]
r600: add some new r7xx pci ids
Eric Anholt [Mon, 3 Aug 2009 19:38:56 +0000 (12:38 -0700)]
texenv: Use VP->Current, since _Current isn't updated at this point.
Eric Anholt [Mon, 3 Aug 2009 19:36:52 +0000 (12:36 -0700)]
texenv: Match state.c in deciding whether we'll be using a vertex shader.
Eric Anholt [Mon, 3 Aug 2009 19:21:03 +0000 (12:21 -0700)]
texenv: Add missing dependency on VP changes.
Funny thing is I annotated this dependency in
e5f63c403b767f9974e8eb5d412c012b8a69287f, but didn't actually use it.
Chia-I Wu [Mon, 3 Aug 2009 17:36:08 +0000 (11:36 -0600)]
egl_softpipe: Add support for pbuffer surface.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Chia-I Wu [Mon, 3 Aug 2009 17:35:44 +0000 (11:35 -0600)]
egl: Correct the default values of surface attributes.
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to
EGL_NO_TEXTURE.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Chia-I Wu [Mon, 3 Aug 2009 17:35:14 +0000 (11:35 -0600)]
egl: Make eglMakeCurrent more robust.
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers. This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Chia-I Wu [Mon, 3 Aug 2009 17:34:37 +0000 (11:34 -0600)]
egl: Replace IsBound by a pointer to the binding.
IsBound tells if a context or surface is current. What it does not tell
is, to which thread a context is current, or to which context a surface
is current. This commit replaces IsBound by a pointer to the binding
thread or context.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Brian Paul [Mon, 3 Aug 2009 17:22:39 +0000 (11:22 -0600)]
gl: upgrade wglext.h to version 15
Brian Paul [Mon, 3 Aug 2009 17:21:57 +0000 (11:21 -0600)]
gl: upgrade glxext.h to version 23
Brian Paul [Mon, 3 Aug 2009 17:20:40 +0000 (11:20 -0600)]
gl: upgrade glext.h to version 54
Brian Paul [Fri, 31 Jul 2009 16:23:52 +0000 (10:23 -0600)]
tgsi: report opcode name in addition to the number when translation fails
Brian Paul [Fri, 31 Jul 2009 16:23:09 +0000 (10:23 -0600)]
tgsi: added tgsi_get_opcode_name()
Brian Paul [Fri, 31 Jul 2009 15:30:56 +0000 (09:30 -0600)]
gallium: comments, reformatting
Alex Deucher [Mon, 3 Aug 2009 15:21:10 +0000 (11:21 -0400)]
r600: add some missing pci ids
Alex Deucher [Mon, 3 Aug 2009 07:12:56 +0000 (03:12 -0400)]
r600: fix the build when RADEON_DEBUG_BO is set
Alex Deucher [Mon, 3 Aug 2009 06:28:22 +0000 (02:28 -0400)]
r600: fix r600SetTexOffset
We need to properly set up a fake bo for the texture override,
so add a new function to radeon_bo_legacy.c. This could probably
be used on radeon/r200/r300 to unify the bo handling for
texture override.
compiz now works :)
Corbin Simpson [Sun, 2 Aug 2009 23:56:52 +0000 (16:56 -0700)]
Merge commit 'nha/r300-compiler-gallium'
Alex Deucher [Sun, 2 Aug 2009 22:26:12 +0000 (18:26 -0400)]
r600: handle state emit better
- move shader-related state with the rest of the shader setup/emit
- start to track dirty state better
vehemens [Sun, 2 Aug 2009 22:03:58 +0000 (18:03 -0400)]
r600: Logic Operations Fix
fixes bug 23087
Alex Deucher [Sun, 2 Aug 2009 17:28:18 +0000 (13:28 -0400)]
r600: fix regression in texenv
Emit shader consts with the shader program itself
Nicolai Hähnle [Sun, 2 Aug 2009 12:38:44 +0000 (14:38 +0200)]
r300: Fix a regression on non-KMS
The regression was introduced by
9a1c336253579d8b58b31910325227b22b4af395
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Alex Deucher [Sun, 2 Aug 2009 00:55:43 +0000 (20:55 -0400)]
r600: fix rectangle textures
It might be better to add an instruction to normalize the
coordinates for rectanglular textures as there are some limitations
to wrap modes on unnormalized tex coords.
fixes texrect
Nicolai Hähnle [Sat, 1 Aug 2009 16:58:47 +0000 (18:58 +0200)]
r300: Fix corner-case of KIL on R300
R300 hardware (but _not_ R500) hardware requires an enabled texture unit
if KIL is used in fragment programs. We now work around the CS checker
correctly when enabling such a fake texture unit.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Sat, 1 Aug 2009 14:50:21 +0000 (16:50 +0200)]
r300: Fix Z buffer re-emit after window resize
We used to not always correctly re-emit the Z buffer size in all cases,
in particular the clear path, and invalidated state was not always picked
up correctly.
This fixes a bug where the kernel CS checker correctly complains about
a Z buffer that is too small.
Note that this bug was probably only visible with ridiculously high
framerates, i.e. glxgears.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Patrice Mandin [Sat, 1 Aug 2009 09:15:18 +0000 (11:15 +0200)]
mesa st: Use POT texture for draw pixels operations if NPOT texture is not supported
Patrice Mandin [Sat, 1 Aug 2009 09:03:30 +0000 (11:03 +0200)]
mesa st: Move logbase2 function to util/u_math.h
Roland Scheidegger [Fri, 31 Jul 2009 21:24:44 +0000 (23:24 +0200)]
radeon: fix r100/r200 compressed texture stride
This almost fixes compressed mipmapped textures on r200, though some small
mip levels are still broken.
Leave r300 compressed texture stride as is though afaik it's different
to pre-radeon-rewrite too. Also do the fixup for rs600 uncompressed row stride
at same place.
Roland Scheidegger [Fri, 31 Jul 2009 21:20:22 +0000 (23:20 +0200)]
radeon: s/r300/radeon in shared code error message
Pauli Nieminen [Tue, 28 Jul 2009 22:28:33 +0000 (01:28 +0300)]
radeon: Cliprects has to be updated before doing anything with clip rectangles
Reported to fix corruption while dragging an active window by John Bridgman.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Pauli Nieminen [Fri, 31 Jul 2009 11:03:36 +0000 (14:03 +0300)]
radeon: Remove unused variable from context.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Alex Deucher [Fri, 31 Jul 2009 19:11:41 +0000 (15:11 -0400)]
r600: make sure bos are valid before usign that
Alex Deucher [Fri, 31 Jul 2009 18:48:46 +0000 (14:48 -0400)]
r600: fix reloc setup
re-use the same reloc index for bos that are referenced
multiple times.
Fixes rain demo.
Alex Deucher [Fri, 31 Jul 2009 16:06:26 +0000 (12:06 -0400)]
r600: remove unused offset_mod stuff
this is a step in migrating to the common cs code
Alex Deucher [Fri, 31 Jul 2009 15:33:16 +0000 (11:33 -0400)]
r600: ensure we have enough room for full state emit
full state is roughly 4000 dwords, but will vary depending
on the rendering.
Also fix some warnings.
Alex Deucher [Fri, 31 Jul 2009 15:12:10 +0000 (11:12 -0400)]
r600: unify state emit into one function
Alex Deucher [Fri, 31 Jul 2009 14:53:06 +0000 (10:53 -0400)]
r600: re-arrange state setup and emit so they are not mixed
Michal Krol [Fri, 31 Jul 2009 16:12:53 +0000 (18:12 +0200)]
Rename TGSI LOOP instruction to better match theri usage.
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour
is similar to a C language for-loop.
The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now
there is no name collision.
Chia-Wu [Fri, 31 Jul 2009 13:28:56 +0000 (07:28 -0600)]
egl: Silence warnings on x86-64.
Casting an unsigned int to or from a pointer directly gives warnings on
x86-64. Add wrappers to silence the warnings.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Alex Deucher [Fri, 31 Jul 2009 06:13:43 +0000 (02:13 -0400)]
r600: get updated pending age from cs ioctl
REQUIRES AN UPDATED DRM
Alex Deucher [Fri, 31 Jul 2009 01:27:05 +0000 (21:27 -0400)]
r600: warning fixes
Alex Deucher [Thu, 30 Jul 2009 18:59:48 +0000 (14:59 -0400)]
r600: split primitive draw into a separate function
Nicolai Hähnle [Thu, 30 Jul 2009 21:45:34 +0000 (23:45 +0200)]
r300g: Use radeon compiler for fragment programs
This is entirely untested on R500, and needs more testing on R300.
Nicolai Hähnle [Wed, 29 Jul 2009 17:22:56 +0000 (19:22 +0200)]
r300g: Remove extraneous printf
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Mon, 27 Jul 2009 18:23:49 +0000 (20:23 +0200)]
r300g: Use r300compiler for vertex shaders
Nicolai Hähnle [Thu, 30 Jul 2009 20:26:02 +0000 (22:26 +0200)]
r300/compiler: Remove inst_offset from r500_fragment_program_code
The field is not used, and in any case it would be more interesting to
manipulate from *outside* the compiler if we ever wanted to load several
fragment programs at the same time or something.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Ian Romanick [Thu, 30 Jul 2009 21:08:53 +0000 (14:08 -0700)]
progs/vp: Correct the PARAM array sizes in arl-*.txt
Chia-I Wu [Thu, 30 Jul 2009 16:42:41 +0000 (10:42 -0600)]
softpipe: Mark texture dirty when unmapped.
When a texutre transfer is mapped for writing, mark the texture dirty
when unmapped. This was done in surface creation, and this commit moves
it to happen in texture unmapping.
This fixes subtex test in progs/tests/.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Brian Paul [Thu, 30 Jul 2009 16:04:38 +0000 (10:04 -0600)]
mesa: re-enable _mesa_source_buffer_exists() call
Somehow this code wound up inside a comment a while back.
Brian Paul [Thu, 30 Jul 2009 15:59:52 +0000 (09:59 -0600)]
mesa: get_current_tex_unit() helper function
Brian Paul [Thu, 30 Jul 2009 15:50:36 +0000 (09:50 -0600)]
mesa: refactor glGetTexImage error checking code
Brian Paul [Thu, 30 Jul 2009 15:46:57 +0000 (09:46 -0600)]
tests: glGetTexImage() test
Brian Paul [Thu, 30 Jul 2009 15:24:01 +0000 (09:24 -0600)]
mesa: simplify _mesa_select_tex_image()
Brian Paul [Thu, 30 Jul 2009 15:10:26 +0000 (09:10 -0600)]
mesa: simplify _mesa_set_tex_image()
Brian Paul [Thu, 30 Jul 2009 15:03:43 +0000 (09:03 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Thu, 30 Jul 2009 15:02:27 +0000 (09:02 -0600)]
mesa: move misplaced return statement
Fixes regression from commit
7d93f817c9c5222e2bdbaa9fa9f03fc502bfe878
Brian Paul [Thu, 30 Jul 2009 14:24:10 +0000 (08:24 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Thu, 30 Jul 2009 14:20:01 +0000 (08:20 -0600)]
mesa: add missing return after catching program error
Brian Paul [Thu, 30 Jul 2009 14:22:57 +0000 (08:22 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Thu, 30 Jul 2009 14:22:26 +0000 (08:22 -0600)]
docs: document new i915/945 extensions
Thomas Hellstrom [Thu, 30 Jul 2009 10:39:26 +0000 (12:39 +0200)]
mesa st: Change the preferred internal format for some RGB formats.
For GL_RGB5, GL_RGB4 and GL_R3_G3_B2, prefer
PIPE_FORMAT_R5G6B5_UNORM over PIPE_FORMAT_A1R5G5B5_UNORM, since hardware
is more likely to support the previous format for rendering.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Thomas Hellstrom [Thu, 30 Jul 2009 10:34:02 +0000 (12:34 +0200)]
mesa st: Report unsupported render-to-texture formats.
If a texture image is bound to a framebuffer for render-to-texture, but
the hardware doesn't support rendering to its internal format,
report the framebuffer as incomplete with FRAMEBUFFER_UNSUPPORTED.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Michal Krol [Thu, 30 Jul 2009 09:39:06 +0000 (11:39 +0200)]
tgsi: Add proper constraints to sanity.
Michal Krol [Thu, 30 Jul 2009 08:34:06 +0000 (10:34 +0200)]
tgsi: Declare a LOOP register.
The only valid usage for LOOP/ENDLOOP instructions
is LOOP[0] as a destination register.
The only valid usage for the remaining instructions
is LOOP[0].x as an indirect register.
Michal Krol [Thu, 30 Jul 2009 08:33:18 +0000 (10:33 +0200)]
tgsi: Fix number operands for LOOP/ENDLOOP.
Michal Krol [Thu, 30 Jul 2009 08:31:57 +0000 (10:31 +0200)]
vbo: Fix build on windows.
Michal Krol [Thu, 30 Jul 2009 08:12:09 +0000 (10:12 +0200)]
tgsi: Document LOOP/ENDLOOP instruction operation.
Xiang, Haihao [Thu, 30 Jul 2009 06:45:11 +0000 (14:45 +0800)]
i965: Postpone ff_sync message in CLIP kernel on IGDNG
In addition, it guarantees ff_sync message is issued
Alex Deucher [Thu, 30 Jul 2009 07:30:46 +0000 (03:30 -0400)]
r600: fix mipmaps
redbook mipmap works
Eric Anholt [Wed, 29 Jul 2009 21:06:05 +0000 (14:06 -0700)]
i915: Add support for EXT_stencil_two_side and ATI_separate_stencil.
Passes tests/stencil_twoside and glean/stencil2.
Eric Anholt [Wed, 29 Jul 2009 20:37:41 +0000 (13:37 -0700)]
i915: Add ARB_point_sprite since we already expose NV_point_sprite.
It's all fallbacks anyway due to the DD_POINT_ATTEN fallback.
Brian Paul [Wed, 29 Jul 2009 22:27:03 +0000 (16:27 -0600)]
gallium: fix SSE shadow texture instructions
When sampling a 2D shadow map we need 3 texcoord components, not 2.
The third component (distance from light source) is compared against
the texture sample to return the result (visible vs. occluded).
Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI
translation. There's a possibility for breakage in gallium drivers if
they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D /
TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions,
but that should be easy to fix.
With these changes, progs/demos/shadowtex.c renders properly again with
softpipe.
Alex Deucher [Wed, 29 Jul 2009 22:12:33 +0000 (18:12 -0400)]
r600: remove extraneous semicolon