mesa.git
17 years agoFix some warnings and implement lg2
Zack Rusin [Thu, 18 Oct 2007 11:20:27 +0000 (07:20 -0400)]
Fix some warnings and implement lg2

17 years agoImplement frc and floor
Zack Rusin [Thu, 18 Oct 2007 11:03:37 +0000 (07:03 -0400)]
Implement frc and floor

17 years agoImplement ex2 opcode
Zack Rusin [Thu, 18 Oct 2007 09:51:01 +0000 (05:51 -0400)]
Implement ex2 opcode

17 years agoImplement dst opcode
Zack Rusin [Wed, 17 Oct 2007 17:46:00 +0000 (13:46 -0400)]
Implement dst opcode

17 years agoImplement dph opcode
Zack Rusin [Wed, 17 Oct 2007 17:38:53 +0000 (13:38 -0400)]
Implement dph opcode

17 years agoImplement dot4 opcode
Zack Rusin [Wed, 17 Oct 2007 17:34:25 +0000 (13:34 -0400)]
Implement dot4 opcode

17 years agoImplement pow/rcp and sub opcodes
Zack Rusin [Wed, 17 Oct 2007 17:27:25 +0000 (13:27 -0400)]
Implement pow/rcp and sub opcodes

17 years agoAdd the "add" opcode and assert one vp if an opcode isn't supported
Zack Rusin [Wed, 17 Oct 2007 16:13:33 +0000 (12:13 -0400)]
Add the "add" opcode and assert one vp if an opcode isn't supported

17 years agoRefactor the tgsi->llvm storage translator
Zack Rusin [Wed, 17 Oct 2007 15:28:26 +0000 (11:28 -0400)]
Refactor the tgsi->llvm storage translator

17 years agoImplement basic opcode translation and storage translation.
Zack Rusin [Wed, 17 Oct 2007 15:27:46 +0000 (11:27 -0400)]
Implement basic opcode translation and storage translation.

17 years agoDraw first triangle. Start on the llvm builder.
Zack Rusin [Tue, 16 Oct 2007 17:23:43 +0000 (13:23 -0400)]
Draw first triangle. Start on the llvm builder.

17 years agoCleanup some of the testing code. Implement first pass at actually
Zack Rusin [Tue, 16 Oct 2007 09:41:06 +0000 (05:41 -0400)]
Cleanup some of the testing code. Implement first pass at actually
running shaders in llvm.

17 years agoExecution engine is a singleton, for now keep it in the pipe.
Zack Rusin [Mon, 15 Oct 2007 13:59:19 +0000 (09:59 -0400)]
Execution engine is a singleton, for now keep it in the pipe.

17 years agoGenerate the base shader.
Zack Rusin [Mon, 15 Oct 2007 12:12:22 +0000 (08:12 -0400)]
Generate the base shader.

17 years agoImplement the conversion and do the initial execution pass.
Zack Rusin [Fri, 12 Oct 2007 17:57:53 +0000 (13:57 -0400)]
Implement the conversion and do the initial execution pass.

17 years agoStub out some conversion.
Zack Rusin [Wed, 10 Oct 2007 11:21:02 +0000 (07:21 -0400)]
Stub out some conversion.

17 years agoInitial stab at LLVM integration.
Zack Rusin [Mon, 8 Oct 2007 14:24:35 +0000 (10:24 -0400)]
Initial stab at LLVM integration.

17 years agoFix vertex cache bug that allows multiple vertices to fall into the same slot.
Brian [Tue, 23 Oct 2007 21:08:54 +0000 (15:08 -0600)]
Fix vertex cache bug that allows multiple vertices to fall into the same slot.

Need to set the slot's bit in draw->vcache.referenced even when there was a
cache hit since flushing the primitive buffer will have cleared the bitfield
but not the cache's vertex indexes.

Fixes a bug found when drawing long triangle fans but could be hit by other
prim types as well.

An alternate fix would be to call draw_vertex_cache_invalidate() from
draw_vertex_cache_unreference().

17 years agoadded comment
Brian [Tue, 23 Oct 2007 21:02:02 +0000 (15:02 -0600)]
added comment

17 years agoIn get_vertex(), slot was computed using & 31. Replace with % VCACHE_SIZE.
Brian [Tue, 23 Oct 2007 18:32:02 +0000 (12:32 -0600)]
In get_vertex(), slot was computed using & 31.  Replace with % VCACHE_SIZE.

