Commit Graph

54414 Commits

Author SHA1 Message Date
Matt Turner 7d5496ab3b i915g: Convert to automake 2013-01-10 22:01:07 +01:00
Matt Turner 533130a5bb r600g: Use gallium automake include file 2013-01-10 22:01:06 +01:00
Tom Stellard 80d290d47a libgallium: Convert to automake 2013-01-10 22:01:06 +01:00
Tom Stellard 047fe04750 trace: Convert to automake 2013-01-10 22:01:06 +01:00
Tom Stellard 34a6150188 radeon/winsys: Convert to automake 2013-01-10 22:01:06 +01:00
Matt Turner 8dc4048b3b r300g: Link ralloc.c and register_allocate.c into separate library 2013-01-10 22:01:06 +01:00
Tom Stellard e04413cbb0 r300g: Build a libtool archive 2013-01-10 22:01:06 +01:00
Tom Stellard c07c2696c7 r300g: Use gallium automake include file
[mattst88] v2: Remove ARCH_FLAGS/OPT_FLAGS
2013-01-10 22:01:06 +01:00
Tom Stellard c040fe102c gallium: Add common automake include file
v2: Matt Turner <mattst88@gmail.com>
    Remove ARCH_FLAGS/OPT_FLAGS

v3: Johannes Obermayr <johannesobermayr@gmx.de>
    Add -I$(top_srcdir)/include to GALLIUM_CFLAGS
2013-01-10 22:01:06 +01:00
Matt Turner 9bf0d49abe automake: Convert Gallium target and winsys 2013-01-10 22:01:06 +01:00
Kristian Høgsberg 4e42e569dd egl/gbm: Implement EGL_EXT_buffer_age
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-10 15:58:05 -05:00
Matt Turner 0ae81b8422 mesa: Rename and wire-up GetInteger64i_v
The function was named badly and wasn't in the dispatch table,
making it hard to find.

Fixes transform_feedback2_states and gets a few other transform
feedback tests closer to working in es3conform.

Reviewed-by Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 1a3ffbf378 mesa: Correct glGet{Boolean,Integer}i_v names
Reviewed-by Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner ec8ee91923 mesa: Allow GL_DEPTH_STENCIL_ATTACHMENT in ES 3
Fixes framebuffer_srgb_default_encoding_fbo and 5 packed_depth_stencil
tests from es3conform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-10 10:57:51 -08:00
Chad Versace 75b963c095 mesa: Support more glGet enums for ES3
For glGetIntegerv, add support for the following in an OpenGL ES 3.0
context:
    GL_MAJOR_VERSION
    GL_MINOR_VERSION
    GL_NUM_EXTENSIONS

See Table 6.29 of the OpenGL ES 3.0 spec.

Fixes error GL_INVALID_ENUM in piglit egl-create-context-verify-gl-flavor,
testcase for OpenGL ES 3.0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 532e05a9d0 mesa: Support querying GL_MAX_ELEMENT_INDEX in ES 3
The ES 3 spec says that the minumum allowable value is 2^24-1, but the
GL 4.3 and ARB_ES3_compatibility specs require 2^32-1, so return 2^32-1.

Fixes es3conform's element_index_uint_constants test.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 92855727f1 mesa: De-duplicate ES2 queries
From GL/GLES/GL_CORE and GLES2 -> GL/GL_CORE/GLES2.

Yes, we really were exposing ES2_compatibility queries on ES 1.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 5bb1827d95 mesa: Allow glGet* queries on EXT_texture_lod_bias data in ES 3
Fixes the remaining 4 texture_lod_bias failures in es3conform.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner e895d368e1 mesa: Allow glGet* queries on EXT_framebuffer_blit data in ES 3
Fixes 2 framebuffer_blit es3conform tests.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner d9948e49d3 mesa: Allow glGet* queries on ARB_fragment/vertex_shader data in ES 3
Fixes uniform_buffer_object_implementation_dependent_limits in
es3conform.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner d93c1b62f8 mesa: Allow glGet* queries on ARB_framebuffer_object data in ES 3
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 914415a63f mesa: Allow glGet* queries on ARB_transform_feedback2 data in ES 3
Fixes the transform_feedback2_init_defaults test from es3conform.

