Kristian Høgsberg [Fri, 28 Oct 2011 19:25:09 +0000 (15:25 -0400)]
dri: Drop unused driCalculateSwapUsage
Kristian Høgsberg [Fri, 28 Oct 2011 19:23:39 +0000 (15:23 -0400)]
dri: Remove unused driIntersectArea
Kristian Høgsberg [Fri, 28 Oct 2011 19:22:43 +0000 (15:22 -0400)]
dri: Drop __driUtilUpdateDrawableInfo and helper macros
Kristian Høgsberg [Fri, 28 Oct 2011 19:18:22 +0000 (15:18 -0400)]
dri: Remove unused driSwapBuffers
Kristian Høgsberg [Fri, 28 Oct 2011 19:17:20 +0000 (15:17 -0400)]
dri: Drop unused driCreateNewContext
Kristian Høgsberg [Fri, 28 Oct 2011 19:14:41 +0000 (15:14 -0400)]
dri: Fold driCreateNewDrawable into dri2CreateNewDrawable
Kristian Høgsberg [Fri, 28 Oct 2011 19:11:15 +0000 (15:11 -0400)]
dri: Remove unsused driCreateNewScreen
Kristian Høgsberg [Fri, 28 Oct 2011 19:08:24 +0000 (15:08 -0400)]
dri: Remove unused __DRIswapInfoRec
Kristian Høgsberg [Fri, 28 Oct 2011 19:02:42 +0000 (15:02 -0400)]
dri: Remove driMediaStreamCounterExtension
Also DRI1-only.
Kristian Høgsberg [Fri, 28 Oct 2011 19:01:20 +0000 (15:01 -0400)]
dri: Remove driSwapControlExtension
DRI1-only as well.
Kristian Høgsberg [Fri, 28 Oct 2011 18:57:34 +0000 (14:57 -0400)]
dri: Drop driCopySubBufferExtension
Another DRI1-only extension.
Kristian Høgsberg [Fri, 28 Oct 2011 18:55:25 +0000 (14:55 -0400)]
dri: Drop driReadDrawableExtension
All DRI2 drivers support setting a separate read drawable.
Kristian Høgsberg [Fri, 28 Oct 2011 18:52:28 +0000 (14:52 -0400)]
dri: Drop driLegacyExtension
There are no DRI1 drivers left.
George Sapountzis [Wed, 2 Nov 2011 13:02:10 +0000 (15:02 +0200)]
st/dri/sw: add get_image inline helper similar to put_image
TODO: check if GetImage works with passing the pitch as width, similar to PutImage,
which avoids the extra copy, ala dri_sw_displaytarget_display() in src/gallium/winsys/sw/dri/dri_sw_winsys.c
Benjamin Franzke [Wed, 2 Nov 2011 14:56:23 +0000 (15:56 +0100)]
st/dri/sw: Fix incorrect cast
Missed one casting error due to rebase for commit
98aa2a8f725e44aec8bd998fe436a134e94f13bb.
Benjamin Franzke [Fri, 9 Sep 2011 08:12:23 +0000 (10:12 +0200)]
st/dri/sw: Implement texture_from_pixmap
This is a cleanup of commit
02f1b50987c0d24da3dcc36dbb44821c20d0660c.
Update tex buffer using a dri_drawable hook from implemented in sw/drisw.c.
This saves us the duplication of dri_drawable.c.
CC: Stuart Abercrombie <sabercrombie@chromium.org>
CC: Stéphane Marchesin <marcheu@chromium.org>
Benjamin Franzke [Fri, 9 Sep 2011 07:34:59 +0000 (09:34 +0200)]
Revert "Duplicate state_tracker/dri/sw/dri_drawable.c"
This reverts commit
569bde1fa7d03fb7688d0d391b32e61e857ad44e.
CC: Stuart Abercrombie <sabercrombie@chromium.org>
CC: Stéphane Marchesin <marcheu@chromium.org>
Benjamin Franzke [Fri, 9 Sep 2011 07:34:50 +0000 (09:34 +0200)]
Revert "state_trackers/dri/sw: Implement texture_from_pixmap."
This reverts commit
02f1b50987c0d24da3dcc36dbb44821c20d0660c.
CC: Stuart Abercrombie <sabercrombie@chromium.org>
CC: Stéphane Marchesin <marcheu@chromium.org>
Alex Deucher [Wed, 2 Nov 2011 13:38:46 +0000 (09:38 -0400)]
r600g: add comment about special shader exports
Certain exports (position, point size, etc.) are treated
specially by the shader and not counted as generic exports.
Note the exports and any relevant related state bits.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Vadim Girlin [Wed, 2 Nov 2011 07:50:59 +0000 (11:50 +0400)]
r600g: take into account PSIZE output for spi mapping
Skip PSIZE and POSITION when counting VS outputs.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42435
Tested without regressions on evergreen.
NOTE: this is a candidate for the 7.11 branch.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
José Fonseca [Wed, 2 Nov 2011 10:32:20 +0000 (10:32 +0000)]
svga: Update state prototypes to return pipe_error.
Fixes a bunch of prototype mismatch warnings..
Jeremy Huddleston [Wed, 2 Nov 2011 04:04:34 +0000 (21:04 -0700)]
Build fix for -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Yuanhan Liu [Tue, 1 Nov 2011 09:41:08 +0000 (17:41 +0800)]
intel: fix potential segfault error
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 11 Oct 2011 22:08:15 +0000 (15:08 -0700)]
swrast: Use MapRenderbuffer for glReadPixels(GL_DEPTH_COMPONENT) fast-paths.
This fixes issues with the code playing fast and loose with types of
buffers, and as a bonus avoids the wrappers that were previously used
to pull bits out of packed depth/stencil buffers.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Thu, 13 Oct 2011 16:38:30 +0000 (09:38 -0700)]
mesa: Make unpack_uint_z_row return 32 bits of data.
Some of the return values were u32, some were 24 bits, and z16
returned 16 bits. The caller would have to do all the work of
interpreting the format all over again. However, there are no callers
of this function at this point.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Mon, 17 Oct 2011 17:18:30 +0000 (10:18 -0700)]
nouveau: Add implementation of MapRenderbuffer.
Perhaps the easiest implementation, nouveau can directly map buffers
even if tiled, and uses separate surfaces for its texture
renderbuffers so we don't have to worry about that offset.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Mon, 17 Oct 2011 16:50:52 +0000 (09:50 -0700)]
radeon: Add implementation of MapRenderbuffer.
Unlike intel, we do a blit to/from GTT memory in order to
untile/retile the renderbuffer data, since we don't have fence
registers for accessing it.
(There is software tiling code in radeon_tile.c, but it's unused and
doesn't support macro tiling)
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Tue, 11 Oct 2011 21:46:31 +0000 (14:46 -0700)]
intel: Use MapRenderbuffer in spans setup.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Tue, 11 Oct 2011 21:22:45 +0000 (14:22 -0700)]
intel: Add an implementation of MapRenderbuffer.
v2: Add separate stencil S8 W-tile swizzling/deswizzling. Tested for
the swizzling case with env INTEL_SEPARATE_STENCIL=1 INTEL_HIZ=1
./bin/hiz-depth-stencil-test-fbo-d24-s8
v3: Apply Chad's fix for S8 window system buffers.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Eric Anholt [Tue, 1 Nov 2011 00:07:34 +0000 (17:07 -0700)]
intel: Improve the debug info for renderbuffer allocation.
Eric Anholt [Thu, 13 Oct 2011 19:02:43 +0000 (12:02 -0700)]
Add MapRenderbuffer implementations for software drivers.
Mesa core's is generic for things like osmesa.
For swrast_dri.so, we have to do Y flipping. The front-buffer path
isn't actually tested, though, because both before and after it fails
with a BadMatch in XGetImage.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Tue, 11 Oct 2011 21:12:50 +0000 (14:12 -0700)]
mesa: Add a driver hook for mapping renderbuffers.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Tue, 1 Nov 2011 16:24:47 +0000 (09:24 -0700)]
Revert "intel: Drop the immediate validation of the texture object in TFP."
This reverts commit
abaebcee787eeb8a89bf7a82ed4d1532fcde5e39.
The assertion I made was that "the zero-copy code in validation" would
zero copy. Of course, I deleted that check back in January because
the two sites that would trigger it (glTexImage() and this one) both
immediately bound their mt to the object, making the other check
pointless.
Removes two extra blits in glx-tfp. Also fixed the Android home
screen, which wasn't rendering because the extra copy broke the
relationship between the texture and the eglimage.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42152
Tested-by: Chad Versace <chad@chad-versace.us>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Brian Paul [Tue, 1 Nov 2011 19:34:52 +0000 (13:34 -0600)]
mesa: make save_EndConditionalRender param list (void) to silence warning
Brian Paul [Tue, 1 Nov 2011 17:34:51 +0000 (11:34 -0600)]
postprocess: remove const qualifiers on unsigned int parameters
to match the prototype in postprocess.h
Chia-I Wu [Sun, 30 Oct 2011 11:32:25 +0000 (19:32 +0800)]
scons: include src/glsl/Makefile.sources
Reviewed-by: Brian Paul <brianp@vmware.com>
Chia-I Wu [Sun, 30 Oct 2011 11:32:41 +0000 (19:32 +0800)]
android: include src/glsl/Makefile.sources
This also fixes the build error due to missing link_uniforms.cpp in the source
lists.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
[olv: the missing link_uniforms.cpp was added before this patch is committed]
Chia-I Wu [Sun, 30 Oct 2011 11:28:35 +0000 (19:28 +0800)]
glsl: Refactor source lists to Makefile.sources
With the hope that Android.mk and SConscript can share the file to reduce
future breakage.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
Vinson Lee [Thu, 27 Oct 2011 21:51:08 +0000 (14:51 -0700)]
mesa: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.
Adam Jackson [Tue, 1 Nov 2011 17:52:48 +0000 (13:52 -0400)]
drisw: Enable SGI_make_current_read for direct contexts
Equivalent to glXMakeContextCurrent, which had better already work since
we advertise GLX 1.3.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Thomas Hellstrom [Tue, 1 Nov 2011 16:42:21 +0000 (17:42 +0100)]
st/xa: Add a scanout flag for surfaces
Bump minor to signal availability.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Eugeni Dodonov [Tue, 1 Nov 2011 17:04:01 +0000 (15:04 -0200)]
Build link_uniforms for android
Otherwise android-x86 build fails.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
José Fonseca [Tue, 1 Nov 2011 12:28:47 +0000 (12:28 +0000)]
llvmpipe: Re-advertise support for stencil formats...
"no fetch_rgba_float for uint formats" => "llvmpipe does not support uint formats"
"stencil == uint" => "llvmpipe does not support stencil"
José Fonseca [Mon, 31 Oct 2011 19:35:55 +0000 (19:35 +0000)]
llvmpipe: Use -1 instead of ~0 for "no slot".
As the value of unsigned ~0 depends on the bit-width.
Fixes fdo 42411.
Marek Olšák [Sat, 29 Oct 2011 12:33:08 +0000 (14:33 +0200)]
docs: update relnotes-7.12
Nicholas Miell [Tue, 20 Sep 2011 13:20:39 +0000 (15:20 +0200)]
dri/nouveau: Enable NV_fog_distance on NV10 and NV20 hardware
Add support for NV_fog_distance to the NV10 and NV20 drivers.
[ Francisco Jerez: Fix fog coord. signedness for
GL_EYE_RADIAL_NV/GL_EYE_PLANE on nv20 ]
Nicholas Miell [Tue, 20 Sep 2011 06:17:01 +0000 (23:17 -0700)]
st/mesa: Enable NV_fog_distance for Gallium drivers
The fixed-function generated vertex program is all that's needed for
Gallium drivers.
Nicholas Miell [Tue, 20 Sep 2011 06:17:00 +0000 (23:17 -0700)]
mesa: Add NV_fog_distance to the fixed-function vertex program generator
This is all that is needed to implement NV_fog_distance on programmable
hardware.
Nicholas Miell [Tue, 20 Sep 2011 06:16:59 +0000 (23:16 -0700)]
mesa: Add the basics for the NV_fog_distance extension
No driver implements it yet.
José Fonseca [Tue, 1 Nov 2011 06:58:29 +0000 (06:58 +0000)]
ralloc: Use _vscprintf on MinGW.
MinGW uses MSVC's runtime DLLs for most of C runtime's functions, and
there has same semantics for vsnprintf.
Not sure how this worked until now -- maybe one of the internal
vsnprintf implementations was taking precedence.
José Fonseca [Mon, 31 Oct 2011 19:26:53 +0000 (19:26 +0000)]
svga: Fix potential buffer overflow in rs draw state.
Reviewed-by: Brian Paul <brianp@vmware.com>
José Fonseca [Mon, 31 Oct 2011 19:36:07 +0000 (19:36 +0000)]
llvmpipe: Remove unsed variables.
José Fonseca [Mon, 31 Oct 2011 19:04:08 +0000 (19:04 +0000)]
util: Add missing initializer.
Paul Berry [Tue, 25 Oct 2011 00:46:26 +0000 (17:46 -0700)]
i965: Fix flat integral varyings.
Previously, the vertex and fragment shader back-ends assumed that all
varyings were floats. In GLSL 1.30 this is no longer true--they can
also be of integral types provided that they have an interpolation
qualifier of "flat".
This required two changes in each back-end: assigning the correct type
to the register that holds the varying value during shader execution,
and assigning the correct type to the register that ties the varying
value to the rest of the graphics pipeline (the message register in
the case of VS, and the payload register in the case of FS).
Fixes piglit tests fs-int-interpolation and fs-uint-interpolation.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Paul Berry [Tue, 25 Oct 2011 23:24:03 +0000 (16:24 -0700)]
mesa: Add glsl_type::get_scalar_type() function.
This function is similar to get_base_type(), but when called on
arrays, it returns the scalar type composing the array. For example,
glsl_type(vec4[]) => float_type.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Paul Berry [Sat, 8 Oct 2011 00:37:32 +0000 (17:37 -0700)]
i965/gen6+: Switch GLSL from ALT to IEEE floating point mode
i965 graphics hardware has two floating point modes: ALT and IEEE. In
ALT mode, floating-point operations never generate infinities or NaNs,
and MOV instructions translate infinities and NaNs to finite values.
In IEEE mode, infinities and NaNs behave as specified in the IEEE 754
spec.
Previously, we used ALT mode for all vertex and fragment programs,
whether they were GLSL programs or ARB programs. The GLSL spec is
sufficiently vague about how infs and nans are to be handled that it
was unclear whether this mode was compliant with the GLSL 1.30 spec or
not, and it made it very difficult to test the isinf() and isnan()
functions.
This patch changes i965 GLSL programs to use IEEE floating-point mode,
which is clearly compliant with GLSL 1.30's inf/nan requirements. In
addition to making the Piglit isinf and isnan tests pass, this paves
the way for future support of the ARB_shader_precision extension.
Unfortunately we still have to use ALT floating-point mode when
executing ARB programs, because those programs require 0^0 == 1, and
i965 hardware generates 0^0 == NaN in IEEE mode.
Fixes piglit tests "isinf-and-isnan fs_fbo", "isinf-and-isnan vs_fbo",
and {fs,vs}-{isinf,isnan}-{vec2,vec3,vec4}.
Paul Berry [Thu, 6 Oct 2011 17:20:10 +0000 (10:20 -0700)]
glsl: Add isinf() and isnan() builtins.
The implementations are as follows:
isinf(x) = (abs(x) == +infinity)
isnan(x) = (x != x)
Note: the latter formula is not necessarily obvious. It works because
NaN is the only floating point number that does not equal itself.
Fixes piglit tests "isinf-and-isnan fs_basic" and "isinf-and-isnan
vs_basic".
Paul Berry [Thu, 6 Oct 2011 17:31:34 +0000 (10:31 -0700)]
glsl: Add '.ir' extension to builtin IR files
This patch adds the extension '.ir' to all the files in
src/glsl/builtins/ir/, and changes generate_builtins.py so that it no
longer globs on '*' to find the files to build. This prevents
spurious files (such as EMACS' infamous *~ backup files) from breaking
the build.
Paul Berry [Thu, 6 Oct 2011 18:28:42 +0000 (11:28 -0700)]
glsl: Fix copy-paste error in constant_expression_value(ir_binop_nequal)
The implementation of ir_binop_nequal in constant_expression_value()
appears to have been copy-and-pasted from the implementation of
ir_binop_equal, but with all instances of '==' changed to '!='. This
is correct except for one minor flaw: one of those '==' operators was
in an assertion checking that the types of the two arguments were
equal. That one needs to stay an '=='.
Fixes piglit tests {fs,vs}-inline-notequal.
Brian Paul [Mon, 31 Oct 2011 16:52:57 +0000 (10:52 -0600)]
docs: list GL_ARB_texture_storage in 7.12 release notes
Brian Paul [Mon, 31 Oct 2011 16:52:57 +0000 (10:52 -0600)]
mesa: add note about immutable textures for _mesa_test_texobj_completeness()
Brian Paul [Mon, 31 Oct 2011 16:52:57 +0000 (10:52 -0600)]
swrast: implement GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:57 +0000 (10:52 -0600)]
st/mesa: implement GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:57 +0000 (10:52 -0600)]
mesa: plug in dispatch functions for GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: compile new texstore.c file
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: init extension entry for GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: display list dispatch for GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: new glTexImage error checks for GL_ARB_texture_storage
If the texture memory was allocated with glTexStorage1/2/3D() we can
only change the image data with glTexSubImage calls.
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: glGetTexParameter support for GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: implement new functions for GL_ARB_texture_storage
This is the glTexStorage1D/2D/3D() functions. Basically do error
checking then call the driver hook to actually allocate memory.
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
glapi: regenerated API files for GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
glapi: new API specs for GL_ARB_texture_storage
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: add new driver hook for AllocTextureStorage()
Brian Paul [Mon, 31 Oct 2011 16:52:56 +0000 (10:52 -0600)]
mesa: add new fields for GL_ARB_texture_storage
José Fonseca [Thu, 27 Oct 2011 18:09:25 +0000 (19:09 +0100)]
svga: Flush the hwtnl primitives before writing to buffers.
svga keeps a small queue of similar primitive draws in order to coalesce
them into a single draw primitive command.
But the buffers referred in primitives not yet emitted were being ignored
in the considerations to flush or not the context.
This fixes piglit vbo-map-remap, vbo-subdata-sync, vbo-subdata-zero, and
Seeker.
Based on investigation and patch from Brian Paul.
Reviewed-By: Brian Paul <brianp@vmware.com>
Thomas Hellstrom [Mon, 31 Oct 2011 13:01:39 +0000 (14:01 +0100)]
st/xa: Plug a pipe context leak.
Forgot to destroy the pipe context on xa context destroy.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Thomas Hellstrom [Mon, 31 Oct 2011 11:14:05 +0000 (12:14 +0100)]
pipebuffer/debug: Fix a recursive mutex lock
pb_debug_manager_dump was trying to take a lock already
held by all callers.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Dave Airlie [Sat, 29 Oct 2011 07:39:54 +0000 (08:39 +0100)]
radeon/r200: drop remains of r300/r600 support along with old drm 1.x kernel
This drops all the old drmSupports* checks since KMS does them all, and it
also drop R300_CLASS and R600_CLASS.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Chia-I Wu [Fri, 23 Sep 2011 03:40:49 +0000 (11:40 +0800)]
llvmpipe: fix a crash in non-SSE path
It is a typo went unnoticed.
Chia-I Wu [Sun, 21 Aug 2011 13:47:39 +0000 (21:47 +0800)]
intel: enable GL_OES_draw_texture
Chia-I Wu [Sun, 21 Aug 2011 13:08:25 +0000 (21:08 +0800)]
meta: add _mesa_meta_DrawTex()
It is set to dd->DrawTex.
Reviewed-by: Brian Paul <brianp@vmware.com>
[olv: set dd->DrawTex in _mesa_init_driver_functions]
Marek Olšák [Sat, 29 Oct 2011 14:19:45 +0000 (16:19 +0200)]
r600g: reset the render condition to NULL when rendering unconditionally
Marek Olšák [Sat, 29 Oct 2011 15:56:12 +0000 (17:56 +0200)]
r600g: shortcut ctx->screen->ws to ctx->ws
Eric Anholt [Sat, 22 Oct 2011 19:16:44 +0000 (12:16 -0700)]
i965: Remove the prepare() hook from state atoms.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 19:16:05 +0000 (12:16 -0700)]
i965: Remove the memcpy()ed atoms array now that everything is emit()-based.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 19:11:27 +0000 (12:11 -0700)]
i965: Merge brw_validate_state() and brw_upload_state() together.
They were called back-to-back at this point.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 19:02:37 +0000 (12:02 -0700)]
i965: Remove state upload code for calling prepare() now that there are none.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 19:03:36 +0000 (12:03 -0700)]
i965: Remove some old texturing debug code.
It caught one possible bug I recall in my time working on the driver,
and we haven't been setting it for non-fixed-function since the new FS
backend came along. The bug it caught was likely a confusion about
sampler mappings, which we have tests for these days.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:57:44 +0000 (11:57 -0700)]
i965: Finally, move the global fallbacks check to emit() time.
This was the last prepare() function, and it's the first state atom,
so it must be ready to move.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:54:32 +0000 (11:54 -0700)]
i965: Move index buffer upload to emit() time.
It's consumed by the brw_emit_index_buffer() code at emit() time.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:35:56 +0000 (11:35 -0700)]
i965: Do a hack job of merging VB prepare()/emit() together.
I don't really want to touch this impenetrable code in this series, so
just call the one function from the other, since no other atom cares
about them.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:34:49 +0000 (11:34 -0700)]
i965: Move the WM input sizes calculation to emit() time.
It's used for program compile.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:33:54 +0000 (11:33 -0700)]
i965: Move program compile to emit() time.
Only 4 other prepare() functions are left, which don't rely on this.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:32:05 +0000 (11:32 -0700)]
i965/gen4: Move CURBE offset calculation to emit() time.
This is consumed by the unit state.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:21:51 +0000 (11:21 -0700)]
i965/gen4: Fold push constant prepare()/emit() together.
While other units need to know about our constant buffer offsets,
nothing else cared about which particular BO other than the emit() half.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:18:56 +0000 (11:18 -0700)]
i965/gen6: Move viewport state setup to emit() time.
Only the emit() for the pointers into the batch later in this file
cares.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:25:15 +0000 (11:25 -0700)]
i965/gen4: Move URB fence recalculate to emit() time.
This is used by the unit state, which is at emit() time.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:17:27 +0000 (11:17 -0700)]
i965: Fold the gen6/7 URB state prepare()/emit() together.
No other unit cares about the prepare state, unlike gen4-5.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:14:02 +0000 (11:14 -0700)]
i965: Move VS pull constant upload to emit() time.
Only needed by the emit() for VS surfaces.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Sat, 22 Oct 2011 18:12:43 +0000 (11:12 -0700)]
i965: Fold prepare() and emit() of VS surface state setup together.
This rearranges the code a bit, and makes the upload of the binding
table take only as many surfaces as there are in use.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>