Also, assert that index is not too large before indexing array.

17 years agoadjust coords in wide_line() to be conformant
Brian [Tue, 23 Oct 2007 17:38:17 +0000 (11:38 -0600)]
adjust coords in wide_line() to be conformant

17 years agoproperly init dst reg's CondMask/Swizzle fields
Brian [Tue, 23 Oct 2007 16:54:50 +0000 (10:54 -0600)]
properly init dst reg's CondMask/Swizzle fields

17 years agobump up MAX_INSTRUCTIONS and add an assertion to catch emitting too many instructions
Brian [Tue, 23 Oct 2007 16:23:01 +0000 (10:23 -0600)]
bump up MAX_INSTRUCTIONS and add an assertion to catch emitting too many instructions

17 years agoDon't pad renderbuffers to multiple of two pixels anymore.
Brian [Tue, 23 Oct 2007 14:30:36 +0000 (08:30 -0600)]
Don't pad renderbuffers to multiple of two pixels anymore.

This was only needed to avoid out-of-bounds memory accesses with the
2x2 quad_read/write() functions which no longer exist.

17 years agodon't apply ColorMask to main gc
Brian [Mon, 22 Oct 2007 23:50:00 +0000 (17:50 -0600)]
don't apply ColorMask to main gc

17 years agofix masking bug, memory leak
Brian [Mon, 22 Oct 2007 23:20:56 +0000 (17:20 -0600)]
fix masking bug, memory leak

17 years agodon't use GL types for get/put_tile() params
Brian [Mon, 22 Oct 2007 23:20:08 +0000 (17:20 -0600)]
don't use GL types for get/put_tile() params

17 years agonew flag to control psize (from vertex shader or fixed size)
Brian [Mon, 22 Oct 2007 18:19:54 +0000 (12:19 -0600)]
new flag to control psize (from vertex shader or fixed size)

17 years agoadd support for sprite texcoord modes
Brian [Mon, 22 Oct 2007 18:10:30 +0000 (12:10 -0600)]
add support for sprite texcoord modes

17 years agoimplement point sprite mode
Brian [Mon, 22 Oct 2007 17:59:26 +0000 (11:59 -0600)]
implement point sprite mode

17 years agoadd point_sprite flag to rasterizer state
Brian [Mon, 22 Oct 2007 17:41:31 +0000 (11:41 -0600)]
add point_sprite flag to rasterizer state

17 years agoremove unused var
Brian [Mon, 22 Oct 2007 17:41:17 +0000 (11:41 -0600)]
remove unused var

17 years agotweak point corners to pass conform test
Brian [Mon, 22 Oct 2007 17:38:40 +0000 (11:38 -0600)]
tweak point corners to pass conform test

17 years agoplug the wide prims code into the pipeline
Brian [Mon, 22 Oct 2007 17:01:34 +0000 (11:01 -0600)]
plug the wide prims code into the pipeline

17 years agoupdate to working condition
Brian [Mon, 22 Oct 2007 17:01:02 +0000 (11:01 -0600)]
update to working condition

17 years agoFinish unifying the surface and texture tile caches.
Brian [Mon, 22 Oct 2007 15:37:26 +0000 (09:37 -0600)]
Finish unifying the surface and texture tile caches.

17 years agopull clip/ module wide and stippled lines/points code
keithw [Fri, 19 Oct 2007 15:41:13 +0000 (16:41 +0100)]
pull clip/ module wide and stippled lines/points code

17 years agoStart implementing cache routines for textures.
Brian [Mon, 22 Oct 2007 00:06:35 +0000 (18:06 -0600)]
Start implementing cache routines for textures.

First step to consolidating surface/texture caching...

17 years agorename some vars
Brian [Sun, 21 Oct 2007 23:15:07 +0000 (17:15 -0600)]
rename some vars

17 years agosilence warning
Brian [Sun, 21 Oct 2007 23:14:46 +0000 (17:14 -0600)]
silence warning

17 years agoRemove obsolete read/write_quad() functions
Brian [Sat, 20 Oct 2007 22:09:17 +0000 (16:09 -0600)]
Remove obsolete read/write_quad() functions

17 years agoinit sp->sbuf_cache to avoid possible segfault
Brian [Sat, 20 Oct 2007 21:52:59 +0000 (15:52 -0600)]
init sp->sbuf_cache to avoid possible segfault

