summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressionsTobias Klausmann2014-06-061-2/+6
| | | | | Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: clear subop when folding constant expressionsTobias Klausmann2014-06-061-0/+1
| | | | | | | | | Some operations (e.g. OP_MUL/OP_MAD/OP_EXTBF) might have a subop set. After folding, make sure that it is cleared Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: "10.1 10.2" <[email protected]>
* i965: Support GL_CLAMP natively on Broadwell.Kenneth Graunke2014-06-053-4/+13
| | | | | | | | | | | | The new hardware actually supports this OpenGL 1.x feature natively, so we can finally drop our shader workarounds. Not many applications use GL_CLAMP, and most use it unintentionally, but it's trivial to do right, so we should. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.2" <[email protected]>
* i965: Pass brw to translate_wrap_mode().Kenneth Graunke2014-06-053-8/+9
| | | | | | | | This lets us do generation checks. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.2" <[email protected]>
* i965: use _mesa_align_malloc in intel_miptree_map_movntdqaTapani Pälli2014-06-051-2/+2
| | | | | | | | | This fixes case where we have 1x1 size buffer and misalignment is 0. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79616
* i965/fs: Allow array dereference of HW_REG.Chris Forbes2014-06-051-1/+1
| | | | | | | | | | | | | | When dereferencing an element of gl_SampleMaskIn[], the source register here will be a HW_REG rather than a VGRF because the payload slot is now exposed directly. Fixes an assertion failure in the Piglit test: tests/spec/arb_gpu_shader5/execution/samplemaskin-basic Signed-off-by: Chris Forbes <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/omx/enc: enable b framesLeo Liu2014-06-042-3/+5
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* radeon/vce: implement h264 profile supportLeo Liu2014-06-041-1/+4
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx/enc: implement h264 profile supportLeo Liu2014-06-042-2/+49
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl: add more avc profilesLeo Liu2014-06-042-1/+9
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* wgl: Disable CRT message boxes when Windows system error messages boxes are ↵José Fonseca2014-06-043-0/+43
| | | | | | | | | | disabled. At least on MSVC we statically link against the CRT, so we must disable the CRT message boxes if we want unattended testing. The messages are convenient when running manually, so let them be if the system error message boxes are not disabled.
* glapi: Note apparent gap in numbering from ARB_multi_draw_indirectChris Forbes2014-06-041-0/+3
| | | | | | This is defined in the same included file as ARB_draw_indirect. Signed-off-by: Chris Forbes <[email protected]>
* docs: Mark off gs5/overload resolutionChris Forbes2014-06-041-1/+1
| | | | Signed-off-by: Chris Forbes <[email protected]>
* glsl: Implement overload resolution for ARB_gpu_shader5Chris Forbes2014-06-041-0/+71
| | | | | | | V3: Move spec citation into the code. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Add support for comparing function parameter conversionsChris Forbes2014-06-041-3/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ARB_gpu_shader5 spec says: "To determine whether the conversion for a single argument in one match is better than that for another match, the following rules are applied, in order: 1. An exact match is better than a match involving any implicit conversion. 2. A match involving an implicit conversion from float to double is better than a match involving any other implicit conversion. 3. A match involving an implicit conversion from either int or uint to float is better than a match involving an implicit conversion from either int or uint to double. If none of the rules above apply to a particular pair of conversions, neither conversion is considered better than the other." V3: Add spec citation, including oddball difference between gs5 and GLSL 4.0; comment a bit better as per Jordan's suggestions. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Build a list of inexact function matchesChris Forbes2014-06-041-11/+32
| | | | | | | | | This will facilitate GLSL 4.0 / ARB_gpu_shader5's enhanced overload resolution rules, and also possibly better error reporting for ambiguous function calls. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* docs: Mark off gs5/implicit conversionsChris Forbes2014-06-041-1/+1
| | | | Signed-off-by: Chris Forbes <[email protected]>
* glsl: Allow int -> uint implicit conversions on function parametersChris Forbes2014-06-041-3/+16
| | | | | | | | | V2: Fix crashes during linking, where the parse state is NULL. In this case, all required checks have already been done, so we assume the extension is enabled. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Pass parse state to can_implicitly_convert_to()Chris Forbes2014-06-044-6/+8
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Pass parse state to parameter_lists_match()Chris Forbes2014-06-041-2/+3
| | | | | | | | The available implicit conversions depend on the GLSL version we're compiling. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add support for int -> uint implicit conversionsChris Forbes2014-06-041-0/+8
| | | | | | | This is required for ARB_gpu_shader5. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Clean up apply_implicit_conversionChris Forbes2014-06-041-27/+31
| | | | | | | | | | | | | | | We're about to add new implicit conversions, first for ARB_gpu_shader5, and then later for ARB_gpu_shader_fp64. Pull out the opcode determination into its own function, and get rid of the bool -> float case that could never be hit anyway [since it fails the is_numeric() check]. V2: Retain the vector width mangling. It turns out this is necessary for the conversions done (and then thrown away) when determining the return type of arithmetic operators. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* docs: Update `precise` qualifier status in GL3.txtChris Forbes2014-06-041-1/+1
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Allow `precise` as a parameter qualifierChris Forbes2014-06-041-2/+10
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Disallow `precise` redeclarations of vars from outer scopesChris Forbes2014-06-041-0/+9
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: Add support for `precise` redeclarationsChris Forbes2014-06-044-7/+47
| | | | | | | | This works like glsl-1.20+'s invariant redeclarations, but with fewer restrictions, since `precise` is allowed on pretty much anything. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: add support for `precise` in type_qualifierChris Forbes2014-06-045-8/+48
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glsl: remove outdated comment, move sample to correct blockChris Forbes2014-06-041-3/+3
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix copy and pasted values in Broadwell code.Kenneth Graunke2014-06-031-10/+21
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Cc: "10.2" <[email protected]>
* glsl: Make most ir_instruction::as_subclass() functions non-virtual.Matt Turner2014-06-031-109/+52
| | | | | | | | | | | | | | | | | | | | | | | | There are several common ways to check whether an object is a particular subclass: dynamic_cast<>, the as_subclass() pattern, or explicit enum tags. We originally used the virtual as_subclass methods, but later added enum tags as they are much nicer for debugging. Since we have the enum tags, we don't necessarily need to use virtual functions to implement the as_subclass() methods. We can just check the tag and return the pointer or NULL. This saves 18 entries in the vtable, and instead of two pointer dereferences per as_subclass() call most are only three inline instructions. Compile time of sam3/112.frag (the longest compile in a recent shader-db run) is reduced by 5% from 348 to 329 ms (n=500). perf stat of this workload shows: 24.14% reduction in iTLB-loads: 285,543 -> 216,606 42.55% reduction in iTLB-load-misses: 18,785 -> 10,792 Reviewed-by: Juha-Pekka Heikkila <[email protected]>
* glsl: Move ir_type_unset to end of enumeration.Matt Turner2014-06-032-7/+3
| | | | | | | | Now that the constructors set a type, ir_type_unset is not very useful. Move it to the end of the enum (specifically out of position 0) so that enums checks for dereferences and rvalues can save an instruction. Reviewed-by: Juha-Pekka Heikkila <[email protected]>
* glsl: Reorder ir_type_* enum for easier comparisons.Matt Turner2014-06-031-7/+7
| | | | | | | | Makes checking whether an object is an ir_dereference, an ir_rvalue, or an ir_jump simpler. Since ir_dereference is a subclass or ir_rvalue, list its subtypes first so that they can both generate nice code. Reviewed-by: Juha-Pekka Heikkila <[email protected]>
* glsl: Remove useless call to as_rvalue().Matt Turner2014-06-031-1/+1
| | | | | | The type returned by hir() is already an ir_rvalue pointer. Reviewed-by: Juha-Pekka Heikkila <[email protected]>
* glsl: Set ir_instruction::ir_type in the base class constructorIan Romanick2014-06-032-54/+57
| | | | | | | | | | | | This has the added perk that if you forget to set ir_type in the constructor of a new subclass (or a new constructor of an existing subclass) the compiler will tell you... instead of relying on ir_validate or similar run-time detection. Reviewed-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
* egl: Check for NULL native_window in eglCreateWindowSurfaceSinclair Yeh2014-06-031-0/+4
| | | | | | | | | | | | | | | We have customers using NULL as a way to test the robustness of the API. Without this check, EGL will segfault trying to dereference dri2_surf->wl_win->private because wl_win is NULL. This fix adds a check and sets EGL_BAD_NATIVE_WINDOW v2: Incorporated feedback from idr - moved the check to a higher level function. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: "10.1 10.2" <[email protected]>
* r600g,radeonsi: don't use hardware MSAA resolve if dst is fast-clearedMarek Olšák2014-06-032-2/+4
| | | | | | | It doesn't work and our docs say so too. Cc: [email protected] Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: BlitFramebuffer should follow render conditionMarek Olšák2014-06-031-5/+6
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: BlitFramebuffer should follow render conditionMarek Olšák2014-06-031-5/+6
|
* r300g: BlitFramebuffer should follow render conditionMarek Olšák2014-06-031-3/+4
|
* r600g,radeonsi: disable fast clear if render condition is onMarek Olšák2014-06-031-0/+3
| | | | | | | | | | For some reason, CP DMA doesn't follow the predicate bit if I enable it, so this is the only option. This fixes piglit: spec/NV_conditional_render/clear Cc: [email protected] Reviewed-by: Michel Dänzer <[email protected]>
* mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.José Fonseca2014-06-032-2/+12
| | | | | | | | | | | | | | | | | | | | | Same as b026b6bbfe3f15c8a7296ac107dc3d31f74e401e, but COLOR_ARRAY_SIZE/SECONDARY_COLOR_ARRAY_SIZE. Ideally we wouldn't munge the incoming state, so that we wouldn't need to unmunge it back on glGet*. But the array size state is copied and referred in many places, many of which couldn't take an GLenum like GL_BGRA instead of a plain integer. So just hack around on glGet*, to ensure there is no risk of introducing regressions elsewhere. This bug causes problems to Apitrace, resulting in wrong traces. See https://github.com/apitrace/apitrace/issues/261 for details. Tested with piglit arb_vertex_array_bgra-get, which was created for this purpose. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.1 10.2" <[email protected]>
* mesa/main: Make get_hash.c values constant.José Fonseca2014-06-031-1/+1
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.1 10.2" <[email protected]>
* i965: Add _default_ name changes to test_eu_compact.c.Vinson Lee2014-06-021-5/+5
| | | | | | | | | | | | | | | | | | These were missed in commit e374809819d82f2e3e946fe809c4d46061ddc5b5. Fixes 'make check'. CC test_eu_compact.o test_eu_compact.c: In function ‘gen_f0_0_MOV_GRF_GRF’: test_eu_compact.c:222:4: error: implicit declaration of function ‘brw_set_predicate_control’ [-Werror=implicit-function-declaration] brw_set_predicate_control(p, true); ^ test_eu_compact.c: In function ‘run_tests’: test_eu_compact.c:270:6: error: implicit declaration of function ‘brw_set_access_mode’ [-Werror=implicit-function-declaration] brw_set_access_mode(p, BRW_ALIGN_16); ^ Signed-off-by: Vinson Lee <[email protected]>
* i965/gen8: Print number of instructions directly.Matt Turner2014-06-022-0/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Emit compaction stats without walking the assembly.Matt Turner2014-06-023-19/+12
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move program header printing to end of generate_code().Matt Turner2014-06-024-52/+44
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move annotation info into generate code.Matt Turner2014-06-026-91/+68
| | | | | | Suggested by Ken as a way to cut down lines of code. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Put '_default_' in the name of functions that set default state.Kenneth Graunke2014-06-0213-163/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | Eventually we're going to use functions to set bits on an instruction. Putting 'default' in the name of functions that alter default state will help distinguins them. This patch was generated entirely mechanically, by the following: for file in brw*.{cpp,c,h}; do sed -i \ -e 's/brw_set_mask_control/brw_set_default_mask_control/g' \ -e 's/brw_set_saturate/brw_set_default_saturate/g' \ -e 's/brw_set_access_mode/brw_set_default_access_mode/g' \ -e 's/brw_set_compression_control/brw_set_default_compression_control/g' \ -e 's/brw_set_predicate_control/brw_set_default_predicate_control/g' \ -e 's/brw_set_predicate_inverse/brw_set_default_predicate_inverse/g' \ -e 's/brw_set_flag_reg/brw_set_default_flag_reg/g' \ -e 's/brw_set_acc_write_control/brw_set_default_acc_write_control/g' \ $file; done No manual changes were done after running that command. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Delete brw_set_conditionalmod.Kenneth Graunke2014-06-023-13/+0
| | | | | | | | | This removes the ability to set the default conditional modifier on all future instructions. Nothing uses it, and it's not really a sensible thing to do anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Eliminate brw_set_conditionalmod from the Gen4-5 compilers.Kenneth Graunke2014-06-026-24/+24
| | | | | | | | | With the predication changes eliminated, all this does is set the conditional modifier on a single instruction. Doing that directly is easy, and avoids mucking about with default state. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>