summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: change state query return value for RGB565Haixia Shi2016-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | The GL_BGR and GL_UNSIGNED_SHORT_5_6_5_REV are not defined anywhere in OpenGL ES 3.2 (or earlier) specification, and there are no known extensions in the Khronos registry that would add these enums as valid responses for glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE) and glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT) queries. Note that this patch does not change the bit layout returned by the query. As defined by the GL spec, the bit layout of GL_RGB + GL_UNSIGNED_SHORT_5_6_5 and GL_BGR + GL_UNSIGNED_SHORT_5_6_5_REV are identical. TEST=dEQP-GLES3.functional.state_query.integers.* Signed-off-by: Haixia Shi <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: Stéphane Marchesin <[email protected]> Change-Id: I81bbc8ccdc7e125edaeae443baf6fa8fdefcc6b6
* anv/device: Add limits for InterpolationOffsetAnuj Phogat2016-08-121-3/+3
| | | | | | | | Fixes the vulkan cts regression in test dEQP-VK.api.info.device.properties Cc: Mark Janes <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Change 8X MSAA sample mappingAnuj Phogat2016-08-122-6/+6
| | | | | | | | This is required following the change in 8X sample positions. Fixes the recently modified multisample-scaled-blit piglit tests. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Change 8x multisample positionsAnuj Phogat2016-08-121-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no standard sample positions defined in OpenGL and OpenGL ES specs. Implementations have the freedom to pick the positions which give plausible results. But the Vulkan 1.0 spec does define standard sample positions for different sample counts. Defined positions in Vulkan for all the sample counts except 8X match with the positions we set in i965. We have an upcoming plan to share the blorp code between OpenGL and Vulkan driver in near future. Keeping the 8X sample positions same on both the drivers will help us move in that direction. Here is an argument by Neil Roberts (from commit 20250e85) against any advantage of current 8X sample positions over the new ones: "The comment above for the 8x sample positions says that the hardware implements centroid interpolation by picking the centre-most sample that is inside the primitive. That implies that it might be worthwhile to pick a pattern that includes 0.5,0.5. However by experimentation this doesn't seem to actually be the case. With the sample positions in this patch, if I modify the piglit test below so that it instead reports the centroid position, it reports 0.492188,0.421875 which doesn't match any of the positions. If I modify the sample positions so that they include one at exactly 0.5,0.5 it doesn't help and it reports another position which is even further from the center for some reason. arb_gpu_shader5-interpolateAtSample-different Kenneth Graunke experimented with some other patterns that have a higher standard deviation but I think after some discussion it was decided that it would be better to pick the same pattern as the other graphics API in case there are games that rely on this pattern." Observed no regressions in jenkins testing. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Use macro to avoid code duplication for sample positionsAnuj Phogat2016-08-123-92/+106
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: BufferData should flag NewDriverStateMarek Olšák2016-08-121-5/+5
| | | | | | | | because NewDriverState is filtered depending on active shader states, while st->dirty isn't. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't update atomic, SSBO, UBO and TBO states that have no effectMarek Olšák2016-08-121-3/+6
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: _NEW_TEXTURE & CONSTANTS shouldn't flag states that aren't usedMarek Olšák2016-08-123-8/+60
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: when changing shaders, only dirty states that are affected by themMarek Olšák2016-08-124-91/+79
| | | | | | | This reduces the amount of state processing that has no effect. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: determine states used or affected by shaders at compile timeMarek Olšák2016-08-123-3/+189
| | | | | | | | | | | | At compile time, each shader determines which ST_NEW flags should be set at shader bind time. This just sets the new field for all shaders. The next commit will use it. v2: small code unification Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* st/mesa: remove TES/TCS/GS state dirtying optimizationMarek Olšák2016-08-121-8/+0
| | | | | | | This will be replaced with a better mechanism. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't update clip state on VS changes if it has no effectMarek Olšák2016-08-124-15/+16
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't update clip state if it has no effectMarek Olšák2016-08-123-4/+9
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Document that _mesa_enum_to_string() returns non-null (v2)Chad Versace2016-08-121-1/+6
| | | | | | | | It always returns non-null, even if the number is an invalid enum. Cc: Haixia Shi <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Change-Id: I26e8843c96130be972e66f48a49e362442e1bf97
* glsl: Fix invariant matching in GLSL 4.30 and GLSL ES 1.00.Kenneth Graunke2016-08-112-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | Old languages (GLSL <= 4.20 and GLSL ES 1.00) require "invariant" to be specified on both inputs and outputs, and match when linking. New languages only allow outputs to be qualified as "invariant" and remove the "invariant must match" restriction when linking varyings (because no input can have that qualifier). Commit 426a50e2089b12d33f5c075aa5622f64076914a3 introduced the new behavior for ES 3.00. It also removed the "must match" restriction for ES 1.00 shaders, which I believe is incorrect. This patch adds that back, as well as making 4.30+ follow the new rules. Thanks to Qiankun Miao for noticing this discrepancy. Fixes a WebGL 2.0 conformance test when run in Chromium: https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles3/shaders/qualification_order.html?webglVersion=2 Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96971 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Tidy stream handling in merge_qualifier().Kenneth Graunke2016-08-111-3/+2
| | | | | | | | | | | | | | | | | The previous commit fixed xfb_buffer handling, which was largely copy and pasted from the stream handling. The difference is that stream was set in input_layout_mask, so it worked. However, that's totally rubbish: stream is only valid on geometry shader outputs. Presumably this was to hack around inout. Instead, apply the solution I used in the previous fix. Really, we just need to separate shader interface and parameter qualifier handling so this isn't a mess, but this patch at least tidies it slightly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Fix inout qualifier handling in GLSL 4.40.Kenneth Graunke2016-08-111-1/+2
| | | | | | | | | | | | | | | | | inout variables have q.in and q.out set. We were trying to set xfb_buffer = 1 for shader output variables (and inadvertantly setting it on inout parameters, too). But input_layout_mask doesn't have xfb_buffer set, so it was seen as in invalid input qualifier. This meant that all 'inout' parameters were broken. Caught by running a WebGL conformance test in Chromium: https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles3/shaders/qualification_order.html?webglVersion=2 Fixes Piglit's tests/spec/glsl-4.40/compiler/inout-parameter-qualifier. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* swrast: fix active attribs with atifragshaderMiklós Máté2016-08-111-1/+2
| | | | | | | | | | | Only include the ones that can be used by the shader. This fixes texture coordinates, which were completely wrong, because WPOS was included in the list of attribs. It also increases performance noticeably. Signed-off-by: Miklós Máté <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/omx/dec/h264: pass default scaling lists in raster formatIndrajit Das2016-08-111-20/+20
| | | | | Tested-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]>
* appveyor: Force Visual Studio 2013 image.Jose Fonseca2016-08-111-0/+2
| | | | | It seems the default build image is now Visual Studio 2015, and Visual Studio 2013 is not installed.
* appveyor: Install pywin32 extensions.Jose Fonseca2016-08-111-0/+2
| | | | | AppVeyor build images seem to have been upgraded to Python 2.7.12, but no longer have pywin32 pre-installed.
* glsl/tests: fix segfault in uniform initializer testTimothy Arceri2016-08-111-0/+5
| | | | | | | Caused by 549222f5 Tested-by: Aaron Watry <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97286
* glcpp: Only disallow #undef of pre-defined macros on GLSL ES >= 3.00 shadersIan Romanick2016-08-101-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Section 3.4 (Preprocessor) of the GLSL ES 3.00 spec says: It is an error to undefine or to redefine a built-in (pre-defined) macro name. The GLSL ES 1.00 spec does not contain this text. Section 3.3 (Preprocessor) of the GLSL 1.30 spec says: #define and #undef functionality are defined as is standard for C++ preprocessors for macro definitions both with and without macro parameters. At least as far as I can tell GCC allow '#undef __FILE__'. Furthermore, there are desktop OpenGL conformance tests that expect '#undef __VERSION__' and '#undef GL_core_profile' to work. Fixes: GL45-CTS.shaders.preprocessor.definitions.undefine_version_vertex GL45-CTS.shaders.preprocessor.definitions.undefine_version_fragment GL45-CTS.shaders.preprocessor.definitions.undefine_core_profile_vertex GL45-CTS.shaders.preprocessor.definitions.undefine_core_profile_fragment Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: [email protected]
* glcpp: Track the actual version instead of just the version_resolved flagIan Romanick2016-08-102-6/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: [email protected]
* glsl: remove remaining tabs in link_uniform_initializers.cppTimothy Arceri2016-08-111-39/+39
| | | | Reviewed-by: Eric Anholt <[email protected]>
* glsl: use UniformHash to find storage locationTimothy Arceri2016-08-111-18/+11
| | | | | | There is no need to be looping over all the uniforms. Reviewed-by: Eric Anholt <[email protected]>
* glsl: remove dead builtins before assigning varying locationsTimothy Arceri2016-08-111-9/+9
| | | | | | | | Builtins already have locations assigned so this shouldn't change anything. We want to call it earlier so we can tranform GLSL IR to NIR earlier. Reviewed-by: Eric Anholt <[email protected]>
* glsl: split out varying and uniform linking codeTimothy Arceri2016-08-111-207/+222
| | | | | | | | | | | | | Here a new function link_varyings_and_uniforms() is created this should help make it easier to follow the code in link_shader() which was getting very large. Note the end of the new function contains a for loop with some lowering calls that currently don't seem related to varyings or uniforms but they are a dependancy for converting to NIR ealier so we move things here now to keep things easy to follow. Reviewed-by: Eric Anholt <[email protected]>
* i965/vec4: Make opt_vector_float reset at the top of each blockJason Ekstrand2016-08-101-80/+82
| | | | | | | | | | | The pass isn't really control-flow aware and you can get into case where it tries to combine instructions from different blocks. This can actually lead to an assertion failure when removing unneeded instructions if part of the vector is set in one block and part in another. This prevents regressions in the next commit. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* mesa: Use a temporary set to track whether we've added a resource yet.Eric Anholt2016-08-101-26/+50
| | | | | | | Saves another .1s on servo.trace. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* prog_hash_table: Convert to using util/hash_table.h.Eric Anholt2016-08-102-205/+54
| | | | | | | | | | | | | | | | | | Improves glretrace -b servo.trace (a trace of Mozilla's servo rendering engine booting, rendering a page, and exiting) from 1.8s to 1.1s. It uses a large uniform array of structs, making a huge number of separate program resources, and the fixed-size hash table was killing it. Given how many times we've improved performance by swapping the hash table to util/hash_table.h, just do it once and for all. This just rebases the old hash table API on top of util/, for minimal diff. Cleaning things up is left for later, particularly because I want to fix up the new hash table API a little bit. v2: Add UNUSED to the now-unused parameter. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* prog_hash_table: Convert compare funcs to match util/hash_table.h.Eric Anholt2016-08-102-7/+11
| | | | | | | | I'm going to replace this hash table with util/hash_table.h, and the first step is to compare things the same way. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nir: Drop an unused program/hash_table.h include.Eric Anholt2016-08-101-1/+0
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* swr: [rasterizer core] unused variable warning fixesTim Rowley2016-08-103-12/+0
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] add core string to JitManagerTim Rowley2016-08-104-6/+10
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] fix OOB check of viewport indicesTim Rowley2016-08-101-2/+2
| | | | | | Use correct comparison intrinsic for OOB check of viewport indices. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer common] add linux definition for InterlockedAdd64Tim Rowley2016-08-101-0/+2
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] add VMASKSTOREPS intrinsicTim Rowley2016-08-101-0/+1
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] add mask support for odd format fetchTim Rowley2016-08-101-15/+26
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] routing of viewport indexes through frontendTim Rowley2016-08-106-27/+91
| | | | | | Viewport transform performed based on per-prim viewport index if available. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] split FE and BE statsTim Rowley2016-08-1011-59/+95
| | | | | | | | | | | Separated FE stats out into its own structure. There are 17 FE vs 3 BE stat fields. Since there is only one FE thread per DC then we don't have to loop over all threads and sum up FE stats over all the worker threads. This also reduces size of DC since we only need to store one copy of the FE stats and not one per worker. Finally, we can use the new FE callback mechanism to update these. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] remove all old stats codeTim Rowley2016-08-107-92/+0
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] viewport array supportTim Rowley2016-08-108-34/+49
| | | | | | Change viewport matrix storage from AOS to SOA to support viewport arrays. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] fetch support for offsetting VertexIDTim Rowley2016-08-102-4/+16
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] fundamentally change how stats workTim Rowley2016-08-107-19/+94
| | | | | | Add a per draw stats callback to update driver stats. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] add rasterizerSampleCount to PS contextTim Rowley2016-08-102-0/+6
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] remove cygwin threads.cpp stubsTim Rowley2016-08-101-14/+0
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] allow override of KNOB thread settingsTim Rowley2016-08-106-70/+53
| | | | | | | | - Remove HYPERTHREADED_FE support - Add threading info as optional data passed to SwrCreateContext. If supplied this data will override any KNOB thread settings. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] add SwrWaitForIdleFETim Rowley2016-08-104-14/+51
| | | | | | | This is a blocking call that waits until all FE work is complete. This is useful for waiting for FE work to complete such as for streamout. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] change threadsDone to be a 32-bit value.Tim Rowley2016-08-103-5/+5
| | | | Signed-off-by: Tim Rowley <[email protected]>