summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Introduce scheduling of QPU instructions.Eric Anholt2014-12-016-126/+722
| | | | | | | | | | | | This doesn't reschedule much currently, just tries to fit things into the regfile A/B write-versus-read slots (the cause of the improvements in shader-db), and hide texture fetch latency by scheduling setup early and results collection late (haven't performance tested it). This infrastructure will be important for doing instruction pairing, though. shader-db2 results: total instructions in shared programs: 61874 -> 59583 (-3.70%) instructions in affected programs: 50677 -> 48386 (-4.52%)
* vc4: Drop the explicit scoreboard wait.Eric Anholt2014-12-011-12/+11
| | | | This is actually implicitly handled by the TLB operations.
* vc4: Also deal with VPM reads at thread end.Eric Anholt2014-12-011-2/+6
| | | | | Prevents a regression with QPU scheduling, which happens to put the no-op reads for unused VPM contents end up at the end of the program.
* vc4: Fix assertion about SFU versus texturing.Eric Anholt2014-12-011-3/+4
| | | | | | | We're supposed to be checking that nothing else writes r4, which is done by the TMU result collection signal, not the coordinate setup. Avoids a regression when QPU instruction scheduling is introduced.
* vc4: Add another check for invalid TLB scoreboard handling.Eric Anholt2014-12-013-8/+39
| | | | This was caught by an assertion in the simulator.
* freedreno/a4xx: invalidate cache when vbo's changeRob Clark2014-12-011-0/+7
| | | | | | | | | Otherwise vertex shader can see stale cache data. This in particular happens when the same vbo is updated and reused. Not sure yet if vbo's at differing addresses but bound to same vertex buffer slot could have issues, but seems safest to flush whenever new vertex buffers are bound. Signed-off-by: Rob Clark <[email protected]>
* st/mesa: avoid exposing EXT_texture_integer for pre-GLSL 1.30Ilia Mirkin2014-11-301-0/+3
| | | | | | | | | For drivers building up to GL(ES)3, only expose the actual extension if the API will let it be used (e.g. via overrides/debug flags that enable higher versions). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* freedreno/a3xx: add missing integer formats and enable renderingIlia Mirkin2014-11-301-3/+30
| | | | | | | | The mesa state tracker doesn't fall back on similar integer formats, so they must all be provided. Remove the restriction against integer color rendering. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: enable sampling from integer texturesIlia Mirkin2014-11-305-5/+55
| | | | | | | | We need to produce a u32 destination type on integer sampling instructions, so keep that in a shader key set based on the currently-bound textures. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno: allow each generation to hook into sampler view settingIlia Mirkin2014-11-305-3/+8
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: don't use half precision shaders for int/float32Ilia Mirkin2014-11-303-10/+35
| | | | | | | Integer outputs end up getting mangled due to cov.f32f16, and float32 loses precision. Use full precision shaders in both of those cases. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: disable blending for integer formatsIlia Mirkin2014-11-302-2/+14
| | | | | | | Also add support for the BLENDABLE bind flag, similarly predicated on non-int formats. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: remove blend clamp enables from gmem/clearsIlia Mirkin2014-11-302-4/+2
| | | | | | | Just pass the data through unmolested. This probably has no effect since blending isn't actually enabled. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: add format to emit info, use to set sint/uint flagsIlia Mirkin2014-11-303-2/+7
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: add 16-bit unorm/snorm texture formatsIlia Mirkin2014-11-301-6/+6
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: remove unused arg parameterIlia Mirkin2014-11-301-7/+7
| | | | | | Leaving it around in the struct in case we want to use it later. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: fix UMADIlia Mirkin2014-11-301-9/+9
| | | | | | | | Looks like none of the mad variants do u16 * u16 + u32, so just add in the extra value "by hand". Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3 10.4" <[email protected]>
* freedreno/a4xx: stencil fixesRob Clark2014-11-308-10/+38
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-11-305-14/+24
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a4xx: add render target format to fd4_emitRob Clark2014-11-305-42/+30
| | | | | | This lets us move emitting SP_FS_MRT_REG back to fd4_program_emit. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: unify vertex/texture formats into a single tableIlia Mirkin2014-11-291-351/+218
| | | | | | | | | | | | The table contains all the relevant information about each format. The helper functions now just do lookups in the table. Note that this adds support for a lot of formats that were previously unsupported. Additionally it adds disabled support for integer render buffers, which will require more work to actually enable. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/a3xx: rename vertex/texture format enums to be more consistentIlia Mirkin2014-11-292-172/+177
| | | | | | | | Switch both of them from independently inconsistent conventions to having UINT/SINT/UNORM/SNORM/FLOAT/FIXED suffixes. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/a3xx: fd3_util -> fd3_formatIlia Mirkin2014-11-2915-22/+18
| | | | | | | All the "util" helpers are actually format-related Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/a3xx: only enable blend clamp for non-float formatsIlia Mirkin2014-11-292-4/+7
| | | | | | | | This fixes arb_color_buffer_float-render GL_RGBA16F. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3 10.4" <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* i965: Add _CACHE_ in brw_cache_id enum names.Kenneth Graunke2014-11-2910-43/+43
| | | | | | | | | | | | BRW_CACHE_VS_PROG is more easily associated with program caches than plain BRW_VS_PROG. While we're at it, rename BRW_WM_PROG to BRW_CACHE_FS_PROG, to move away from the outdated Windowizer/Masker name. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Move CACHE_NEW_SAMPLER to BRW_NEW_SAMPLER_STATE_TABLE.Kenneth Graunke2014-11-296-11/+12
| | | | | | | | | | | | | | | | | | | This flag signifies that we've emitted a new SAMPLER_STATE table. Given that we haven't cached those in years, CACHE_NEW_SAMPLER isn't a great name. Putting it in the BRW_NEW_* hierarchy would make more sense; BRW_NEW_SAMPLER_STATE_TABLE better reflects its actual purpose. When this flag is raised, the pointer to the SAMPLER_STATE table has changed, so we need to re-issue any packets which point to it (unit state on Gen4-5, 3DSTATE_SAMPLER_STATE_POINTERS on Gen6, and the per-stage variants on Gen7+). Saves 2 * sizeof(void *) bytes per context, as we remove useless aux_compare/aux_free function pointers. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Move some /* CACHE_NEW_SAMPLER */ comments.Kenneth Graunke2014-11-292-3/+2
| | | | | | | | | | | | | | | | | | | | | | Marking brw_stage_state::sampler_count as CACHE_NEW_SAMPLER is wrong. The number of samplers used by each program is actually computed at draw time (brw_try_draw_prims), based purely on the currently bound shader programs (gl_program::SamplersUsed). CACHE_NEW_SAMPLER means that we've emitted a new SAMPLER_STATE table. Although this could indicate that the number of samplers has changed, it could also simply mean that the contents of the table has changed (i.e. we've bound different textures). The real reason these atoms depend on CACHE_NEW_SAMPLER is because they include a pointer to the SAMPLER_STATE table. This was not commented. So, move the comments to the appropriate place. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Move CACHE_NEW_*_VP flags to BRW_NEW_*_VP.Kenneth Graunke2014-11-295-21/+23
| | | | | | | | | | | | We've been streaming these out for ages, so they basically have nothing to do with brw_state_cache.c. Saves 6 * sizeof(void *) bytes per context, as we won't have useless aux_compare/aux_free functions for them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Fold the gen7_cc_viewport_state_pointer atom into brw_cc_vp.Kenneth Graunke2014-11-294-23/+8
| | | | | | | | | These always happen together; the extra atom just means another item to iterate through, flags to check, and a call through a function pointer. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Combine CACHE_NEW_*_UNIT into BRW_NEW_GEN4_UNIT_STATE.Kenneth Graunke2014-11-299-31/+11
| | | | | | | | | | | | | | | | | | | | | On Gen4-5, unit state is specified as indirect state, rather than commands. If any unit state changes, we upload it via brw_state_batch and arrange for 3DSTATE_PIPELINED_POINTERS to be re-emitted, which updates pointers to all unit state at once. Since there's only one command and state atom (brw_psp_urb_cs) that needs to know about this, there's no benefit to having six separate flags. We can combine CACHE_NEW_*_UNIT into a single flag. We also haven't cached these in a long time, so it doesn't make sense to use the "CACHE_NEW_" prefix. Instead, use the "BRW_NEW_" prefix. This also saves 12 * sizeof(void *) bytes of memory per context, as we remove useless aux_compare/aux_free functions for each CACHE bit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Alphabetize brw_tracked_state flags and use a consistent style.Kenneth Graunke2014-11-2952-283/+359
| | | | | | | | | | | | | | | | Most of the dirty flags were listed in some arbitrary order. Some used bonus parenthesis. Some put multiple flags on one line, others put one per line. Some used tabs instead of spaces...but only on some lines. This patch settles on one flag per line, in alphabetical order, using spaces instead of tabs, and sheds the unnecessary parentheses. Sorting was mostly done with vim's visual block feature and !sort, although I alphabetized short lists by hand; it was pretty manual. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nv50/ir/tgsi: handle TGSI_OPCODE_ARRChristoph Bumiller2014-11-281-1/+4
| | | | | | | This instruction is used by st/nine. Reviewed-by: Ilia Mirkin <[email protected]> Cc: "10.4" <[email protected]>
* i965: Set prog_data->uses_kill if simulating alpha test via discards.Kenneth Graunke2014-11-273-3/+6
| | | | | | | | | | | | | | When using MRT on Gen4-5, we have to simulate GL's alpha test feature by emitting discards in the fragment shader. In this case, it makes sense to set prog_data->uses_kill, which means the fragment shader may kill pixels via the discard mechanism. This saves us from having to look an extra key value in a couple of places, including in the generator. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Use brw_wm_prog_data::uses_kill, not gl_fragment_program::UsesKillKenneth Graunke2014-11-275-6/+7
| | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Pass key->render_to_fbo via src1 of FS_OPCODE_DDY_*.Kenneth Graunke2014-11-273-11/+10
| | | | | | | | | This means the generator doesn't have to look at the key, which is a little nicer - we're pretty close to no key dependencies at all. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Handle derivative quality decisions in the front-end.Kenneth Graunke2014-11-275-52/+51
| | | | | | | | | | | | | | | | | | | | | Kristian noted that there's very little use of brw_wm_prog_key in the generator, and that it basically just generates what it's told, without caring about what stage it's handling. One exception to this is derivative handling. When handling dFdxCoarse and dFdxFine, we packed an enum value in a second source register, explicitly telling the generator what to do. For dFdx, we specified an enum value of "please use the hint", then checked the program key in the generator level code. A natural method is to define separate FS_OPCODE_DD[XY]_{COARSE,FINE} opcodes, and have the front-end (which already decides what IR to generate based on the program key) decide which dPdx/dPdy should correspond to. This consolidates the decision making in one place. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Create prog_data temporary variables in PS state upload code.Kenneth Graunke2014-11-274-77/+81
| | | | | | | | | prog_data->foo is a bit more readable than brw->wm.prog_data->foo. The local variable definition is also a great location to put the obligatory /* CACHE_NEW_WM_PROG */ comment. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix missing CACHE_NEW_WM_PROG in 3DSTATE_PS_EXTRA.Kenneth Graunke2014-11-271-2/+2
| | | | | | | | | | | | brw->wm.prog_data is covered by CACHE_NEW_WM_PROG, not BRW_NEW_FRAGMENT_PROGRAM. So, we should listen to it. However, I believe that BRW_NEW_FRAGMENT_PROGRAM is sufficient to cover all the necessary cases - CACHE_NEW_WM_PROG happens in a subset of cases. So, the code being wrong shouldn't have triggered bugs. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nv50: remove ancient map of rt formatsIlia Mirkin2014-11-271-83/+0
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: don't pass consts to madsh.m16 in MOD logicIlia Mirkin2014-11-271-0/+3
| | | | | | | | madsh.m16 can't handle a const in src1, make sure to unconst it Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Cc: "10.3 10.4" <[email protected]>
* glsl: Use | action in the lexer source to avoid duplicating the float actionNeil Roberts2014-11-271-12/+3
| | | | | | | | Flex and lex have a special action ‘|’ which means to use the same action as the next rule. We can use this to reduce a bit of code duplication in the rules for the various float literal formats. Reviewed-by: Matt Turner <[email protected]>
* glsl: Disallow float literals with the 'f' suffix but no point or exponentNeil Roberts2014-11-271-4/+0
| | | | | | | | According to the GLSL spec float literals like ‘1f’ shouldn't be allowed without adding a decimal point or an exponent. Apparently the AMD driver also disallows this so it seems unlikely that anything would be relying on it. Reviewed-by: Matt Turner <[email protected]>
* r600g: make llvm code compile this timeDave Airlie2014-11-271-1/+1
| | | | | | | Actually compiling the code helps make it compile. Cc: "10.3 10.4" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: fix fallout from last patchDave Airlie2014-11-273-4/+1
| | | | | | | | | | | | | | | I accidentally rebased from the wrong machine and missed some fixes that were on my r600 box. doh. this fixes a bunch of geom shader textureSize tests on rv635 from gpu reset to pass. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86760 Reported-by: [email protected] Cc: "10.4 10.3" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: merge the TXQ and BUFFER constant buffers (v1.1)Dave Airlie2014-11-273-68/+61
| | | | | | | | | | | | | | | We are using 1 more buffer than we have, although in the future the driver should just end up using one buffer in total probably, this is a good first step, it merges the txq cube array and buffer info constants on r600 and evergreen. This should in theory fix geom shader tests on r600. v1.1: fix comments from Glenn. Reviewed-by: Glenn Kennard <[email protected]> Cc: "10.4 10.3" <[email protected] Signed-off-by: Dave Airlie <[email protected]>
* glapi: Remove dead mesadef.py.Matt Turner2014-11-262-216/+0
| | | | | | | Dead since commit 4e120c97, in which apiparser (which mesadef.py imports) was removed. Reviewed-by: José Fonseca <[email protected]>
* mesa/gdi: Don't pretend mesa.def is auto generated.José Fonseca2014-11-261-647/+192
| | | | | | | Just use the same entrypoints we use for st/wgl's opengl32.dll. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/wgl: Don't export wglGetExtensionsStringARB.José Fonseca2014-11-261-1/+0
| | | | | | | | | It's not exported by the official opengl32.dll neither. Applications are supposed to get it via wglGetProcAddress(), not GetProcAddress(). Cc: "10.4" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mapi/glapi: Fix dll linkage of GLES1 symbols.José Fonseca2014-11-261-0/+1
| | | | | | | | | | | | | | | | This fixes several MSVC warnings like: warning C4273: 'glClearColorx' : inconsistent dll linkage In fact, we should avoid using `declspec(dllexport)` altogether, and use exclusively the .DEF instead, which gives more precise control of which symbols must be exported, but all the public GL/GLES headers practically force us to pick between `declspec(dllexport)` or `declspec(dllimport)`. Cc: "10.4" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_snprintf: Don't redefine HAVE_STDINT_H as 0.José Fonseca2014-11-261-1/+1
| | | | | | | | | We now always guarantee availability of stdint.h on MSVC -- if MSVC doesn't supply one we use our own. Cc: "10.4" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>