Commit Graph

19287 Commits

Author SHA1 Message Date
Brian Paul 1e299ff828 i965: another checkpoint commit of new constant buffer support
Everything is in place now for using a true constant buffer for GLSL fragment
shaders.  Still some bugs to find though.
2009-04-03 09:07:04 -06:00
Brian Paul 30adf05181 i965: fix response length param in brw_dp_READ_4()
We were accidentally clobbering the next register.
2009-04-03 09:07:04 -06:00
Brian Paul 3423986243 i965: change args to get_src_reg() to prep for new constant buffer support 2009-04-03 09:07:04 -06:00
Brian Paul 597cd5b94e i965: check-point commit of new constant buffer support
Currently, shader constants are stored in the GRF (loaded from the CURBE
prior to shader execution).  This severly limits the number of constants
and temps that we can support.

This new code will support (practically) unlimited size constant buffers
and free up registers in the GRF.  We allocate a new buffer object for the
constants and read them with "Read" messages/instructions.  When only a
small number of constants are used, we can still use the old method.

The code works for fragment shaders only (and is actually disabled) for now.
Need to do the same thing for vertex shaders and need to add the necessary
code-gen to fetch the constants which are referenced by the shader
instructions.
2009-04-03 09:07:04 -06:00
Brian Paul ba8b25a46c i965: remove unused code for sampling a constant buffer 2009-04-03 09:07:04 -06:00
Brian Paul 8c093a1fb0 i965: code to setup a constant buffer sampler
This code won't actually be used and will be removed in a subsequent commit.
Just committing for posterity.
2009-04-03 09:07:04 -06:00
Brian Paul a9c62a2340 i965: do negation and Abs in get_src_reg_imm()
Fixes regression seen with progs/glsl/bump.c
2009-04-03 09:07:04 -06:00
Brian Paul 5f1ce6b87e i965: comments 2009-04-03 09:07:03 -06:00
Brian Paul ed8f54aa65 i965: code to debug/dump instruction immediates 2009-04-03 09:07:03 -06:00
Brian Paul 1ee0e22646 i965: minor code movement, new comment 2009-04-03 09:07:03 -06:00
Brian Paul 8127e49b93 i965: added new brw_dp_READ_4() function
Used to read float[4] vectors from the constant buffer/surface.
2009-04-03 09:07:03 -06:00
Brian Paul 6b18a8d3e7 i965: new and updated comments 2009-04-03 09:07:03 -06:00
Brian Paul 264058f38a mesa: more error message info 2009-04-03 09:07:03 -06:00
Brian Paul f5a4d20e4a mesa: clean up formatting and use 'return' instead of 'break' consistantly 2009-04-03 09:07:03 -06:00
Brian Paul 1146d40b9c i965: comments for brw_SAMPLE() 2009-04-03 09:07:03 -06:00
Brian Paul e1a1a5a638 i965: comments for sampling code 2009-04-03 09:07:03 -06:00
Brian Paul 154cd7a723 i965: add support for float literal instruction operands
Call the get_src_reg_imm() function when it's permissible to generate a
literal value src register.
2009-04-03 09:07:03 -06:00
Brian Paul 966cd4f1af i965: remove 'nr' param from get_src/dst_reg() functions
The value was always 1.
2009-04-03 09:07:03 -06:00
Brian Paul f1b9a5cff1 i965: fix comment typo 2009-04-03 09:07:03 -06:00
Brian Paul d5346a925c i965: comments, clean-up in prepare_wm_surfaces() 2009-04-03 09:07:03 -06:00
Brian Paul 5d7f3ae15c i965: remove unneeded #includes 2009-04-03 09:07:03 -06:00
Brian Paul 7709b26e6b i965: formatting clean-ups 2009-04-03 09:07:03 -06:00
Brian Paul 4999721022 i965: comments, whitespace changes 2009-04-03 09:07:03 -06:00
Brian Paul c82851598f i965: rename scratch_buffer -> scratch_bo to be consistant with other buffers 2009-04-03 09:07:03 -06:00
Brian Paul bf28b576cb i965: fix indentation 2009-04-03 09:07:03 -06:00
Brian Paul 9f146943ec i965: whitespace changes, comments 2009-04-03 09:07:03 -06:00
Michal Krol dfab375c07 tgsi/text: Allow optional component selection for indirect registers. 2009-04-03 17:06:36 +02:00
Michal Krol 3b7c9a9a16 python/regress: vertex shader FRC test does not use IN[1]. 2009-04-03 16:37:34 +02:00
Michal Krol 37661516ea python/regress: Add relative addressing tests. 2009-04-03 16:37:13 +02:00
Michal Krol d2ed91201e util/debug: Initialise local variables. 2009-04-03 14:59:25 +02:00
Michal Krol cc770e0a0c tgsi/text: Allow -|src| variant of -(|src|). 2009-04-03 14:59:22 +02:00
Alan Hourihane f7039fde4f mesa: ensure pbo stencil buffers are mapped before use 2009-04-03 12:49:53 +01:00
Michal Krol 016052c18f python/regress: Add vertex shader source modifier tests. 2009-04-03 08:27:50 +02:00
Christoph Bumiller 030533dd10 nv50: fix viewport state update 2009-04-03 08:33:19 +10:00
Roland Scheidegger ebc1478e50 mesa: fix TexParameter functions
premature return in TexParameterf caused mesa to never call Driver.TexParameter
breaking drivers relying on this (fix bug #20966).
While here, also fix using ctx->ErrorValue when deciding to call
Driver.TexParameter. Errors are sticky and uncleared errors thus would cause
this to no longer get called. Since we thus need return value of
set_tex_parameter[if] can also optimize this to only call when value changed.
2009-04-02 23:38:34 +02:00
Brian Paul 7b9bf39543 mesa: don't call ctx->Driver.ReadPixels() if width or height is zero 2009-04-02 13:05:55 -06:00
Brian Paul f6a3f1f52a mesa: don't call ctx->Driver.Draw/CopyPixels() if width or height is zero 2009-04-02 13:05:22 -06:00
Brian Paul 46d09cb53d glsl: fix segfault in linker when vertex or fragment shader was missing 2009-04-02 11:15:53 -06:00
Michal Krol 39c2fae657 python/regress: Do not generate HTML summary for vertex shader test. 2009-04-02 12:21:50 +02:00
Thomas Hellstrom 96fd3df59a glx: MakeCurrent fixes.
1) If MakeContextCurrent is called with (NULL, None, None), Don't
   send the request to the X server if the current context is direct.