17 years agoCall softpipe_unmap_surfaces() in softpipe_flush().
Brian [Sat, 20 Oct 2007 21:52:36 +0000 (15:52 -0600)]
Call softpipe_unmap_surfaces() in softpipe_flush().

This fixes a DRM BO failure upon swapbuffers caused by the color buffer
still being mapped.
This is a bit heavy handed since we don't always need to unmap buffers
when flushing.  Need to pass a flag to flush() or design a new function.

17 years agoIn region_unmap(), check if region is mapped before decrementing refcount.
Brian [Sat, 20 Oct 2007 21:45:24 +0000 (15:45 -0600)]
In region_unmap(), check if region is mapped before decrementing refcount.

17 years agoflush the pipe before accum ops
Brian [Sat, 20 Oct 2007 21:21:02 +0000 (15:21 -0600)]
flush the pipe before accum ops

17 years agounmap regions when reallocating renderbuffer storage
Brian [Sat, 20 Oct 2007 21:20:46 +0000 (15:20 -0600)]
unmap regions when reallocating renderbuffer storage

17 years agorenderbuffer tweaks in update_framebuffer_state()
Brian [Sat, 20 Oct 2007 21:20:17 +0000 (15:20 -0600)]
renderbuffer tweaks in update_framebuffer_state()

17 years agouse combined depth/stencil buffer when possible
Brian [Sat, 20 Oct 2007 21:19:14 +0000 (15:19 -0600)]
use combined depth/stencil buffer when possible

17 years agoConvert Z/stencil ops to use cached tiles like colors.
Brian [Sat, 20 Oct 2007 21:18:02 +0000 (15:18 -0600)]
Convert Z/stencil ops to use cached tiles like colors.

Also, quite a bit of re-org of the tile caches and surface mapping/unmapping.
Leave surfaces mapped between primitives now.

17 years agoadded case for TGSI_OPCODE_END
Brian [Sat, 20 Oct 2007 16:09:12 +0000 (10:09 -0600)]
added case for TGSI_OPCODE_END

17 years agoget/put_tile_raw() funcs for 16/32bpp surfaces
Brian [Fri, 19 Oct 2007 18:47:05 +0000 (12:47 -0600)]
get/put_tile_raw() funcs for 16/32bpp surfaces

17 years agoadded get/put_tile_raw() methods
Brian [Fri, 19 Oct 2007 18:45:54 +0000 (12:45 -0600)]
added get/put_tile_raw() methods

17 years agodon't alloc region in xmesa_surface_alloc(), fixes a mem leak
Brian [Fri, 19 Oct 2007 18:42:05 +0000 (12:42 -0600)]
don't alloc region in xmesa_surface_alloc(), fixes a mem leak

17 years agodisable debug printf
Brian [Fri, 19 Oct 2007 16:13:55 +0000 (10:13 -0600)]
disable debug printf

17 years agocall Driver.Flush() in _mesa_notifySwapBuffers()
Brian [Fri, 19 Oct 2007 16:12:00 +0000 (10:12 -0600)]
call Driver.Flush() in _mesa_notifySwapBuffers()

17 years agoInitial implementation of surface tile caching.
Brian [Fri, 19 Oct 2007 16:10:08 +0000 (10:10 -0600)]
Initial implementation of surface tile caching.

Instead of using read/write_quad() functions, do framebuffer accesses via
get/put_tile().  A cache of tiles is used to avoid frequent get/put() calls.
Only implemented for color buffers right now.

17 years agoTile cache functions.
Brian [Fri, 19 Oct 2007 16:08:24 +0000 (10:08 -0600)]
Tile cache functions.

17 years agoclamp/clip in put_tile(), move softpipe_init_surface_funcs() call
Brian [Fri, 19 Oct 2007 16:07:55 +0000 (10:07 -0600)]
clamp/clip in put_tile(), move softpipe_init_surface_funcs() call

17 years agoremove old comment
Brian [Thu, 18 Oct 2007 22:27:01 +0000 (16:27 -0600)]
remove old comment

17 years agoAlternate CopyPixels path based on get/put_tile().
Brian [Thu, 18 Oct 2007 21:18:55 +0000 (15:18 -0600)]
Alternate CopyPixels path based on get/put_tile().

