summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-2344-492/+277
| | | | | | | | | | | | The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* svga: remove unneeded include of u_double_list.hBrian Paul2013-10-231-2/+0
|
* i965: Expose write_reg() as brw_store_register_mem64().Kenneth Graunke2013-10-232-9/+11
| | | | | | | | | | | | Writing a 64-bit register value to memory is sufficiently complicated that it makes sense to reuse this function rather than duplicating it. Exposing it outside of gen6_queryobj.c means it needs a more descriptive function name. It could probably be moved to brw_util.c or somewhere else, but this works too. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Move flushing out of write_reg and into the callers.Kenneth Graunke2013-10-231-4/+8
| | | | | | | | | | The current callers just want to write a single register, so combining the register read with a pipeline flush made sense. However, in the future we'll want to do multiple register reads back to back, and we'll only want to flush once. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Simplify the interface to link_invalidate_variable_locationsIan Romanick2013-10-223-44/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | The unit tests added in the previous commits prove some things about the state of some internal data structures. The most important of these is that all built-in input and output variables have explicit_location set. This means that link_invalidate_variable_locations doesn't need to know the range of non-generic shader inputs or outputs. It can simply reset location state depending on whether explicit_location is set. There are two additional assumptions that were already implicit in the code that comments now document. - ir_variable::is_unmatched_generic_inout is only used by the linker when connecting outputs from one shader stage to inputs of another shader stage. - Any varying that has explicit_location set must be a built-in. This will be true until GL_ARB_separate_shader_objects is supported. As a result, the input_base and output_base parameters to link_invalidate_variable_locations are no longer necessary, and the code for resetting locations and setting is_unmatched_generic_inout can be simplified. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl/tests: Unit test vertex shader in / out with ↵Ian Romanick2013-10-222-0/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | link_invalidate_variable_locations Validates: - ir_variable::explicit_location should not be modified. - If ir_variable::explicit_location is not set, ir_variable::location, ir_variable::location_frac, and ir_variable::is_unmatched_generic_inout must be reset to 0. - If ir_variable::explicit_location is set, ir_variable::location should not be modified. ir_variable::location_frac, and ir_variable::is_unmatched_generic_inout must be reset to 0. Previous unit tests have shown that all non-generic inputs / outputs have explicit_location set. v2: Split the link_invalidate_variable_locations interface change out to a separate patch. Remove the vertex_in_builtin_without_explicit and vertex_out_builtin_without_explicit tests. There was a lot of good discussion about this on the mailing list to which I refer the interested reader. Both changes suggested by Paul. http://lists.freedesktop.org/archives/mesa-dev/2013-October/046652.html Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Modify interface to link_invalidate_variable_locationsIan Romanick2013-10-222-7/+7
| | | | | | | | | | | This will make it easier to unit test this function in successive patches. Also, correct the prototype in linker.h. It was... wrong. v2: Split the interface change from adding the unit tests. Suggested by Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl/tests: Verify geometry shader built-ins generated by ↵Ian Romanick2013-10-221-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | _mesa_glsl_initialize_variables Checks that the variables generated meet certain criteria. - Geometry shader inputs have an explicit location. - Geometry shader outputs have an explicit location. - Fragment shader-only varying locations are not used. - Geometry shader uniforms and system values don't have an explicit location. - Geometry shader constants don't have an explicit location and are read-only. - No other kinds of geometry variables exist. It does not verify that an specific variables exist. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl/tests: Verify fragment shader built-ins generated by ↵Ian Romanick2013-10-221-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | _mesa_glsl_initialize_variables Checks that the variables generated meet certain criteria. - Fragment shader inputs have an explicit location. - Fragment shader outputs have an explicit location. - Vertex / geometry shader-only varying locations are not used. - Fragment shader uniforms and system values don't have an explicit location. - Fragment shader constants don't have an explicit location and are read-only. - No other kinds of fragment variables exist. It does not verify that an specific variables exist. v2: Use _mesa_varying_slot_in_fs in fragment_builtin.inputs_have_explicit_location. Suggested by Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl/tests: Verify vertex shader built-ins generated by ↵Ian Romanick2013-10-222-0/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _mesa_glsl_initialize_variables Checks that the variables generated meet certain criteria. - Vertex shader inputs have an explicit location. - Vertex shader outputs have an explicit location. - Fragment shader-only varying locations are not used. - Vertex shader uniforms and system values don't have an explicit location. - Vertex shader constants don't have an explicit location and are read-only. - No other kinds of vertex variables exist. It does not verify that an specific variables exist. v2: Fix memory management mistakes in common_builtin::string_starts_with_prefix. Clean up error message reporting in common_builtin::no_invalid_variable_modes. Both suggested by Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: When constructing a variable with an interface type, set interface_typeIan Romanick2013-10-226-4/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since the addition of interface blocks with instance names, we have had an implicit invariant: var->type->is_interface() == (var->type == var->interface_type) The odd use of == here is intentional because !var->type->is_interface() implies var->type != var->interface_type. Further, if var->type->is_array() is true, we have a related implicit invariant: var->type->fields.array->is_interface() == (var->type->fields.array == var->interface_type) However, the ir_variable constructor doesn't maintain either invariant. That seems kind of silly... and I tripped over it while writing some other code. This patch makes the constructor do the right thing, and it introduces some tests to verify that behavior. v2: Add general-ir-test to .gitignore. Update the description of the ir_variable invariant for arrays in the commit message. Both suggested by Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa/tests: Add simple, dumb test for _mesa_program_state_stringIan Romanick2013-10-222-1/+48
| | | | | | | | | | | After some discussions about the correct way to update _mesa_program_state_string, I decided to make a unit test for the function. It turns out that the function didn't work quite the way I thought. The unit test proves that the code was already correct. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: Anuj Phogat <[email protected]>
* wayland: Don't leak wl_drm global when unbinding displayAnder Conselvan de Oliveira2013-10-221-2/+5
|
* mesa: fixes for MSVC 2013Scott Graham2013-10-222-1/+4
| | | | | Cc: "9.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: minor whitespace, comment changes in st_draw.cBrian Paul2013-10-221-8/+11
|
* st/dri: minor formatting clean-ups in dri_context.cBrian Paul2013-10-221-4/+6
|
* mesa: fix a couple issues with U_FIXED, I_FIXED macrosBrian Paul2013-10-221-3/+3
| | | | | | | | | | Silence a bunch of MSVC type conversion warnings. Changed return type of S_FIXED to int32_t (signed). The result is the same. It just seems more intuitive that a signed conversion function should return a signed value. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove GL_MESA_program_debug bits from gl.hBrian Paul2013-10-221-21/+0
| | | | | | The code for this was removed from Mesa some time ago. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove remnants of GL_MESA_shader_debugBrian Paul2013-10-223-55/+0
| | | | | | | | This extension never saw any real use so remove it. v2: also update tests/num_strings.cpp for 'make check' Reviewed-by: Ian Romanick <[email protected]>
* i965: Only emit interpolation setup if there are actual FS inputs.Kenneth Graunke2013-10-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Dead code elimination would get rid of the extra instructions, but skipping this saves iterations through the optimization loop. From shader-db: N Min Max Median Avg Stddev x 14672 3 16 3 3.1334515 0.59904168 + 14672 1 16 3 2.8955153 0.77732963 Difference at 95.0% confidence -0.237936 +/- 0.0158798 -7.59342% +/- 0.506783% (Student's t, pooled s = 0.693935) Embarassingly, the classic shadow mapping shader: void main() { } used to require three iterations through the optimization loop. With this patch, it only requires one (which makes no progress). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Fix accidental type conversion in header setupChris Forbes2013-10-221-3/+2
| | | | | | | | | | Previously one side could be UD while the other was float. V2: Prefer float; apparently IVB can dispatch float ops faster. (Thanks Eric) Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Fix handling of sampler messages with header but zero offsetChris Forbes2013-10-221-3/+11
| | | | | | | | | | Gather unconditionally uses a header, but in some cases the texture_offset value will be zero. V2: Don't introduce a bogus conversion. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Optimize -(-expr) into expr.Matt Turner2013-10-211-0/+10
| | | | | Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Optimize abs(-expr) and abs(abs(expr)) into abs(expr).Matt Turner2013-10-211-0/+18
| | | | | Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Use saved values instead of recomputing them.Matt Turner2013-10-211-8/+4
| | | | | Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* docs: Mark GLSL 1.50, 3.30, and geometry shaders done for i965.Matt Turner2013-10-211-3/+3
| | | | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* docs: Update docs for ARB_texture_mirror_clamp_to_edge.Rico Schüller2013-10-212-1/+2
| | | | | Signed-off-by: Rico Schüller <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Implement ARB_texture_mirror_clamp_to_edge.Kenneth Graunke2013-10-212-0/+3
| | | | | | | | | | This passes Piglit's texwrap tests. v2: Remove _EXT suffix. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Rico Schüller <[email protected]>
* i965: Drop unused simple_list.h includes.Kenneth Graunke2013-10-212-2/+0
| | | | | | These don't appear to be necessary. Everything compiles just fine. Signed-off-by: Kenneth Graunke <[email protected]>
* gbm-dri: Support importing RGB565 buffersKristian Høgsberg2013-10-211-0/+3
|
* glsl/linker: Allow mixing of desktop GLSL versions.Paul Berry2013-10-211-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, Mesa followed the linkage rules outlined in the GLSL 1.20-1.40 specs, which (collectively) said that GLSL versions 1.10 and 1.20 could be linked together, but no other versions could be linked. In GLSL 4.30, the linkage rules were relaxed so that any two desktop GLSL versions can be linked together. This change was made because it reflected the behaviour of nearly all existing implementations (see Khronos bug 8463). Mesa was one of the few (perhaps the only) exceptions to prohibit cross-linking of some GLSL versions. Since the GLSL linkage rules were deliberately relaxed in order to match the behaviour of existing implementations, it seems appropriate to relax the rules in Mesa too (even though Mesa doesn't support GLSL 4.30 yet). Note that linking ES and desktop shaders is still prohibited, as is linking ES shaders having different GLSL versions. Fixes piglit tests "shaders/version-mixing {interstage,intrastage}". Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* clover: Improve region and pitch argument handling in memory transfer APIs.Francisco Jerez2013-10-211-130/+270
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Add a pixel_size() method to the image class.Francisco Jerez2013-10-212-0/+7
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Implement support for the ICD extension.Francisco Jerez2013-10-2117-78/+1046
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Make sure hidden is the default symbol visibility.Francisco Jerez2013-10-211-2/+5
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Prepare the build system for ICD support.Tom Stellard2013-10-213-8/+25
| | | | Signed-off-by: Francisco Jerez <[email protected]>
* clover: Fix memory leak when initializing a device object fails.Francisco Jerez2013-10-211-1/+3
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Tidy up resource::mapping.Francisco Jerez2013-10-212-11/+9
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Simplify command_queue::flush().Francisco Jerez2013-10-212-11/+10
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Clean up the kernel and program object interface.Francisco Jerez2013-10-218-136/+139
| | | | | [ Tom Stellard: Make sure to bind global arguments before retrieving handles. ] Tested-by: Tom Stellard <[email protected]>
* clover: Clean up the interface of the context object slightly.Francisco Jerez2013-10-216-27/+23
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Delete copy constructors and assignment operators in all ↵Francisco Jerez2013-10-2111-22/+44
| | | | | | non-copiable objects. Tested-by: Tom Stellard <[email protected]>
* clover: Define a few convenience equality operators.Francisco Jerez2013-10-2110-5/+47
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Simplify the platform object by using util/range.Francisco Jerez2013-10-213-28/+8
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Add property list helpers with a syntax consistent with other API ↵Francisco Jerez2013-10-215-50/+91
| | | | | | objects. Tested-by: Tom Stellard <[email protected]>
* clover: Switch samplers to the new model.Francisco Jerez2013-10-217-53/+53
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Switch memory objects to the new model.Francisco Jerez2013-10-219-302/+267
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Switch kernel and program objects to the new model.Francisco Jerez2013-10-2111-492/+458
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Switch command queues to the new model.Francisco Jerez2013-10-2114-252/+264
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Switch event objects to the new model.Francisco Jerez2013-10-217-222/+233
| | | | Tested-by: Tom Stellard <[email protected]>