Commit Graph

24217 Commits

Author SHA1 Message Date
Vinson Lee 520b6abdec i915g: Fix memory leak when pci id is unknown. 2009-11-10 12:39:42 -08:00
Eric Anholt 56ab92bad8 i965: Unalias src/dst registers for SGE and friends.
Fixes piglit vp-sge-alias test, and the googleearth ground shader.  \o/

Bug #22228
2009-11-10 10:54:15 -08:00
Eric Anholt d52d78b4bc i965: Allow use of PROGRAM_LOCAL constants in ARB_vp.
Fixes piglit arl.vp.
2009-11-10 10:46:57 -08:00
Michal Krol 28039ffdc8 slang: Fix return value check. 2009-11-10 19:25:51 +01:00
Michel Dänzer 5e17c89ead st/xorg: Fix SCons build.
Check for new DPMS header and add xorg_renderer.c source file.
2009-11-10 10:09:56 -08:00
Michal Krol 413e933fd5 slang: Check OOM conditions for alloc_node_storage(). 2009-11-10 18:30:10 +01:00
José Fonseca eef5a0b3a3 llvmpipe: Fix derived blend color state. 2009-11-10 05:22:15 -08:00
Michal Krol cc470bf0ca slang: Check return value from new_instruction(). 2009-11-10 04:03:55 +01:00
Michal Krol b2a29ad309 slang: Fix signed/unsigned int handling in _slang_free_temp(). 2009-11-10 03:25:06 +01:00
Michal Krol b5d8a7b6dc tgsi/exec: Exit early on error. 2009-11-10 03:12:02 +01:00
Michal Krol e44c77028c tgsi/ureg: Simplify logic in tokens_expand(). 2009-11-10 03:08:21 +01:00
Michal Krol 83760d961f slang: Handle OOM condition in new_instruction(). 2009-11-10 02:46:24 +01:00
Zack Rusin 031fbb9681 st/xorg: remove deprecated rendering code 2009-11-09 18:04:21 -05:00
Zack Rusin a6d527d7b8 st/xorg: fix composite batching
quite a large performance optimization (text demo from 1.6fps to 9fps)
2009-11-09 18:04:21 -05:00
Jerome Glisse 216319fc0f r600/r700: typo, fix mask of DB_ALPHA_TO_MASK 2009-11-09 22:37:41 +01:00
Alex Deucher 74ef3207d8 r600: don't emit htile regs
These are needed for HiZ which is not currently used and
the _BASE reg requires a reloc which is not currently supported
in the drm.
2009-11-09 12:27:27 -05:00
Alex Deucher 66d6f9e860 r600: rework DB render setup
- consolidate DB render setup
- only enable perfect ZPASS counts and cull disable
when OQ is active
- enable early Z
2009-11-09 12:20:47 -05:00
Alex Deucher 37676b396a r600: don't emit htile regs
These are needed for HiZ which is not currently used and
the _BASE reg requires a reloc which is not currently supported
in the drm.
2009-11-09 12:16:55 -05:00
Alex Deucher a9035f3dc3 r600: add missing ZPASS setup bits for r7xx+ 2009-11-09 12:16:55 -05:00
José Fonseca bc9d51bb0e llvmpipe: Ensure stack variables in unit tests are properly aligned. 2009-11-09 07:26:08 -08:00
Christoph Bumiller 7204b92101 nv50: clarify data for method 0x121c 2009-11-09 14:30:32 +01:00
Corbin Simpson c9167d868c r300g: Fix up SW TCL rendering functions.
They don't work, but at least they're clean now.
2009-11-08 14:53:29 -08:00
Corbin Simpson fe89863808 r300g: Protect against possibly missing Draw pointer.
Part of the SW TCL revival.
2009-11-08 14:53:29 -08:00
Corbin Simpson 11d9edf4c9 r300g: Unify context names for counts.
From the SW TCL fixups.
2009-11-08 14:53:29 -08:00
Corbin Simpson b6f93e2607 r300g: Enable PSC/RS dump with new debugging flags. 2009-11-08 14:53:15 -08:00
Corbin Simpson 0525cb1273 r300g: Fix is_buffer_referenced. 2009-11-08 09:56:02 -08:00
Corbin Simpson ee28a69188 r300g: Fix build error on old compilers.
This dead code was still getting compiled, causing a bad ref in the lib.
2009-11-08 09:35:07 -08:00
Ian Romanick 2cda507fa1 prog parse: Handle GL_VERTEX_PROGRAM_ARB in glLoadProgramNV 2009-11-07 15:54:33 -08:00
Ian Romanick 6d2ceda780 prog parse: Handle GL_VERTEX_PROGRAM_NV in glProgramStringARB
Handle both NV vertex programs and NV vertex state programs passed to
glProgramStringARB.
2009-11-07 15:54:33 -08:00
Ian Romanick 289db82b2d prog parse: Handle GL_FRAGMENT_PROGRAM_ARB in glLoadProgramNV 2009-11-07 15:54:32 -08:00
Ian Romanick 7452877cf6 prog parse: Handle GL_FRAGMENT_PROGRAM_NV in glProgramStringARB 2009-11-07 15:54:32 -08:00
Corbin Simpson a12fc1a9c4 r300g: Organize inlined state. 2009-11-07 14:32:31 -08:00
Corbin Simpson 547e939afb r300g: DCE.
This must never have been called before; it's completely wrong.
2009-11-07 14:14:19 -08:00
Corbin Simpson 9f49db6f84 r300g: Minor code cleanup to avoid confusion. 2009-11-07 13:37:07 -08:00
Corbin Simpson fa6916cfef r300g: Remove do-nothing functions. 2009-11-07 13:12:15 -08:00
Corbin Simpson c4fa0e4caa r300g: Remove faulty assert. 2009-11-07 13:07:52 -08:00
Corbin Simpson b7322fd874 Merge branch 'r300g-vbo'
This is an experimental HW TCL fastpath for r300g. It should run alright.

