summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: fix pipe_query_result result initializerBrian Paul2015-05-051-1/+1
| | | | | | Fixes MSVC build error. Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: fix st_NewPerfMonitor() declarationBrian Paul2015-05-051-1/+1
| | | | | | Was missing the context parameter. Fixes MSVC warning. Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: add parens in shader_integer_mix() to silence compiler warningBrian Paul2015-05-051-1/+1
| | | | | | | | Silences gcc warning: builtin_functions.cpp:204:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses] Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: also try PIPE_FORMAT_R10G10B10A2_UNORM for GL_RGB10Brian Paul2015-05-051-1/+1
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: all queries use an unsigned 64-bits integer by defaultSamuel Pitoiset2015-05-061-5/+7
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* nvc0: make begin_query return false when all MP counters are usedSamuel Pitoiset2015-05-061-5/+8
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* docs: mark GL_AMD_performance_monitor on nvc0 for the 10.6.0 releaseSamuel Pitoiset2015-05-061-0/+1
| | | | | | | | Other drivers which want to enable this extension must expose groups of GPU hardware performance counters. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* nvc0: define driver-specific query groupsSamuel Pitoiset2015-05-063-0/+76
| | | | | | | | This patch defines "Driver statistics" and "MP counters" groups, but only the latter will be exposed through GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* st/mesa: implement GL_AMD_performance_monitorChristoph Bumiller2015-05-064-0/+500
| | | | | | | | | | | | | | | | | | | | This is based on the original patch of Christoph Bumiller. v2 (Samuel Pitoiset): - improve Gallium interface for this extension - rewrite some parts of the original code - fix compilation errors and piglit tests v3: - only enable this extension when the underlying driver expose GPU counters - get rid of the ring buffer of queries v4: - add a debug message when the maximum number of counters has been reached Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: make pipe_context::begin_query return a booleanSamuel Pitoiset2015-05-0618-34/+51
| | | | | | | | | GL_AMD_performance_monitor must return an error when a monitoring session cannot be started. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: replace pipe_driver_query_info::max_value by a unionSamuel Pitoiset2015-05-066-27/+36
| | | | | | | | This allows queries to return different numeric types. Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add new numeric types to pipe_query_resultSamuel Pitoiset2015-05-061-0/+8
| | | | | | | | This will be used by GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add new fields to pipe_driver_query_infoSamuel Pitoiset2015-05-065-20/+30
| | | | | | | | | | | | | | According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. v2: add PIPE_DRIVER_QUERY_TYPE_BYTES v3: fix incorrect query type for radeon and svga drivers Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add pipe_screen::get_driver_query_group_infoSamuel Pitoiset2015-05-063-0/+35
| | | | | | | | | | | | | | Driver queries are organized as a single hierarchy where queries are categorized into groups. Each group has a list of queries and a maximum number of queries that can be sampled. The list of available groups can be obtained using pipe_screen::get_driver_query_group_info. This will be used by GL_AMD_performance monitor. v2: add group type (CPU/GPU) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: fix shininess check for ffvertex_prog v2Tim Rowley2015-05-051-1/+1
| | | | | | | | Switch to using VERT_BIT_GENERIC macro, as varying_vp_inputs is a bitmask. Reviewed-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* i965/aa: fixing anti-aliasing bug for thinnest width lines - GEN7Marius Predut2015-05-051-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | On SNB and IVB hw, for 1 pixel line thickness or less, the general anti-aliasing algorithm give up - garbage line is generated. Setting a Line Width of 0.0 specifies the rasterization of the “thinnest” (one-pixel-wide), non-antialiased lines. Lines rendered with zero Line Width are rasterized using Grid Intersection Quantization rules as specified by bspec section 6.3.12.1 Zero-Width (Cosmetic) Line Rasterization. v2: Daniel Stone: Fix = used instead of == in an if-statement. v3: Ian Romanick: Use "._Enabled" flag insteed ".Enabled". Add code comments. re-word wrap the commit message. Add a complete bugzillia list. Improve the hardcoded values to produce better results. v4: Matt Turner: typo fixes and adjust <= 1.49 to become < 1.5 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28832 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=9951 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27007 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60797 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=15006 Acked-by: Chris Forbes <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Marius Predut <[email protected]>
* i965: Fix missing type in local variable declaration.Kenneth Graunke2015-05-051-1/+1
| | | | | | | | | Trivial. Fixes the following compiler warning (from GCC 5.1.0): brw_context.c:629:10: warning: type defaults to ‘int’ in declaration of ‘simd_size’ [-Wimplicit-int] Signed-off-by: Kenneth Graunke <[email protected]>
* i965/vec4: Use same type for immediate, for compaction.Matt Turner2015-05-051-1/+1
|
* i965/aa: fixing anti-aliasing bug for thinnest width lines - GEN6Marius Predut2015-05-051-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | On SNB and IVB hw, for 1 pixel line thickness or less, the general anti-aliasing algorithm give up - garbage line is generated. Setting a Line Width of 0.0 specifies the rasterization of the “thinnest” (one-pixel-wide), non-antialiased lines. Lines rendered with zero Line Width are rasterized using Grid Intersection Quantization rules as specified by bspec section 6.3.12.1 Zero-Width (Cosmetic) Line Rasterization. v2: Daniel Stone: Fix = used instead of == in an if-statement. v3: Ian Romanick: Use "._Enabled" flag insteed ".Enabled". Add code comments. re-word wrap the commit message. Add a complete bugzillia list. Improve the hardcoded values to produce better results. v4: Matt Turner: typo fixes and adjust <= 1.49 to become < 1.5 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28832 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=9951 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27007 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60797 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=15006 Acked-by: Chris Forbes <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Marius Predut <[email protected]>
* i965: Remove end-of-thread SEND alignment code.Matt Turner2015-05-051-12/+3
| | | | | | | This was present in Eric's initial implementation of the compaction code for Sandybridge (commit 077d01b6). There is no documentation saying this is necessary, and removing it causes no regressions in piglit on any platform.
* i965: Add XRGB8888 format to intel_screen_make_configsBoyan Ding2015-05-051-1/+2
| | | | | | | | | | | | | | Some application, such as drm backend of weston, uses XRGB8888 config as default. i965 doesn't provide this format, but before commit 65c8965d, the drm platform of EGL takes ARGB8888 as XRGB8888. Now that commit 65c8965d makes EGL recognize format correctly so weston won't start because it can't find XRGB8888. Add XRGB8888 format to i965 just as other drivers do. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89689 Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* nir: add nir_array.h to the sources listEmil Velikov2015-05-051-0/+1
| | | | | | | Otherwise `make distcheck' will fail. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: don't lower fragdata array if the output data types don't matchSamuel Iglesias Gonsalvez2015-05-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7e414b58640aee6e243d337e72cea290c354f632 broke the gl_FragData array into separate gl_FragData[i] variables, so drivers can eliminate useless writes to gl_FragData improving their performance. The problem occurs when GLSL IR code is linked in the following case: * The FS output variable base data type does not match gl_FragData one (float vector) * The FS output variable is replaced by gl_out_FragDataX because of commit 7e414b58640aee6 with X from 0 to GL_MAX_DRAW_BUFFERS. Then the FS output variable base data type is lost in the resulting GLSL IR, making that the driver does a wrong assignment to gl_out_FragData components because of unmatching data types. This patch reverts the fragdata array lowering when the output var base data type doesn't match gl_out_FragData, i.e., when output variable base data type is not a float or a float vector. This patch fixes 250 dEQP tests (tested in an Intel Haswell machine) dEQP-GLES3.functional.fragment_out.random.* (22 failed tests) dEQP-GLES3.functional.fragment_out.array.uint.* (120 failed tests) dEQP-GLES3.functional.fragment_out.array.int.* (108 failed tests) Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/skl: Align compressed textures to four times the block sizeNeil Roberts2015-05-051-4/+27
| | | | | | | | | | | | On Skylake it is possible to choose your own alignment values for compressed textures but they are expressed as a multiple of the block size. The minimum alignment value we can use is 4 so we effectively have to align to 4 times the block size. This patch makes it initially set mt->align_[wh] to the large alignment value and then later divides it by the block size so that it can be uploaded as part of the surface state. Reviewed-by: Ben Widawsky <[email protected]>
* egl: image_dma_buf_export - use KHR 64-bit typeDave Airlie2015-05-055-15/+19
| | | | | | | | After talking to Jon Leech he suggested this should be fine. update spec to the version in the registry. Signed-off-by: Dave Airlie <[email protected]>
* glapi/es3.1: Add support for GLES versions > 3.0Ian Romanick2015-05-041-2/+2
| | | | | | | | | | | | Make the checks in the Python script and the generated code more generic to support arbitrary GLES versions >= 2.0. The updated dispatch_sanity.cpp test discovered this problem. Without this, the next patch would erroneously enable GLES 3.1 functions in GLES 2.0 and GLES 3.0. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl/es3.1: Allow misc ARB_gpu_shader5 built-ins in GLSL ES 3.10Ian Romanick2015-05-041-11/+11
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl/es3.1: Allow textureGather and textureGatherOffset in GLSL ES 3.10Ian Romanick2015-05-041-29/+61
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* glsl/es3.1: Allow enhnaced packing functions in GLSL ES 3.10Ian Romanick2015-05-041-6/+7
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* glsl/es3.1: Allow interger mix built-ins in GLSL ES 3.10Ian Romanick2015-05-045-7/+55
| | | | | | | | v2: Add missing lexer support. Noticed by Tapani. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> [v1]
* glsl/es3.1: Allow separate shader objects in GLSL ES 3.10Ian Romanick2015-05-041-2/+2
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* glsl/es3.1: Allow explicit uniform locations in GLSL ES 3.10Ian Romanick2015-05-041-4/+13
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* glsl/es3.1: Allow 3.10 ES shaders in a GLES 3.1 contextIan Romanick2015-05-042-3/+8
| | | | | | | | Currently no 3.10 ES features (beyond 3.00 ES) are enabled. That will come later. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/es3.1: Add _mesa_is_gles31 helperIan Romanick2015-05-041-1/+11
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* docs/GL3: Update GLES 3.1 dependenciesIan Romanick2015-05-041-0/+6
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* glsl: Add glsl_parser_state::has_atomic_counters helperIan Romanick2015-05-045-5/+10
| | | | | | | v2: Change GL version from 400 to 420. Noticed by Tapani and Ilia. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Use bool in _mesa_is_ helpers instead of GLbooleanIan Romanick2015-05-041-4/+4
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Trivial coding standards cleanupsIan Romanick2015-05-041-15/+10
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Use bool instead of GLbooleanIan Romanick2015-05-041-158/+157
| | | | | | | | | | v2: Squash in whitespace fixes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Silence unused parameter warningsIan Romanick2015-05-042-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I opted to comment out "last_field" because it was not obvious what the meaning of the dangling bool would be. For the other parameters, the meaning was more intuitive without the name. link_uniform_blocks.cpp:70:65: warning: unused parameter 'name' [-Wunused-parameter] virtual void enter_record(const glsl_type *type, const char *name, ^ link_uniform_blocks.cpp:77:65: warning: unused parameter 'name' [-Wunused-parameter] virtual void leave_record(const glsl_type *type, const char *name, ^ link_uniform_blocks.cpp:93:62: warning: unused parameter 'record_type' [-Wunused-parameter] bool row_major, const glsl_type *record_type, ^ link_uniform_blocks.cpp:94:34: warning: unused parameter 'last_field' [-Wunused-parameter] bool last_field) ^ link_uniforms.cpp:547:65: warning: unused parameter 'name' [-Wunused-parameter] virtual void enter_record(const glsl_type *type, const char *name, ^ link_uniforms.cpp:556:65: warning: unused parameter 'name' [-Wunused-parameter] virtual void leave_record(const glsl_type *type, const char *name, ^ link_uniforms.cpp:567:34: warning: unused parameter 'last_field' [-Wunused-parameter] bool last_field) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Restore functionality to dispatch sanity testIan Romanick2015-05-041-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Along with a couple secondary goals, the dispatch sanity test had two major, primary goals. 1. Ensure that all functions part of an API version are set in the dispatch table. 2. Ensure that functions that cannot be part of an API version are not set in the dispatch table. Commit 4bdbb58 removed the tests ability to fulfill either of its primary goals by removing anything that used _mesa_generic_nop(). It seems like the problem on Windows could have been resolved by adding the NULL context pointer check from nop_handler to _mesa_generic_nop(). There is, however, some debugging benefit to actually getting the (supposed) function name logged in the "unsupported function called" message. The preceding commit added a function, _glapi_new_nop_table, that allocates a table of per-entry point no-op functions. Restore the ability to actually validate the sanity of the dispatch table by using _glapi_new_nop_table. Previous to this commit removing a function from one of the *_functions_possible lists would not cause the test to fail. With this commit removing such a function will result in failure, as is expected. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Fix variable indexing of sampler arrays under non-uniform control flow.Francisco Jerez2015-05-043-6/+8
| | | | | | | | | | | | | | | | | | ARB_gpu_shader5 requires sampler array indexing expressions to be dynamically uniform, this however doesn't have any implications on the control flow that leads to the evaluation of that expression being uniform. Use emit_uniformize() to obtain an arbitrary live value from the binding table index calculation instead of assuming that the first channel is always live. Fixes the following Piglit test cases: arb_gpu_shader5/execution/sampler_array_indexing/fs-nonuniform-control-flow.shader_test arb_gpu_shader5/execution/sampler_array_indexing/vs-nonuniform-control-flow.shader_test part of the series: http://lists.freedesktop.org/archives/piglit/2015-February/014615.html Reviewed-by: Matt Turner <[email protected]>
* i965: Fix variable indexing of UBO arrays under non-uniform control flow.Francisco Jerez2015-05-043-10/+11
| | | | | | | | | | | | | | | | | | ARB_gpu_shader5 requires UBO array indexing expressions to be dynamically uniform, this however doesn't have any implications on the control flow that leads to the evaluation of that expression being uniform. Use emit_uniformize() to obtain an arbitrary live value from the binding table index calculation instead of assuming that the first channel is always live. Fixes the following Piglit tests: arb_gpu_shader5/execution/ubo_array_indexing/fs-nonuniform-control-flow.shader_test arb_gpu_shader5/execution/ubo_array_indexing/vs-nonuniform-control-flow.shader_test part of the series: http://lists.freedesktop.org/archives/piglit/2015-February/014616.html Reviewed-by: Matt Turner <[email protected]>
* i965: Define helper function to copy an arbitrary live component from some ↵Francisco Jerez2015-05-044-0/+28
| | | | | | register. Reviewed-by: Matt Turner <[email protected]>
* i965: Perform basic optimizations on the FIND_LIVE_CHANNEL opcode.Francisco Jerez2015-05-046-0/+93
| | | | | | | | v2: Save some CPU cycles by doing 'return progress' rather than 'depth++' in the discard jump special case. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Introduce the FIND_LIVE_CHANNEL pseudo-opcode.Francisco Jerez2015-05-046-0/+94
| | | | | | | | | | | | | This instruction calculates the index of an arbitrary channel enabled in the current execution mask. It's expected to be used as input for the BROADCAST opcode, but it's implemented as a separate instruction rather than being baked into BROADCAST because FIND_LIVE_CHANNEL has no dependencies so it can always be CSE'ed with other instances of the same instruction within a basic block. v2: Whitespace fixes. Reviewed-by: Matt Turner <[email protected]>
* i965: Perform basic optimizations on the BROADCAST opcode.Francisco Jerez2015-05-048-0/+44
| | | | | | v2: Style fixes. Reviewed-by: Matt Turner <[email protected]>
* i965: Introduce the BROADCAST pseudo-opcode.Francisco Jerez2015-05-046-0/+98
| | | | | | | | | | | | | | | | | | | The BROADCAST instruction picks the channel from its first source given by an index passed in as second source. This will be used in situations where all channels from the same SIMD thread have to agree on the value of something, e.g. a surface binding table index. This is in particular the case for UBO, sampler and image arrays, which can be indexed dynamically with the restriction that all active SIMD channels access the same index, provided to the shared unit as part of a single scalar field of the message descriptor. Simply taking the index value from the first channel as we were doing until now is incorrect, because it might contain an uninitialized value if the channel had previously been disabled by non-uniform control flow. v2: Minor style fixes. Improve commit message. Reviewed-by: Matt Turner <[email protected]>
* glsl: Keep track of the early_fragment_tests flag in gl_shader.Francisco Jerez2015-05-045-3/+13
| | | | | | | | And rename _mesa_glsl_parse_state::early_fragment_tests to fs_early_fragment_tests for consistency with other FS-specific flags in the same struct. Reviewed-by: Matt Turner <[email protected]>
* glsl: Error out on invalid uses of the early_fragment_tests layout qualifier.Francisco Jerez2015-05-043-5/+34
| | | | Reviewed-by: Matt Turner <[email protected]>