aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa/main/ff_frag: Don't bother with VARYING_BIT_FOGC.Gustaw Smolarczyk2017-04-081-3/+1
| | | | | | | It's not used. Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Remove unused struct.Gustaw Smolarczyk2017-04-081-8/+0
| | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Reduce the size of nr_enabled_units.Gustaw Smolarczyk2017-04-081-1/+1
| | | | | | | | Since it holds values from 0 to 8, 4 bits will suffice. Signed-off-by: Gustaw Smolarczyk <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Remove enabled_units.Gustaw Smolarczyk2017-04-081-3/+1
| | | | | | | | | Its only usage is easily replaced by nr_enabled_units. As for cache key part, unit[i].enabled should be enough. Signed-off-by: Gustaw Smolarczyk <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Use correct constant.Gustaw Smolarczyk2017-04-081-1/+1
| | | | | | | | | | Since fixed-function shaders are restricted to MAX_TEXTURE_COORD_UNITS texture units, use this constant instead of MAX_TEXTURE_UNITS. This reduces the array size from 32 to 8. Signed-off-by: Gustaw Smolarczyk <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: simplify and optimise vertex bindings trackingTimothy Arceri2017-04-081-5/+3
| | | | | | | | We only need to update it if something changes. Also _mesa_bind_vertex_buffer() will update the mask when binding to a NULL or default buffer so no need to do that update here. Reviewed-by: Juan A. Suarez Romero <[email protected]>
* st/mesa: silence unused/uninitialized var warningsBrian Paul2017-04-071-1/+2
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: fix renderbuffer leakTimothy Arceri2017-04-072-1/+6
| | | | | | | | | | | We don't need to call _mesa_reference_renderbuffer() for the first assignment as refCount starts at 1. For swrast we work around the fact we will indirectly call _mesa_reference_renderbuffer() by resetting refCount to 0. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa/main: simplify _mesa_IsRenderbuffer()Samuel Pitoiset2017-04-071-7/+6
| | | | | | | _mesa_lookup_renderbuffer() already checks if 'id' is non-zero. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: stop abstracting texture object hashtable lockingTimothy Arceri2017-04-073-23/+5
| | | | | | | This doesn't do anything useful so just remove it. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: stop abstracting buffer object hashtable lockingTimothy Arceri2017-04-073-31/+12
| | | | | | | This doesn't do anything useful so just remove it. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* i965/blorp: Bump the batch space estimateJason Ekstrand2017-04-061-1/+1
| | | | | | | | | | | | | | Commit f938354362655a378d474c5f79c52cea9852ab91 recently increased the alignment on vertex buffer data from 32 to 64. This caused us to consume a bit more batch than we were before and we now go over the estimate by a small amount on certain blits on gen8+. This commit bumps then gen8 batch estimate by a bit to compensate. Haswell and older still seems to be well within the limit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100582 Reviewed-by: Iago Toral Quiroga <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]>
* intel/gen_decoder: return -1 for unknown command formatsJordan Justen2017-04-061-4/+4
| | | | | | | | | | | | | | | | | Decoding with aubinator encountered a command of 0xffffffff. With the previous code, it caused aubinator to jump 255 + 2 dwords to start decoding again. Instead we can attempt to detect the known instruction formats. If the format is not recognized, then we can advance just 1 dword. v2: * Update aubinator_error_decode * Actually convert the length variable returned into a *signed* integer in aubinator.c, intel_batchbuffer.c and aubinator_error_decode.c. Signed-off-by: Jordan Justen <[email protected]> Acked-by: Lionel Landwerlin <[email protected]>
* st/pbo: select the right swizzle for instance IDsNicolai Hähnle2017-04-061-1/+2
| | | | | | | | | The system value only has an X component, and radeonsi started checking that in debug builds. Reported-by: Michel Dänzer <[email protected]> Fixes: 4cf29427770f ("radeonsi: support 64-bit system values") Reviewed-by: Marek Olšák <[email protected]>
* mesa: use internal function when deleting buffersTimothy Arceri2017-04-061-16/+16
| | | | | | | This avoids validation and looking up the buffer target for a second time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: rework bind_buffer_object()Timothy Arceri2017-04-061-18/+16
| | | | | | | | This allows internal users to pass buffer objects directly and allows for KHR_no_error support to be more easily added. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: small texstate tidy upTimothy Arceri2017-04-061-4/+5
| | | | | | | | Possibly more efficient, either way it makes the code easier to follow. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: tidy up renderbuffer RefCount initialisationTimothy Arceri2017-04-063-4/+1
| | | | | | | | | | | 42aaa548 changed the renderbuffer initialisation of RefCount from 1 to 0. This is inconsitent with how we use RefCount elsewhere. Also every driver implementation of NewRenderbuffer() calls _mesa_init_renderbuffer() so its safe to set it there. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: enable ARB_shader_ballotNicolai Hähnle2017-04-051-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: implement ARB_shader_ballot system variablesNicolai Hähnle2017-04-051-0/+16
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: implement ARB_shader_ballot builtin functionsNicolai Hähnle2017-04-051-0/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* glsl: add ARB_shader_ballot operationsNicolai Hähnle2017-04-051-0/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add GL_ARB_shader_ballot boilerplateNicolai Hähnle2017-04-052-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: plumbing for sparse buffersNicolai Hähnle2017-04-051-0/+20
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: enable ARB_sparse_buffer when supportedNicolai Hähnle2017-04-051-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: implement sparse buffer commitmentNicolai Hähnle2017-04-052-0/+76
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: implement sparse storage buffer allocationNicolai Hähnle2017-04-051-6/+23
| | | | | | | v2: - spec quote and style (Ian) Reviewed-by: Marek Olšák <[email protected]>
* mesa: implement SPARSE_BUFFER_PAGE_SIZE_ARBNicolai Hähnle2017-04-053-0/+7
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Add GL_ARB_sparse_buffer boilerplateNicolai Hähnle2017-04-055-0/+25
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Replace program locks with atomic inc/dec.Matt Turner2017-04-052-13/+3
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* i965/blorp: Align vertex buffers to 64BJason Ekstrand2017-04-041-1/+13
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]>
* mesa: Require mipmap completeness for glCopyImageSubData(), sometimes.Kenneth Graunke2017-04-041-2/+23
| | | | | | | | | | This patch makes glCopyImageSubData require mipmap completeness when the texture object's built-in sampler object has a mipmapping MinFilter. Fixes (on i965): dEQP-GLES31.functional.debug.negative_coverage.*.buffer.copy_image_sub_data Reviewed-by: Roland Scheidegger <[email protected]>
* drirc: Set glsl_zero_init for Kerbal Space Program.Francisco Jerez2017-04-041-0/+8
| | | | | | | | | | | This fixes the stripes of garbage rendered on the floor of the vehicle assembly building among other rendering issues. The reason for the misrendering seems to be that some of the GLSL shaders used by the application use variables before initializing them, incorrectly assuming that they will be implicitly set to zero by the implementation. Acked-by: Matt Turner <[email protected]>
* gallium: decrease the size of pipe_resource - 64 -> 48 bytesMarek Olšák2017-04-043-20/+26
| | | | | | | Some other changes needed here. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/glthread: Avoid unnecessary batch reallocationBartosz Tomczyk2017-04-041-6/+9
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: fix misaligned address accessBartosz Tomczyk2017-04-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | Address sanitizer reports lot of misaligned access: SUMMARY: AddressSanitizer: undefined-behavior main/marshal.c:276:31 in main/marshal.c:276:31: runtime error: load of misaligned address 0x631000104866 for type 'const GLuint' (aka 'const unsigned int'), which requires 4 byte alignment 0x631000104866: note: pointer points here 92 88 00 00 00 00 00 00 4a 03 0c 00 93 88 00 00 00 00 00 00 02 01 0c 00 40 8d 00 00 00 00 00 00 ^ SUMMARY: AddressSanitizer: undefined-behavior main/marshal_generated.c:28725:12 in main/marshal_generated.c:28726:12: runtime error: member access within misaligned address 0x6310003fc874 for type 'struct marshal_cmd_VertexAttribPointer', which requires 8 byte alignment 0x6310003fc874: note: pointer points here 01 00 00 00 7a 02 20 00 00 00 00 00 be be be be be be be be be be be be be be be be be be be be ^ SUMMARY: AddressSanitizer: undefined-behavior main/marshal_generated.c:28726:12 in main/marshal_generated.c:28726:12: runtime error: store to misaligned address 0x6310003fc87c for type 'GLint' (aka 'int'), which requires 8 byte alignment 0x6310003fc87c: note: pointer points here 00 00 00 00 be be be be be be be be be be be be be be be be be be be be be be be be be be be be Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Fix blob memory leakBartosz Tomczyk2017-04-041-1/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* aubinator/gen_decoder/i965: decode instructions from dword 0Lionel Landwerlin2017-04-031-4/+4
| | | | | | | | | Some packets like 3DSTATE_VF_STATISTICS, 3DSTATE_DRAWING_RECTANGLE, 3DPRIMITIVE, PIPELINE_SELECT, etc... have configurable fields in dword0, we probably want to print those. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/mesa: add st_convert_image()Samuel Pitoiset2017-04-032-47/+63
| | | | | | | | | | | | | Should be used by the state tracker when glGetImageHandleARB() is called in order to create a pipe_image_view template. v3: - move the comment to *.c v2: - make 'st' const - describe the function Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: make 'st' const in st_mesa_format_to_pipe_format()Samuel Pitoiset2017-04-032-2/+2
| | | | | | | | | This avoids a compilation warning since st_convert_image() requires 'st' to be const. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/glthread: Call unmarshal_batch directly in glthread_finishBartosz Tomczyk2017-04-031-12/+32
| | | | | | | | Call it directly when batch queue is empty. This avoids costly thread synchronisation. This commit improves performance of games that have previously regressed with mesa_glthread=true. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: disable glthread when DEBUG_OUTPUT_SYNCHRONOUS is enabledTimothy Arceri2017-04-032-0/+45
| | | | | | | | | | | | | We could re-enable it also but I haven't tested that yet, and I'm not sure we care much anyway. V2: don't disable it from with the call itself. We need a custom marshalling function or we get stuck waiting for thread to finish. V3: tidy up redundant code copied from generated version. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/main: Fix memset in formatquery.cEdward O'Callaghan2017-04-021-1/+2
| | | | | | | | | v2: We explicitly set each member to -1 over using a confusing memset(). Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: ir_explog_to_explog2 is no moreErik Faye-Lund2017-04-012-2/+6
| | | | | | | | | | | | | | Since 63684a9a ("glsl: Combine many instruction lowering passes into one.", Thu Nov 18 2010), we no longer have anything called ir_explog_to_explog2. So it's only confusing to have those references there. Update with the appropriate method, so people can grep for it in the current tree if they encounter it. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: avoid aliasing violation in st_cb_perfmon.cErik Faye-Lund2017-04-011-3/+3
| | | | | Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st: Add cubeMapFace parameter to st_finalize_texture.Michal Srb2017-04-016-7/+9
| | | | | | | | | | | st_finalize_texture always accesses image at face 0, but it may not be set if we are working with cubemap that had other face set. This fixes crash in piglit same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT. Cc: [email protected] Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: Add support for NV_fill_rectangleLyude2017-03-312-0/+3
| | | | | | | | | Signed-off-by: Lyude <[email protected]> Changes since v1: - Fix commit name Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Add support for GL_NV_fill_rectangleLyude2017-03-314-2/+26
| | | | | | | | | | | | | | | | Since we don't have the bits required to support this in OpenGLES yet, this only enables support for Desktop OpenGL Signed-off-by: Lyude <[email protected]> Changes since v1: - Simply _mesa_PolygonMode() a little bit - Fix formatting in OpenGL spec excerpts - Move polygon mode checking into _mesa_valid_to_render() Changes since v3: - Improve error message for invalid drawings with GL_FILL_RECTANGLE_NV Reviewed-by: Ilia Mirkin <[email protected]>
* tnl: remove unused var to silence warningBrian Paul2017-03-311-2/+0
| | | | Trivial.
* st/glsl_to_tgsi: fix 64-bit integer bit shiftsNicolai Hähnle2017-03-311-5/+15
| | | | | | | | | | | | | | Fix a bug that was caused by a type mismatch in the shift count between GLSL and TGSI. I briefly considered adjusting the TGSI semantics, but since both LLVM and AMD GCN require both arguments to be of the same type, it makes more sense to keep TGSI as-is -- it reflects the underlying implementation better. I'm also sending out piglit tests that expose this error. v2: use the right number of components for the temporary register Reviewed-by: Marek Olšák <[email protected]>