Dan McCabe [Mon, 7 Nov 2011 23:09:40 +0000 (15:09 -0800)]
glsl: Create AST structs corresponding to new productions in grammar
Previously we added productions for:
switch_body
case_label_list
case_statement
case_statement_list
Now add AST structs corresponding to those productions.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dan McCabe [Mon, 7 Nov 2011 23:07:43 +0000 (15:07 -0800)]
glsl: Add productions to GLSL grammar for switch statement
The grammar is modified to support switch statements. Rather than follow the
grammar in the appendix, which allows case labels to be placed ANYWHERE
as a regular statement, we follow the development of the grammar as
described in the body of the GLSL spec.
In this variation, the switch statement has a body which consists of a list
of case statements. A case statement is preceded by a list of case labels and
ends with a list of statements.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dan McCabe [Mon, 7 Nov 2011 23:05:16 +0000 (15:05 -0800)]
glsl: Create AST data structures for switch statement and case label
Data structures for switch statement and case label are created that parallel
the structure of other AST data.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chia-I Wu [Sun, 6 Nov 2011 21:48:11 +0000 (14:48 -0700)]
util: add log2f for Android
It is needed for nv50's new shader backend. With this change, both u_math.h
and imports.h in core mesa define the same function. I have to #undef log2f
here to avoid the conflict. Not sure if there is a better way to deal with
the situation.
Acked-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 7 Nov 2011 23:35:38 +0000 (16:35 -0700)]
mesa: remove prog_uniform.c from SConscript
Ian Romanick [Tue, 18 Oct 2011 23:50:10 +0000 (16:50 -0700)]
Delete code made dead by previous uniform related patches
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 23:28:21 +0000 (16:28 -0700)]
mesa: Add missing check for glUniform*v count > 1 on non-array
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 23:01:49 +0000 (16:01 -0700)]
mesa: Rewrite the way uniforms are tracked and handled
Switch all of the code in ir_to_mesa, st_glsl_to_tgsi, glUniform*,
glGetUniform, glGetUniformLocation, and glGetActiveUniforms to use the
gl_uniform_storage structures in the gl_shader_program.
A couple of notes:
* Like most rewrite-the-world patches, this should be reviewed by
applying the patch and examining the modified functions.
* This leaves a lot of dead code around in linker.cpp and
uniform_query.cpp. This will be deleted in the next patches.
v2: Update the comment block (previously a FINISHME) in _mesa_uniform
about generating GL_INVALID_VALUE when an out-of-range sampler index
is specified.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Mon, 24 Oct 2011 23:37:01 +0000 (16:37 -0700)]
i965: Move _mesa_ir_link_shader call before device-specific linking
_mesa_ir_link_shader needs to be called before cloning the IR tree so
that the var->location field for uniforms is set.
WARNING: This change breaks several integer division related piglit
tests. The tests break because _mesa_ir_link_shader lowers integer
division to an RCP followed by a MUL. The fix is to factor out more
of the code from ir_to_mesa so that _mesa_ir_link_shader does not need
to be called at all by the i965 driver. This will be the subject of
several follow-on patches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 22:21:04 +0000 (15:21 -0700)]
mesa: Add log_uniform and log_program_parameters to dump data
These were both useful debugging aids while developing this code.
log_uniform will be used to keep the MESA_GLSL=uniform behavior.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 22:07:45 +0000 (15:07 -0700)]
ir_to_mesa: Add _mesa_associate_uniform_storage
Connects all of the gl_program_parameter structures with the correct
gl_uniform_storage structures.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 21:38:12 +0000 (14:38 -0700)]
mesa: Add _mesa_uniform_{attach,detach_all}_driver_storage functions
These functions are used to create and destroy the connections between
a uniform and the storage used by the driver to hold its value.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 21:29:43 +0000 (14:29 -0700)]
mesa: Add _mesa_propagate_uniforms_to_driver_storage
This function propagates the values from the backing storage of a
gl_uniform_storage structure to the driver supplied data locations.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 18:54:48 +0000 (11:54 -0700)]
linker: Track uniform locations to new tracking structures
This is just the infrastructure and the code. It's not used yet.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 18:53:19 +0000 (11:53 -0700)]
mesa: Add structures for "new style" uniform tracking in shader programs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 18:24:58 +0000 (11:24 -0700)]
linker: Add helper class for parcelling out backing storage to uniforms
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 18 Oct 2011 18:09:14 +0000 (11:09 -0700)]
linker: Add helper class for determining uniform usage
v2: Remane class count_uniform_size based on feedback from Eric:
"Maybe just "count_uniform_size"? "usage" makes me think "way it's
dereferenced" or something."
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Thu, 13 Oct 2011 20:45:39 +0000 (13:45 -0700)]
mesa: Move most of uniforms.c to uniform_query.cpp
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Fri, 14 Oct 2011 03:18:31 +0000 (20:18 -0700)]
mesa: Refactor parameter validate for GetUniform, Uniform, and UniformMatrix
v2: Update a comment block about the different treatment of
location=-1 based on feedback from Ken.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Thu, 13 Oct 2011 20:42:56 +0000 (13:42 -0700)]
mesa: Move {split,merge}_location_offset to uniforms.h
Prepend _mesa_uniform_ to the names and rework the calling
convention. The calling convention was changed for a couple reasons.
1. Having a single variable named 'location' have completely different
meanings at different places in the function is confusing. Before
calling split_location_offset the location is the encoded value
returned by glGetUniformLocation. After calling split_location_offset
it's the index of the uniform in the gl_uniform_list::Uniforms array.
2. In a later commit the original value of 'location' is needed after
split_location_offset has been called.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Wed, 12 Oct 2011 00:16:18 +0000 (17:16 -0700)]
glsl: Add new structures for tracking uniforms in linked shaders
v2: Update some comments based on feedback from Eric Anholt.
v3: Remove gl_uniform_storage::dirty field. Make
gl_uniform_storage::initialized be bool, and make
gl_uniform_storage::sampler be uint8_t.
v4: Include stdbool.h after Tom Stellard noticed a build failure that
was introduced by the changes in v2. Oops.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Wed, 12 Oct 2011 00:02:06 +0000 (17:02 -0700)]
mesa: Make get_uniform available outside compilation unit
Also rename to _mesa_get_uniform.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 11 Oct 2011 23:55:54 +0000 (16:55 -0700)]
mesa: Move the link check from _mesa_get_uniform_location to _mesa_GetUniformLocationARB
There are cases where we might want to internally query the location
of a uniform in a shader that failed linking.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 11 Oct 2011 23:15:47 +0000 (16:15 -0700)]
linker: Make invalidate_variable_locations available outside the compilation unit
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 11 Oct 2011 23:11:40 +0000 (16:11 -0700)]
glsl: Allow glsl_types.h to be included in C sources
Some C code will want access to the glsl_base_type and
glsl_sampler_dim enums in the near future.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 11 Oct 2011 22:25:00 +0000 (15:25 -0700)]
mesa: Add string_to_uint_map::clear method to clear the map
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Ian Romanick [Tue, 1 Nov 2011 22:11:12 +0000 (15:11 -0700)]
mesa: Fix error generation for glClearBuffer{i ui}v with GL_DEPTH or GL_STENCIL
The spec says "Only ClearBufferiv should be used to clear
stencil buffers." and "Only ClearBufferfv should be used to clear
depth buffers." However, on the following page it also says:
"The result of ClearBuffer is undefined if no conversion between
the type of the specified value and the type of the buffer being
cleared is defined (for example, if ClearBufferiv is called for a
fixed- or floating-point buffer, or if ClearBufferfv is called
for a signed or unsigned integer buffer). *This is not an error.*"
Emphasis mine.
Fixes problems with piglit's clearbuffer-invalid-drawbuffer test.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Sat, 5 Nov 2011 18:59:12 +0000 (12:59 -0600)]
mesa: fix the selection of soft renderbuffer color formats
This fixes a regression from the recent glReadPixels changes found
with the piglit hiz tests.
Use either MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV for color
buffers depending on endian-ness. Before, the gl_renderbuffer::Format
field was MESA_FORMAT_RGBA8888 but the data was really stored as
MESA_FORMAT_RGBA8888_REV when using a little endian machine.
Getting this right matters now that we can access renderbuffer data
without going through the span functions (namely glReadPixels() +
MapRenderbuffer()).
Brian Paul [Sat, 5 Nov 2011 18:54:06 +0000 (12:54 -0600)]
mesa: remove unneeded soft renderbuffer format-setting code
These vars will just get overwritten when we call _mesa_add_renderbuffer()
anyway. We only need to set the InternalFormat field when we create the
software renderbuffer.
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Sat, 5 Nov 2011 16:48:18 +0000 (10:48 -0600)]
mesa: fix comment typo in intel_renderbuffer
Brian Paul [Sat, 5 Nov 2011 16:48:18 +0000 (10:48 -0600)]
intel: update intel_texture_image comment
Brian Paul [Sat, 5 Nov 2011 16:48:18 +0000 (10:48 -0600)]
intel: wrap comment and fix typo
Brian Paul [Sat, 5 Nov 2011 16:48:18 +0000 (10:48 -0600)]
st/mesa: first implementation of Map/UnmapRenderbuffer()
Untested, but also unused at this point.
Brian Paul [Sat, 5 Nov 2011 16:48:18 +0000 (10:48 -0600)]
xlib: implement renderbuffer mapping/unmapping
This fixes the glReadPixels() regression for reading from the front/back
color buffers.
Note, we only allow one mapping of an XImage/Pixmap renderbuffer
at any time. That might need to be revisited in the future.
Brian Paul [Fri, 4 Nov 2011 01:56:51 +0000 (19:56 -0600)]
mesa: check for immutable texture in _mesa_test_texobj_completeness()
One of the points of GL_ARB_texture_storage is to make it impossible
to have malformed mipmap stacks. If we know the texture object is
immutable, we can skip a bunch of size checking.
Brian Paul [Fri, 4 Nov 2011 01:56:51 +0000 (19:56 -0600)]
swrast: update program type assertion
Fixes bogus failed assertion when using NV_fragment_program, such
as with demos/fplight.c
Note: This is a candidate for the 7.11 branch.
Brian Paul [Fri, 4 Nov 2011 01:56:51 +0000 (19:56 -0600)]
st/mesa: clean-up st_translate_interp()
Brian Paul [Mon, 7 Nov 2011 19:28:26 +0000 (12:28 -0700)]
st/mesa: add some null pointer checking to better handle out of memory
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Morgan Armand [Mon, 7 Nov 2011 18:38:32 +0000 (19:38 +0100)]
st/mesa: fix memory leaks
Signed-off-by: Brian Paul <brianp@vmware.com>
Morgan Armand [Mon, 7 Nov 2011 18:38:13 +0000 (19:38 +0100)]
st/mesa: fix indentation
Signed-off-by: Brian Paul <brianp@vmware.com>
Morgan Armand [Mon, 7 Nov 2011 18:37:48 +0000 (19:37 +0100)]
softpipe: fix memory leaks
This series of patches is a splitted version of my previous one, as suggested by Brian.
Signed-off-by: Brian Paul <brianp@vmware.com>
Kenneth Graunke [Mon, 7 Nov 2011 20:07:44 +0000 (12:07 -0800)]
i965: Fix Sandybridge regression introduced by workaround-free math.
Commit
a73c65c5342bf41fa0dfefe7daa9197ce6a11db4 had a typo which
accidentally enabled the workaround-free Gen7 code on Gen6.
Fixes GPU hangs in anything using pow() or integer division/modulus.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Tue, 18 Oct 2011 19:24:47 +0000 (12:24 -0700)]
i965: Enable faster workaround-free math on Ivybridge.
According to the documentation, Ivybridge's math instruction works in
SIMD16 mode for the fragment shader, and no longer forbids align16 mode
for the vertex shader.
The documentation claims that SIMD16 mode isn't supported for INT DIV,
but empirical evidence shows that it works fine. Presumably the note
is trying to warn us that the variant that returns both quotient and
remainder in (dst, dst + 1) doesn't work in SIMD16 mode since dst + 1
would be sechalf(dst), trashing half your results. Since we don't use
that variant, we don't care and can just enable SIMD16 everywhere.
The documentation also still claims that source modifiers and
conditional modifiers aren't supported, but empirical evidence and
study of the simulator both show that they work just fine.
Goodbye workarounds. Math just works now.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Marek Olšák [Fri, 4 Nov 2011 18:12:16 +0000 (19:12 +0100)]
mesa: add missing checks to compute_version
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fabio Pedretti [Mon, 7 Nov 2011 09:21:38 +0000 (09:21 +0000)]
radeon: cleanup radeon shared code after r300 and r600 classic drivers removal
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kenneth Graunke [Tue, 1 Nov 2011 22:30:52 +0000 (15:30 -0700)]
i965: Fix struct vs class warnings in brw_fs_vector_splitting.cpp.
Makes clang happier.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Dave Airlie [Sun, 6 Nov 2011 20:55:25 +0000 (20:55 +0000)]
llvmpipe: fix typo in the depth sampling aos code.
Just found by reading llvmpipe code for no great reason.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 6 Nov 2011 19:33:00 +0000 (19:33 +0000)]
llvmpipe: enable RGTC after u_format fix.
The two piglit tests pass + render correctly.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 6 Nov 2011 19:32:22 +0000 (19:32 +0000)]
u_format: fix RGTC support in fits 8unorm.
Signed RGTC won't fit in a unorm, so don't allow them.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Chia-I Wu [Sun, 6 Nov 2011 13:59:47 +0000 (06:59 -0700)]
scons: add CPP_SOURCES for nv50/nvc0
Chia-I Wu [Sun, 6 Nov 2011 14:02:04 +0000 (07:02 -0700)]
android: add CPP_SOURCES for nv50/nvc0
Chia-I Wu [Sun, 6 Nov 2011 14:43:32 +0000 (07:43 -0700)]
android: reorder nouveau pipe drivers
To match targerts/dri-nouveau, and to fix a potential
"undefined reference to `nv50_ir::getTargetNVC0(unsigned int)'"
error.
Dave Airlie [Sun, 6 Nov 2011 19:38:50 +0000 (19:38 +0000)]
gl3.txt: update for ARB_texture_storage.
As per Brian's suggestion.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 6 Nov 2011 12:49:21 +0000 (12:49 +0000)]
r600g: add initial linestipple support.
It seems line loop stipple in hardware needs something I don't know, it might
need a proper geometry shader who knows.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Christian Inci [Sun, 6 Nov 2011 07:32:54 +0000 (07:32 +0000)]
gallivm: change sys::getHostTriple to sys::getDefaultTargetTriple for LLVM >= 0x0301
LLVM change r143502
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Vinson Lee [Fri, 4 Nov 2011 04:10:45 +0000 (21:10 -0700)]
g3dvl: Fix memory leaks on error paths.
Fixes Coverity resource leak defect.
Reviewed-by: Brian Paul <brianp@vmware.com>
Vinson Lee [Fri, 4 Nov 2011 03:55:10 +0000 (20:55 -0700)]
pp: Reorder calloc to avoid memory leak on error path.
Fixes Coverity resource leak defect.
Reviewed-by: Brian Paul <brianp@vmware.com>
Vadim Girlin [Fri, 4 Nov 2011 17:24:03 +0000 (21:24 +0400)]
r600g: move SPI setup to PS setup
SPI semantic indices for PS/VS are now static, so we don't
need to update spi config for every shaders combination. We can move
the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps.
Flatshade state is now controlled by the global FLAT_SHADE_ENA flag
instead of updating FLAT_SHADE for all inputs.
Sprite coord still requires the update of spi setup when
sprite_coord_enable is first changed from zero (enabled), and then
only when it's changed to other non-zero value (enabled for other input).
Change to zero (disabling) and back to the same value is handled via
global SPRITE_COORD_ENA.
New field "sprite_coord_enable" added to "struct r600_pipe_shader"
to track current state for the pixel shader. It's checked in the
r600_update_derived_state.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Vadim Girlin [Sat, 5 Nov 2011 04:48:02 +0000 (08:48 +0400)]
r600g: precalculate semantic indices for SPI setup
There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.
TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Matt Turner [Sat, 5 Nov 2011 21:11:59 +0000 (17:11 -0400)]
docs: fix grammar and punctuation in llvmpipe docs.
Dave Airlie [Sat, 5 Nov 2011 17:18:34 +0000 (17:18 +0000)]
gl3.txt: add not of ARB_texture_storage work started.
José Fonseca [Sat, 5 Nov 2011 10:38:16 +0000 (10:38 +0000)]
docs: Update llvmpipe docs.
Recommend LLVM 2.9, it has been working quite well, and unlike earlier
versions, it works out-of-the-box without patches.
Update Windows instructions.
Chia-I Wu [Sat, 5 Nov 2011 07:09:36 +0000 (15:09 +0800)]
configure.ac: gbm_gallium requires DRI_LIB_DEPS to link
gbm_gallium does not depend on DRI, but its build rules depend on DRI_LIB_DEPS
being set. Output an error when the user enables gbm_gallium but disables
DRI. This is just a workaround.
Chia-I Wu [Fri, 4 Nov 2011 08:32:17 +0000 (16:32 +0800)]
shared-glapi: fix a linking error for SELinux
Link with -lselinux when SELinux is enabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41571
Alex Deucher [Fri, 4 Nov 2011 22:33:31 +0000 (18:33 -0400)]
Revert "r600g: precalculate semantic indices for SPI setup"
This reverts commit
c15f8569fddac5f8aee77863922fd5bb992cfe8a.
This breaks r6xx.
Alex Deucher [Fri, 4 Nov 2011 22:32:42 +0000 (18:32 -0400)]
Revert "r600g: move SPI setup to PS setup"
This reverts commit
9804cf3118ae7249098af2a9c78b36f4fb576ee4.
This breaks r6xx.
Brian Paul [Fri, 4 Nov 2011 20:36:59 +0000 (14:36 -0600)]
svga: fix varying var remapping for unused FS outputs
If the VS has outputs that aren't consumed by the FS we were mapping
them all to one unused VS output index, but that's illegal. Instead,
map unused VS outputs to unique indexes.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 4 Nov 2011 19:39:19 +0000 (13:39 -0600)]
svga: add comments and reformat code in svga_tgsi_decl_sm30.c
Marek Olšák [Fri, 4 Nov 2011 17:10:16 +0000 (18:10 +0100)]
st/mesa: set geometry shader to NULL when doing internal drawing
The code expects the geometry shader to be NULL.
We don't have geometry shaders now, but it's good to be prepared.
v2: check for support in the cso context
José Fonseca [Fri, 4 Nov 2011 16:57:09 +0000 (16:57 +0000)]
mesa/st: Be nice with the stack -- use malloc for large structures/arrays.
st_translate_program's data was taking 51K off the stack, causing stack
overflow on Windows.
George Sapountzis [Fri, 4 Nov 2011 14:35:49 +0000 (16:35 +0200)]
dri: cosmetic
To smooth minor diff between dri_util & drisw_util
George Sapountzis [Fri, 4 Nov 2011 14:25:51 +0000 (16:25 +0200)]
dri_util: move drawable functions
George Sapountzis [Fri, 4 Nov 2011 14:24:19 +0000 (16:24 +0200)]
dri_util: move context functions
George Sapountzis [Fri, 4 Nov 2011 14:19:22 +0000 (16:19 +0200)]
dri_util: move context functions
George Sapountzis [Fri, 4 Nov 2011 14:14:58 +0000 (16:14 +0200)]
dri_util: move screen functions
This is to reorder as screen/context/drawable similar to drisw_util
George Sapountzis [Thu, 3 Nov 2011 12:38:31 +0000 (14:38 +0200)]
dri: drop stray includes and typedef
George Sapountzis [Thu, 3 Nov 2011 12:19:41 +0000 (14:19 +0200)]
dri: move __driUtilMessage to xmlconfig.c
__driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now
George Sapountzis [Thu, 3 Nov 2011 11:57:41 +0000 (13:57 +0200)]
dri: drop drisw_util.h
George Sapountzis [Thu, 3 Nov 2011 11:14:31 +0000 (13:14 +0200)]
dri: reorder as driver,screen,context,drawable
George Sapountzis [Thu, 3 Nov 2011 11:11:55 +0000 (13:11 +0200)]
dri: unify __DRIcontextRec, __DRIdrawableRec
George Sapountzis [Thu, 3 Nov 2011 11:04:57 +0000 (13:04 +0200)]
dri: unify __DRIscreenRec
Also drop DriverAPI field, this is a static symbol and I don't see why it
should be accessed through __DRIscreenRec
George Sapountzis [Thu, 3 Nov 2011 10:46:08 +0000 (12:46 +0200)]
dri: unify __DriverAPIRec
I dropped the comments because they don't add much.
George Sapountzis [Thu, 3 Nov 2011 09:59:57 +0000 (11:59 +0200)]
dri: drop drmLock remnants
George Sapountzis [Wed, 2 Nov 2011 16:01:01 +0000 (18:01 +0200)]
dri: drop DRI_VALIDATE macros
Marek Olšák [Fri, 4 Nov 2011 17:05:19 +0000 (18:05 +0100)]
gallium/cso_cache: remove one call to pipe_sampler_view_reference
Vadim Girlin [Fri, 4 Nov 2011 17:24:03 +0000 (21:24 +0400)]
r600g: move SPI setup to PS setup
SPI semantic indices for PS/VS are now static, so we don't
need to update spi config for every shaders combination. We can move
the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps.
Flatshade state is now controlled by the global FLAT_SHADE_ENA flag
instead of updating FLAT_SHADE for all inputs.
Sprite coord still requires the update of spi setup when
sprite_coord_enable is first changed from zero (enabled), and then
only when it's changed to other non-zero value (enabled for other input).
Change to zero (disabling) and back to the same value is handled via
global SPRITE_COORD_ENA.
New field "sprite_coord_enable" added to "struct r600_pipe_shader"
to track current state for the pixel shader. It's checked in the
r600_update_derived_state.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 4 Nov 2011 17:24:02 +0000 (21:24 +0400)]
r600g: precalculate semantic indices for SPI setup
There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.
TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
José Fonseca [Fri, 4 Nov 2011 20:07:26 +0000 (20:07 +0000)]
svga: Tighten the register file assertions.
Untested. But should fix fdo 42576.
Dave Airlie [Fri, 4 Nov 2011 17:13:53 +0000 (17:13 +0000)]
radeon/r200: strip texture borders.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 4 Nov 2011 17:12:02 +0000 (17:12 +0000)]
radeon/r200: fix r100/r200 blit to use the offsets.
This is needed to do proper renderbuffer operation on mipmaps.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 4 Nov 2011 10:47:40 +0000 (10:47 +0000)]
radeon: drop mtface/mtlevel, use ones in base class.
This just uses the base class copies.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Fri, 4 Nov 2011 17:06:04 +0000 (18:06 +0100)]
u_vbuf_mgr: avoid one call to pipe_resource_reference in most cases
José Fonseca [Fri, 4 Nov 2011 08:54:55 +0000 (08:54 +0000)]
swrast: Avoid void * arithmetic.
An error with MSVC.
Eric Anholt [Wed, 19 Oct 2011 17:31:40 +0000 (10:31 -0700)]
i965/gen6: Improve glReadPixels() performance by blitting to a linear temp.
The readpixels microbenchmark in mesa-demos goes from 47Mpix/sec at
1000x1000 to 450Mpix/sec. The 10x10 sizes stay about the same.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Mon, 31 Oct 2011 23:59:05 +0000 (16:59 -0700)]
intel: Add safety asserts for the blit engine's pitch alignment requirements.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Wed, 19 Oct 2011 17:39:15 +0000 (10:39 -0700)]
intel: Don't force a batchbuffer flush in readpixels.
Renderbuffer mapping handles flushing the batchbuffer if required, so
all we need to do is make sure any pending rendering has reached the
batchbuffer.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Mon, 17 Oct 2011 16:39:48 +0000 (09:39 -0700)]
radeon: Remove early dereference of src/dst width in glCopyTexSubImage.
There doesn't appear to be any particular reason for this -- it's not
like the width is changing between the deref and the use.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Thu, 13 Oct 2011 17:34:56 +0000 (10:34 -0700)]
swrast: Drop the global mapping of buffers across glReadPixels().
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Thu, 13 Oct 2011 17:25:15 +0000 (10:25 -0700)]
swrast: Drop the remaining GetRow-based glReadPixels() fast-path.
In all of piglit, only two tests hit it (reading to RGBA float, where
GetRow would drop floats into place from R, RG, or RGB). Mostly this
is because _ColorReadClamp has been causing transferOps to always be
set, skipping any fast-paths anyway.
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Thu, 13 Oct 2011 16:56:34 +0000 (09:56 -0700)]
swrast: Remove dead _swrast_read_depth_span_uint().
All the code using it is converted to MapRenderbuffer and the core
unpack functions.
Reviewed-by: Brian Paul <brianp@vmware.com>