Thanks to osiris for making this possible.
2009-11-07 12:03:04 -08:00
Corbin Simpson 0fe5f0c09a r300g: Be more verbose in what's killing us WRT vert formats. 2009-11-07 11:55:29 -08:00
Corbin Simpson cd5b2a93d5 r300g: Comments. 2009-11-07 11:55:29 -08:00
Corbin Simpson ef513776b5 r300g: Don't assert on oversized VBOs, just return FALSE. 2009-11-07 11:55:25 -08:00
Corbin Simpson 746c01b3b2 r300g: Moar vbo cleanup. 2009-11-07 11:53:14 -08:00
Corbin Simpson b6c3954138 r300g: s/false/FALSE/
Also s/true/TRUE/
2009-11-07 11:53:14 -08:00
Corbin Simpson 7da3cc4241 r300g: Clean up indexbuf render, switch to RELOC macro. 2009-11-07 11:53:14 -08:00
Corbin Simpson 7518d9b1b7 r300g: Clean up r300_setup_vertex_buffers. 2009-11-07 11:53:14 -08:00
Corbin Simpson 96b729f926 r300g: Don't pass hw_prim around in the context.
And some other fixes.
2009-11-07 11:53:14 -08:00
Corbin Simpson 24c6fdbd32 r300g: Use common state funcs for translating vert formats. 2009-11-07 11:53:14 -08:00
Maciej Cencora 1ef0341ea7 r300g: don't hang GPU on misbehaving apps 2009-11-07 11:53:13 -08:00
Maciej Cencora 3445f47697 r300g: VBOs WIP 2009-11-07 11:53:13 -08:00
Maciej Cencora d8592d1724 r300g: add missing flush 2009-11-07 11:53:13 -08:00
Maciej Cencora c7dfffc5d5 r300g: enable CS dumping 2009-11-07 11:53:13 -08:00
Maciej Cencora 6acb26eadf r300g: move vborender context function to seperate file
r300g: Un-migrate r300_draw_render.

