aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa/extensions: Use _mesa_extension_supported()Nanley Chery2015-11-122-46/+14
| | | | | | | | Replace open-coded checks for extension support with _mesa_extension_supported(). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa/extensions: Create _mesa_extension_supported()Nanley Chery2015-11-121-0/+18
| | | | | | | | | | | | Create a function which determines if an extension is supported in the current context. v2: Use common variable names (Emil) Insert new line between variables and return statement (Chad) Rename api_set variable to api_bit (Chad) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa/extensions: Add extension::versionNanley Chery2015-11-122-320/+334
| | | | | | | | | | | | | | | | Enable limiting advertised extension support by context version with finer granularity. This new field is currently unused and is set to 0 everywhere. When it is used, a value of 0 will indicate that the extension is supported for any version of a context. v2: Use uint*t type for version and note the expected values (Emil) Use an 8-bit data type Reformat macro for better readability (Chad) v3: Note preparatory nature of commit (Chad) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa/extensions: Move entries entries to separate fileNanley Chery2015-11-123-325/+327
| | | | | | | | | | With this infrastructure set in place, we can now reuse the entries to generate useful code. v2: Add the new file into Makefile.sources (Emil) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa/extensions: Wrap array entries in macrosNanley Chery2015-11-121-327/+328
| | | | | | | | | | | | | Now that we're using macros, remove the redundant text from each entry. Remove comments between the entries to make editing easier and separate the sections with blank lines. Structure the EXT macros in a way that helps reviewers verify that no meaning has been altered. v2: Indent the entries (Chad) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa/extensions: Remove array sentinelNanley Chery2015-11-121-18/+25
| | | | | | | | Simplify future updates to the extension struct array by removing the sentinel. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Check instructions appear only on supported hardware.Matt Turner2015-11-121-0/+254
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add initial assembly validation pass.Matt Turner2015-11-125-0/+174
| | | | | | | Initially just checks that sources are non-NULL, which would have alerted us to the problem fixed by commit 6c846dc5. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add annotation_insert_error() and support for printing errors.Matt Turner2015-11-122-7/+71
| | | | | | | | Will allow annotations to contain error messages (indicating an instruction violates a rule for instance) that are printed after the disassembly of the block. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Combine assembly annotations if possible.Matt Turner2015-11-121-5/+18
| | | | | | | | Often annotations are identical between sets of consecutive instructions. We can perhaps avoid some memory allocations by reusing the previous annotation. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Set annotation_info's mem_ctx.Matt Turner2015-11-123-2/+5
| | | | | | It was being memset to 0 previously. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Don't consider control flow instructions to have sources.Matt Turner2015-11-121-8/+8
| | | | | | | | | | | | And why did IFF have a destination? I suspect that once upon a time the disassembler used this information to know which fields to find the jump targets in. The jump targets have moved, so the disassembler has to know how to handle these per-generation anyway. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fill out instruction list.Matt Turner2015-11-123-14/+42
| | | | | | | | | | | Add some instructions: illegal, movi, sends, sendsc. Remove some instructions with reused opcodes: msave, mrestore, push, pop, goto. I did have some gross code for disassembling opcodes per-generation, but there's very little meaningful overlap so it's probably not needed. Reviewed-by: Kenneth Graunke <[email protected]>
* ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.Matt Turner2015-11-121-0/+1
| | | | | | | We were leaving it undefined, even though we were writing a string to *str. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Consolidate is_3src() functions.Matt Turner2015-11-123-8/+7
| | | | Otherwise I'll have to add another later in this series.
* st/wgl: add a comment about recursive locking in stw_make_current()Brian Paul2015-11-121-0/+4
| | | | | Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: add a lock assertion in stw_framebuffer_from_hwnd_locked()Brian Paul2015-11-121-0/+1
| | | | | Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: add some mutex checking codeJosé Fonseca2015-11-121-0/+26
| | | | | | | | | | | This would have caught the locking bug that was fixed in the earlier "st/wgl: fix locking issue in stw_st_framebuffer_present_locked()" patch. v2: minor coding style changes by Brian. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: rename stw_framebuffer_release() to stw_framebuffer_unlock()Brian Paul2015-11-125-19/+19
| | | | | | | To match the new stw_framebuffer_lock() function. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: reimplement stw_framebuffer::mutex with CRITICAL_SECTIONBrian Paul2015-11-124-29/+32
| | | | | | | | v2: update comments on the stw_framebuffer::mutex field regarding locking order. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: include u_debug.hBrian Paul2015-11-123-0/+6
| | | | | | | | To get declaration for debug_printf() directly instead of getting it indirectly through os_thread.h Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: reimplement stw_device::fb_mutex with CRITICAL_SECTIONBrian Paul2015-11-123-15/+29
| | | | | Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: re-implement stw_device::ctx_mutex with CRITICAL_SECTIONBrian Paul2015-11-123-19/+34
| | | | | | | | | This is Windows-only code so we can use the native Win32 functions for critical sections. This will also allow us to (cleanly) add some mutex check/debug code in subsequent patches. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* gallium/hud: add cpu graph support for WindowsBrian Paul2015-11-121-0/+54
| | | | | | | | | | We support "cpu" but not "cpu#" because there's no good way of querying per-cpu usage. Also, the cpu usage is for the process, not the whole system. Original code cobbled together by Brian and then fixed/polished by Jose. Signed-off-by: Brian Paul <[email protected]>
* glsl: set matrix_stride for non matrices with atomic counter buffersTapani Pälli2015-11-121-0/+2
| | | | | | | | | | | | | | | | | | Patch sets matrix_stride as 0 for non matrix uniforms that are in a atomic counter buffer. Matrix stride calculation for actual matrix uniforms is done during link_assign_uniform_locations. From ARB_program_interface_query specification: GL_MATRIX_STRIDE: "For active variables not declared as a matrix or array of matrices, zero is written to <params>. For active variables not backed by a buffer object, -1 is written to <params>, regardless of the variable type." Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marta Lofstedt <[email protected]>
* mesa: validate precision of varyings during ValidateProgramPipelineTapani Pälli2015-11-123-0/+80
| | | | | | | | | | | Fixes following failing ES3.1 CTS tests: ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingFloat ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingInt ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingUInt Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl: do not lose precision information when packing varyingsTapani Pälli2015-11-121-0/+1
| | | | | | | | This information will be used by cross stage validation of varyings for pipeline objects. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl: Add precision information to ir_variableIago Toral Quiroga2015-11-124-24/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need this later on when we implement proper support for precision qualifiers in the drivers and also to do link time checks for uniforms as indicated by the spec. This patch also adds compile-time checks for variables without precision information (currently, Mesa only checks that a default precision is set for floats in fragment shaders). As indicated by Ian, the addition of the precision information to ir_variable has been done using a bitfield and pahole to identify an available hole so that memory requirements for ir_variable stay the same. v2 (Ian): - Avoid if-ladders by defining arrays of supported sampler names and indexing into them with type->sampler_array + 2 * type->sampler_shadow - Make the code that selects the precision qualifier to use an utility function - Fix a typo v3 (Tapani): - rebased - squashed in "Precision qualifiers are not allowed on structs" - fixed select_gles_precision for sampler arrays - fixed precision_qualifier_allowed for arrays of structs v4 (Tapani): - add atomic_uint handling - do not allow precision qualifier on images (issues reported by Marta) v5 (Tapani): - support precision qualifier on image types v6 (Tapani): - set precision qualifier on interface block members Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* glsl: Move the definition of precision_qualifier_allowedIago Toral Quiroga2015-11-121-36/+35
| | | | | | | We will need this to build later patches Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* glsl: Add user-defined default precision qualifiers to the symbol tableIago Toral Quiroga2015-11-121-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notice that the spec requires that a default precision has been set for every type used by a shader that can use a precision qualifier and does not have a predefined precision, however, at the moment, Mesa only checks this for floats in the fragment shader. This is probably because the GLSL ES 1.0 specs mentions this case specifically, but GLSL ES 3.0 clarifies that the same applies to other types: "The fragment language has no default precision qualifier for floating point types. Hence for float, floating point vector and matrix variable declarations, either the declaration must include a precision qualifier or the default float precision must have been previously declared. Similarly, there is no default precision qualifier for the following sampler types in either the vertex or fragment language: sampler3D; samplerCubeShadow; sampler2DShadow; sampler2DArray; sampler2DArrayShadow; isampler2D; isampler3D; isamplerCube; isampler2DArray; usampler2D; usampler3D; usamplerCube; usampler2DArray;" we will fix this in a later patch. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* glsl: Add default precision qualifiers to the symbol tableIago Toral Quiroga2015-11-121-0/+12
| | | | | | | | | | | | | | | | The GLSL ES spec specifies default precision qualifiers for certain types, so populate the symbol table with these. Notice that the desktop GLSL spec also indicates defaults for some types but this is not really useful since precision qualifiers are completely ignored in desktop GLSL. v2: simplify and add samplerExternalOES, specified by OES_EGL_image_external (Tapani) v3: add atomic_uint (reported missing by Marta) Reviewed-by: Tapani Pälli <[email protected]>
* glsl: Add API to put default precision qualifiers in the symbol tableIago Toral Quiroga2015-11-122-0/+26
| | | | | | | | These have scoping rules that match the ones defined for other things such as variables, so we want them in the symbol table. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i965/fs/nir: fix the number of register written by FS_OPCODE_GET_BUFFER_SIZESamuel Iglesias Gonsálvez2015-11-121-2/+14
| | | | | | | | | | | FS_OPCODE_GET_BUFFER_SIZE is calculated with a resinfo's sampler message. This patch adjusts the number of registers written by the opcode following what the PRM spec says about the number of registers written by the SIMD8 and SIMD16's writeback messages for sampler messages. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/skl/gt4: Fix URB programming restriction.Ben Widawsky2015-11-111-0/+9
| | | | | | | | | | | | | | The comment in the code details the restriction. Thanks to Ken for having a very helpful conversation with me, and spotting the blurb in the link I sent him :P. There are still stability problems for me on GT4, but this definitely helps with some of the failures. v2: Comment fixes Cc: [email protected] Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nv50,nvc0: add ARB_clear_texture supportIlia Mirkin2015-11-117-8/+103
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* st/mesa: implement ARB_clear_textureIlia Mirkin2015-11-112-0/+30
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add PIPE_CAP_CLEAR_TEXTURE and clear_texture prototypeIlia Mirkin2015-11-1118-0/+31
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: add helper to check for enhanced layouts supportTimothy Arceri2015-11-121-0/+5
| | | | Reviewed-by: Emil Velikov <[email protected]>
* mesa: add ARB_enhanced_layoutsTimothy Arceri2015-11-125-0/+6
| | | | Reviewed-by: Emil Velikov <[email protected]>
* r600: initialised PGM_RESOURCES_2 for ES/GSDave Airlie2015-11-122-0/+6
| | | | | | | | | | | This fixes the corruption on rendering that we are seeing in certain geometry shaders. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91780 Reviewed-by: Alex Deucher <[email protected]> Tested / Reviewed-by: Glenn Kennard <[email protected]> Cc: "10.6" "11.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965: Split nir_emit_intrinsic by stage with a general fallback.Kenneth Graunke2015-11-112-277/+381
| | | | | | | | | | | | | | | | | | | | | | Many intrinsics only apply to a particular stage (such as discard). In other cases, we may want to interpret them differently based on the stage (such as load_primitive_id or load_input). The current method isn't that pretty - we handle all intrinsics in one giant function. Sometimes we assert on stage, sometimes we forget. Different behaviors are handled via if-ladders based on stage. This commit introduces new nir_emit_<stage>_intrinsic() functions, and makes nir_emit_instr() call those. In turn, those fall back to the generic nir_emit_intrinsic() function for cases they don't want to handle specially. This makes it clear which intrinsics only exist in one stage, and makes it easy to handle inputs/outputs differently for various stages. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/copyimage: allow width/height to not be multiples of blockIlia Mirkin2015-11-111-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For compressed textures, the image size is not necessarily a multiple of the block size (e.g. the last mip levels). Section 18.3.2 (Copying Between Images) of the OpenGL 4.5 Core Profile spec says: An INVALID_VALUE error is generated if the dimensions of either subregion exceeds the boundaries of the corresponding image object, or if the image format is compressed and the dimensions of the subregion fail to meet the alignment constraints of the format. and Section 8.7 (Compressed Texture Images) says: An INVALID_OPERATION error is generated if any of the following conditions occurs: * width is not a multiple of four, and width + xoffset is not equal to the value of TEXTURE_WIDTH. * height is not a multiple of four, and height + yoffset is not equal to the value of TEXTURE_HEIGHT. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92860 Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: [email protected]
* i965/brw_reg: Add a brw_VxH_indirect helperJason Ekstrand2015-11-111-0/+11
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove old comments in arrayobj.cBrian Paul2015-11-111-5/+0
|
* st/wgl: clarify code in stw_framebuffer_from_hwnd_locked()Brian Paul2015-11-111-2/+2
| | | | | | | | | Just a minor code change to make it obvious that NULL is returned when we don't find the given HWND. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/wgl: improve some function commentsBrian Paul2015-11-111-6/+30
| | | | | | | | | In particular, explain when stw_framebuffer objects are locked/unlocked/etc. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/wgl: whitespace/formatting fixesBrian Paul2015-11-113-63/+48
|
* st/wgl: fix locking issue in stw_st_framebuffer_present_locked()Brian Paul2015-11-111-0/+3
| | | | | | | | | | | | | When stw_st_framebuffer_present_locked() is called, the stw_framebuffer's mutex will already be locked. Normally, the stw_framebuffer_present_locked() function calls stw_framebuffer_release() to unlock the mutex when it's done. But if for some reason the 'resource' pointer in stw_st_framebuffer_present_locked() is null, we'd return without unlocking the stw_framebuffer. This fixes that to avoid potential deadlocks. Reviewed-by: Charmaine Lee <[email protected]>
* i965: Print force_writemask_all in dump_instructions().Kenneth Graunke2015-11-112-0/+6
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Combine BRW_NEW_*_BINDING_TABLE dirty bits.Kenneth Graunke2015-11-115-26/+14
| | | | | | | | | | | A while back, we moved to directly emitting the Gen7+ state when constructing the binding tables. These flags are only used on Gen4-6, which emit all the binding table pointers at once. We gain nothing by having separate flags, so combine them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>