For some drivers (like Xlib) it's not possible to treat the front/back color
buffers as pipe_regions.  So pipe->region_copy() won't work.  Added a new
state tracker field indicating if we can use regions for colorbuffer accesses.
This should probably be re-considered someday...

17 years agofix bug in copy_rect(), use temp vars in sp_region_copy() to aid debugging
Brian [Thu, 18 Oct 2007 21:14:50 +0000 (15:14 -0600)]
fix bug in copy_rect(), use temp vars in sp_region_copy() to aid debugging

17 years agofix off-by-one error in CopyPixels src position
Brian [Thu, 18 Oct 2007 20:30:03 +0000 (14:30 -0600)]
fix off-by-one error in CopyPixels src position

17 years agofix upside down CopyPixels image
Brian [Thu, 18 Oct 2007 20:22:38 +0000 (14:22 -0600)]
fix upside down CopyPixels image

17 years agofix function name
Brian [Thu, 18 Oct 2007 20:20:38 +0000 (14:20 -0600)]
fix function name

17 years agocheckpoint: code refactoring for glCopyPixels
Brian [Thu, 18 Oct 2007 19:27:10 +0000 (13:27 -0600)]
checkpoint: code refactoring for glCopyPixels

17 years agostart implementing glCopyPixels (stencil works)
Brian [Thu, 18 Oct 2007 18:31:35 +0000 (12:31 -0600)]
start implementing glCopyPixels (stencil works)

17 years agomake read_stencil_pixels() non-static
Brian [Thu, 18 Oct 2007 18:31:05 +0000 (12:31 -0600)]
make read_stencil_pixels() non-static

17 years agoChange type of shader->executable field from void * to generic function pointer.
Brian [Thu, 18 Oct 2007 17:09:12 +0000 (11:09 -0600)]
Change type of shader->executable field from void * to generic function pointer.

Fix warnings in draw_create_vertex_shader()

17 years agoadded const qualifiers
Brian [Thu, 18 Oct 2007 17:05:03 +0000 (11:05 -0600)]
added const qualifiers

17 years agobetter debug code, silence some warnings
Brian [Thu, 18 Oct 2007 17:03:39 +0000 (11:03 -0600)]
better debug code, silence some warnings

17 years agoprint vertex input mapping
Brian [Thu, 18 Oct 2007 16:55:26 +0000 (10:55 -0600)]
print vertex input mapping

17 years agohandle fogcoord/raster distance
Brian [Thu, 18 Oct 2007 16:42:47 +0000 (10:42 -0600)]
handle fogcoord/raster distance

17 years agoadded st_debug.c
Brian [Thu, 18 Oct 2007 16:16:40 +0000 (10:16 -0600)]
added st_debug.c

17 years agodebug functions
Brian [Thu, 18 Oct 2007 16:16:28 +0000 (10:16 -0600)]
debug functions

17 years agofix logic error in stipple_quad() (point/line fragments were getting dropped)
Brian [Thu, 18 Oct 2007 16:09:01 +0000 (10:09 -0600)]
fix logic error in stipple_quad() (point/line fragments were getting dropped)

17 years agoCorrected the file permissions in src/mesa/pipe.
Oliver McFadden [Thu, 18 Oct 2007 16:36:04 +0000 (16:36 +0000)]
Corrected the file permissions in src/mesa/pipe.

17 years agopipe/draw/draw_context.c:47: error: 'false' undeclared (first use in this function)
Oliver McFadden [Thu, 18 Oct 2007 16:01:42 +0000 (16:01 +0000)]
pipe/draw/draw_context.c:47: error: 'false' undeclared (first use in this function)

17 years agosp_context.c:255: error: 'false' undeclared (first use in this function)
Oliver McFadden [Thu, 18 Oct 2007 14:45:32 +0000 (14:45 +0000)]
sp_context.c:255: error: 'false' undeclared (first use in this function)

17 years agofix interpolation bug in nearest-image/linear-mipmap filtering
Brian [Wed, 17 Oct 2007 23:22:06 +0000 (17:22 -0600)]
fix interpolation bug in nearest-image/linear-mipmap filtering

17 years agoremove #include vf.h
Brian [Wed, 17 Oct 2007 22:23:25 +0000 (16:23 -0600)]
remove #include vf.h

17 years agodisable the NeedFlush assertion for now
Brian [Wed, 17 Oct 2007 22:19:10 +0000 (16:19 -0600)]
disable the NeedFlush assertion for now