It'll make maintaining the SW TCL path easier.
2009-11-07 11:53:06 -08:00
Jakob Bornecrantz 57d77c6a44 i915g: Fix comment in is buffer referenced 2009-11-07 19:31:18 +00:00
brian 18768393d1 mesa: move code after decl
Fixes bug 24967.
2009-11-07 08:18:07 -07:00
Christoph Bumiller 44cb5b5c66 nv50: enable all 32 threads of a warp
This should be the default setting.
See also 7d967b9b7c.
2009-11-07 10:48:36 +01:00
Eric Anholt 8baee3d25b i965: Use Compr4 instruction compression mode on G4X and newer.
No statistically significant performance difference at n=3 with either
openarena or my GL demo, but cutting program size seems like a good
thing to be doing for the hypothetical app that has a working set near
icache size.
2009-11-06 21:24:22 -08:00
Eric Anholt ec66644ed0 i965: Share min/max between brw_wm_emit.c and brw_wm_glsl.c 2009-11-06 21:08:55 -08:00
Eric Anholt cfa927766a i965: Share emit_fb_write() between brw_wm_emit.c and brw_wm_glsl.c
This should fix issues with antialiased lines in GLSL.
2009-11-06 21:08:55 -08:00
Eric Anholt 2b58c31257 i965: Share most of the WM functions between brw_wm_glsl.c and brw_wm_emit.c
The PINTERP code should be faster for brw_wm_glsl.c now since brw_wm_emit.c's
had been improved, and pixel_w should no longer stomp on a neighbor to dst.
2009-11-06 21:08:55 -08:00
Eric Anholt 1e5400c575 i965: Share math functions between brw_wm_glsl.c and brw_wm_emit.c. 2009-11-06 21:08:54 -08:00
Eric Anholt 7059aa0eff i965: Share the sop opcodes between brw_wm_glsl.c and brw_wm_emit.c. 2009-11-06 21:08:54 -08:00
Eric Anholt 726ad15606 i965: Share OPCODE_MAD between brw_wm_glsl.c and brw_wm_emit.c 2009-11-06 21:08:54 -08:00
Eric Anholt bad5b120be i965: Share the DP3, DP4, and DPH between brw_wm_glsl.c and brw_wm_emit.c 2009-11-06 21:08:54 -08:00
Eric Anholt 06c1bc8a22 i965: Add generic GLSL code for unaliasing a 3-arg opcode, and share LRP code. 2009-11-06 21:08:54 -08:00
Eric Anholt 90629704ef i965: Use a normal alu1 emit for OPCODE_TRUNC. 2009-11-06 21:08:54 -08:00
Eric Anholt 71af508072 i965: Share basic ALU ops between brw_wm_glsl and brw_wm_emit.c
This drops support for get_src_reg_imm in these, but the prospect of getting
brw_wm_pass*.c onto our GLSL path is well worth some temporary pain.
2009-11-06 21:08:54 -08:00
Eric Anholt 0f34cdf621 i965: Collect GLSL src/dst regs up in generic code.
This matches brw_wm_emit.c, which we'll be using shortly.  There's a
possible penalty here in that we'll allocate registers for unused channels,
since we aren't doing ref tracking like brw_wm_pass*.c does.  However, my
measurements on GM965 don't show any for either OA or UT2004 with the GLSL
path forced.
2009-11-06 21:08:54 -08:00
Zack Rusin e521bf7706 st/xorg: implement batching for the composite op
something is broken so disabled for now
2009-11-06 22:08:21 -05:00
Zack Rusin 4322346f3f st/xorg: batch solid fill requests
instead of lots of very small transfers, one larger is a lot better
for performance
2009-11-06 22:08:21 -05:00
Zack Rusin e1730632aa st/xorg: start accumulating vertices in a common buffer 2009-11-06 22:08:21 -05:00
Zack Rusin 3f7df23ff5 st/xorg: use quads instead of triangle fans
easier to split, accumulate and batch those
2009-11-06 22:08:21 -05:00
Zack Rusin 6c44d399bd st/xorg: make the buffer size global 2009-11-06 22:08:21 -05:00
Ian Romanick 26d2ce0a09 GLX: Change GLX client vendor string to "Mesa Project and SGI"
This change allows a certain closed-source browser plug-in to work
with open-source drivers.
2009-11-06 14:52:49 -08:00
Eric Anholt 6b0bcfafab mesa: Reduce the source channels considered in optimization passes.
Depending on the writemask or the opcode, we can often trim the source
channels considered used for dead code elimination.  This saves actual
instructions on 965 in the non-GLSL path for glean glsl1, and cleans up
the writemasks of programs even further.
2009-11-06 14:27:35 -08:00
Eric Anholt f3cacfe216 mesa: Fix remove_instructions to successfully remove when removeFlags[0].
This fixes the dead code elimination to work on the particular code
mentioned in the previous commit.
2009-11-06 13:16:49 -08:00
Eric Anholt e4e312d493 mesa: Add an optimization path to remove use of pointless MOVs.
GLSL code such as:
	vec4 result = {0, 1, 0, 0};
	gl_FragColor = result;

emits code like:
  0: MOV TEMP[0], CONST[0];
  1: MOV OUTPUT[1], TEMP[0];

and this replaces it with:
  0: MOV TEMP[0], CONST[0];
  1: MOV OUTPUT[1], CONST[0];

