summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/a4xx: fix 5_5_5_1 texture sampler formatIlia Mirkin2015-11-191-1/+1
| | | | | | | | This fixes teximage-colors, fbo-generatemipmap-formats, and probably others (in relation to the RGB5 formats, others still fail). Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* freedreno/a4xx: add depth clamp and halfz clipIlia Mirkin2015-11-193-4/+9
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a4xx: allow seamless cubemap filtering to be enabled per-textureIlia Mirkin2015-11-193-1/+3
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a4xx: support lod_biasIlia Mirkin2015-11-192-0/+7
| | | | | | | | | The lower layers assume that we support this, and it's been core since GL 1.4. This fixes a slew of piglit tests, especially around tex-miplevel-selection. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nv50: allow using inline vertex data submit when gl_VertexID is usedSamuel Pitoiset2015-11-195-15/+46
| | | | | | | | | | | | | | | The hardware can actually generates vertexid when vertices come from a client-side buffer like when glDrawElements is used. This doesn't fix (or break) any piglit tests but it improves the previous attempt of Ilia (c830d19 "nv50: avoid using inline vertex data submit when gl_VertexID is used") The only disadvantage is that only works on G84+, but we don't really care of that weird and old NV50 chipset. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: add NV84_3D macroSamuel Pitoiset2015-11-193-3/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* i965: Drop IMM fs_reg/src_reg -> brw_reg conversions.Matt Turner2015-11-192-36/+2
| | | | | | | The previous two commits make this unnecessary. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Replace src_reg(imm) constructors with brw_imm_*().Matt Turner2015-11-1912-239/+195
| | | | | | | Cuts 1.5k of .text. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use brw_imm_uw().Matt Turner2015-11-192-8/+3
| | | | | | | | | | | | W/UW immediates are 16-bits, but those 16-bits must be replicated in the high 16-bits of the 32-bit field. Remove the useless W/UW immediate saturating code, since we'll now be using the appropriate immediate (and W/UW immediates in the IR can now no longer be larger than 16-bits). Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Replace fs_reg(imm) constructors with brw_imm_*().Matt Turner2015-11-199-217/+167
| | | | | | | | | | | | Cuts 10k of .text, of which only 776 bytes are the fs_reg constructor implementations themselves. text data bss dec hex filename 5204535 214112 27784 5446431 531b1f i965_dri.so before 5193977 214112 27784 5435873 52f1e1 i965_dri.so after Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make brw_imm_vf4() take 8-bit restricted floats.Matt Turner2015-11-192-32/+11
| | | | | | | | | | | | | | | | | | | | This partially reverts commit bbf8239f92ecd79431dfa41402e1c85318e7267f. I didn't like that commit to begin with -- computing things at compile time is fine -- but for purposes of verifying that the resulting values are correct, looking up 0x00 and 0x30 in a table is a lot better than evaluating a recursive function. Anyway, by making brw_imm_vf4() take the actual 8-bit restricted floats directly (instead of only integral values that would be converted to restricted float), we can use this function as a replacement for the vector float src_reg/fs_reg constructors. brw_float_to_vf() is not currently an inline function, so it will not be evaluated at compile time. I'll address that in a follow-up patch. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add test for sorted extension tableNanley Chery2015-11-192-0/+52
| | | | | | | | | | | | Enable developers to know if the table's alphabetical sorting is maintained or lost. v2: Move "*" next to pointer name (Matt) Include extensions_table.h instead of extensions.h (Ian) Remove extra " *" in comment (Ian) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/extensions: Sort the extension table alphabeticallyNanley Chery2015-11-191-81/+93
| | | | | | | | | | Make it easier to determine where to add new extensions. Performed with the vim sort command. v2: Insert newline after last #define (Matt) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* docs: GL3.1 for a3xx and a4xxIlia Mirkin2015-11-191-0/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* mesa: enable EXT_blend_func_extended if the driver supports the ARB versionRyan Houdek2015-11-192-0/+2
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: allow MAX_DUAL_SOURCE_DRAW_BUFFERS to be available to ESRyan Houdek2015-11-191-1/+3
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: enable usage of blend_func_extended blend factors in GLES2Ryan Houdek2015-11-191-3/+3
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: add a parse check to check for the index layout qualifierRyan Houdek2015-11-191-0/+5
| | | | | | | This can only be used if EXT_blend_func_extended is enabled Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: add GL_EXT_blend_func_extended preprocessor defineRyan Houdek2015-11-191-0/+2
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: add support for EXT_blend_func_extended builtinsRyan Houdek2015-11-192-0/+92
| | | | | | | | | | | gl_MaxDualSourceDrawBuffersEXT - Maximum dual-source draw buffers supported For ESSL 1.0, it provides two builtins since you can't have user-defined color output variables: gl_SecondaryFragColorEXT gl_SecondaryFragDataEXT[MaxDSDrawBuffers] Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: add EXT_blend_func_extended parser enablesRyan Houdek2015-11-192-0/+8
| | | | | | | | | This adds a state for the maximum dual source draw variables available and the variable for determining if the extension has been enabled in the program shaders. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glapi: add EXT_blend_func_extended XML definitionsRyan Houdek2015-11-193-1/+36
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* os: check for GALLIUM_PROCESS_NAME to override os_get_process_name()Brian Paul2015-11-191-18/+29
| | | | | | | Useful for debugging and for glretrace. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* glsl: fix ir_constant::equals() for doublesConnor Abbott2015-11-191-2/+7
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* glsl: fix isinf() for doublesConnor Abbott2015-11-191-1/+10
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* nir: fix constant folding of bfiConnor Abbott2015-11-191-2/+2
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* hud: fix Windows build breakBrian Paul2015-11-191-0/+6
| | | | | | Protect signal-related code with PIPE_OS_UNIX test. Reviewed-by: Jose Fonseca <[email protected]>
* glsl: Fix off-by-one error in array size check assertionIan Romanick2015-11-181-2/+1
| | | | | | | | | | Apparently, this has been a bug since 2010 (c30f6e5d). Also use ARRAY_SIZE instead of open coding it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* mesa: Don't expose GL_EXT_shader_integer_mix in GLES 1.xIan Romanick2015-11-181-1/+1
| | | | | | | | | There are no shaders, so it doesn't even make sense to expose the extension. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: Nanley Chery <[email protected]>
* glsl: Silence unused parameter warningsIan Romanick2015-11-181-2/+2
| | | | | | | | | | | | builtin_functions.cpp:5289:52: warning: unused parameter 'num_arguments' [-Wunused-parameter] unsigned num_arguments, ^ builtin_functions.cpp:5290:52: warning: unused parameter 'flags' [-Wunused-parameter] unsigned flags) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: Silence ignored qualifier warningIan Romanick2015-11-181-1/+1
| | | | | | | | | | | | | I think the intention was to mark the "this" parameter as const, but const goes on the other end to do that. In file included from glsl_symbol_table.cpp:26:0: ast.h:339:35: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] const bool is_single_dimension() ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Allow indirect GS input indexing in the scalar backend.Kenneth Graunke2015-11-184-46/+107
| | | | | | | | | | | | | | | | | | This allows arbitrary non-constant indices on GS input arrays, both for the vertex index, and any array offsets beyond that. All indirects are handled via the pull model. We could potentially handle indirect addressing of pushed data as well, but it would add additional code complexity, and we usually have to pull inputs anyway due to the sheer volume of input data. Plus, marking pushed inputs as live due to indirect addressing could exacerbate register pressure problems pretty badly. We'd need to be careful. v2: Use updated MOV_INDIRECT opcode. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Abdiel Janulgue <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* gallium/hud: document GALLIUM_HUD_PERIOD in envvars.html.Jimmy Berry2015-11-191-0/+2
| | | | Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: control visibility at startup and runtime.Jimmy Berry2015-11-192-0/+35
| | | | | | | - env GALLIUM_HUD_VISIBLE: control default visibility - env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal Signed-off-by: Marek Olšák <[email protected]>
* i965/nir: Add hooks for testing nir_shader_cloneJason Ekstrand2015-11-181-9/+26
| | | | | | | | | | This commit adds code for testing nir_shader_clone by running it after each and every optimization pass and throwing away the old shader. Testing nir_shader_clone is hidden behind a new INTEL_CLONE_NIR environment variable. Reviewed-by: Rob Clark <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* nir: Add support for cloning shadersJason Ekstrand2015-11-184-0/+682
| | | | | | | | This commit is heavily based on one by Rob Clark <[email protected]> but reworked to re-use nir_create functions and do less hashing. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* i965/nir: Validate that NIR passes call nir_metadata_preserve().Kenneth Graunke2015-11-183-3/+48
| | | | | | | | | | | | | | | | | | | | | Failing to call nir_metadata_preserve() can have nasty consequences: some pass breaks dominance information, but leaves it marked as valid, causing some subsequent pass to go haywire and probably crash. This pass adds a simple validation mechanism to ensure passes handle this properly. We add a new bogus metadata flag that isn't used for anything in particular, set it before each pass, and ensure it *isn't* still set after the pass. nir_metadata_preserve will reset the flag, so correct passes will work, and bad passes will assert fail. (I would have made these functions static inline, but nir.h is included in C++, so we can't bit-or enums without lots of casting...) Thanks to Dylan Baker for the idea. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965/nir: Add OPT() and OPT_V() macros for invoking NIR passes.Kenneth Graunke2015-11-181-72/+59
| | | | | | | | | | | | | | | | | OPT() is the normal macro for passes that return booleans, while OPT_V() is a variant that works for passes that don't properly report progress. (Such passes should be fixed to return a boolean, eventually.) These macros take care of calling nir_validate_shader() and setting progress appropriately. In the future, it would be easy to add shader dumping similar to INTEL_DEBUG=optimizer by extending the macro. v2 (Jason Ekstrand): - Fix an unused variable warning Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: add array length fieldRob Clark2015-11-182-0/+10
| | | | | | | | This will simplify things somewhat in clone. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: remove nir_variable::max_ifc_array_accessRob Clark2015-11-182-22/+0
| | | | | | | | No users. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* freedreno/a4xx: add fake RGTC support (required for GL3)Rob Clark2015-11-184-2/+23
| | | | | | | | | | The a4xx bits corresponding to 'freedreno/a3xx: add fake RGTC support (required for GL3)' TODO some more r/e.. maybe we get lucky and hw supports some of this directly? For now this will help us enable gl3. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a4xx: add compressed texture formatsRob Clark2015-11-182-2/+26
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2015-11-185-11/+37
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: expose GLSL 140 and fake MSAA for GL3.0/3.1 supportIlia Mirkin2015-11-181-2/+2
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: fix texture buffers, enable offsetsIlia Mirkin2015-11-183-14/+32
| | | | | | | | | | | | | | | The main issue is that the current logic looked into cso->u.tex, which is the wrong side of the union to look into for texture buffers. While I was at it, it was easy enough to add the logic to handle offsets (first_element). - reduce texture buffer size limit (determined experimentally) - don't look at first/last levels, instead look at first/last element - include the first element offset - set offset alignment to 16 (determined experimentally) Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno: add support for conditional rendering, required for GL3.0Ilia Mirkin2015-11-187-6/+57
| | | | | | | | | A smarter implementation would make it possible to attach this to emit state for the BY_REGION versions to avoid breaking the tiling. But this is a start. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add fake RGTC support (required for GL3)Ilia Mirkin2015-11-186-27/+176
| | | | | | | | | | | | Also throw in LATC while we're at it (same exact format). This could be made more efficient by keeping a shadow compressed texture to use for returning at map time. However... it's not worth it for now... presumably compressed textures are not updated often. Lastly fix up Z32S8 transfers to non-0 layers. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add missing formats to enable ARB_vertex_type_2_10_10_10_revIlia Mirkin2015-11-183-4/+9
| | | | | | | | | The previously RE'd formats were from an ES driver implementing OES_vertex_type_10_10_10_2 and thus backwards. A future change could add the 2_10_10_10 support. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx+a4xx: fix for stk binning pass hangRob Clark2015-11-183-19/+76
| | | | | | | | | | | | | | We'd end up in a state where shader uses no inputs, yet num_elements is greater than zero. Triggered by a TF vertex shader which did: gl_Position = vec4(0.0, 0.0, 0.0, 0.0); resulting in a binning pass variant with no inputs. Includes equiv fix in a4xx, even though we don't have binning-pass enabled yet on a4xx. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx+a4xx: fix GL_POINTS lockup w/ GLESRob Clark2015-11-183-6/+11
| | | | | | | | point_size_per_vertex is always TRUE for GLES, causing us to configure the hw as if gl_PointSize was written, even if it was not. Which makes for grumpy hw. Signed-off-by: Rob Clark <[email protected]>