The ES 3 spec lists these as TRANSFORM_FEEDBACK_PAUSED and
TRANSFORM_FEEDBACK_ACTIVE.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 3d0e4eb134 mesa: Allow glGet* queries on EXT_transform_feedback data in ES 3
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 3f1217607a mesa: Allow glGet* queries on ARB_sync data in ES 3
Fixes the sync_coverage_max_server_wait_timeout test in es3conform.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 0a8866e751 mesa: Allow glGet* queries of EXT_pbo data in ES 3
Fixes pixel_buffer_object_default_binding and gets other tests in
es3conform closer to passing.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner be68dae374 mesa: Allow glGet* queries of select ARB_ubo data in ES 3
Fixes 5 uniform_buffer_object tests in es3conform.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:51 -08:00
Matt Turner 0cc018526f Add ES 3 handling to get.c and get_hash_generator.py
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:50 -08:00
Matt Turner 57616159aa glapi: Move ARB_base_instance to the correct location
It's #107, it shouldn't be added after the #116 comment.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:50 -08:00
Matt Turner a5ed966069 mesa/tests: Add ARB_ES3_compatibility enums
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:50 -08:00
Matt Turner 910a0bfe5b glapi: Add enums for ARB_ES3_compatibility
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-10 10:57:50 -08:00
Quentin Glidic c5e9396424 mesa/program: Fix both Classic and Gallium build
Follow-up for 9078441072 and
3a5ad21cd3

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57044
Tested-by: Fabio Pedretti <fabio.ped@libero.it>
Tested-by: Brad King <brad.king@kitware.com>
2013-01-10 10:34:56 -08:00
Andreas Boll f416b382d6 configure.ac: fix typo in error message 2013-01-10 18:41:53 +01:00
Marek Olšák 2f89949b66 r300g: don't set sample positions to the pixel center if MSAA is disabled
but an MSAA resource is bound. This effectively makes the MSAA disable switch
not affect rasterization, but it still affects the alpha-to-one and
alpha-to-coverage states. This hardware just lacks a proper MSAA disable
switch.

This fixes graphics corruption in sauerbraten.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59194
2013-01-10 15:37:10 +01:00
Paul Berry 9a07b6bd74 intel: Clean up confusion between logical and physical surface dimensions.
In most cases, the width, height, and depth of the physical surface
used by the driver to implement a texture or renderbuffer is equal to
the logical width, height, and depth exposed to the client through
functions such as glTexImage3D().  However, there are two exceptions:
cube maps (which have a physical depth of 6 but a logical depth of 1)
and multisampled renderbuffers (which have larger physical dimensions
than logical dimensions to allow multiple samples per pixel).

Previous to this patch, we accounted for the difference between
physical and logical surface dimensions at inconsistent places in the
call graph (multisampling was accounted for in
intel_miptree_create_for_renderbuffer(), and cubemaps were accounted
for in intel_miptree_create_internal()).  As a result, it wasn't
always clear, when calling a miptree creation function, whether
physical or logical dimensions were needed.  Also, we weren't
consistent about storing logical dimensions in the intel_mipmap_tree
structure (we only did so in the
intel_miptree_create_for_renderbuffer() code path, and we did not
store depth).

This patch refactors things so that intel_miptree_create_internal() is
responsible for converting logical to physical dimensions and for
storing both the physical and logical dimensions in the
intel_mipmap_tree structure.  As a result, all miptree creation
functions interpret their arguments as logical dimensions, and both
physical and logical dimensions are always available to functions that
work with intel_mipmap_trees.

In addition, it renames the fields in intel_mipmap_tree used to store
the dimensions, so that it is clear from the name whether physical or
logical dimensions are being referred to.

This should fix the following bugs:

- When creating a separate stencil surface for a depthstencil cubemap,
  we would erroneously try to convert the depth from 1 to 6 twice,
  resulting in an assertion failure.

- When creating an MCS buffer for compressed multisampling, we used
  physical dimensions instead of logical dimensions, resulting in
  wasted memory.

In addition, this should considerably simplify the implementation of
ARB_texture_multisample, because it moves the code to compute the
physical size of multisampled surfaces out of renderbuffer-only code.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-01-09 13:10:47 -08:00
Paul Berry a5f87e8843 intel: Add a force_y_tiling parameter to intel_miptree_create().
This allows intel_miptree_alloc_mcs() to force Y tiling for the MCS
buffer.  Previously we accomplished this by the hack of passing
INTEL_MSAA_LAYOUT_CMS as the msaa_layout parameter, but that parameter
is going to be going away soon.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-01-09 13:10:30 -08:00
Paul Berry 8f15f19696 intel: Move compute_msaa_layout earlier in file.
No functional change.  This patch moves the compute_msaa_layout()
function earlier in intel_mipmap_tree.c so that it can be used by
other functions in that file.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-01-09 13:10:14 -08:00
Vinson Lee b37930f309 r600g: Fix memory leak in r600_bytecode_add_vtx.
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2013-01-09 11:11:46 -05:00
Marek Olšák f8651dea4e r300g: optionally log MSAA resources to stderr
Set: RADEON_DEBUG=msaa
2013-01-09 16:47:10 +01:00
Marek Olšák 1385c353cf r300g: fix the GPU name in the renderer string
Broken by ca474f98f2.
2013-01-09 16:40:37 +01:00
Marek Olšák 4f2d9a8f52 r300g: fix CS checker errors caused by emit_dsa_state
size is 10 on r500 and 8 on r300
2013-01-09 16:40:37 +01:00
Johannes Obermayr 959e83d650 clover: Adapt libclc's INCLUDEDIR and LIBEXECDIR to make use of the new introduced libclc.pc.
Tom Stellard:
  -Keep --with-libclc-path and mark it deprecated.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-01-08 20:32:47 -05:00
