summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* r600g,radeonsi: Assert that there's enough space after flushingMichel Dänzer2015-06-081-3/+2
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* prog_to_nir: Fix fragment depth writes.Kenneth Graunke2015-06-061-3/+19
| | | | | | | | | | | | | | | | | | | In the ARB_fragment_program specification, the result.depth output variable is treated as a vec4, where the fragment depth is stored in the .z component, and the other three components are undefined. This is different than GLSL, which uses a scalar value (gl_FragDepth). To make this consistent for driver backends, this patch makes prog_to_nir use a scalar output variable for FRAG_RESULT_DEPTH, moving result.depth.z into the first component. Fixes Glean's fragProg1 "Z-write test" subtest. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90000 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Set max texture buffer size to hardware limitChris Forbes2015-06-061-0/+1
| | | | | | | | | | | Previously we were leaving this at the default of 64K, which meets the spec but is too small for some real uses. The hardware can handle up to 128M. User was complaining about this on freenode ##OpenGL today. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add gen8 fast clear perf debugBen Widawsky2015-06-052-2/+19
| | | | | | | | | | | | | | | | | In an ideal world I would just implement this instead of adding the perf debug. There are some errata involved which lead me to believe it won't be so simple as flipping a few bits. There is room to add a thing for Gen9s flexibility, but since I am actively working on that I have opted to ignore it. Example: Multi-LOD fast clear - giving up (256x128x8). v2: Use braces for if statements because they are multiple lines (Ken) Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add buffer sizes to perf debug of fast clearsBen Widawsky2015-06-052-4/+7
| | | | | | | | | | | | | | When we cannot do the optimized fast clear it's important to know the buffer size since a small buffer will have much less performance impact. A follow-on patch could restrict printing the message to only certain sizes. Example: Failed to fast clear 1400x1056 depth because of scissors. Possible 5% performance win if avoided. Recommended-by: Kenneth Graunke <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* clover: clarify and fix the EGL interop error caseMarek Olšák2015-06-051-1/+6
| | | | Cc: 10.6 <[email protected]>
* egl: expose EGL 1.5 if all requirements are metMarek Olšák2015-06-052-0/+16
| | | | | | | | There's no driver support yet, because EGL_KHR_gl_colorspace isn't implemented. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: return correct invalid-type error from eglCreateSyncMarek Olšák2015-06-051-8/+19
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: add new platform functions (v2)Marek Olšák2015-06-051-0/+54
| | | | | | | | These are just wrappers around the existing extension functions. v2: return BAD_ALLOC if _eglConvertAttribsToInt fails Reviewed-by: Chad Versace <[email protected]>
* egl: add eglCreateImage (v2)Marek Olšák2015-06-051-0/+42
| | | | | | | v2: - use calloc - return BAD_ALLOC if calloc fails Reviewed-by: Chad Versace <[email protected]>
* egl: add eglGetSyncAttrib (v2)Marek Olšák2015-06-055-10/+29
| | | | | | | | | v2: - don't modify "value" in eglGetSyncAttribKHR after an error - rename _egl_api::GetSyncAttribKHR -> GetSyncAttrib - rename GetSyncAttribKHR_t -> GetSyncAttrib_t - rename _eglGetSyncAttribKHR to _eglGetSyncAttrib Reviewed-by: Chad Versace <[email protected]>
* egl: add eglWaitSyncMarek Olšák2015-06-051-0/+12
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: add EGL 1.5 functions that don't need any changes from extensionsMarek Olšák2015-06-051-12/+16
| | | | | | | Declare the functions without the suffix, so that the core names are exported. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: use EGL 1.5 types without suffixesMarek Olšák2015-06-056-38/+38
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: add context attribs from EGL 1.5Marek Olšák2015-06-051-0/+30
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: fix setting context flagsMarek Olšák2015-06-051-2/+3
| | | | | | Cc: 10.6 10.5 10.4 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: combine VersionMajor and VersionMinor into one variableMarek Olšák2015-06-052-7/+5
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: set the EGL version in common codeMarek Olšák2015-06-055-24/+7
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove unused _egl_global::ClientExtensionsMarek Olšák2015-06-052-19/+0
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: remove unused gl_config::colorIndexModeMarek Olšák2015-06-051-1/+0
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: use GL_GEOMETRY_PROGRAM_NV instead of MESA_GEOMETRY_PROGRAMMarek Olšák2015-06-058-21/+15
| | | | | | | | There's no reason to use our own definition. Tessellation will use the NV definitions too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: use _mesa_has_geometry_shader in get_programivMarek Olšák2015-06-051-1/+1
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove useless gl_compute_program_state::CurrentMarek Olšák2015-06-052-5/+0
| | | | | | | This is for user assembly shaders only (not GLSL). We won't support those. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove unused geometry shader variablesMarek Olšák2015-06-054-18/+0
| | | | | | | These states are for GS assembly shaders only. We don't support those. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi/ureg: fix a coverity defect in emit_declsMarek Olšák2015-06-051-3/+4
| | | | Reported by Ilia Mirkin.
* r600g: fix a coverity defect in streamout codeMarek Olšák2015-06-051-1/+1
| | | | Reported by Ilia Mirkin.
* glsl_to_tgsi: use TGSI array declarations for VS,GS arrays of outputs (v2)Marek Olšák2015-06-054-41/+103
| | | | v2: don't use PIPE_MAX_SHADER_ARRAYS
* glsl_to_tgsi: use TGSI array declarations for GS,FS arrays of inputs (v2)Marek Olšák2015-06-053-23/+201
| | | | v2: don't use PIPE_MAX_SHADER_ARRAYS
* glsl_to_tgsi: remove some emit functions by using C++ default valuesMarek Olšák2015-06-051-61/+12
|
* glsl_to_tgsi: rename emit -> emit_asmMarek Olšák2015-06-051-214/+214
| | | | My editor thinks "emit" is a keyword, which breaks code indexing.
* glsl_to_tgsi: remove memset after callocMarek Olšák2015-06-051-2/+0
|
* glsl_to_tgsi: don't use a static array size for st_translate::arraysMarek Olšák2015-06-051-8/+9
|
* glsl_to_tgsi: don't use a static array size for "array_sizes"Marek Olšák2015-06-051-5/+13
|
* tgsi/ureg: don't emit in/out arrays if drivers don't support ranged declarationsMarek Olšák2015-06-0517-39/+161
| | | | | | Softpipe, llvmpipe, r300g, and radeonsi pass tests. Other drivers need testing. Freedreno and nv30 are definitely broken. Other drivers seem to be alright.
* tgsi/ureg: add support for output array declarationsMarek Olšák2015-06-054-31/+78
|
* tgsi/ureg: add support for GS input array declarationsMarek Olšák2015-06-054-15/+30
|
* tgsi/ureg: merge input and fs_input arraysMarek Olšák2015-06-051-51/+33
|
* tgsi/ureg: rename and simplify ureg_DECL_gs_inputMarek Olšák2015-06-054-27/+25
| | | | | There is nothing special about it and it's used for tessellation shaders too.
* tgsi/ureg: add support for FS input array declarationsMarek Olšák2015-06-054-18/+61
|
* tgsi/scan: get more information about arrays and handle arrays correctly (v2)Marek Olšák2015-06-052-3/+25
| | | | v2: use less memory for the information
* mesa: fix program resource queries for builtin variablesTapani2015-06-051-1/+24
| | | | | | | | | | | | | Patch fixes special cases with gl_VertexID and sets all builtin variables locations as '-1' as specified by the extension spec. Fixes ES 3.1 conformance test failure: ES31-CTS.program_interface_query.input-built-in v2: comments + use is_gl_identifier() (Martin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* glsl_compiler: Remove unused extra argument to printf in usage_failAlan Coopersmith2015-06-041-1/+1
| | | | | | | | | | | | Flagged by Oracle's parfait static analyzer: Error: Format string argument mismatch (CWE 628) In call to printf with format string "usage: %s [options] <file.vert | file.geom | file.frag>\n\nPossible options are:\n" Too many arguments for format string (got more than 1 arguments) at line 285 of src/glsl/main.cpp in function 'usage_fail'. Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* draw: (trivial) fix NULL pointer dereferenceRoland Scheidegger2015-06-051-2/+2
| | | | | | | | | | | This probably got broken when the samplers were converted to be indexed by shader type. Seen when looking at bug 89819 though I'm not sure if that really was what the bug was about... Cc: "10.5 10.6" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/fs: Print mlen in dump_instructions() output.Kenneth Graunke2015-06-041-0/+3
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* prog_to_nir: Make RSQ properly take the absolute value of its argument.Kenneth Graunke2015-06-041-1/+2
| | | | | | | | | | | | | | | | | I just botched this when writing the original code. From the ARB_vertex_program specification: "The RSQ instruction approximates the reciprocal of the square root of the absolute value of the scalar operand and replicates it to all four components of the result vector." Fixes a Glean vertProg1 subtest: RSQ test 2 (reciprocal square root of negative value) Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90547 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* main: fix a regression in uniform handling introduced by 87a4bc5Martin Peres2015-06-041-1/+1
| | | | | | | | The comment was accurate but the condition was reversed... Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* mesa: reference built-in uniforms into gl_uniform_storageMartin Peres2015-06-0414-49/+73
| | | | | | | | | | | | | | | This change introduces a new field in gl_uniform_storage to explicitely say that a uniform is built-in. In the case where it is, no storage is defined to make it clear that it is read-only from the mesa side. I fixed all the places in the code that made use of the structure that I changed. Any place making a wrong assumption and using the storage straight away will just crash. This patch seems to implement the path of least resistance towards listing built-in uniforms in GL_ACTIVE_UNIFORM (and other APIs). Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* llvmpipe: Implement stencil exportRoland Scheidegger2015-06-044-15/+21
| | | | | | | | | | | | | Pretty trivial, fixes the issue that we're expected to be able to blit stencil surfaces (as the blit just relies on util blitter code which needs stencil export to do it). 2 piglits skip->pass, 11 fail->pass v2: prettify, keep different stencil ref value handling out of depth/stencil test itself. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* i965: Use UW-typed immediate in multiply inst.Matt Turner2015-06-032-2/+2
| | | | | | | | | | | | Some hardware reads only the low 16-bits even if the type is UD, but other hardware like Cherryview can't handle this. Fixes spec@arb_gpu_shader5@execution@sampler_array_indexing@fs-simple on Cherryview. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90830 Reviewed-by: Neil Roberts <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* program: Replace gl_inst_opcode with enum prog_opcode.Matt Turner2015-06-034-16/+16
| | | | | | Both were introduced at the same time. I'm not sure why we needed two. Reviewed-by: Brian Paul <[email protected]>