17 years agoAdd some FLUSH_CURRENT() calls.
Brian [Wed, 17 Oct 2007 22:18:45 +0000 (16:18 -0600)]
Add some FLUSH_CURRENT() calls.

Without these we can find ourselves in _mesa_load_state_parameters()
computing derived lighting/material values whhen the current material
properties haven't been updated from the VBO.
This may be a somewhat wide-spread problem that needs more attention...

17 years agoAssert that there's no outstanding current state that needs to be flushed from the...
Brian [Wed, 17 Oct 2007 21:59:59 +0000 (15:59 -0600)]
Assert that there's no outstanding current state that needs to be flushed from the vbo in _mesa_load_state_parameters().

Several of the state parameters use current state (such as materials).
Need to make sure those values are not stale.

17 years agoformatting fix
Brian [Wed, 17 Oct 2007 20:57:15 +0000 (14:57 -0600)]
formatting fix

17 years agofix addressing error in read_stencil_pixels()
Brian [Wed, 17 Oct 2007 20:56:55 +0000 (14:56 -0600)]
fix addressing error in read_stencil_pixels()

17 years agoReplace repeat_remainder() with simpler macro that just casts args to unsigned.
Brian [Wed, 17 Oct 2007 20:29:12 +0000 (14:29 -0600)]
Replace repeat_remainder() with simpler macro that just casts args to unsigned.

17 years agoreorder params to get_texel()
Brian [Wed, 17 Oct 2007 20:16:42 +0000 (14:16 -0600)]
reorder params to get_texel()

17 years agoimplement 3D texture sampling
Brian [Wed, 17 Oct 2007 20:13:21 +0000 (14:13 -0600)]
implement 3D texture sampling

17 years agoWhen in GL_FEEDBACK mode, make sure we emit color and texcoord registers.
Brian [Wed, 17 Oct 2007 18:42:29 +0000 (12:42 -0600)]
When in GL_FEEDBACK mode, make sure we emit color and texcoord registers.

17 years agogenerate selection hit if in selection mode and pos is not clipped
Brian [Wed, 17 Oct 2007 18:32:21 +0000 (12:32 -0600)]
generate selection hit if in selection mode and pos is not clipped

17 years agoUpdate framebuffer state in response to _NEW_COLOR (set by glDrawBuffer)
Brian [Wed, 17 Oct 2007 18:27:40 +0000 (12:27 -0600)]
Update framebuffer state in response to _NEW_COLOR (set by glDrawBuffer)

17 years agoFix viewport Z scale/bias to get the right Z values from drawing the quad.
Brian [Wed, 17 Oct 2007 17:24:06 +0000 (11:24 -0600)]
Fix viewport Z scale/bias to get the right Z values from drawing the quad.

17 years agodon't crash if texture border is used (unsupported for now)
Brian [Wed, 17 Oct 2007 16:52:30 +0000 (10:52 -0600)]
don't crash if texture border is used (unsupported for now)

17 years agofix square point rasterization
Brian [Wed, 17 Oct 2007 16:51:55 +0000 (10:51 -0600)]
fix square point rasterization

17 years agolower clamp bound for UNCLAMPED_FLOAT_TO_SHORT() is -1
Brian [Wed, 17 Oct 2007 00:46:14 +0000 (18:46 -0600)]
lower clamp bound for UNCLAMPED_FLOAT_TO_SHORT() is -1

17 years agouse new st_clear_accum_buffer() function
Brian [Wed, 17 Oct 2007 00:45:42 +0000 (18:45 -0600)]
use new st_clear_accum_buffer() function

17 years agoNew st_clear_accum_buffer() function (can't use pipe->clear() since it doesn't handle...
Brian [Wed, 17 Oct 2007 00:45:28 +0000 (18:45 -0600)]
New st_clear_accum_buffer() function (can't use pipe->clear() since it doesn't handle negative color values)

Also, remove unneeded clamping in the accum ops.

17 years agofront/back determination was wrong
Brian [Tue, 16 Oct 2007 23:59:24 +0000 (17:59 -0600)]
front/back determination was wrong

17 years agoremove debug assertion
Brian [Tue, 16 Oct 2007 23:56:13 +0000 (17:56 -0600)]
remove debug assertion

17 years agoUpdate mask calculations for point drawing.
Brian [Tue, 16 Oct 2007 23:43:41 +0000 (17:43 -0600)]
Update mask calculations for point drawing.