aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* i965/nir: double/dvec2 uniforms only need to be padded to a single vec4 slotSamuel Iglesias Gonsálvez2017-01-031-1/+2
| | | | | | | | | | | | max_vector_size is used in the vec4 backend to pad out the uniform components to match a size that is a multiple of a vec4. Double and dvec2 uniforms only require a single vec4 slot, not two. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: fix exec_size when emitting DIM instructionSamuel Iglesias Gonsálvez2017-01-031-1/+1
| | | | | | | | | Otherwise, DIM instructions will be emitted with the default exec size which could be 16 in some cases, that is not legal. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Suggested-by: Matt Turner <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/mesa: get Version from gl_program rather than gl_shader_programTimothy Arceri2017-01-031-4/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: stop passing gl_shader_program to brw_compile_gs() and gen6_gs_visitor()Timothy Arceri2017-01-035-10/+6
| | | | | | Instead we caan just use gl_program. Reviewed-by: Eric Anholt <[email protected]>
* i965: get InfoLog and LinkStatus via the shader program data pointer in ↵Timothy Arceri2017-01-035-12/+10
| | | | | | | | | gl_program This removes another dependency on gl_shader_program in the codegen functions. Reviewed-by: Eric Anholt <[email protected]>
* i965: eliminate gen6_xfb_enabled field in brw_gs_prog_dataTimothy Arceri2017-01-035-20/+11
| | | | | | | | | We can just get this information from shader_info instead. Note that passing gen6_gs_visitor() gl_program via _LinkedShaders will go away in a later patch. Reviewed-by: Eric Anholt <[email protected]>
* i965: update brw_get_shader_time_index() not to take gl_shader_programTimothy Arceri2017-01-038-25/+31
| | | | | | | | This removes another dependency on gl_shader_program in the codegen functions which will help allow us to use gl_program in the CurrentProgram array rather than gl_shader_program. Reviewed-by: Eric Anholt <[email protected]>
* gallium/hud: fix the windows build by disabling file dumpingMarek Olšák2017-01-021-0/+2
|
* glsl: Update ES 3.2 shader output restrictions.Kenneth Graunke2017-01-021-11/+37
| | | | | | | | | | | | | | | | | This disallows fancy varyings in tessellation and geometry shaders, as required by ES 3.2. Fixes: dEQP-GLES31.functional.tessellation.user_defined_io.negative.per_patch_array_of_structs dEQP-GLES31.functional.tessellation.user_defined_io.negative.per_patch_structs_containing_arrays (Not a candidate for stable branches as it only disallows things which should be working as desktop GL allows them.) v2: Update error messages to not say "vertex shader" (caught by Iago). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* i965/miptree: Create a disable CCS flagBen Widawsky2017-01-024-20/+16
| | | | | | Cc: Chad Versace <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Replace bool aux disable with enumBen Widawsky2017-01-022-13/+21
| | | | | | | | | | | | | | | | | | | As CCS buffers are passed to KMS, it becomes useful to be able to determine exactly what type of aux buffers are disabled. This was previously not entirely needed (though the code was a little more confusing), however it becomes very desirable after a recent patch from Chad: commit 1c8be049bea786c2c054a770025976beba5b8636 Author: Chad Versace <[email protected]> Date: Fri Dec 9 16:18:11 2016 -0800 i965/mt: Disable aux surfaces after making miptree shareable The next patch will handle CCS and get rid of no_ccs. Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* docs: document GALLIUM_HUD_DUMP_DIR envvarEdmondo Tommasina2017-01-011-0/+2
| | | | Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: set filedescriptor for fps graphEdmondo Tommasina2017-01-011-0/+2
| | | | Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: set filedescriptor for cpu graphEdmondo Tommasina2017-01-011-0/+2
| | | | Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: move file initialization to a functionEdmondo Tommasina2017-01-013-11/+20
| | | | | | | The function will be used later to create the filedescriptor for other metrics. Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: dump hud_driver_query values to filesEdmondo Tommasina2017-01-013-0/+19
| | | | | | | | | | | | | | Dump values for every selected data source in GALLIUM_HUD. Every data source has its own file and the filename is equal to the data source identifier. Set GALLIUM_HUD_DUMP_DIR to dump values to files in this directory. No values are dumped if the environment variable is not set, the directory doesn't exist or the user doesn't have write access. Signed-off-by: Marek Olšák <[email protected]>
* anv,radv: disable StorageImageWriteWithoutFormat for nowIlia Mirkin2016-12-312-2/+2
| | | | | | | | | | | The SPIR-V capability isn't even marked as enabled, and there are no tests in Vulkan-CTS. Per Jason Ekstrand, this won't work in anv as such write-only surfaces require additional setup which is currently not performed. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* i965: Avoid NULL pointer dereference when transform feedback is off.Kenneth Graunke2016-12-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | upload_3dstate_streamout can be called when there's no currently bound transform feedback object. In this case, we get the default object, which has a NULL shader (previously gl_shader_program, now gl_program). The old code did something sketchy, but which worked: const struct gl_transform_feedback_info *linked_xfb_info = &xfb_obj->shader_program->LinkedTransformFeedback; Here, if shader_program is NULL, this would be a bogus pointer of 0x60. But we never actually dereferenced it, so it worked out. With Timothy's recent reworks, we actually end up dereferencing xfb_obj->program along the way, which crashes since it's NULL. The solution is to move this pointer initialization into the "active" block, where we know it actually exists and won't be bogus. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99231 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/mesa: add reference to gl_shader_program_data from gl_programTimothy Arceri2016-12-315-0/+21
| | | | | | | | | We also add the stubs for the standalone compiler in this change. By adding a reference here we can now refactor some code to use gl_program where we were previously awkwardly using gl_shader_program. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make union in gl_program a struct and add FIXMETimothy Arceri2016-12-311-1/+5
| | | | | | | | i915 is mixing the use of these fields, for now change this to a struct and add a FIXME. Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99229
* i965/peephole_ffma: Use nir_builderJason Ekstrand2016-12-301-29/+14
| | | | | Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir/split_var_copies: Use a nir_shader rather than a void *mem_ctxJason Ekstrand2016-12-301-3/+3
| | | | | Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir/opt_peephole_select: Pass around the actual nir_shaderJason Ekstrand2016-12-301-4/+5
| | | | | Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir/conditional_if: Properly use the builderJason Ekstrand2016-12-301-11/+10
| | | | | | | | | | We were passing around a void *mem_ctx and using that to initialize the builder which was wrong since that pointed to ralloc_parent(impl) which is the shader but the builder is supposed to be initialized with the nir_function_impl. Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir/lower_var_copies: Use a shader rather than a void *mem_ctxJason Ekstrand2016-12-302-9/+10
| | | | | Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir/lower_io: Use the builder instead of carrying a mem_ctxJason Ekstrand2016-12-301-8/+8
| | | | | Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir/from_ssa: Use nir_builder for emit_copyJason Ekstrand2016-12-301-13/+13
| | | | | | | | This lets us get rid of the void *mem_ctx parameter and make things a bit more type safe. Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nir: Make nir_copy_deref follow the "clone" patternJason Ekstrand2016-12-3013-65/+51
| | | | | | | | | We rename it to nir_deref_clone, re-order the sources to match the other clone functions, and expose nir_deref_var_clone. This past part, in particular, lets us get rid of quite a few lines since we no longer have to call nir_copy_deref and wrap it in deref_as_var. Reviewed-by: Jordan Justen <[email protected]>
* freedreno/ir3: rework varying slots (maybe??)Rob Clark2016-12-301-4/+9
| | | | | | | | | | See: dEQP-GLES2.functional.shaders.swizzles.vector_swizzles.mediump_vec2_yyyy_fragment if we only access (in FS) varying.y then it ends up in slot zero.. I'm not sure the hw likes that.. Signed-off-by: Rob Clark <[email protected]>
* spirv: always expose SpvCapabilityStorageImageExtendedFormatsIlia Mirkin2016-12-293-5/+1
| | | | | | | | | | I forgot to do this in commit 76b97d544e ("anv: enable storage image extended formats"). Since both drivers support this now, no need for the conditional enable. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* anv: add support for extended texture gatherIlia Mirkin2016-12-292-2/+1
| | | | | | | | | Now that the SPIR-V -> NIR translation is in place, no additional logic is required. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* radv: only allow cmask/dcc in color optimal.Dave Airlie2016-12-301-3/+2
| | | | | | | | I had this on transfers due to the clear color cmd, but it seems like that path shouldn't get fast clears. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: only allow cmask/dcc on exclusive or concurrent with graphics queue.Dave Airlie2016-12-301-3/+6
| | | | | | | Otherwise we don't get the barriers to flush dcc etc. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir: Rewrite lower_regs_to_ssa to use the phi builderJason Ekstrand2016-12-291-421/+174
| | | | | This keeps some of Connor's original code. However, while I was at it, I updated this very old pass to a bit more modern NIR.
* nir/phi-builder: Set the value in the block when creating a phiJason Ekstrand2016-12-291-1/+1
| | | | | | | | | After we figure out the value that we are going to return, we have a loop that walks up the dominance tree and sets the value in each of the blocks that doesn't have one yet. In the case of the phi, the def is set to NEEDS_PHI not NULL, so the last one where the phi node actually goes never gets filled out. This can lead to duplicating the phi node unnecessarily.
* nir: Add foreach_register helper macrosJason Ekstrand2016-12-291-0/+5
|
* nir: Rename convert_to_ssa lower_regs_to_ssaJason Ekstrand2016-12-299-13/+12
| | | | This matches the naming of nir_lower_vars_to_ssa, the other to-SSA pass.
* mesa/glsl/i965: remove Driver.NewShader()Timothy Arceri2016-12-3010-58/+2
| | | | | | | | | After removing brw_shader in the previous commit this is no longer needed. V2: remove use in src/compiler/glsl/test_optpass.cpp Reviewed-by: Eric Anholt <[email protected]>
* i965: move compiled_once flag to brw_programTimothy Arceri2016-12-308-48/+23
| | | | | | | This allows us to delete brw_shader and removes the last use of gl_linked_shader in the codegen paths. Reviewed-by: Eric Anholt <[email protected]>
* mesa/glsl: move BlendSupport bitfield to gl_programTimothy Arceri2016-12-305-11/+20
| | | | | | | | | | | | This will let us to make _CurrentFragmentProgram a gl_program pointer allowing for simpilifications to be made. We also need to add a field to gl_shader to hold it during parsing. In gl_program we put it inside a union in anticipation of moving more fields here that can be only fs or vertex stage fields. Reviewed-by: Eric Anholt <[email protected]>
* mesa: store gl_program in gl_transform_feedback_object rather than ↵Timothy Arceri2016-12-305-23/+21
| | | | | | | | | gl_shader_program This will allow us to make the CurrentProgram array store gl_program which allows us to do a bunch of simplifications. Reviewed-by: Eric Anholt <[email protected]>
* mesa/glsl: move LinkedTransformFeedback from gl_shader_program to gl_programTimothy Arceri2016-12-3012-48/+62
| | | | | | | | | | | | This will help allow us to store gl_program in the CurrentProgram array rather than gl_shader_program which will allow a bunch of simplifications. Note that we make LinkedTransformFeedback a pointer so we don't waste memory creating a struct for each stage. We also store a pointer to the gl_program that will contain the pointer in gl_shader_program so we can get easy access to the correct stage. Reviewed-by: Eric Anholt <[email protected]>
* i965: get LinkedTransformFeedback from gl_transform_feedback_objectTimothy Arceri2016-12-301-20/+9
| | | | | | | | | We have already set the gl_shader_program pointer to the correct shader program in _mesa_BeginTransformFeedback() so use it. This is more consistent with how we do it for gen7. Reviewed-by: Eric Anholt <[email protected]>
* mesa: move _Used to gl_programTimothy Arceri2016-12-303-6/+6
| | | | | | We no longer need to initialise it because gl_program is never reused. Reviewed-by: Eric Anholt <[email protected]>
* mesa/compiler: add local_size_variable to shader_infoTimothy Arceri2016-12-302-0/+3
| | | | | | | | This will be used in api_validate.c in a following patch when we switch to using gl_program pointers for the pipelines CurrentProgram array. Reviewed-by: Eric Anholt <[email protected]>
* mesa: pass gl_program to _mesa_append_uniforms_to_file()Timothy Arceri2016-12-303-5/+4
| | | | | | This now contains everything we need. Reviewed-by: Eric Anholt <[email protected]>
* glsl/mesa: set separate_shader directly in shader_infoTimothy Arceri2016-12-302-1/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa/glsl: move subroutine metadata to gl_programTimothy Arceri2016-12-305-119/+123
| | | | | | | | This will allow us to store gl_program rather than gl_shader_program as the current program perstage which allows us to simplify code that makes use of the CurrentProgram list. Reviewed-by: Eric Anholt <[email protected]>
* mesa/compiler: add stage to shader_infoTimothy Arceri2016-12-302-0/+4
| | | | | | | | | | | | This will allow us to simplify the current program logic for SSO. Also since we aim to detach shader_info from nir_shader this will come in handy avoiding passing nir_shader around just to keep track of the stage we are dealing with. V2: set stage for arb asm programs also. Reviewed-by: Eric Anholt <[email protected]>
* vc4: Rework scheduling of thread switch to cut one more NOP.Eric Anholt2016-12-291-46/+75
| | | | | | | | | | | | | | Jonas's patch got us most of the benefit of scheduling instructions into the delay slots of thread switch, but if there had been nothing to pair the thrsw with, it would move the thrsw up and leave a NOP where the thrsw was. Instead, don't pair anything with thrsw through the normal scheduling path, and have a separate helper function that inserts the thrsw earlier if possible and inserts any necessary NOPs. total instructions in shared programs: 93027 -> 92643 (-0.41%) instructions in affected programs: 14952 -> 14568 (-2.57%)