summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl/cs: Add gl_LocalInvocationID variableJordan Justen2015-09-132-0/+13
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* softpipe: Change faces type to uintKrzesimir Nowak2015-09-132-6/+6
| | | | | | | | This is to avoid needless float<->int conversions, since all face-related computations are made on integers. Spotted by Emil Velikov. Reviewed-by: Brian Paul <[email protected]>
* freedreno/ir3: fix compile warn after 1807a08eRob Clark2015-09-131-0/+1
| | | | | | | | | | | | | | New enum to add to switch so compiler doesn't complain. commit 1807a08e4f35b014f2a80d1e88dd74a9f096d7a5 Author: Ilia Mirkin <[email protected]> AuthorDate: Thu Aug 27 23:05:03 2015 -0400 Commit: Ilia Mirkin <[email protected]> CommitDate: Thu Sep 10 17:38:33 2015 -0400 nir: add nir_texop_texture_samples and convert from glsl Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix compile break after a4aa25beRob Clark2015-09-131-2/+1
| | | | | | | | | | | | | | Following commit dropped the unused memctx arg: commit a4aa25be1e0a27b1a6a6b0bcf576beb9dfe1ea7a Author: Jason Ekstrand <[email protected]> AuthorDate: Wed Sep 9 13:24:35 2015 -0700 Commit: Jason Ekstrand <[email protected]> CommitDate: Fri Sep 11 09:21:20 2015 -0700 nir: Remove the mem_ctx parameter from ssa_def_rewrite_uses Signed-off-by: Rob Clark <[email protected]>
* nir: add nir_channel() to get at single components of vec'sRob Clark2015-09-133-28/+22
| | | | | | | Rather than make yet another copy of channel(), let's move it into nir. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* tgsi/scan: add support to figure out max nesting depthRob Clark2015-09-132-0/+21
| | | | | | | | | Sometimes a useful thing for compilers (or, for example, tgsi_to_nir) to know. And pretty trivial for scan to figure this out for us. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600: Fix llvm build since const buffer changesKai Wasserbäch2015-09-131-1/+1
| | | | | | | | | | | In commit f9caabe8f1bff86d19b53d9ecba5c72b238d9e23: One place in r600_llvm.c was forgotten when replacing R600_UCP_CONST_BUFFER with R600_BUFFER_INFO_CONST_BUFFER. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91985 Signed-off-by: Kai Wasserbäch <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965/vec4: Don't reswizzle hardware registersJason Ekstrand2015-09-121-0/+8
| | | | | | Cc: "11.0 10.6" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91719 Reviewed-by: Kenneth Graunke <[email protected]>
* i965/emit: Add assertions for accumulator restrictionsJason Ekstrand2015-09-121-0/+17
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* docs: add news item and link release notes for 11.0.0Emil Velikov2015-09-122-0/+8
| | | | Signed-off-by: Emil Velikov <[email protected]>
* docs: add sha256 checksums for 11.0.0Emil Velikov2015-09-121-1/+2
| | | | | Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit c4bae5792bb5515da42e23f166f5ba5d68f79615)
* docs: Update 11.0.0 release notesEmil Velikov2015-09-121-3/+165
| | | | | Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 4f1e500150be2e82a2d7eb954f7198cc0c5cbec1)
* r600: Enable fp64 on chips with native supportGlenn Kennard2015-09-123-2/+6
| | | | | | | | Cypress/Cayman/Aruba, earlier r6xx/r7xx chips only support a subset of the needed fp64 ops, and don't do GL4 anyway. Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: Support I2D/U2D/D2I/D2UGlenn Kennard2015-09-121-8/+98
| | | | | | | | | Only for Cypress/Cayman/Aruba, older chips have only partial fp64 support. Uses float intermediate values so only accurate for int24 range, which matches what the blob does. Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: lower number of driver const buffersDave Airlie2015-09-123-70/+131
| | | | | | | | | | | | | | I'm going to want a driver constant buffer for tess to coordinate LDS storage, so before I go tackling that I decided to merge the clip/samplepos and texture info buffers into one. So I can steal the spare one. This creates a single constant buffer between the two, with clip/samplepos taking up a reserved 128 bytes at the start. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: define some values for the fetch constant offsets.Dave Airlie2015-09-124-27/+47
| | | | | | | | This just puts these in one place and #defines them. Reviewed-by: Glenn Kennard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* docs: Update with GLES3.2 entries and statusThomas Helland2015-09-111-0/+24
| | | | | | | | | | | | | | | | V2: -Change to "not started" for most entries -Add status for multisample_2d_array -Change shader_multisample_interpolation to "not_stared" V3 (idr): Move the GLES 3.2 section after the "Additional functions" section from GLES 3.1. Note that GL_KHR_texture_compression_astc_hdr is done for i965 on gen9+ hardware. Note that GL_OES_shader_io_blocks is based on some features from GLSL 1.50. Signed-off-by: Thomas Helland <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> [v2] Reviewed-by: Ian Romanick <[email protected]>
* softpipe: Constify variablesKrzesimir Nowak2015-09-111-242/+199
| | | | | | | | | This commit makes a lot of variables constant - this is basically done by moving the computation to variable definition. Some of them are moved into lower scopes (like in img_filter_2d_ewa). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Constify sp_tgsi_samplerKrzesimir Nowak2015-09-111-12/+23
| | | | | | | | | | | Add a small inline function doing the casting - this is to make sure we don't do a cast from some completely unrelated type. This commit does not make tgsi_sampler parameters const in vfuncs themselves for now - probably llvmpipe would need looking at before making such a change. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Constify sampler and view parameters in mip filtersKrzesimir Nowak2015-09-112-18/+18
| | | | | | | Those functions actually could always take them as constants. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Constify sampler and view parameters in img filtersKrzesimir Nowak2015-09-112-36/+36
| | | | | | | Those functions actually could always take them as constants. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi, softpipe: Constify tgsi_sampler in query_lod vfuncKrzesimir Nowak2015-09-112-2/+2
| | | | | | | | | | A followup from previous commit - since all functions called by query_lod take pointers to const sp_sampler_view and const sp_sampler, which are taken from tgsi_sampler subclass, we can the tgsi_sampler as const itself now. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Constify some sampler and view parametersKrzesimir Nowak2015-09-112-27/+28
| | | | | | | | | This is to prepare for making tgsi_sampler parameter in query_lod a const too. These functions do not modify anything in either sampler or view anymore. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Move the faces array from view to filter_argsKrzesimir Nowak2015-09-112-17/+23
| | | | | | | | With that, sp_sampler_view instances are not abused anymore as a local storage, so we can later make them constant. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nir/from_ssa: Use instr_rewrite_destJason Ekstrand2015-09-111-3/+1
| | | | Reviewed-by: Eduardo Lima Mitev <[email protected]>
* nir: Add a function for rewriting instruction destinationsJason Ekstrand2015-09-112-0/+26
| | | | Reviewed-by: Eduardo Lima Mitev <[email protected]>
* nir: Only unlink sources that are actually validJason Ekstrand2015-09-111-7/+8
| | | | Reviewed-by: Thomas Helland <[email protected]>
* nir: Remove the mem_ctx parameter from ssa_def_rewrite_usesJason Ekstrand2015-09-1120-47/+25
| | | | Reviewed-by: Thomas Helland <[email protected]>
* nir: Fix a bunch of ralloc parenting errorsJason Ekstrand2015-09-1110-31/+32
| | | | | | | | | | | | | | As of a10d4937, we would really like things associated with an instruction to be allocated out of that instruction and not out of the shader. In particular, you should be passing the instruction that will ultimately be holding the source into nir_src_copy rather than an arbitrary memory context. We also change the prototypes of nir_dest_copy and nir_alu_src/dest_copy to explicitly take an instruction so we catch this earlier in the future. Cc: "11.0" <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* nir/lower_outputs_to_temporaries: Reparent the output nameJason Ekstrand2015-09-111-0/+3
| | | | | | | | | | We copy the output, make the old output the temporary, and give the temporary a new name. The copy keeps the pointer to the old name. This works just fine up until the point where we lower things to SSA and delete the old variable and, with it, the name. Instead, we should re-parent to the copy. Reviewed-by: Eduardo Lima Mitev <[email protected]>
* i965/vec4: check writemask when bailing out at register coalesceAlejandro Piñeiro2015-09-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | | opt_register_coalesce stopped to check previous instructions to coalesce with if somebody else was writing on the same destination. This can be optimized to check if somebody else was writing to the same channels of the same destination using the writemask. Shader DB results (taking into account only vec4): total instructions in shared programs: 1781593 -> 1734957 (-2.62%) instructions in affected programs: 1238390 -> 1191754 (-3.77%) helped: 12782 HURT: 0 GAINED: 0 LOST: 0 v2: removed some parenthesis, fixed indentation, as suggested by Matt Turner v3: added brackets, for consistency, as suggested by Eduardo Lima Reviewed-by: Matt Turner <[email protected]>
* tgsi,softpipe: capitalize the tgsi_sampler_control enum valuesBrian Paul2015-09-113-48/+49
| | | | | | | We use capitalized enum values everywhere else. This improves understanding a bit too. Reviewed-by: Roland Scheidegger <[email protected]>
* nir: Store some geometry shader data in nir_shader.Kenneth Graunke2015-09-113-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | This makes it possible for NIR shaders to know the number of output vertices and the number of invocations. Drivers could also access these directly without going through gl_program. We should probably add InputType and OutputType here too, but currently those are stored as GL_* enums, and I wanted to avoid using those in NIR, as I suspect Vulkan/SPIR-V will use different enums. (We should probably make our own.) We could add VerticesIn, but it's easily computable from the input topology, so I'm not sure whether it's worth it. It's also currently not stored in gl_shader (only gl_shader_program), which would require changes to the glsl_to_nir interface or require us to store it there. This is a bit of duplication of data...ideally, we would factor these substructs out of gl_program, gl_shader_program, and nir_shader, creating a gl_geometry_info class...but it would need to go in a new place (in src/glsl?) that isn't mtypes.h nor nir.h. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/builder: Add nir_load_var() and nir_store_var() helpers.Kenneth Graunke2015-09-111-0/+27
| | | | | | | These provide a convenient way to do simple variable loads and stores. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: Use hash tables for opt_constant_propagation() kill sets.Kenneth Graunke2015-09-111-18/+28
| | | | | | | | | | | | | | Cuts compile/link time of the fragment shader in #91857 by 19% (16.28 -> 13.05). I didn't bother with the acp sets because they're smaller, but it might be worth doing as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91857 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Tapani Pälli <[email protected]>
* i965: Use hash tables for brw_fs_vector_splitting().Kenneth Graunke2015-09-111-22/+22
| | | | | | | | | | | | | | | Cuts compile/link time of the fragment shader in #91857 by 25% (21.64 -> 16.28). v2: Drop unnecessary _mesa_hash_table_destroy call, and use refs.ht->entries == 0 rather than ad-hoc checking (suggested by Timothy Arceri). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91857 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Tapani Pälli <[email protected]>
* glsl: Use hash tables in opt_constant_variable().Kenneth Graunke2015-09-111-18/+21
| | | | | | | | | | | | Cuts compile/link time of the fragment shader in bug #91857 by 31% (31.79 -> 21.64). It has over 8,000 variables so linked lists are terrible. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91857 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Tapani Pälli <[email protected]>
* meta: Use result of texture coordinate clamping operationIan Romanick2015-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the result of the complicated clamp() expression just dropped on the floor: clamp does not modify any of its parameters. Looking at the surrounding code, I believe this is supposed to modify the value of tex_coord. This change (along with a change to avoid the use of brw_blorp_framebuffer) does not affect any existing piglit tests. I'm not sure what this clamp is trying to accomplish, so I'm not sure how to write a test to exercise this path. I also noticed another bug in this code. There is no way the array texture case could possibly work. This will generate code for the TEXEL_FETCH macro like: #define TEXEL_FETCH(coord) texelFetch(texSampler, ivec3(coord), sample_map[int(2 * fract(coord.x))]); Since the coord parameter of this macro is a vec2 at all invocations, no expansion of this macro will even compile. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: Topi Pohjolainen <[email protected]> Cc: Jordan Justen <[email protected]>
* meta: Always bind the textureIan Romanick2015-09-101-3/+6
| | | | | | | | | | | | | | | | We may have been called from glGenerateTextureMipmap with CurrentUnit still set to 0, so we don't know when we can skip binding the texture. Assume that _mesa_BindTexture will be fast if we're rebinding the same texture. v2: Remove currentTexUnitSave because it is now unused. Suggested by both Neil and Anuj. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91847 Cc: "11.0" <[email protected]> Reviewed-by: Neil Roberts <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915, i965: Silence unused parameter warnings in intel_batchbuffer_advanceIan Romanick2015-09-102-0/+4
| | | | | | | | | | | | | These only occurred in release builds, but they occurred in every file that included intel_batchbuffer.h. Lots of spam. :( intel_batchbuffer.h: In function 'intel_batchbuffer_advance': intel_batchbuffer.h:153:47: warning: unused parameter 'brw' [-Wunused-parameter] intel_batchbuffer_advance(struct brw_context *brw) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915: Silence unused parameter warning in intel_miptree_create_layoutIan Romanick2015-09-103-15/+5
| | | | | | | | | | | | | | The for_bo parameter of intel_miptree_create_layout appears to be unused since 27eedca when Eric removed some Gen5 code (after the i915 and i965 drivers parted ways). intel_mipmap_tree.c: In function 'old_intel_miptree_create_layout': intel_mipmap_tree.c:77:35: warning: unused parameter 'for_bo' [-Wunused-parameter] bool for_bo) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915, i965: Silence unused parameter warnings in intel_miptree_unmap_gttIan Romanick2015-09-102-12/+4
| | | | | | | | | | | | | | | | intel_mipmap_tree.c: In function 'intel_miptree_unmap_gtt': intel_mipmap_tree.c:777:34: warning: unused parameter 'map' [-Wunused-parameter] struct intel_miptree_map *map, ^ intel_mipmap_tree.c:778:17: warning: unused parameter 'level' [-Wunused-parameter] unsigned int level, ^ intel_mipmap_tree.c:779:17: warning: unused parameter 'slice' [-Wunused-parameter] unsigned int slice) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915: Silence unused parameter warningsIan Romanick2015-09-103-7/+5
| | | | | | | | | | intel_mipmap_tree.c: In function 'old_intel_miptree_unmap_raw': intel_mipmap_tree.c:726:51: warning: unused parameter 'intel' [-Wunused-parameter] intel_miptree_unmap_raw(struct intel_context *intel, ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915: Remove prototype for nonexistent brw_miptree_layoutIan Romanick2015-09-101-2/+0
| | | | | | | | Hasn't existed in the i915 source since the i915 and i965 drivers parted ways. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Make intel_miptree_map_raw staticIan Romanick2015-09-102-19/+17
| | | | | | | | | | This hasn't been used outside intel_mipmap_tree.c since d5d4ba9 started using meta instead of the blitter for PBO TexSubImage. While we're here, remove the unused brw parameter from the function formerly known as intel_miptree_unmap_raw. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915, i965: Silence unused parameter warnings in intel_mipmap_tree.hIan Romanick2015-09-102-0/+8
| | | | | | | | | | | | | | | | | | | These only occurred in release builds, but they occurred in every file that included intel_mipmap_tree.h. Lots of spam. :( intel_mipmap_tree.h: In function 'intel_miptree_check_level_layer': intel_mipmap_tree.h:595:59: warning: unused parameter 'mt' [-Wunused-parameter] intel_miptree_check_level_layer(struct intel_mipmap_tree *mt, ^ intel_mipmap_tree.h:596:42: warning: unused parameter 'level' [-Wunused-parameter] uint32_t level, ^ intel_mipmap_tree.h:597:42: warning: unused parameter 'layer' [-Wunused-parameter] uint32_t layer) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Silence unused parameter warnings in intel_mipmap_tree.cIan Romanick2015-09-103-11/+9
| | | | | | | | | | | | | | | | | | | | | | The target parameter of compute_msaa_layout appears to be unused since 83b83fb when support for CMS textures was added for Gen7. The brw parameter of intel_get_non_msrt_mcs_alignment appears to be unused since e92fbdc when the GEN check (along with the "can we fast clear" decision) was moved to a different function. intel_mipmap_tree.c: In function 'compute_msaa_layout': intel_mipmap_tree.c:62:73: warning: unused parameter 'target' [-Wunused-parameter] compute_msaa_layout(struct brw_context *brw, mesa_format format, GLenum target, ^ intel_mipmap_tree.c: In function 'intel_get_non_msrt_mcs_alignment': intel_mipmap_tree.c:143:54: warning: unused parameter 'brw' [-Wunused-parameter] intel_get_non_msrt_mcs_alignment(struct brw_context *brw, ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: Ben Widawsky <[email protected]>
* i965: Silence unused parameter warnings in intel_fbo.cIan Romanick2015-09-101-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | intel_fbo.c: In function 'intel_alloc_window_storage': intel_fbo.c:415:48: warning: unused parameter 'ctx' [-Wunused-parameter] intel_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, ^ intel_fbo.c: In function 'intel_nop_alloc_storage': intel_fbo.c:428:74: warning: unused parameter 'rb' [-Wunused-parameter] intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, ^ intel_fbo.c:429:32: warning: unused parameter 'internalFormat' [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^ intel_fbo.c:429:55: warning: unused parameter 'width' [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^ intel_fbo.c:429:69: warning: unused parameter 'height' [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^ intel_fbo.c: In function 'intel_blit_framebuffer_with_blitter': intel_fbo.c:790:61: warning: unused parameter 'filter' [-Wunused-parameter] GLbitfield mask, GLenum filter) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* st/mesa: set the vbuffer to NULL if we are skipping itDave Airlie2015-09-111-1/+5
| | | | | | | | | | | | If we skip a vbuffer we need to make sure we NULL out the contents, otherwise when it gets passed to the driver it will get confused. This was hit by: GL41-CTS.gpu_shader_fp64.varyings Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965/cs: Enable barrier in MEDIA_INTERFACE_DESCRIPTORJordan Justen2015-09-104-1/+8
| | | | | | | | | | | | | Enable barrier in MEDIA_INTERFACE_DESCRIPTOR if the program uses the barrier() GLSL function. On Ivy Bridge and Haswell, this allows the piglit test tests/spec/arb_compute_shader/execution/simple-barrier-atomics.shader_test to pass. On gen8, this enables a similar test with a local group size of 896 to pass. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>