Even when the dead code eliminator fails to clean up a now-useless MOV
instruction (since it doesn't do live/dead ranges), this should at reduce
dependencies.
2009-11-06 13:16:49 -08:00
Eric Anholt ee0a9e6e10 mesa: Fix up the remove_dead_code pass to operate on a channel basis.
This cleans up a bunch of instructions in GLSL programs to have limited
writemasks, which would translate to wins in shaders that hit the i965
brw_wm_glsl.c path by depending less on in-driver optimizations.  It will
also help hit other optimization passes I'm looking at.
2009-11-06 13:16:49 -08:00
Brian Paul 3105f3aa88 intel: better front color buffer test in intelClear() 2009-11-06 13:52:48 -07:00
Eric Anholt 8395da2e8a i965: Always pass the size argument to brw_cache_data.
This keeps the individual state files from having to export their
structures for brw_state_cache initialization.
2009-11-06 11:37:32 -08:00
Eric Anholt 1166294d1d intel: Finish removing the fallback code for bug #16697.
I fixed it properly as of 7216679c19.
2009-11-06 11:37:32 -08:00
Eric Anholt 75bdbdd90b intel: Don't validate in a texture image used as a render target.
Otherwise, we could lose track of rendering to that image, which could
easily happen during mipmap generation.
2009-11-06 11:37:32 -08:00
Eric Anholt 6b68482e68 mesa: Attempt to pair up Driver.RenderTexture and FinishRenderTexture()
This is probably not 100% complete (bind vs unbind may still not pair up
exactly), but it should help out drivers which are relying on
FinishRenderTexture to be called when we're done rendering to a particular
texture level, not just when we're done rendering to the object at all.
This is the case for the one consumer of FinishRenderTexture() so far: the
gallium state tracker.  Noticed when trying to make use of FRT() in the intel
driver.
2009-11-06 11:37:32 -08:00
Eric Anholt 8df81bca17 intel: Clean up some extra struct indirection in finalize. 2009-11-06 11:37:32 -08:00
Eric Anholt ee7dfbbd6c intel: Use _mesa_get_current_tex_object() to clean up TFP path. 2009-11-06 11:37:31 -08:00
Eric Anholt 8f30ceaaef intel: Remove duplicated arguments from intel_miptree_match_image(). 2009-11-06 11:37:31 -08:00
Eric Anholt 2bc8bcdcd3 i965: Remove an XXX comment for testing some code that seems to work. 2009-11-06 11:37:31 -08:00
Eric Anholt bb2dd50be0 intel: Remove obsolete comment about GEM in the spans code. 2009-11-06 11:37:31 -08:00
Eric Anholt 8e0f40d287 intel: Use PIPE_CONTROL on gen4 hardware for doing pipeline flushing.
This should do all the things that MI_FLUSH did, but it can be pipelined
so that further rendering isn't blocked on the flush completion unless
necessary.
2009-11-06 11:37:31 -08:00
Eric Anholt caf3038123 Make a convenient int for what chipset generation we're on.
gen2/3/4 are easier to say than "8xx, 915-945/g33/pineview, 965/g45/misc",
and compares on generation are often easier than stringing together a bunch
of chipset checks.
2009-11-06 11:37:31 -08:00
Ian Romanick 4e4c2ee1fd Merge branch 'mesa_7_6_branch'
This should fix the memory leaks in the assembly parser without the
regressions.

The conflicts in program_lexer.l were related to changes in returning
strings between the branches (always return IDENTIFIER vs. returing
either IDENTIFIER or USED_IDENTIFIER).

The conflicts in program_parse.y were related to two changes in master
One change prints a variable name in an error message.  The other
change adds outputVarSize to the OUTPUT_statement rule.  The cause the
position of the IDENTIFIER to change from $2 to $3.

Conflicts:
	src/mesa/shader/lex.yy.c
	src/mesa/shader/program_lexer.l
	src/mesa/shader/program_parse.tab.c
	src/mesa/shader/program_parse.y
2009-11-06 11:17:00 -08:00
Ian Romanick 9348ac03ce ARB prog parser: Regenerate parser from previous commits. 2009-11-06 10:46:23 -08:00
Ian Romanick d8e256f923 ARB prog parser: Release old program string in _mesa_parse_arb_{fragment,vertex}_program
The program structure passed to _mesa_parse_arb_program is just a
place holder.  The stings that actually need to be released are only
known to the functions calling _mesa_parse_arb_program, so they should
be freed there.
2009-11-06 10:46:22 -08:00
Ian Romanick 301a9b7e28 ARB prog parser: Release strings returned from the lexer that don't need to be kept 2009-11-06 10:46:22 -08:00
Ian Romanick 1c7337d46e Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"
This reverts commit 93dae6761b.

This change was completely broken when the parser uses multiple
strings in a single production.  It would be nice if bug fixes could
initially land somewhere other than the stable branch.
2009-11-06 10:46:22 -08:00
José Fonseca 96e938f62c llvmpipe: Fix build with llvm 2.6.
Fixes bug 24949.
2009-11-06 15:08:05 +00:00
Brian Paul 38d3c156dc intel: call intel_check_front_buffer_rendering() in intelClear()
fixes bug 24953.
2009-11-06 08:00:38 -07:00
José Fonseca 577a598dc9 mesa: Export S3_s3tc as well.
Used in Quake3.
2009-11-06 12:06:45 +00:00
José Fonseca f611425101 mesa: Translate MAP_UNSYNCHRONIZED_BIT. 2009-11-06 12:06:44 +00:00
José Fonseca 244591ae7b gallium: Add UNSYNCHRONIZED cpu access flag. Document others. 2009-11-06 12:06:44 +00:00
Zack Rusin 25728860fc st/xorg: unify vertex buffer handling
first step on our way to batching
2009-11-06 00:19:54 -05:00
Brian Paul 63191bd244 xmesa: pass pixmap to clip_for_xgetimage()
The code was assuming ctx->DrawBuffer == ctx->ReadBuffer.
Passing the pixmap is simpler and better.
Fixes a potential segfault.
2009-11-05 16:48:52 -07:00
Brian Paul d971069fc6 mesa: fix infinite loop bug in _mesa_drawbuffers()
Fixes bug 24946.
This regression came from 8df699b3bb.
2009-11-05 13:17:21 -07:00
José Fonseca 67034b9efc softpipe: Implement PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE for destination.
It is a valid and tested combination on D3D9.
2009-11-05 19:44:07 +00:00
Cooper Yuan e0590159ce g3dvl: remove a debug line 2009-11-05 16:06:01 +08:00
Cooper Yuan c621c100b2 g3dvl: add scissor setting 2009-11-05 15:59:27 +08:00
Marek Olšák c2e47191d7 r300g: add polygon mode
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák 4671005a43 r300g: fix the size of CS when emitting the fragprog constant buffer
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák 07190888bd r300g: set the correct offset in a colorbuffer surface
Suggested by Joakim Sindholt.

Also, put flushing of colorbuffers _before_ the framebuffer state setup,
suggested by docs.

Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák ad96c0d851 r300g: add color channel masking
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Brian Paul 7c623905bc mesa: added cast to silence warning 2009-11-04 17:58:43 -07:00
Brian Paul 898de4a9d5 Merge branch 'mesa_7_6_branch'
Conflicts:

	src/mesa/drivers/windows/gdi/mesa.def
2009-11-04 17:57:20 -07:00
Brian Paul 1c3f7ab74c vbo: fix out-of-bounds array access
The exec->vtx.inputs[] array was being written past its end.  This was
clobbering the following vbo_exec_context::eval state.  Probably not noticed
since evaluators and immediate mode rendering don't happen at the same time.

Fixed the loop in vbo_exec_vtx_init().
Changed the size of the vbo_exec_context::vtx.arrays[] array.
Added a bunch of debug-build assertions.

Issue found by Vinson Lee.
2009-11-04 17:51:28 -07:00
Brian Paul bc4ad7c2ae mesa: fix broken pack_histogram() case for GLhalf 2009-11-04 17:42:30 -07:00
Brian Paul 76aa0c0fd3 mesa: silence warning from gcc 4.4.1 2009-11-04 17:42:01 -07:00
Brian Paul fe86f8d732 ARB prog parser: include variable name in error text 2009-11-04 17:27:49 -07:00
Zack Rusin 4c5a758d06 st/xorg: these flushes shouldn't be necessary
performance optimization
2009-11-04 18:10:33 -05:00
Alex Deucher 9fce12b894 r600: rework draw functions
Seems INDX_OFFSET doesn't work properly on some cards,
so change back to immediate mode indices.  Seems to only
affect DRI1.  Needs more investigation.

Rework and clean up the draw functions.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-11-04 16:59:13 -05:00
Alex Deucher 70dade8afe r600: fix count prediction for IB case
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-11-04 14:43:24 -05:00
Alan Hourihane f1b91ccc08 Fix YTILE spantmp functions 2009-11-04 15:26:38 +00:00
Alan Hourihane 3040b2ee9d Fix YTILE spantmp functions 2009-11-04 14:48:25 +00:00
Vinson Lee 51f7763c00 glslcompiler: Fix Mac OS build.
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-04 07:14:55 -07:00
José Fonseca 0b4ea45e8a util: Remove homegrown Windows KM profiler.
It's not sampling based so its results are biased towards functions called
many times.
2009-11-04 12:15:29 +00:00
Michal Krol 767bc8eb5a tgsi/ureg: Allow for multiple extended instruction tokens.
For example, we would like to have a predicate and texture token
in one instruction to do predicated texture sampling.
2009-11-04 11:47:10 +00:00
Christoph Bumiller 618e3b89f6 nv50: fix shader emit_tex for cube textures 2009-11-04 00:53:52 +01:00
Christoph Bumiller 317ccfe0df nv50: add abs-modifier for emit_minmax 2009-11-04 00:53:51 +01:00
Christoph Bumiller 040e1d008f nv50: add 3d texture tiling and mip-mapping
Mip-mapped 3D textures are not arrays of 2D layers
with a mip-map layout like 2D textures, therefore we
cannot use image_nr == depth for them.

Making use of "volume tiling" modes now, the allowed
modes are 0xZY where Z <= 5 and y <= 5.
2009-11-04 00:53:51 +01:00
Brian Paul 6eb71519f7 mesa: (GLint64) casts in get.c to silence Visual Studio warnings
Revised version of a patch from Karl Schultz.
2009-11-03 16:13:24 -07:00
Karl Schultz 077eb0d81c windows: remove old entrypoints from mesa.def file
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 16:08:46 -07:00
Karl Schultz e713a95c96 mesa: added GLAPIENTRY keywords for sync object functions
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 16:05:12 -07:00
Michal Krol ceb6728725 llvmpipe: Sanitise shader semantic and interpolator handling.
Handle the remaining semantic names and indices.
Respect color interpolator when not flatshading.

Based on Michal's softpipe commit
eb699d64ec.
2009-11-03 17:12:34 +00:00
Keith Whitwell 026cf84bbb llvmpipe: remove old prim_setup draw stage
Everything now goes through the draw_vbuf handler, the same as
regular drivers.

Based on Keith's commit 4fe0fc3eba.
2009-11-03 17:12:34 +00:00
José Fonseca 677a055fa0 llvmpipe: Respect gl_rasterization_rules in primitive setup.
Based on Michal's identical commit for softpipe
(ca9c413647).
2009-11-03 17:12:34 +00:00
José Fonseca 3e8f665c1e python/retrace: Cope with null constant buffers. 2009-11-03 17:12:33 +00:00
José Fonseca a2e868b977 python/retrace: Add missing colon. 2009-11-03 17:12:33 +00:00
Michal Krol 7ccf60ae40 tgsi: Up tgsi_exec's control flow nesting to 32. 2009-11-03 16:56:50 +00:00
Brian Paul 4bced42341 Merge branch 'mesa_7_6_branch' 2009-11-03 09:54:09 -07:00
Brian Paul 800e553e7a mesa: clean-up, remove some flushing in FBO functions
Remove some unneeded flushes.
Replace FLUSH_CURRENT w/ FLUSH_VERTICES in other places.
2009-11-03 09:52:25 -07:00
Brian Paul 4de18fb093 mesa: fix indentation 2009-11-03 09:52:25 -07:00
Brian Paul 5698d7cd75 mesa: clean-up formatting 2009-11-03 09:52:25 -07:00
Brian Paul 18af75e501 mesa: avoid extraneous _NEW_BUFFER changes in _mesa_BindFramebufferEXT() 2009-11-03 09:52:25 -07:00
Brian Paul c7048f9d9f mesa: use FLUSH_VERTICES() in _mesa_drawbuffers() 2009-11-03 09:52:25 -07:00
Brian Paul 8df699b3bb mesa: avoid extraneous _NEW_BUFFER state in _mesa_drawbuffers() 2009-11-03 09:52:25 -07:00
Brian Paul b28c637382 mesa: use ffs() to shorten loop in _mesa_drawbuffers() 2009-11-03 09:52:25 -07:00
Brian Paul 2d11c48223 mesa: added assertion, another comment 2009-11-03 09:52:25 -07:00
Brian Paul bcbfda71b0 intel: avoid unnecessary front buffer flushing/updating
Before, if we just called glXMakeCurrent() and didn't render anything we'd
still trigger a flushFrontBuffer() call.

Now only set the intel->front_buffer_dirty field at state validation time
just before we draw something.

NOTE: additional calls to intel_check_front_buffer_rendering() might be
needed if I missed some rendering paths.
2009-11-03 09:52:25 -07:00
Marek Olšák a0cd2b7029 st/mesa: clip pixels in draw_stencil_pixels to avoid crash
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-03 09:48:04 -07:00
Brian Paul e60ebebb39 st/mesa: don't use util_blit_pixels_writemask() for depth or depth/stencil
util_blit_pixels_writemask() only works for color formats at this time.
Also, it might never work for depth/stencil surfaces since we can't get
handle stencil values in a fragment shader.

Fixes glCopyTexSubImage(GL_DEPTH_COMPONENT).
2009-11-03 09:48:04 -07:00
Brian Paul 0197348641 st/mesa: fix tests for depth and depth/stencil texture formats 2009-11-03 09:48:04 -07:00
Brian Paul 644d8fd363 mesa: added comment 2009-11-02 19:38:35 -07:00
Brian Paul 7157479b25 mesa: use _mesa_get_current_tex_object() 2009-11-02 19:38:35 -07:00
Brian Paul 1afe60e802 mesa: use _mesa_get_current_tex_object() 2009-11-02 19:38:35 -07:00
Brian Paul b8fdb900fb mesa: make _mesa_get_current_tex_objec() public 2009-11-02 19:38:35 -07:00
Ian Romanick 731810f854 ARB prog parser: Fix a couple issues with previous merge from mesa_7_6_branch
Since the addition of support for Nvidia condition codes, the lexer internally
uses handle_ident to select between returning IDENTIFIER and USED_IDENTIFIER.
Also, use return_string instead of strdup.

Fixes bug #24809.
2009-11-02 12:44:14 -08:00
Vinson Lee e055665752 glx: Fix memory leak if XF86DRICreateDrawable() fails
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-02 12:35:47 -07:00
Pierre Ossman 213ec8251c r600: implement LOG op in compiler 2009-11-02 11:30:00 -05:00
Pierre Ossman d00cbba403 r600: implement EXP op in compiler 2009-11-02 11:29:54 -05:00
Michal Krol c379fbbe24 tgsi/ureg: Add negate and swizzle for predicates. 2009-11-02 14:59:52 +00:00
Brian Paul c02cd82b46 mesa: fix incorrect approx bits/channel for fxt1 formats
See bug 24806.
2009-11-02 06:52:10 -07:00
Brian Paul a40055f4b6 gallium/util: add casts to silence warnings 2009-11-02 06:51:47 -07:00
Michal Krol 962ece9540 tgsi/ureg: Update for gallium interface changes. 2009-11-02 09:44:21 +00:00
Michal Krol aa2b2e5d7d tgsi: Update for gallium interface changes. 2009-11-02 09:44:20 +00:00
Michal Krol 0a7d50ed7e gallium: Cleanup predicate and condition code TGSI tokens.
There is little point in having a special TGSI token just to handle
predicate register updates. Remove tgsi_dst_register_ext_predicate token
and instead use a new PREDICATE register file to update predicates.
Actually, the contents of the obsolete token are being moved
to tgsi_instruction_ext_predicate, where they should be
from the very beginning.

Remove the NVIDIA-specific condition code tokens -- nobody uses them
and they can be emulated with predicates if needed.

Introduce PIPE_CAP_SM3 that indicates whether a driver supports
SM3-level instructions, and in particular predicates.

Add PIPE_CAP_MAX_PREDICATE_REGISTERS that can be used to query the driver
how many predicate registers it supports (currently it would be 1).
2009-11-02 09:44:18 +00:00
Michal Krol eb699d64ec softpipe: Sanitise shader semantic and interpolator handling.
Handle the remaining semantic names and indices.
Respect color interpolator when not flatshading.
2009-11-02 09:44:16 +00:00
Younes Manton 87d7c1aa15 nouveau: Assume all texture blankets are linear for now. 2009-11-01 18:27:47 -05:00
Corbin Simpson 1f630fa016 r300g: Miscellania. Avoid draw segfaults, s/true/TRUE/, etc.
Cleared out my git stash.
2009-11-01 11:54:52 -08:00
Maciej Cencora 3d73852121 r300g: fix geometry corruptions
PVS flush is needed before changing the vertex shader or vertex shader constants.
2009-11-01 11:02:02 -08:00
Maciej Cencora 2db46af875 r300g: split constant buffer and shader emittion 2009-11-01 11:01:40 -08:00
Corbin Simpson cab749a1d0 r300g: Adopt osiris' PSC data and swizzle.
A fair amount more flexible and easier to maintain.
2009-11-01 09:24:02 -08:00
Christoph Bumiller 5de8f97440 nv50: handle TGSI_SEMANTIC_FACE 2009-11-01 14:28:08 +01:00
Christoph Bumiller 496c9eaacf nv50: make IF condition safe
Don't assume that a SET that writes to IF's argument
directly precedes the IF.
2009-11-01 14:28:04 +01:00
Christoph Bumiller 99e308a0e0 nv50: implement TGSI_OPCODE_AND/OR/XOR
Will use AND for gl_FrontFacing, the face input
is either 0 or 0xffffffff.
2009-11-01 14:27:35 +01:00
Christoph Bumiller 1cc16e1b83 nv50: fix textures with block size != cpp
First, using width * block size as pitch is evidently
wrong if a block contains more than 1 texel.

For tiled textures, since a block occupies a contiguous
area of memory, y addressing in m2mf has to be done by
block index, not the y coordinate itself.

This should fix compressed textures.
2009-10-31 20:51:09 +01:00
Younes Manton 91232b7004 nouveau: Support X8R8G8B8 textures on nv30, nv40 and RTs on nv10-nv40. 2009-10-31 09:42:49 -04:00
Christoph Bumiller 9831e1f76c nv50: use SIFC also for shader upload
Adds a more generic SIFC transfer function.
2009-10-31 13:40:33 +01:00
Christoph Bumiller 525f529d13 nv50: make MRTs work
We have to indicate to the hw whether the FP exports
multiple colour results.
Method 0x121c is used to specify the number of RTs.
Also deactivate zeta explicitly if there's no zsbuf.
2009-10-31 13:40:33 +01:00
Dave Airlie 73b45b0669 radeon: add missing include 2009-10-31 21:24:50 +10:00
Marek Olšák c9928ac3ee r300g: correct the pitch calculation for smaller mipmaps 2009-10-31 07:30:48 +01:00
Marek Olšák 3f60130b87 r300g: pretend NPOT support
It's requires to get GL2.1, therefore, much more piglit tests can be used
for testing. Figure out later how to emulate this.
2009-10-31 07:30:48 +01:00
Marek Olšák a8f85dceb5 r300g: fix reading from the destination buffer in blending 2009-10-31 07:30:48 +01:00
Marek Olšák 63c9450ae7 r300g: add precalculating of pixel pitch, add a new NPOT flag 2009-10-31 07:30:48 +01:00
Marek Olšák 11180b4471 r300g: remove unnecessary assertions
Also, correct typos in comments.
2009-10-31 07:30:48 +01:00
Marek Olšák ace78d90de r300g: fix crash in r300_is_texture_referenced
Also, a subtle fix in emitting a texture state
2009-10-31 07:30:47 +01:00
Dave Airlie 5cf7c8e2d5 radeon: use _mesa_get_current_tex_unit 2009-10-31 15:50:12 +10:00
Brian Paul 5e9f97f0ea ARB prog parser: regenerated files 2009-10-30 19:08:19 -06:00
Brian Paul df5615de1f ARB prog parser: new set_src_reg(), set_dst_reg() helpers
These functions do sanity checks on the register file and index.
2009-10-30 19:08:18 -06:00
Brian Paul a71edc9455 mesa: better error message 2009-10-30 19:08:18 -06:00
Eric Anholt 7c8bed62e0 intel: Use GTT mapping when available for swrast.
This improves piglit quick.tests runtime from 19:33 minutes to 6:06 on
my GM45.  It should also hide most of the A17 swizzling issues, though
they'll still exist when swapping occurs (which is the kernel's problem
either way).
2009-10-30 17:35:12 -07:00
Eric Anholt d63c29ef20 x86: Fix the test for negative pixel count in optimized rgb565 spans.
There's a bunch of bogus looking stuff the count handling in this code, but
this fixes the testcases we have.
2009-10-30 17:35:11 -07:00
Eric Anholt 21a3a79371 intel: Fix up z24_x8 depth spans since the texformat merge. 2009-10-30 17:35:11 -07:00
Eric Anholt cb132406de i965: Add an index assert on get_fp_inst array like other compiler arrays. 2009-10-30 13:28:44 -07:00
Eric Anholt 2c30ee9bd6 i965: Fix BRW_WM_MAX_INSN to reflect current limits.
Part of fixing bug #24355.
2009-10-30 13:20:34 -07:00
Eric Anholt 2073006c95 intel: Set the texture format in the TFP path.
This fixes a regression in piglit's tfp test as of
11caea687e.  Additionally, set the texture
format for the RGB textures to MESA_FORMAT_XRGB8888 and support it in the
hw paths so that hopefully sw fallbacks involving TFP get better alpha
behavior.