Ian Romanick ed3f237e09 glsl: Don't add structure fields to the symbol table
I erroneously added this back in January 2011 in commit 88421589.
Looking at the commit message, I have no idea why I added it.  It only
added non-array structure fields to the symbol table, so array structure
fields are treated correctly.

Fixes piglit tests structure-and-field-have-same-name.vert and
structure-and-field-have-same-name-nested.vert.  It should also fix
WebGL conformance tests shader-with-non-reserved-words.

NOTE: This is a candidate for the stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57622
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-08 13:09:31 -08:00
Kenneth Graunke a5265f7536 i965/fs: Fix struct vs. class in acp_entry definitions. 2013-01-08 13:09:31 -08:00
Marek Olšák a70e5e2b94 r600g: implement buffer copying using CP DMA for R7xx, Evergreen, Cayman
R6xx doesn't work - the issue seems to be with flushing (sometimes
the destination buffer contains garbage). There are no hangs, so we're good.

R7xx doesn't seem to have any alignment restriction despite our initial
thinking. Everything just works.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-01-08 21:58:28 +01:00
Marek Olšák 2d3d0d3a5a st/mesa: fix possible MSVC build error v2
https://bugs.freedesktop.org/show_bug.cgi?id=59143

Using GLubyte as per Brian's suggestion.
2013-01-08 21:53:13 +01:00
Paul Berry c35abcd1b0 glsl: Pack flat "varyings" of mixed types together.
This patch enhances the varying packing code so that flat varyings of
uint, int, and float types can be packed together.

We accomplish this in lower_packed_varyings.cpp by making the type of
all flat varyings ivec4, and then using information-preserving type
conversions (e.g. ir_unop_bitcast_f2i) to convert all other types to
ints.

The varying_matches::compute_packing_class() function is updated to
reflect the fact that varying packing no longer needs to segregate
varyings of different base types.

Fixes piglit test varying-packing-mixed-types.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

v2: Split lower_packed_varyings_visitor::bitwise_assign into
pack/unpack variants.
2013-01-08 09:18:14 -08:00
Paul Berry 18720555dd glsl: Prohibit structs and bools from being used as "varyings".
The GLSL 1.30 spec only allows vertex shader outputs and fragment
shader inputs ("varyings" in pre-GLSL-1.30 parlance) to be of type
int, uint, float, or vectors, matrices, or arrays thereof.  Bools,
bvec's, and structs are prohibited.  (Integral varyings were
prohibited prior to GLSL 1.30).

Previously, Mesa only performed this check on variables declared with
the "varying" keyword, and it always performed the check according to
the pre-GLSL-1.30 rules.  As a result, bools and structs were allowed
to slip through, provided they were declared using the new in/out
syntax.

This patch modifies the error check so that it occurs after "varying"
is converted to "in/out", and corrects it to properly account for GLSL
version.

Fixes piglit tests:
  in-bool-prohibited.frag
  in-bvec2-prohibited.frag
  in-bvec3-prohibited.frag
  in-bvec4-prohibited.frag
  in-struct-prohibited.frag
  out-bool-prohibited.vert
  out-bvec2-prohibited.vert
  out-bvec3-prohibited.vert
  out-bvec4-prohibited.vert
  out-struct-prohibited.vert

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-08 09:09:21 -08:00
Paul Berry c33be485c5 glsl: Plumb through is_parameter to apply_type_qualifier_to_variable()
This patch adds logic to allow the ast_to_hir function
apply_type_qualifier_to_variable() to tell whether it is acting on a
variable declaration or a function parameter.  This will allow it to
correctly interpret the meaning of "out" and "in" keywords (which have
different meanings in those two contexts).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-08 09:09:18 -08:00
Paul Berry 4b11b57ab4 glsl: Separate varying linking code to its own file.
linker.cpp is getting pretty big, and we're about to add even more
varying packing code, so split out the linker code that concerns
varyings to its own file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-08 09:09:09 -08:00
Paul Berry 8706395f25 mesa: Add ALIGN() macro to main/macros.h.
Previously this macro existed in 3 separate places, some inside the
intel driver and some outside of it.  It makes more sense to have it
in main/macros.h

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-08 09:08:57 -08:00