summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: update comment on gl_display_listBrian Paul2018-01-241-3/+1
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: whitespace clean-ups in mtypes.hBrian Paul2018-01-241-68/+82
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: remove unused MAT_INDEX_AMBIENT/DIFFUSE/SPECULAR contantsBrian Paul2018-01-241-4/+0
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: move DLIST_DANGLING_REFS from mtypes.h to vbo_save_api.cBrian Paul2018-01-242-9/+5
| | | | | | It's only used in this file. Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: replace assert(0) with unreachable()Brian Paul2018-01-245-11/+10
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: fix, add comment in vbo_save.hBrian Paul2018-01-241-2/+2
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: whitespace, formatting fixes in vbo_split.[ch]Brian Paul2018-01-242-60/+65
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* i965: Don't try to disable render aux buffers for computeTopi Pohjolainen2018-01-241-2/+4
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104546 Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* radeon: remove left over dead codeEric Engestrom2018-01-231-6/+0
| | | | | | | Fixes: 4e0d99a63588c67a955f "r100: Use shared debug code" Cc: Pauli Nieminen <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Drop render_target_start from binding table struct.Kenneth Graunke2018-01-221-6/+4
| | | | | | | | | We have to start render targets at binding table index 0 in order to use headerless FB write messages, and in fact already assume this in a bunch of places in the code. Let's finish that off, and not bother storing 0 in a struct to pretend to add it in a few places. Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: make brw_context::num_samples unsigned intEmil Velikov2018-01-221-1/+1
| | | | | | | | It is never a negative number. Variable is compared against unsigned values and passed into functions that expect unsigned int. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: provide static inline st_init_vdpau_functionsEmil Velikov2018-01-222-6/+8
| | | | | | | | | The ifdef spaghetty in st_vdpau.c is rather confusing and misleading. Simplily it by introducing a static inline helper noop (when HAVE_ST_VDPAU is not defined) in the header. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Christian König <[email protected]>
* i965: Accept CONTEXT_ATTRIB_PRIORITY for brwCreateContextChris Wilson2018-01-221-1/+3
| | | | | | | | | | | | | | | | | The forward port of commit 6d87500fe12e ("dri: Change __DriverApiRec::CreateContext to take a struct for attribs") failed to adapt the set of allowed attributes for the earlier introduction of context priorities (commit 1617fca6d12e "i965: Pass the EGL/DRI context priority through to the kernel"). Fixes: 6d87500fe12e ("dri: Change __DriverApiRec::CreateContext to take a struct for attribs") Signed-off-by: Chris Wilson <[email protected]> Cc: Adam Jackson <[email protected]> Cc: Nicolai Hähnle <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Cc: [email protected]
* i965: Set tiling on BOs imported with modifiersJason Ekstrand2018-01-211-1/+10
| | | | | | | | | | We need this to ensure that GTT maps work on buffers we get from Vulkan on the off chance that someone does a readpixels or something. Soon, we will be removing GTT maps from i965 entirely and this can be reverted. None the less, it's needed for stable. Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* i965/bufmgr: Add a create_from_prime_tiled functionJason Ekstrand2018-01-212-8/+35
| | | | | | | This new function is an import and a set tiling in one go. Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* i965/miptree: Use the tiling from the modifier instead of the BOJason Ekstrand2018-01-211-4/+5
| | | | | | | | | | | This fixes a bug where we were taking the tiling from the BO regardless of what the modifier said. When we got images in from Vulkan where it doesn't set the tiling on the BO, we would treat them as linear even though the modifier expressly said to treat it as Y-tiled. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* i965/miptree: Add an explicit tiling parameter to create_for_boJason Ekstrand2018-01-216-10/+24
| | | | | | | | Otherwise, create_for_bo will just grab the tiling from the BO which is not what we want when using modifiers. Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* mesa: Only require independent blending for GLES 3.2.Eric Anholt2018-01-211-1/+1
| | | | | | | | | We've been requiring this since GLES 3.0 was introduced, but the GLES 3.2 spec is the one that has "Supporting blending on a per-draw-buffer basis" in the new features. V3D 3.3 would require lowering blending to shader code to implement independent blending. Reviewed-by: Tapani Pälli <[email protected]>
* i965: Delete completely bogus commentKenneth Graunke2018-01-201-5/+0
| | | | | | | | | | | This hasn't been true in 6+ years, if it was even true then. Before we rewrote the compiler and introduced GLSL IR in 2010-2011, i965 used to have two compiler backends for WM programs, based on Mesa IR. One handled flow control and was SIMD8-only, while the other was SIMD16 only and didn't handle flow control. Or something like that. Even then, this certainly didn't handle vertex shaders, so "all ... code generation" is a bit strong.
* autotools: include meson build files in tarballDylan Baker2018-01-1912-7/+22
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: Avoid problems from referencing orphaned BOs after growing.Kenneth Graunke2018-01-192-24/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Growing the batch/state buffer is a lot more dangerous than I thought. A number of places emit multiple state buffer sections, and then write data to the returned pointer, or save a pointer to brw->batch.state.bo and then use it in relocations. If each call can grow, this can result in stale map references or stale BO pointers. Furthermore, fences refer to the old batch BO, and that reference needs to continue working. To avoid these woes, we avoid ever swapping the brw->batch.*.bo pointer, instead exchanging the brw_bo structures in place. That way, stale BO references are fine - the GEM handle changes, but the brw_bo pointer doesn't. We also defer the memcpy until a quiescent point, so callers can write to the returned pointer - which may be in either BO - and we'll sort it out and combine the two properly in the end. v2/v3: - Handle stale pointers in the shadow copy case, where realloc may or may not move our shadow copy to a new address. - Track the partial map explicitly, to avoid problems with buffer reuse where multiple map modes exist (caught by Chris Wilson). v4: - Don't use realloc in the CPU shadow case, it isn't safe. Fixes: 2dfc119f22f257082ab0 "i965: Grow the batch/state buffers if we need space and can't flush." Reviewed-by: Iago Toral Quiroga <[email protected]> [v3] Reviewed-by: Chris Wilson <[email protected]>
* i965: Rename 'aux' to 'prog_data' in program cache.Kenneth Graunke2018-01-191-15/+16
| | | | | | | 'aux' is a very generic name, suggesting it can be a bunch of things. However, it's always the brw_*_prog_data structure. So, call it that. Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa/program: Fix -Wunused-param warningGert Wollny2018-01-194-6/+4
| | | | | | | | v2: Don't annotate, but remove the unused ctx parameter Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/program/prog_execute.c: Silence -Wunused-paramGert Wollny2018-01-191-6/+3
| | | | | | | | v2: Don't annotate, but remove the unused ctx parameter Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Make numSamples an unsigned intGert Wollny2018-01-196-8/+8
| | | | | | | | | | As a followup to the previous patch propagate the change of numSamples from int to unsigned to gl_config::samples and consequently fix some -Wsign-compare warnings. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* vbo: fix VBO optimization regressionBrian Paul2018-01-182-4/+7
| | | | | | | | | | | | | | | The optimization in change 8e4efdc895ea ("vbo: optimize some display list drawing") missed the loopback case. This is used when the glBegin/End primitive doesn't have a uniform set of vertex attributes. The new Piglit gl-1.0-dlist-materials test hits this. So check the aligned_vertex_buffer_offset(list) value and adjust the buffer offset accordingly. We also need to remove the 'start == 0' assertion in the loopback code since it no longer applies. Reviewed-by: Roland Scheidegger <[email protected]>
* i965: Bind null render targets for shadow sampling + color.Kenneth Graunke2018-01-181-1/+32
| | | | | | | | | | | | | | | | | | | Portal 2 appears to bind RGBA8888_UNORM textures to a sampler2DShadow, and calls shadow2D() on it. This causes undefined behavior in OpenGL. Unfortunately, our sampler appears to hang in this scenario, which is not acceptable. Just give them a null surface instead, which returns all zeroes. Fixes GPU hangs in Portal 2 on Kabylake. Huge thanks to Jason Ekstrand for noticing this crazy behavior while sifting through crash dumps. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104487 Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/screen: Allow drirc to set 'allow_rgb10_configs' again.Mario Kleiner2018-01-181-1/+6
| | | | | | | | | | | | | | Since setup of ALLOW_RGB10_CONFIGS was moved to i965's own brw_config_options.xml, this was hard-coded to false and could not be overriden by drirc. Add some parsing into i965's private screen->optionCache to enable drirc again. Fixes: b391fb26df9f1b ("dri_util: remove ALLOW_RGB10_CONFIGS option (v2)") Signed-off-by: Mario Kleiner <[email protected]> Cc: Marek Olšák <[email protected]> Cc: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/st: translate SO info in glsl_to_nir() caseRob Clark2018-01-181-4/+43
| | | | | | | | | | | | | | | | | | | | | | | This was handled for VS, but not for GS. Fixes for gallium drivers using nir: spec@arb_gpu_shader5@arb_gpu_shader5-xfb-streams-without-invocations spec@arb_gpu_shader5@arb_gpu_shader5-xfb-streams* spec@arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs* spec@ext_transform_feedback@geometry-shaders-basic spec@ext_transform_feedback@* use_gs [email protected]@execution@geometry@primitive-id* [email protected]@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip * [email protected]@transform-feedback-builtins [email protected]@transform-feedback-type-and-size v2: don't call st_translate_program_stream_output) for TCS v3: drop scanning patch outputs as TCS can't output xfb Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Karol Herbst <[email protected]>
* i965: Pass brw_growing_bo to grow_buffer().Kenneth Graunke2018-01-171-11/+9
| | | | | | Cleaner. Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Make a helper for recreating growing buffers.Kenneth Graunke2018-01-171-13/+17
| | | | | | | | | | | Now that we have two of these, we're duplicating a bunch of this logic. The next commit will add more logic, which would make the duplication seem worse. This ends up setting EXEC_OBJECT_CAPTURE on the batch, which isn't necessary (it's already captured), but it should be harmless. Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Replace cpu_map pointers with a "use_shadow_copy" boolean.Kenneth Graunke2018-01-172-21/+20
| | | | | | | | Having a boolean for "we're using malloc'd shadow copies for all buffers" is cleaner than having a cpu_map pointer for each. It was okay when we had one buffer, but this is more obvious. Reviewed-by: Iago Toral Quiroga <[email protected]>
* st/mesa: assume that user constant buffers are always supportedMarek Olšák2018-01-174-34/+6
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAPMarek Olšák2018-01-171-3/+3
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/mesa: expose ARB_sync unconditionallyMarek Olšák2018-01-171-5/+2
| | | | | | | All drivers support it. Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium: remove PIPE_CAP_TWO_SIDED_STENCILMarek Olšák2018-01-171-3/+2
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: move gl_external_samplers() to program.[ch]Brian Paul2018-01-173-17/+22
| | | | | | | The function is only called from a couple places. It doesn't make sense to have it in mtypes.h Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: include util/bitscan.h in st_glsl_to_tgsi_temprename.cppBrian Paul2018-01-171-5/+6
| | | | | | And use "" instead of <> for including Mesa headers, as we do elsewhere. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: remove unneeded #includes of main/compiler.hBrian Paul2018-01-1716-16/+0
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove unneeded #includes of main/compiler.hBrian Paul2018-01-1713-19/+0
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: include main/compiler.h in st_cb_queryobj.cBrian Paul2018-01-171-0/+1
| | | | | | To get CPU_TO_LE32() macro. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: include util/macros.h in format_fallback.cBrian Paul2018-01-171-0/+1
| | | | | | To get definition of unreachable() macro. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/program: change validate_inputs() local var 'inputs' to GLbitfield64Brian Paul2018-01-171-1/+1
| | | | | | | | | Both state->prog->info.inputs_read and state->InputsBound are GLbitfield64 so it seems that the OR of those values should be of the same type. I'm not sure this fixes any actual issues though. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: reindent vbo_attrib.h to use 3 spacesBrian Paul2018-01-171-50/+50
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: whitespace, formatting fixes in vbo_exec_api.cBrian Paul2018-01-171-99/+98
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: add assertions, comments in vbo_exec_api.cBrian Paul2018-01-171-1/+7
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: whitespace, formatting fixes in vbo_exec_draw.cBrian Paul2018-01-171-64/+64
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: use inputs_read var to simplify codeBrian Paul2018-01-172-8/+8
| | | | | | | | v2: add some const qualifiers, per Ian. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: whitespace, formatting fixes in vbo_split_copy.cBrian Paul2018-01-171-160/+144
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vbo: use a new local 'array' variable in bind_vertex_list() loopBrian Paul2018-01-171-12/+13
| | | | | | | | Make the code a bit more concise. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>