OSDN Git Service
Eric Anholt [Fri, 19 Oct 2012 18:21:18 +0000 (11:21 -0700)]
i965/fs: Fix typo in refactor of brw_fs_reg_allocate.cpp.
I'm amazed that my usual warnings check didn't catch this, and that this
passed piglit.
Tapani Pälli [Fri, 19 Oct 2012 06:45:20 +0000 (09:45 +0300)]
i965/vs: include format argument in debug printf
otherwise some compilers will throw error
"error: format not a string literal and no format arguments"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Michel Dänzer [Fri, 19 Oct 2012 09:59:35 +0000 (11:59 +0200)]
st/mesa: Fix source miptree level for copying data to finalized miptree.
Fixes WebGL texture mips conformance test, no piglit regressions.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912
NOTE: This is a candidate for the stable branches.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Francisco Jerez [Fri, 19 Oct 2012 09:29:40 +0000 (11:29 +0200)]
clover: No need for clover::is_zero() to be a functor.
Simplify is_zero() somewhat, and as a side effect work around a gcc compiler
bug that causes build failure.
https://bugs.freedesktop.org/show_bug.cgi?id=56140
Reported-by: Dmitry Cherkassov <dcherkassov@gmail.com>
Brian Paul [Fri, 19 Oct 2012 00:00:50 +0000 (18:00 -0600)]
st/mesa: improve the guess_and_alloc_texture() heuristic
If GL_BASE_LEVEL==0 and GL_MAX_LEVEL==0 that's a pretty good hint that
there'll be a single mipmap level in the texture.
Google Earth sets the texture's state this way before the first glTexImage
call. This saves a bit of texture memory.
Marek Olšák [Wed, 17 Oct 2012 15:01:37 +0000 (17:01 +0200)]
gallium: remove unused data pointer from pipe_transfer
Reviewed-by: Brian Paul <brianp@vmware.com>
Chad Versace [Fri, 12 Oct 2012 18:11:57 +0000 (11:11 -0700)]
intel: Skip texsubimage fastpath for more pixel unpack state (v2)
Fixes piglit tests "unpack-teximage2d --pbo=* --format=GL_BGRA" on
Sandybridge+.
The fastpath was checking an incomplete set of pixel unpack state. This
patch adds checks for all the fields of gl_pixelstore_attrib that affect
2D texture uploads. Also, it begins permitting the case where
GL_UNPACK_ROW_LENGTH is 0.
Ideally, we would just ask a unicorn to JIT this fastpath for us in
a way that safely handles the unpacking state. Until then, it's safer if
only a small set of situations activate the fastpath.
v2: Use _mesa_is_bufferobj(), per Anholt.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Matt Turner [Wed, 17 Oct 2012 02:37:34 +0000 (19:37 -0700)]
Finish _HAVE_FULL_GL removal
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dmitry Cherkasov [Wed, 17 Oct 2012 18:03:13 +0000 (22:03 +0400)]
configure.ac: Fix LLVM 3.2 r600/radeonsi error message
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Dmitry Cherkasov <Dmitrii.Cherkasov@amd.com>
Brian Paul [Wed, 17 Oct 2012 15:55:54 +0000 (09:55 -0600)]
svga: add svga_screen_cache_dump() debug helper
Kristian Høgsberg [Tue, 16 Oct 2012 18:30:53 +0000 (14:30 -0400)]
wayland: Drop support for ill-defined, unused wl_egl_pixmap
It doesn't provide the cross-process buffer sharing that a window system
pixmap could otherwise support and we don't have anything left that uses
this type of surface.
Kristian Høgsberg [Tue, 16 Oct 2012 18:04:02 +0000 (14:04 -0400)]
wayland: Remove 0.85 compatibility #ifdefs
Kristian Høgsberg [Thu, 11 Oct 2012 02:10:42 +0000 (22:10 -0400)]
egl/wayland: Update to Wayland 0.99 API
The 0.99.0 Wayland release changes the event API to provide a thread-safe
mechanism for receiving events specific to a subsystem (such as EGL) and
we need to use it in the EGL platform.
The Wayland protocol now also requires a commit request to make changes
take effect, issue that from eglSwapBuffers.
Eric Anholt [Wed, 3 Oct 2012 02:07:20 +0000 (19:07 -0700)]
i965/fs: Statically allocate the reg_sets at context initialization.
Now that we've replaced all the variable settings other than reg_width, it's
easy to hang on to this (the expensive part of setting up the allocator).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 2 Oct 2012 23:31:51 +0000 (16:31 -0700)]
i965/fs: Allocate registers in the unused parts of the gen7 MRF hack range.
This should also reduce register pressure on gen7+, like the previous commit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 2 Oct 2012 22:01:24 +0000 (15:01 -0700)]
i965/fs: Reduce the interference between payload regs and virtual GRFs.
Improves performance of the Lightsmark penumbra shadows scene by 15.7% +/-
1.0% (n=15), by eliminating register spilling. (tested by smashing the list of
scenes to have all other scenes have 0 duration -- includes additional
rendering of scene description text that normally doesn't appear in that
scene)
v2: Allow allocation of all but g0/g1 of the payload.
v3: Pull count_to_loop_end() out to a helper function.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v2, recommended v3)
Eric Anholt [Tue, 2 Oct 2012 00:54:10 +0000 (17:54 -0700)]
i965/fs: Expose the payload registers to the register allocator.
For now, nothing else can get allocated over them, but that will change.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Mon, 1 Oct 2012 23:41:02 +0000 (16:41 -0700)]
i965/fs: Remove extra allocation for classes[].
This was to slot in the magic aligned pairs class, but it got moved to a
descriptive name later.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Mon, 1 Oct 2012 23:39:54 +0000 (16:39 -0700)]
i965/fs: Make the register allocation class_sizes[] choice static.
Based on split_virtual_grfs(), we choose the same set every time, so set it in
stone. This will help us avoid regenerating the somewhat expensive
class/register set setup every compile.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 20:44:12 +0000 (13:44 -0700)]
i965/vs: Improve live interval calculation.
This is derived from the FS visitor code for the same, but tracks each channel
separately (otherwise, some typical fill-a-channel-at-a-time patterns would
produce excessive live intervals across loops and cause spilling).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48375
(crash -> failure, can turn into pass by forcing unrolling still)
Eric Anholt [Wed, 3 Oct 2012 23:15:07 +0000 (16:15 -0700)]
i965/vs: Fix the mlen of scratch read/write messages.
These messages always have m0 = g0 and m1 = offset, and write has m2 = data.
Avoids regression in opt_compute_to_mrf() with a change to scratch writes to
set up the data as an MRF write in the IR.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 20:17:58 +0000 (13:17 -0700)]
i965: Make the cfg reusable from the VS.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 20:23:05 +0000 (13:23 -0700)]
i965: Share the predicate field between FS and VS.
Note that BRW_PREDICATE_NONE is 0 and BRW_PREDICATE_NORMAL is 1, so that's a
lot like the true/false we had in the FS before.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 20:16:09 +0000 (13:16 -0700)]
i965: Rename fs_cfg types to not mention fs.
fs_bblock_link -> bblock_link
fs_bblock -> bblock_t (to avoid conflicting with all the fs_bblock *bblock)
fs_cfg -> cfg_t (to avoid conflicting with all the fs_cfg *cfg)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 20:03:12 +0000 (13:03 -0700)]
i965: Move brw_fs_cfg.* to brw_cfg.*.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 20:01:23 +0000 (13:01 -0700)]
i965: Make the FS and VS share a few visitor/instruction fields.
This will let us reuse brw_fs_cfg.cpp from brw_vec4_*.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 16 Oct 2012 00:51:59 +0000 (17:51 -0700)]
i965/vs: Trim the swizzle of the scratch write temporary.
This fixes confusion by the upcoming live variable analysis which saw e.g. use
of temp.w when only temp.xyz were initialized in the basic block, and
concluded that temp.w must have come from outside of the block (even though it
was never initialized anywhere).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 16 Oct 2012 00:48:07 +0000 (17:48 -0700)]
i965/vs: Do the temporary allocation in emit_scratch_write().
Both callers were doing basically the same thing, just written differently.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 16 Oct 2012 00:42:43 +0000 (17:42 -0700)]
i965/vs: Simplify emit_scratch_write() prototype.
Both callers used (effectively) inst->dst as the argument, so just reference
it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 3 Oct 2012 23:11:26 +0000 (16:11 -0700)]
i965/vs: Add a little bit of IR-level debug ability.
This is super basic, but it let me visualize a problem I had with
opt_compute_to_mrf().
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Adam Jackson [Wed, 17 Oct 2012 18:34:53 +0000 (14:34 -0400)]
glx: Add GLXBadProfileARB to the error string list
Note: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Owen W. Taylor [Wed, 17 Oct 2012 04:50:28 +0000 (00:50 -0400)]
glx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()
Due to a string mismatch, INTEL_swap_event wasn't listed among GLX
extensions for the connection, even when present on both client and
server. That is, glXQueryServerString and glXGetClientString reported the
extension, but glXQueryExtensionsString did not.
Note: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56057
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
José Fonseca [Wed, 17 Oct 2012 14:38:50 +0000 (15:38 +0100)]
gallivm: Hide AVX support when requested by LP_NATIVE_VECTOR_WIDTH or unsupported by LLVM.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Will Schmidt [Thu, 4 Oct 2012 21:25:52 +0000 (16:25 -0500)]
gallivm: Use mcjit for ppc_64 architecture
Per commentary and direction in the LLVM community, support for ppc64 is
going into MCJIT rather than the old JIT. There is no existing support
in prior llvm versions, so no need to specify LLVM version numbers.
Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:33:08 +0000 (18:33 -0600)]
st/mesa: silence MSVC signed/unsigned comparison warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
st/mesa: silence MSVC double/unsigned assignment warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
tgsi: silence MSVC signed/unsigned comparison warnings
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util: fix MSVC signed/unsigned comparison warning in u_upload_mgr.c code
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util: fix MSVC signed/unsigned comparison warning in u_vbuf.c code
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util: fix MSVC double/float conversion warning in u_format_r11g11b10f.h
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
draw: silence MSVC signed/unsigned comparison warnings
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:57 +0000 (18:32 -0600)]
util/blitter: silence assorted MSVC warnings
Fix signed/unsigned comparison warnings and float/int assignment warnings.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 17 Oct 2012 00:32:56 +0000 (18:32 -0600)]
wmesa: remove old, unused span code
José Fonseca [Wed, 17 Oct 2012 14:28:26 +0000 (15:28 +0100)]
scons: Fix graw-xlib lib order.
Avoids "undefined symbol: XShmCreateImage" error.
José Fonseca [Wed, 17 Oct 2012 14:27:26 +0000 (15:27 +0100)]
tgsi: Add support to parse IMM[x] too.
Thanks to Brian for pointing this out.
José Fonseca [Wed, 17 Oct 2012 14:04:20 +0000 (15:04 +0100)]
Revert "gallivm: Don't use llvm.x86.avx.max/min.ps.256 inadvertently."
This reverts commit
bf2edc776b02a2a63862bf69a23adf666ecfcc57.
Vinson Lee [Fri, 12 Oct 2012 01:19:49 +0000 (18:19 -0700)]
build: Build on Cygwin with gnu99 instead of c99.
The GCC c99 standard on Cygwin sets __STRICT_ANSI__ and symbols such as
strdup are not available.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Matt Turner [Mon, 15 Oct 2012 18:20:40 +0000 (11:20 -0700)]
es2api: Add GL ES 3 headers
Matt Turner [Mon, 15 Oct 2012 22:09:38 +0000 (15:09 -0700)]
glapi: Add es2="3.0" attributes to XML.
Note that we are missing the ARB_internalformat_query extension, which
provides the glGetInternalformativ function needed by GL ES 3.0.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: whitespace fixes, remove useless comments
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC warning about negating an unsigned value
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC double/float assignment warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: fix MSVC double/float parameter warning
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC float/int assignment warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence MSVC double/float assignment warnings
Brian Paul [Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)]
svga: silence some MSVC signed/unsigned comparison warnings
Ian Romanick [Mon, 15 Oct 2012 22:22:57 +0000 (15:22 -0700)]
mesa/tests: Add ES1.1 dispatch table sanity test
This test actually depends on FEATURE_ES1 because
_mesa_create_exec_table_es1 doesn't exist without it.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Ian Romanick [Mon, 15 Oct 2012 22:00:53 +0000 (15:00 -0700)]
mesa/tests: Compile ES2 test regardless of FEATURE_ES2 setting
The relevant ES2 code is always in Mesa. Always building the tests
ensures that things aren't accidentally broken when people don't build
with --enable-es2.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Sun, 23 Sep 2012 00:45:37 +0000 (18:45 -0600)]
mesa: remove FEATURE_ES1 tests in enable.c code
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Sun, 23 Sep 2012 00:45:36 +0000 (18:45 -0600)]
mesa: remove FEATURE_ES test in _mesa_get_compressed_formats()
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Sun, 23 Sep 2012 00:45:35 +0000 (18:45 -0600)]
mesa: remove FEATURE_ES test in _mesa_is_compressed_format()
The code already has a runtime ES1 test.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Sun, 23 Sep 2012 00:45:34 +0000 (18:45 -0600)]
mesa: remove FEATURE_GL test from updated_drawbuffers()
There's already a runtime test for full OpenGL.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Sun, 23 Sep 2012 00:45:33 +0000 (18:45 -0600)]
mesa: remove #if _HAVE_FULL_GL checks
This is basically more of the "remove FEATURE_x" clean-up.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Sun, 23 Sep 2012 00:45:32 +0000 (18:45 -0600)]
mesa: remove ASSERT_NO_FEATURE macro
Was only used in one place.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 8 Aug 2012 16:03:26 +0000 (09:03 -0700)]
i965: Fix rendering to small mipmaps of depth/stencil buffers using a temp mt.
Fixes 51 piglit tests (fbo-clear-formats, and most of the remaining failures
in depthstencil).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 7 Aug 2012 23:53:24 +0000 (16:53 -0700)]
i965: Share the draw x/y offset masking code between main/blorp and all gens.
This code is twisty, and the comment before most of the blocks was actually
giving me the opposite impression from its intention: We want to apply as much
of our offset as possible through coarse tile-aligned adjustment, since we can
do so independently per buffer, and apply the minimum we can through
fine-grained drawing offset x/y, since it has to agree between all buffers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 8 Aug 2012 16:29:46 +0000 (09:29 -0700)]
i965: Make a helper function for the renderbuffer temporary mt workaround.
We now have a case of wanting to do that on gen6+ as well, so make this logic
usable elsewhere.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 12 Oct 2012 19:53:08 +0000 (12:53 -0700)]
i965: Warn on a couple of workarounds in blending.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 12 Oct 2012 19:41:56 +0000 (12:41 -0700)]
intel: Add a macro for printing a debug warning once.
There are a number of places where some obscure piece of the code is not
currently worth fixing, and we have some workaround behavior available. It's
nicer for users to do some lame workaround than to just assert, but without
asserts we never knew when the workaround was at fault.
This should give us a nice compromise: Execute the workaround, but mention
that the obscure workaround was hit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Andreas Boll [Tue, 16 Oct 2012 19:24:04 +0000 (21:24 +0200)]
docs: add note about removal of GL_NV_fragment_program
Paul Berry [Wed, 10 Oct 2012 23:59:20 +0000 (16:59 -0700)]
glapi: Delete gles_api.py, since it is no longer used.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 23:31:01 +0000 (16:31 -0700)]
mapi_abi: Use GLES information from XML rather than gles_api.py.
Note: mapi_abi can consume API information from either XML or a .csv
file. A side effect of this change is that the ES1 and ES2 API
printers can only be used with XML input now. That's ok, since the
.csv input format is only used for the OpenVG API.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 22:19:21 +0000 (15:19 -0700)]
mapi_abi: Override 'hidden' and 'handcode' attributes using polymorphism.
Previously, the ES1, ES2, and shared GLAPI printers passed a list of
function names to the base class constructor, which was used by the
_override_for_api() function to loop over all the API functions and
adjust their 'hidden' and 'handcode' attributes as appropriate for the
API flavour being code-generated.
This patch lifts the loop from _override_for_api() into its caller,
and makes it into a polymorphic function, so that the derived classes
can customize its behaviour directly. In a future patch, this will
allow us to override the 'hidden' and 'handcode' attributes based on
information from the XML rather than a list of functions.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 22:10:00 +0000 (15:10 -0700)]
mapi_abi: Get rid of unnecessary copy.
Previously, _get_api_entries() would make a deep copy of each element
in the entries table before modifying the 'hidden' and 'handcode'
attributes. This was unnecessary, since the entries aren't used again
after this function. Removing the copy simplifies the code, because
it is no longer necessary to adjust the alias pointers to point to the
copied entries.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 22:07:00 +0000 (15:07 -0700)]
mapi_abi: Remove sanity check that all GLES functions are present.
Currently mapi_abi.py uses hardcoded lists of function names (in
gles_api.py) to determine which functions need to be included in the
GLES 1 or GLES 2 API. This patch removes a sanity check which
verified that all GLES functions listed in the hardcoded lists were
actually present in the XML.
Later patches in this series will modify mapi_abi.py to determine
which functions need to be included in the GLES 1 or GLES 2 API based
directly on the XML. Once that is done, the sanity check will be
redundant. Removing the sanity check now will simplify the patches to
come.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 21:52:48 +0000 (14:52 -0700)]
mapi_abi: Collect all imports at top of file.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 23:48:08 +0000 (16:48 -0700)]
glapi: Use GLES information from XML rather than gles_api.py.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 23:48:08 +0000 (16:48 -0700)]
glapi: Read GLES information from XML.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 23:28:42 +0000 (16:28 -0700)]
glapi: Add es1 and es2 attributes to XML.
Currently, the set of functions which exist in GLES1 or GLES2 is
determined by hardcoded lists of function names in gles_api.py. This
patch encodes that information into the XML files using new
attributes, es1 and es2.
The es1 attribute denotes the first version of GLES 1 in which the
function exists (e.g. es1="1.1" means the function exists in GLES 1.1
but not GLES 1.0). "none" (the default) means the function is not
available in any version of GLES 1.
The es2 attribute denotes the first version of GLES 2/3 in which the
function exists (e.g. es2="2.0" means the function exists in both GLES
2.0 and GLES 3.0). "none" (the default) means the function is not
available in any version of GLES 2 or GLES 3.
Note that since GLES 3 is a strict superset of GLES 2, there is no
need for a separate attribute for it; instead, 'es2="3.0"' should be
used to denote functions that are present in GLES 3 but not GLES 2.
This patch only adds information about GLES versions 1.0, 1.1, and
2.0.
Later patches will modify the python code generation scripts to use
this information rather than the hardcoded lists in gles_api.py.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Wed, 10 Oct 2012 18:01:35 +0000 (11:01 -0700)]
glapi: use new-style Python classes.
An unfortunate quirk of Python 2 is that there are two types of
classes: "classic" classes (which are backward compatible with some
unfortunate design decisions made early in Python's history), and
"new-style" classes. Classic classes have a number of limitations
(for example they don't support super()) and are unavailable in Python
3. There's really no reason to use classic classes, except in
unmaintained legacy code. For more information see
http://www.python.org/download/releases/2.2.3/descrintro/.
This patch upgrades the Python code in src/mapi/glapi/gen to use
exclusively new-style classes.
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 15 Oct 2012 19:00:38 +0000 (12:00 -0700)]
i965/fs: Fix segfault when using INTEL_DEBUG=perf with non-GLSL.
Now that ARB programs and fixed function are routed through the new
backend, shader might be NULL. Don't do INTEL_DEBUG=perf support in
that case, since it relies on shader->compiled_once.
Since INTEL_DEBUG=perf wasn't previously supported, this maintains the
status quo. It might be nice to support it someday, however.
This could be moved to brw_shader_program instead of brw_shader, but
it appears even prog can be NULL in that case.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Thu, 20 Sep 2012 21:27:29 +0000 (14:27 -0700)]
mesa: Don't flatten IF statements by default.
MaxIfDepth of 0 means "flatten all the time", not "never flatten".
This is only desirable on hardware that can't support control flow;
software rasterization and most hardware drivers want this.
This alters behavior for swrast as well as i915. Tested on i915.
NOTE: This is a candidate for stable release branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Mon, 15 Oct 2012 00:04:01 +0000 (17:04 -0700)]
mesa: Remove PROGRAM_WRITE_ONLY register type.
More dead code. I'm not sure what it was for.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 11 Oct 2012 00:07:53 +0000 (17:07 -0700)]
mesa: Remove dead _mesa_num_parameters_of_type() function.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 11 Oct 2012 00:06:41 +0000 (17:06 -0700)]
mesa: Remove dead _mesa_add_attribute() function.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 23:56:42 +0000 (16:56 -0700)]
mesa: Remove remnants of PROGRAM_VARYING.
The previous patch removed the producer of things in this file.
Since there aren't any, we can remove it.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 11 Oct 2012 00:04:33 +0000 (17:04 -0700)]
mesa: Remove dead _mesa_add_varying() function.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 11 Oct 2012 00:02:45 +0000 (17:02 -0700)]
mesa: Remove dead program_parameter::Flags field.
All flags are now gone, so we can stop storing and passing this around.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 15 Oct 2012 18:10:47 +0000 (11:10 -0700)]
st/mesa: Remove the PROG_PARAM_BIT_CYL_WRAP flag. [v2]
Nobody ever set the flag, which makes this dead code.
v2: Leave the ureg_DECL_fs_input_cyl function in place, even though it's
unused, since VMWare uses it for their internal projects.
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Wed, 10 Oct 2012 23:52:23 +0000 (16:52 -0700)]
mesa: Remove GLSL-related PROG_PARAM_BIT flags.
GLSL doesn't use the program code anymore. Accordingly, there were no
consumers of these flags, so there's no need to define them.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 23:43:15 +0000 (16:43 -0700)]
mesa: Remove support for named parameters.
These were only part of NV_fragment_program, so we can kill them.
The fact that PROGRAM_NAMED_PARAM appears in r200_vertprog.c is rather
comedic, but also demonstrates that people just spam the various types
of parameters everywhere because they're confusing.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 23:36:21 +0000 (16:36 -0700)]
driconf: Remove force enable for NV_vertex_program.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 23:27:51 +0000 (16:27 -0700)]
mesa: Remove yet more remnants of NV_fragment_program.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 23:12:47 +0000 (16:12 -0700)]
mesa: Remove some miscellaneous NV program stuff from arbprogram.c.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 22:58:17 +0000 (15:58 -0700)]
mesa: Simplify _mesa_BindProgram() by removing NV program remnants.
Without NV programs, there's no need for the compatible_program_targets
function. A simple (non-)equality check will do.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 22:53:06 +0000 (15:53 -0700)]
mesa: Remove get and enable bits for NV_fragment_program.
Also remove a leftover remnant from NV_vertex_program.
v2: Update for Imre's get changes.
Reviewed-by: Brian Paul <brianp@vmware.com> [v1]
Reviewed-by: Eric Anholt <eric@anholt.net> [v1]
Kenneth Graunke [Sun, 14 Oct 2012 22:39:04 +0000 (15:39 -0700)]
mesa: Remove prog_print support for NV programs.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 22:36:07 +0000 (15:36 -0700)]
mesa: Remove support for parsing NV fragment programs.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 22:30:40 +0000 (15:30 -0700)]
mesa: Remove the gl_program::Resident flag.
It apparently was only used for NV programs.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sun, 14 Oct 2012 22:24:55 +0000 (15:24 -0700)]
mesa: Remove the EmitNVTempInitialization shader compiler option.
Nobody uses it anymore.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>