summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove NV_fragment_program remnants from dlist.c.Matt Turner2016-03-011-14/+7
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* mesa: Remove NV_fragment_program_option enable bit.Matt Turner2016-03-012-2/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program opcode parsing.Matt Turner2016-03-012-9/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program scalar suffix parsing.Matt Turner2016-03-011-17/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program_option parsing support.Matt Turner2016-03-011-44/+5
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program Abs support.Matt Turner2016-03-0110-80/+4
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove incorrect comment about OPCODE_TXD.Matt Turner2016-03-011-1/+1
| | | | | | | | The table in prog_instruction.h is correct. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_TXP_NV.Matt Turner2016-03-015-30/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Clean up after previous commit.Matt Turner2016-03-011-43/+41
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove condition-code and precision support.Matt Turner2016-03-0115-544/+62
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_KIL_NV.Matt Turner2016-03-018-54/+6
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove RelAddr2 support.Matt Turner2016-03-015-41/+3
| | | | | | | | Looks like more never-used crap from the first geometry shader attempt. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Mark table const.Matt Turner2016-03-011-1/+1
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* mesa: Remove EmitCondCodes.Matt Turner2016-03-014-25/+2
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* glsl: Initialize gl_shader_program::EmptyUniformLocations.Matt Turner2016-03-011-0/+2
| | | | | | | | | Commit 65dfb30 added exec_list EmptyUniformLocations, but only initialized the list if ARB_explicit_uniform_location was enabled, leading to crashes if the extension was not available. Cc: "11.2" <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* i965/meta: Don't pollute the framebuffer namespaceIan Romanick2016-03-013-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebufferIan Romanick2016-03-013-8/+25
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Don't pollute the framebuffer namespaceIan Romanick2016-03-014-54/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Fixes piglit tests: - object-namespace-pollution glGetTexImage-compressed framebuffer - object-namespace-pollution glGenerateMipmap framebuffer Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
* meta/decompress: Track framebuffer using gl_framebuffer instead of GL API ↵Ian Romanick2016-03-012-7/+12
| | | | | | | object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta/generate_mipmap: Track framebuffer using gl_framebuffer instead of GL ↵Ian Romanick2016-03-012-24/+16
| | | | | | | API object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebufferIan Romanick2016-03-013-8/+40
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffersIan Romanick2016-03-014-7/+7
| | | | | | | | | | | | | This enables later patches that will stop calling _mesa_GenFramebuffers or _mesa_CreateFramebuffers which pollute the framebuffer namespace. For framebuffers, the Bind call is still necessary. sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \ src/mesa/drivers/common/*.c Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffersIan Romanick2016-03-013-4/+4
| | | | | | | | | | | | | This enables later patches that will stop calling _mesa_GenFramebuffers or _mesa_CreateFramebuffers which pollute the framebuffer namespace. For framebuffers, the Bind call is still necessary. sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \ src/mesa/drivers/dri/i965/*.c Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Save and restore the framebuffer using gl_framebuffer instead of GL ↵Ian Romanick2016-03-012-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | API object handle Some meta operations can be called recursively. Future changes (the "Don't pollute the ... namespace" changes) will cause objects with invalid names to be used. If a nested meta operation tries to restore an object named 0xDEADBEEF, it will fail. This also fixes another latent bug in meta. In a multithreaded, multicontext application, one thread can delete an object that is bound in another thread. That object continues to exist until it is unbound (i.e., its refcount drops to zero). Meta unbinds objects all over the place. As a result, the rebind in _mesa_meta_end could fail because the object vanished! See https://bugs.freedesktop.org/show_bug.cgi?id=92363#c8. Using _mesa_reference_<object type> to save and restore the objects prevents the refcount from going to zero. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: Refactor bind_framebuffer to make _mesa_bind_framebuffersIan Romanick2016-03-012-12/+26
| | | | | | | | | | Fixing dd_function_table::BindFramebuffer will come later because that change is probably not suitable for stable. v2: Fix whitespace issue noticed by Topi. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Use _mesa_check_framebuffer_status instead of _mesa_CheckFramebufferStatusIan Romanick2016-03-014-12/+12
| | | | | | | | | | | | sed -i -e 's/_mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER/_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer/' \ -e 's/_mesa_CheckFramebufferStatus(GL_FRAMEBUFFER[^)]*/_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer/' \ -e 's/_mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER/_mesa_check_framebuffer_status(ctx, ctx->ReadBuffer/' \ $(grep -rl _mesa_CheckFramebufferStatus src/mesa/drivers) The second expression catches both GL_FRAMEBUFFER and GL_FRAMEBUFFER_EXT. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Obvious refactor of _mesa_meta_framebuffer_texture_imageIan Romanick2016-03-011-21/+5
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Convert _mesa_meta_bind_fbo_image to take a gl_framebuffer instead of ↵Ian Romanick2016-03-015-49/+61
| | | | | | | | | | | | | | | | a GL API handle Also change the name of the function to _mesa_meta_framebuffer_texture_image. The function is basically a wrapper around _mesa_framebuffer_texture (which is used to implement glFramebufferTexture1D and friends), so it makes sense for it's name to be similar to that. The next patch will clean _mesa_meta_framebuffer_texture_image up considerably. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Push most TES inputs in vec4 mode.Kenneth Graunke2016-02-292-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This is commit 4a1c8a3037cd29938b2a6e2c680c341e9903cfbe for vec4 mode.) Using the push model for inputs is much more efficient than pulling inputs - the hardware can simply copy a large chunk into URB registers at thread creation time, rather than having the thread send messages to request data from the L3 cache. Unfortunately, it's possible to have more TES inputs than fit in registers, so we have to fall back to the pull model in some cases. However, it turns out that most tessellation evaluation shaders are fairly simple, and don't use many inputs. An arbitrary cut-off of 24 vec4 slots (12 registers) should suffice. (I chose this instead of the 32 vec4 slots used in the scalar backend to avoid regressing a few Piglit tests due to the vec4 register allocator being too stupid to figure out what to do. We probably ought to fix that, but it's a separate issue.) Improves performance in GPUTest's tessmark_x64 microbenchmark by 41.5394% +/- 0.288519% (n = 115) at 1024x768 on my Clevo W740SU (with Iris Pro 5200). Improves performance in Synmark's Gl40TerrainFlyTess microbenchmark by 38.3576% +/- 0.759748% (n = 42). v2: Simplify abs/negate handling, as requested by Matt. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/fbobject: propogate Layered when reusing attachments.Dave Airlie2016-03-011-0/+1
| | | | | | | | | | | | When reusing a depth attachment as a stencil, we need to propogate the layered bit, otherwise we fail to complete the framebuffer. discovered running ./bin/fbo-depth-array depth-layered-clear on virgl on haswell. Reviewed-by: Marek Olšák <[email protected]> Cc: "11.1 11.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Android: clean-up and fix DRI module path handlingRob Herring2016-02-293-5/+2
| | | | | | | | | | | | | | | MESA_DRI_MODULE_PATH is only getting set for classic DRI drivers and may or may not be set correctly for gallium_dri.so depending on the makefile include ordering. For Android 6 and earlier it is fine, but with build system changes in AOSP master, it is not. Move the path variables to a single place at the top level and introduce MESA_DRI_MODULE_REL_PATH for Android 5 and later which require relative paths. With this, there is a single variable to change. Cc: "11.1 11.2" <[email protected]> Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: remove dependence on .SECONDEXPANSIONRob Herring2016-02-291-9/+13
| | | | | | | | | | With the Android build system changes to ninja/kati, the use of .SECONDEXPANSION is no longer supported. Fix this by avoiding rule specific variables and using $(transform-generated-source). Cc: "11.1 11.2" <[email protected]> Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: fix build break from nir/glsl move to compiler/Rob Herring2016-02-298-10/+10
| | | | | | | | | | | | | | | | Commits a39a8fbbaa12 ("nir: move to compiler/") and eb63640c1d38 ("glsl: move to compiler/") broke Android builds. Fix them. There is also a missing dependency between generated NIR headers and several libraries. This isn't a new issue, but seems to have been exposed by the NIR move. Built with i915, i965, freedreno, r300g, r600g, vc4, and virgl enabled. Cc: "11.2" <[email protected]> Cc: Mauro Rossi <[email protected]> Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: add GL_OES_gpu_shader5 and GL_EXT_gpu_shader5 supportIlia Mirkin2016-02-271-0/+2
| | | | | | | | | | | The two extensions are identical, and are largely taking bits of already existing desktop functionality. We continue to do a poor job of supporting the 'precise' keyword, just like we do on desktop. This passes the relevant dEQP tests that I could find. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: expose GL_EXT_texture_sRGB_decode on GLES 3.0+Ilia Mirkin2016-02-262-3/+2
| | | | | | | | Could be exposed on earlier GLES versions if we supported EXT_sRGB, but we don't, for now. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i965/cfg: Fix comment list punctuationIan Romanick2016-02-261-1/+1
| | | | | | Trivial Signed-off-by: Ian Romanick <[email protected]>
* i965/cfg: Split out dead control flow paths to simplify both pathsIan Romanick2016-02-261-55/+38
| | | | | | | v2: Fix some bad indentation. Suggested by Curro. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/cfg: Don't handle fully empty if/else/endifIan Romanick2016-02-261-10/+4
| | | | | | | | | | This will now never occur. The empty if-else part would have already been removed leaving an empty if-endif part. No shader-db changes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/cfg: Eliminate an empty then-branch of an if/else/endifIan Romanick2016-02-261-0/+14
| | | | | | | | | | | | | | | | On BDW, total instructions in shared programs: 8448571 -> 8448367 (-0.00%) instructions in affected programs: 21000 -> 20796 (-0.97%) helped: 116 HURT: 0 v2: Remove spurious attempt to combine the if_block with the (removed!) else_block. Suggested by Matt and Curro. Correct the comment describing what the new pass does. Suggested by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/cfg: Track prev_block and prev_inst explicitly in the whole functionIan Romanick2016-02-261-5/+7
| | | | | | | | This provides a trivial simplification now, and it makes some future changes more straight forward. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/cfg: Slightly rearrange dead_control_flow_eliminateIan Romanick2016-02-261-56/+57
| | | | | | | | | 'git diff -w' is a bit more illustrative. A couple declarations were moved, the continue was removed, and the code was reindented. This will simplify future changes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965: Simplify brw_nir_lower_vue_inputs() slightly.Kenneth Graunke2016-02-261-11/+6
| | | | | | | The same code appeared in both branches; pull it above the if statement. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Avoid recalculating the normal VUE map for IO lowering.Kenneth Graunke2016-02-264-51/+30
| | | | | | | | The caller already computes it. Now that we have stage specific functions, it's really easy to pass this in. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Avoid recalculating the tessellation VUE map for IO lowering.Kenneth Graunke2016-02-264-26/+25
| | | | | | | | The caller already computes it. Now that we have stage specific functions, it's really easy to pass this in. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Eliminate brw_nir_lower_{inputs,outputs,io} functions.Kenneth Graunke2016-02-267-93/+33
| | | | | | | | | | | | Now that each stage is directly calling brw_nir_lower_io(), and we have per-stage helper functions, it makes sense to just call the relevant one directly, rather than going through multiple switch statements. This also eliminates stupid function parameters, such as the two that only apply to vertex attributes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Split brw_nir_lower_inputs/outputs into per-stage functions.Kenneth Graunke2016-02-261-130/+174
| | | | | | | | These functions are both giant switch statements where most cases don't overlap at all. Let's put the bulk of the work in per-stage helpers. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Remove catch-all nir_lower_io call with specific cases.Kenneth Graunke2016-02-261-1/+4
| | | | | | | | | Most cases already call nir_lower_io explicitly for input and output lowering. This catch all isn't very useful anymore - we can just add it to the remaining cases. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Move optimizations from brw_nir_lower_io to brw_postprocess_nir.Kenneth Graunke2016-02-261-1/+3
| | | | | | | | | | This simplifies things. Every caller of brw_nir_lower_io() immediately calls brw_postprocess_nir(). The only real change this will have is that we get an extra brw_nir_optimize() call when compiling compute shaders, but that seems fine. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Always do NIR IO lowering at specialization time.Kenneth Graunke2016-02-262-8/+1
| | | | | | | | | | | | | | We've now hit literally every case other than geometry shaders (and compute shaders, but those are a no-op). So, let's just move geometry shaders over too and be done with it. The only advantage to doing this at link time was to save the expense of running the pass on recompiles. But we're already running a lot of passes, and the extra code complexity isn't worth it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965: Make an is_scalar boolean in brw_compile_gs().Kenneth Graunke2016-02-261-4/+4
| | | | | | | | | Shorter than compiler->scalar_stage[MESA_SHADER_GEOMETRY], which can help with line-wrapping. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>