The radeon drivers appear to need the same fix.

Bug #24803
2009-10-30 12:41:28 -07:00
Alex Deucher b568a2c808 r600: remove duplicate line 2009-10-30 15:08:09 -04:00
Alex Deucher 703a836d40 r600: fill in some missing tex formats
This improves shadowtex since the component ordering
is at least correct now, but I'm not sure how to
deal with texturing from a depth surface yet due to
differences in depth and color tile layouts.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-10-30 15:02:34 -04:00
Alex Deucher 57864f6e04 r600: fix a warning, update comments 2009-10-30 11:52:02 -04:00
Andre Maasikas 5f7d5d3ea3 r600: use AUTO_INDEX for draw - saves cmd buffer space
also seems we can use INDX_OFFSET if start != 0
2009-10-30 17:18:00 +02:00
Brian Paul 409469fb70 intel: fix up some XRGB breakage
We weren't choosing the right XRGB span functions for reading the
framebuffer.  XRGB formats still aren't turned on yet though.
2009-10-30 09:13:04 -06:00
Brian Paul 730a3de9f9 mesa: fix inverted buffer object test
Fixes bug 24799.
2009-10-30 08:31:01 -06:00
Brian Paul 71cd40bccf mesa: fix incorrect format info for MESA_FORMAT_SL8
Fixes bugs 24798 and 24801.
2009-10-30 08:21:16 -06:00
Chow Loong Jin 35506dec67 Add --with-dri-searchpath argument
* Add an extra argument to configure which allows for specifying
  different DRI driver search paths to libGL (FDO #24766)

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-10-30 06:00:13 -07:00
Michal Krol ca9c413647 softpipe: Respect gl_rasterization_rules in primitive setup. 2009-10-30 08:05:40 +00:00