2) Return BadMatch in some error cases according to the glx spec.
3) If MakeContextCurrent is called for a context which is current in
   another thread, return BadAccess according to the glx spec.

Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-02 11:33:20 +02:00
Thomas Hellstrom 8e753d0404 dri glx: Fix dri_util::driBindContext
1) Don't error-check here. It's done in glx makeCurrent.
2) Allow ctx and the dri drawables to be NULL for future use. This is
   currently blocked in glx makeCurrent.
3) Avoid updating dri drawables unless they are completely uninitialized.
   Since the updating was done outside of the lock, the driver need to
   verify and redo it anyway.

Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-02 11:33:19 +02:00
Thomas Hellstrom c952b3e907 dri glx: Propagate driver MakeCurrent errors.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-02 11:33:19 +02:00
Michal Krol fbabeb9b56 python/regress: Do not create zbuf for vertex shader test. 2009-04-02 10:00:11 +02:00
Michal Krol 336a4f84e8 python/regress: Add more vertex shader test cases. 2009-04-02 10:00:09 +02:00
Brian Paul bd32640f77 swrast: remove unused integer lerp functions 2009-04-01 20:24:23 -06:00
Brian Paul 7fbae9f41d mesa: get rid of gl_texture_object::_BorderChan 2009-04-01 20:24:23 -06:00
Brian Paul 79c55e55f8 dri: use BorderColor instead of _BorderChan 2009-04-01 20:24:23 -06:00
Brian Paul 7aed2b0c30 swrast: remove old texture_apply() code; always use texture combine code 2009-04-01 20:24:22 -06:00
Brian Paul 84b24efe8d swrast: fix bad optimization check 2009-04-01 20:24:22 -06:00
Brian Paul 0d8d904823 swrast: remove unused parameter 2009-04-01 20:24:22 -06:00