summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* main: Don't restrict several KHR_debug enum to desktop GLBoyan Ding2015-11-202-12/+3
| | | | | | | | | In preparation for supporting GL_KHR_debug in OpenGL ES v2: add a missing hunk in _mesa_IsEnabled (Emil) Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: use the correct string for the ES GL_KHR_debug functionsEmil Velikov2015-11-203-19/+77
| | | | | | | | | As defined in the spec when implemented in an OpenGL ES context, all entry points defined by this extension must have a "KHR" suffix. Signed-off-by: Emil Velikov <[email protected]>
* glsl: avoid linker and user varying location to overlapGregory Hainaut2015-11-201-3/+43
| | | | | | | | | | | | | | | | | | Current behavior on the interface matching: layout (location = 0) out0; // Assigned to VARYING_SLOT_VAR0 by user out1; // Assigned to VARYING_SLOT_VAR0 by the linker New behavior on the interface matching: layout (location = 0) out0; // Assigned to VARYING_SLOT_VAR0 by user out1; // Assigned to VARYING_SLOT_VAR1 by the linker v4: * Fix variable name in assert Signed-off-by: Gregory Hainaut <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* auxiliary/vl/dri2: coding style fixesEmil Velikov2015-11-202-22/+34
| | | | | | | Rewrap long(ish) lines, add space between struct foo and *. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: hide internal functionsEmil Velikov2015-11-202-34/+20
| | | | | | | | Analogous to previous commit. While we're here prefix all functions identically -> vl_dri2_foo Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: hide internal functionsEmil Velikov2015-11-202-5/+5
| | | | | | | | As of last commit everyone is using the vl_screen dispatch, thus we can hide this function from the headers and make it static. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/vdpau: use the vl_screen dispatchEmil Velikov2015-11-202-11/+11
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/xvmc: use the vl_screen dispatchEmil Velikov2015-11-202-12/+11
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/va: use the vl_screen dispatchEmil Velikov2015-11-203-16/+9
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/omx: use the vl_screen dispatchEmil Velikov2015-11-201-6/+5
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: setup the dispatchEmil Velikov2015-11-202-8/+15
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: use a label for the error pathEmil Velikov2015-11-201-6/+10
| | | | | | | ... just like every other place in gallium. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: setup the dispatchEmil Velikov2015-11-201-0/+6
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: add dispatch tableEmil Velikov2015-11-201-0/+17
| | | | | | | | As mentioned previously, it will allow us to use different vl backend in a generic way from either video state-tracker. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-206-8/+8
| | | | | | | | | | | In a preparation of having proper multi-platform/backend handling in VL. With follow up commits we'll introduce a dispatch within vl_screen similar to the one in pipe_screen. This way any VL state-tracker can operate seamlessly, considering the backend/platform is properly setup. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/va: trivial cleanupEmil Velikov2015-11-201-9/+2
| | | | | | | Drop the temporary variable and fold the two conditional. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/omx: straighten get/put_screenEmil Velikov2015-11-201-16/+16
| | | | | | | | | | | | | | | | | | | | | The current code is busted in a number of ways. - initially checks for omx_display (rather than omx_screen), which may or may not be around. - blindly feeds the empty env variable string to loader_open_device() - reads the env variable every time get_screen is called - the latter manifests into memory leaks, and other issues as one sets the variable between two get_screen calls. Additionally it cleans up a couple of extra bits - drops unneeded set/check of omx_display. - make the teardown (put_screen) order was not symmetrical to the setup (get_screen) v2: Drop the "is empty string" check (Leo) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* automake: loader: don't create an empty dri3 helperEmil Velikov2015-11-201-1/+3
| | | | | | | | | | | | | Seems that creating an empty one does not fair too well with MacOSX's ar. Considering that all the users of the helper include it only when needed, let's reshuffle the makefile. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92985 Signed-off-by: Emil Velikov <[email protected]> Tested-by: Vinson Lee <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* automake: loader: honour the XCB_DRI3 cflagsEmil Velikov2015-11-201-0/+1
| | | | | | | | | | Without this the compilation will fail, as the headers are installed in a non-default location. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* automake: egl: add symbols testEmil Velikov2015-11-202-0/+58
| | | | | | | | | | Should help us catch issues where we expose any extra symbols by mistake. Just like the ones fixes with previous commit. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Acked-by: Matt Turner <[email protected]>
* automake: loader: rework the CPPFLAGSEmil Velikov2015-11-201-11/+4
| | | | | | | | | | | | | Rather than duplicating things, just use the generic AM_CPPFLAGS. This has the fortunate side-effect of adding VISIBILITY_CFLAGS for the dri3 helper. The latter of which was erroneously exposing some internal symbols. Signed-off-by: Emil Velikov <[email protected]> Reported-by: Kai Wasserbäch <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Enable EXT_shader_samples_identicalIan Romanick2015-11-195-2/+34
| | | | | | | | | | | | | | | | | | | On the vec4 backend, textureSamplesIdentical() will always return false. There are currently no test cases for the vec4 backend, so we don't have much confidence in any implementation. We also don't think anyone is likely to miss it. v2: Handle immediate value for MCS smarter. Rebase on changes to nir_texop_sampels_identical (missing second parameter). Suggested by Jason. v3: Add Neil's code to handle 16x MSAA in the FS. Also rebase on top of f9a9ba5e. Stub out the vec4 implementation. Signed-off-by: Ian Romanick <[email protected]> Signed-off-by: Neil Roberts <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> [v2] Reviewed-by: Chris Forbes <[email protected]> [v2]
* i965/vec4: Handle nir_tex_src_ms_index more like the scalarIan Romanick2015-11-191-8/+10
| | | | | | | | v2: Rebase on top of f9a9ba5e. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* nir: Add nir_texop_samples_identical opcodeIan Romanick2015-11-196-1/+18
| | | | | | | | | | | This is the NIR analog to GLSL IR ir_samples_identical. v2: Don't add the second nir_tex_src_ms_index parameter. Suggested by Ken and Jason. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* glsl: Add textureSamplesIdenticalEXT built-in functionsIan Romanick2015-11-191-0/+44
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* glsl: Add ir_samples_identical opcodeIan Romanick2015-11-1910-1/+26
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* glsl: Extension tracking for EXT_shader_samples_indenticalIan Romanick2015-11-193-0/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* mesa: Extension tracking for EXT_shader_samples_indenticalIan Romanick2015-11-192-0/+2
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* nir: add nir_ssa_for_alu_src()Rob Clark2015-11-192-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using something like: numer = nir_ssa_for_src(bld, alu->src[0].src, nir_ssa_alu_instr_src_components(alu, 0)); for alu src's with swizzle, like: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform () () (1, 0) vec2 ssa_2 = udiv ssa_10.xx, ssa_11 ends up turning into something like: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform () () (1, 0) vec2 ssa_13 = imov ssa_10 ... because nir_ssa_for_src() ignore's the original nir_alu_src's swizzle. Instead for alu instructions, nir_src_for_alu_src() should be used to ensure the original alu src's swizzle doesn't get lost in translation: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform () () (1, 0) vec2 ssa_13 = imov ssa_10.xx ... v2: check for abs/neg, and re-use existing nir_alu_src Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: fix missing increments of num_inputs/num_outputsRob Clark2015-11-192-0/+4
| | | | | | | | | | | Note: not quite perfect, we should use type_size vfunc (in compiler_options or nir_shader?) to determine how much we increment num_inputs/outputs/uniforms. But we don't have that yet, so let's at least fix things for the existing users of these passes. Signed-off-by: Rob Clark <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/print: show # of uniforms/inputs/outputsRob Clark2015-11-191-0/+4
| | | | Signed-off-by: Rob Clark <[email protected]>
* nir/print: show shader name/label if setRob Clark2015-11-191-0/+6
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add nir_var_all enumRob Clark2015-11-194-2/+7
| | | | | | | | | Otherwise, passing -1 gets you: error: invalid conversion from 'int' to 'nir_variable_mode' [-fpermissive] Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* 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]>
* mesa: enable EXT_blend_func_extended if the driver supports the ARB versionRyan Houdek2015-11-191-0/+1
| | | | | 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]>