Eric Anholt [Thu, 18 Jun 2009 03:46:12 +0000 (20:46 -0700)]
i965: Add decode for the G4X x,y offset in surface state.
Eric Anholt [Thu, 18 Jun 2009 03:53:27 +0000 (20:53 -0700)]
i965: Fix up texture layout for small things with wide pitches (tiled)
We were packing according to the pitch, while the hardware appears to base
it on the base level width.
With this and the previous commit, fbo-cubemap now matches untiled behavior.
Eric Anholt [Fri, 5 Jun 2009 23:16:44 +0000 (23:16 +0000)]
i965: Fall back or appropriately adjust offsets of drawing to tiled regions.
3D rendering to tiled textures was being done with non-tile-aligned offsets.
The G4X hardware has fields to let us support it easily and correctly, while
the pre-G4X hardware requires a path full of suffering, so we just fall back.
Dave Airlie [Thu, 18 Jun 2009 03:20:32 +0000 (13:20 +1000)]
r300: use vbo_split_prims to split up large vertex buffers.
This lets ut2004 avoid hitting the elt warning.
Eric Anholt [Fri, 12 Jun 2009 15:44:40 +0000 (08:44 -0700)]
i965: Fix tiling for FBO depth attachments by making DEPTH_COMPONENT Y tiled.
This may hurt if miptree relayout occurs, since we can't blit Y tiled
objects. But it corrects depth tests on FBOs using textures.
Dave Airlie [Thu, 18 Jun 2009 03:12:21 +0000 (13:12 +1000)]
radeon: don't re-add BOs to validate list
if its on the list its on the list don't go readding it.
multitexturing from the same texture could cause this.
Brian Paul [Wed, 17 Jun 2009 13:44:04 +0000 (07:44 -0600)]
glsl: call _mesa_postprocess_program(), disabled
Brian Paul [Wed, 17 Jun 2009 13:43:44 +0000 (07:43 -0600)]
mesa: silence warning
Brian Paul [Wed, 17 Jun 2009 13:42:49 +0000 (07:42 -0600)]
mesa: added _mesa_postprocess_program() to aid shader debugging
Jerome Glisse [Wed, 17 Jun 2009 14:33:14 +0000 (16:33 +0200)]
radeon: Flush command buffer on viewport change
We flush the command buffer so we don't emit mixed
state (with new and previous buffer size) command
buffer, this is especialy affecting zbuffer states.
Jerome Glisse [Wed, 17 Jun 2009 11:51:33 +0000 (13:51 +0200)]
r300: don't emit vap index offset on r5xx hw when using cs
vap index offset is programmed to 0 by the kernel, it
would add work to kernel checker to allow userspace
programming of this so it's now disallowed with CS
on KMS.
Dave Airlie [Thu, 11 Jun 2009 00:50:32 +0000 (10:50 +1000)]
GLX: attempt to fix glean makeCurrent test cases.
Two parts to this:
One we don't keep pointers to possibly freed memory anymore once we unbind the
drawables from the context. Brian I need to figure out what the comment
you made there, can we get a glean/piglit test so we can fix it properly?
If the new gc is the same as the oldGC, we call the unbind even though
we just bound it in that function. doh.
Dave Airlie [Wed, 17 Jun 2009 01:12:57 +0000 (11:12 +1000)]
radeon: fix warnings in wrapper with libdrm
Brian Paul [Wed, 17 Jun 2009 00:25:52 +0000 (18:25 -0600)]
Merge branch 'mesa_7_5_branch'
Conflicts:
src/mesa/main/api_validate.c
Brian Paul [Wed, 17 Jun 2009 00:19:45 +0000 (18:19 -0600)]
i965: fix bugs in projective texture coordinates
For the TXP instruction we check if the texcoord is really a 4-component
atttibute which requires the divide by W step. This check involved the
projtex_mask field. However, the projtex_mask field was being miscalculated
because of some confusion between vertex program outputs and fragment
program inputs.
1. Rework the size_masks calculation so we correctly set bits corresponding
to fragment program input attributes.
2. Rename projtex_mask to proj_attrib_mask since we're interested in more
than just texcoords (generic varying vars too).
3. Simply the indexing of the size_masks and proj_attrib_mask fields.
4. The tracker::active[] array was mis-dimensioned. Use MAX_PROGRAM_TEMPS
instead of a magic number.
5. Update comments, add new assertions.
With these changes the Lightsmark demo/benchmark renders correctly, until
we eventually hit a GPU lockup...
Brian Paul [Tue, 16 Jun 2009 21:41:49 +0000 (15:41 -0600)]
softpipe: fix out of bounds quad rasterization bug
For some triangles we can generate quads which lie just outside the
surface bounds. Just check the quad's mask before trying to emit/process
the quad.
Fixes failed assertion in Lightsmark.
Roland Scheidegger [Tue, 16 Jun 2009 19:38:58 +0000 (21:38 +0200)]
i965: handle OPCODE_SWZ in the glsl path
glsl compiler will not generate OPCODE_SWZ, and as a first step it would
be translated away to a MOV anyway (why?), but later internally this opcode is
generated (for EXT_texture_swizzling).
Brian Paul [Tue, 16 Jun 2009 15:34:35 +0000 (09:34 -0600)]
mesa: fix incorrect viewport clamping in _mesa_set_viewport()
A 0 by 0 viewport size is legal. Don't clamp against lower bound of one.
The error checking earlier in the function prevents negative values.
Brian Paul [Tue, 16 Jun 2009 14:45:06 +0000 (08:45 -0600)]
mesa: fix REMAINDER() macro
The results were incorrect for some negative values of A.
See bug 21872.
José Fonseca [Tue, 16 Jun 2009 12:05:25 +0000 (13:05 +0100)]
gallium: Avoid atomic ops / locking when src is dst.
José Fonseca [Tue, 16 Jun 2009 11:34:29 +0000 (12:34 +0100)]
progs/wgl: Quit after displaying usage for -h option.
José Fonseca [Tue, 16 Jun 2009 11:29:14 +0000 (12:29 +0100)]
progs/wgl: Use appropriate types to silence msvc warnings.
José Fonseca [Tue, 16 Jun 2009 11:28:26 +0000 (12:28 +0100)]
progs/wgl: Fix assertion failure in wglthreads' texture creation.
Brian Paul [Mon, 15 Jun 2009 22:44:26 +0000 (16:44 -0600)]
docs: minor relnotes clean-up
Brian Paul [Mon, 15 Jun 2009 22:42:42 +0000 (16:42 -0600)]
Merge branch 'arb_map_buffer_range'
Conflicts:
docs/relnotes-7.6.html
src/mesa/main/mtypes.h
Shuang He [Mon, 15 Jun 2009 22:19:30 +0000 (16:19 -0600)]
intel: Release fb backing regions in intelDestroyBuffer()
Fixes memory leak when destroying framebuffers.
José Fonseca [Mon, 15 Jun 2009 18:22:35 +0000 (19:22 +0100)]
python/tests: Add is_depth_stencil_format utility function.
José Fonseca [Mon, 15 Jun 2009 18:21:58 +0000 (19:21 +0100)]
python/tests: Cleanup texture_sample.
José Fonseca [Mon, 15 Jun 2009 18:20:25 +0000 (19:20 +0100)]
mesa: Always return a value.
José Fonseca [Mon, 15 Jun 2009 18:20:05 +0000 (19:20 +0100)]
mesa: Use appropriate float/integer types.
José Fonseca [Mon, 15 Jun 2009 18:19:29 +0000 (19:19 +0100)]
mesa: Use type modifier for float constants.
José Fonseca [Mon, 15 Jun 2009 18:17:07 +0000 (19:17 +0100)]
mesa: Use integer type with appropriate sign.
José Fonseca [Mon, 15 Jun 2009 18:04:04 +0000 (19:04 +0100)]
rtasm: Use 32bit constant.
As we're only using 32bit bitmasks.
José Fonseca [Mon, 15 Jun 2009 17:57:45 +0000 (18:57 +0100)]
gallium: Ensure assert macro is defined before being used in p_thread.h
José Fonseca [Mon, 15 Jun 2009 17:42:13 +0000 (18:42 +0100)]
softpipe: Fix softpipe_is_texture_referenced.
Render results are only visible when the render cache is flushed.
softpipe_is_texture_referenced must reflect that or transfers to/from the
textures bound in the framebuffer won't be proceeded of the necessary
flush, causing transfer data to be outdated/clobbered.
This fixes conform drawpix test with softpipe.
Brian Paul [Mon, 15 Jun 2009 16:58:04 +0000 (10:58 -0600)]
mesa: revert some recent VBO buffer object refcounting changes
Reverts part of commit
d7ea9ddf5824556e47decac7ba200f37cf1e552f.
We were calling _mesa_reference_buffer_object() on some heap-allocated
memory that was uninitialized and could trigger an assertion.
We can actually go back to "looser" ref counting of the Null/default
buffer object in these cases.
Brian Paul [Mon, 15 Jun 2009 16:47:07 +0000 (10:47 -0600)]
mesa: regenerated gl_mange.h file
Roland Scheidegger [Fri, 12 Jun 2009 18:09:07 +0000 (20:09 +0200)]
enable ARB_half_float_pixel for intel drivers
Roland Scheidegger [Sat, 23 May 2009 23:18:31 +0000 (01:18 +0200)]
intel: fix (cosmetic) typo flag used twice
José Fonseca [Mon, 15 Jun 2009 14:40:10 +0000 (15:40 +0100)]
progs/tests: Use opaque colors.
Transparency is not relevant for this example, and leads to distraction
due to different results in alpha visuals, when capturing images to disk.
Thomas Hellstrom [Wed, 10 Jun 2009 22:54:06 +0000 (00:54 +0200)]
dri st: Don't require the PIPE_TEXTURE_USAGE_RENDER_TARGET property for depth- and stencil renderbuffers.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Thomas Hellstrom [Mon, 15 Jun 2009 09:43:48 +0000 (11:43 +0200)]
Merge branch 'mesa_7_5_branch'
Conflicts:
progs/util/extfuncs.h
Thomas Hellstrom [Mon, 15 Jun 2009 09:20:31 +0000 (11:20 +0200)]
gallium: Fix segfault and valgrind error introduced with commit
3f2e006b759705abd7c409d30f9aeb1f2a75b83f
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Maciej Cencora [Sun, 14 Jun 2009 23:06:40 +0000 (01:06 +0200)]
r300: fix 3D textures
Brian Paul [Fri, 12 Jun 2009 22:21:20 +0000 (16:21 -0600)]
i965: interpolate colors with perspective correction by default
...rather than with linear interpolation. Modern hardware should use
perspective-corrected interpolation for colors (as for texcoords).
glHint(GL_PERSPECTIVE_CORRECTION_HINT, mode) can be used to get
linear interpolation if mode = GL_FASTEST.
Brian Paul [Wed, 10 Jun 2009 19:46:04 +0000 (13:46 -0600)]
mesa: use larger initial refcount for NullBufferObj
Refcounting of the null/default buffer object isn't perfect yet so be
extra safe.
Brian Paul [Wed, 10 Jun 2009 19:45:01 +0000 (13:45 -0600)]
mesa: use _mesa_reference_buffer_object() in a few places
Brian Paul [Wed, 10 Jun 2009 19:44:35 +0000 (13:44 -0600)]
mesa: use _mesa_reference_buffer_object() in a few places
Brian Paul [Fri, 12 Jun 2009 21:58:34 +0000 (15:58 -0600)]
tests: added persp_hint.c test
Test the effect of GL_PERSPECTIVE_CORRECTION_HINT on color interpolation.
Dave Airlie [Fri, 12 Jun 2009 21:43:04 +0000 (07:43 +1000)]
add some info to relnotes on radeon
Maciej Cencora [Fri, 12 Jun 2009 17:08:44 +0000 (19:08 +0200)]
r300: add support for EXT_texture_sRGB
Tested with glean/texture_srgb and wine/d3d9 tests on RV535
Brian Paul [Fri, 12 Jun 2009 16:18:15 +0000 (10:18 -0600)]
set/mesa: enable GL_NV_texture_env_combine4
This is handled entirely in core Mesa where the combiner state is converted
into a fragment program.
Brian Paul [Thu, 11 Jun 2009 18:10:00 +0000 (12:10 -0600)]
tests: added arbgpuprog, for compile-testing ARB vertex/fragment programs
Brian Paul [Thu, 11 Jun 2009 15:48:38 +0000 (09:48 -0600)]
st/mesa: additional debug code (disabled)
Brian Paul [Thu, 11 Jun 2009 21:50:47 +0000 (15:50 -0600)]
demos: update fbotexture.c to use EXT or ARB functions exclusively
When the -arb option is specified we use GL_ARB_framebuffer_object intead
of GL_EXT_framebuffer_object.
For some vendors' OpenGL it's important to call the ARB entrypoints
instead of the EXT entrypoints to get correct behaviour. Use some
function pointer tricks to do this (instead of GLEW).
Brian Paul [Thu, 11 Jun 2009 21:50:32 +0000 (15:50 -0600)]
util: additional function pointers
Jakob Bornecrantz [Fri, 12 Jun 2009 13:55:04 +0000 (14:55 +0100)]
progs/rbug: Add binary to bmp converter program
Jakob Bornecrantz [Fri, 12 Jun 2009 11:31:04 +0000 (12:31 +0100)]
Merge branch 'mesa_7_5_branch'
Jakob Bornecrantz [Thu, 11 Jun 2009 18:26:55 +0000 (19:26 +0100)]
mesa: Enable uploads of only depth to z24s8 textures
Owen W. Taylor [Sat, 6 Jun 2009 18:46:22 +0000 (14:46 -0400)]
Disable SGI_swap_control extension for DRI2
We currently don't have support for SGI_swap_control for direct
contexts with DRI2, so disable reporting the extension. Reporting
the extension, and then having glXSwapIntervalSGI() "succeed"
but do nothing can confuse applications.
https://bugs.freedesktop.org/show_bug.cgi?id=22123
Dave Airlie [Fri, 12 Jun 2009 01:37:13 +0000 (11:37 +1000)]
radeon: fix size of mipmap texture array
Dave Airlie [Fri, 12 Jun 2009 01:35:10 +0000 (11:35 +1000)]
radeon/r200/r300: fix max texture levels assert
use the actual value set in the context
Dave Airlie [Fri, 12 Jun 2009 01:17:32 +0000 (11:17 +1000)]
Merge remote branch 'main/radeon-rewrite'
Maciej Cencora [Wed, 10 Jun 2009 15:05:38 +0000 (17:05 +0200)]
r300: fix VAP setup
If GL context had e.g. tex0, tex2 and fog the VAPOutputCntl1 returned 0x104 instead of 0x124 - that meaned we're sending only 8 texcoords (instead of 12) which ended up in GPU hang.
Maciej Cencora [Wed, 10 Jun 2009 14:58:15 +0000 (16:58 +0200)]
r300: fix for SW TCL path
We shouldn't use i variable for SWTCL_OVM_TEX because textures doesn't have to be enabled in "packed" order.
We could have tex1,tex3 and fog which would receive 7,9,8 OVM locations instead of 6,7,8.
Maciej Cencora [Wed, 10 Jun 2009 14:56:51 +0000 (16:56 +0200)]
r300: don't send unused attributes for SW TCL path
Maciej Cencora [Wed, 10 Jun 2009 14:04:35 +0000 (16:04 +0200)]
r300: send only RS_IP_* regs that we are going to use
Maciej Cencora [Wed, 10 Jun 2009 22:43:55 +0000 (00:43 +0200)]
r300: fix RS setup when no colors and textures are sent to FP
RS_COL_FMT field is part of RS_IP_* reg not RS_INST_*
Maciej Cencora [Wed, 10 Jun 2009 02:09:33 +0000 (04:09 +0200)]
r300: r500 fragment program fixes
- when rewriting per component negate swizzle, first instruction should get not negated source
- KIL instruction ignores swizzles
TODO:
- tex instructions does not support saturation
- tex instructions cannot read from consant memory
Maciej Cencora [Sun, 7 Jun 2009 19:27:52 +0000 (21:27 +0200)]
radeon: increase max bo count
Maciej Cencora [Sun, 7 Jun 2009 19:34:44 +0000 (21:34 +0200)]
r300: fix a GPU lock up
Sending from VAP more texture coordinates than RS expects results in GPU hang.
Fixes BumpSelfShadow from DirectX8 SDK.
Maciej Cencora [Fri, 5 Jun 2009 16:32:05 +0000 (18:32 +0200)]
r300: fix vertex program bug
If the vertex program didn't write position attribute, the position invariant function would add necessary instructions, but the vertex position would be overwritten by artificial outputs insts added to satisfy fragment program requirements.
Fixes "whole screen is gray" problem for HW TCL path in sauerbraten when shaders are enabled, and whole slew of wine d3d9 tests.
Maciej Cencora [Fri, 5 Jun 2009 16:27:00 +0000 (18:27 +0200)]
r300: move some code for easier debugging
Maciej Cencora [Fri, 5 Jun 2009 16:23:55 +0000 (18:23 +0200)]
r300: print vertex program when debugging is enabled
Maciej Cencora [Fri, 5 Jun 2009 16:14:15 +0000 (18:14 +0200)]
r300: fix output register allocation for vertex shaders
If the vertex program wrote secondary color without primary color, the secondary color output register index would be 0 which resulted in overwriting vertex position in some cases.
Maciej Cencora [Fri, 5 Jun 2009 16:00:58 +0000 (18:00 +0200)]
r300: hw doesn't support saturation for tex instructions
Brian Paul [Thu, 11 Jun 2009 20:55:25 +0000 (14:55 -0600)]
mesa: rework vertex shader output / fragment shader input attribute matching
Before, if a vertex shader's outputs didn't exactly match a fragment
shader's inputs we could wind up with invalid TGSI shader declarations.
For example:
Before patch:
DCL OUT[0], POSITION
DCL OUT[1], COLOR[1]
DCL OUT[2], GENERIC[0]
DCL OUT[3], GENERIC[0] <- note duplicate [0]
DCL OUT[4], GENERIC[2]
After patch:
DCL OUT[0], POSITION
DCL OUT[1], COLOR[1]
DCL OUT[2], GENERIC[0]
DCL OUT[3], GENERIC[1]
DCL OUT[4], GENERIC[2]
Brian Paul [Thu, 11 Jun 2009 20:55:14 +0000 (14:55 -0600)]
mesa: add default function for ctx->Driver.CheckQuery() hook
José Fonseca [Thu, 11 Jun 2009 19:46:07 +0000 (20:46 +0100)]
python/retrace: Show the contents of the depth/stencil and surfaces before/after transfers.
José Fonseca [Thu, 11 Jun 2009 18:24:48 +0000 (19:24 +0100)]
python/retrace: Interpret is_texture_referenced/is_buffer_referenced.
José Fonseca [Thu, 11 Jun 2009 18:05:46 +0000 (19:05 +0100)]
wgl: Fix prototype.
José Fonseca [Thu, 11 Jun 2009 18:03:54 +0000 (19:03 +0100)]
Merge branch 'mesa_7_5_branch'
José Fonseca [Thu, 11 Jun 2009 17:53:47 +0000 (18:53 +0100)]
mesa: Use new pf_is_depth_and_stencil inline.
José Fonseca [Thu, 11 Jun 2009 17:53:23 +0000 (18:53 +0100)]
gallium: New pf_is_depth_and_stencil / pf_is_depth_or_stencil inlines.
José Fonseca [Thu, 11 Jun 2009 17:52:17 +0000 (18:52 +0100)]
mesa: Use PIPE_TEXTURE_USAGE_DEPTH_STENCIL for any depth or stencil format.
José Fonseca [Thu, 11 Jun 2009 17:50:36 +0000 (18:50 +0100)]
mesa: Remove dead code.
Brian Paul [Thu, 11 Jun 2009 16:40:19 +0000 (10:40 -0600)]
st/mesa: fix typo s/BFC0/BFC1/
Brian Paul [Wed, 10 Jun 2009 19:00:35 +0000 (13:00 -0600)]
vbo: fix assertion, #define IMM_BUFFER_NAME
This was sometimes seen when Glean exited upon test failure when using
Gallium.
José Fonseca [Thu, 11 Jun 2009 15:34:56 +0000 (16:34 +0100)]
Merge branch 'mesa_7_5_branch'
Conflicts:
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_framebuffer.c
José Fonseca [Thu, 11 Jun 2009 15:21:00 +0000 (16:21 +0100)]
python/tests: Test sampling from a depth texture.
Jakob Bornecrantz [Thu, 11 Jun 2009 14:37:53 +0000 (15:37 +0100)]
mesa: Only do read write when we don't have a depth value to write
José Fonseca [Thu, 11 Jun 2009 12:19:34 +0000 (13:19 +0100)]
progs: Port fp programs to GLEW.
José Fonseca [Thu, 11 Jun 2009 11:23:09 +0000 (12:23 +0100)]
mesa: Take the format from the right structure.
José Fonseca [Thu, 11 Jun 2009 10:47:20 +0000 (11:47 +0100)]
meas: Use a read/write transfer when writing stencil component, but not touching the depth component.
Jerome Glisse [Thu, 11 Jun 2009 09:06:14 +0000 (11:06 +0200)]
r300: fix indexed primitive rendering when using memory manager
Thomas Hellstrom [Wed, 10 Jun 2009 22:54:06 +0000 (00:54 +0200)]
dri st: Don't require the PIPE_TEXTURE_USAGE_RENDER_TARGET property for depth- and stencil renderbuffers.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Michel Dänzer [Thu, 11 Jun 2009 10:11:37 +0000 (12:11 +0200)]
scons: Indent abbreviated command line strings, so command messages stand out.
Also add ASPPCOMSTR.
Michel Dänzer [Thu, 11 Jun 2009 10:09:10 +0000 (12:09 +0200)]
intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.
Fixes glean depthStencil test.
José Fonseca [Wed, 10 Jun 2009 20:29:25 +0000 (21:29 +0100)]
mesa: Reverse s8z24 into z24s8 as required by EXT_packed_depth_stencil.
Actually, after spotting this problem, I realized this is unreachable
code. However don't bother to enable this fast path now, given the normal
path is working just fine.
José Fonseca [Wed, 10 Jun 2009 20:25:54 +0000 (21:25 +0100)]
mesa: Fix typo in bitmask.