summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-07-09WORKAROUND while waiting for curro's patchigalia-ssbo-wipSamuel Iglesias Gonsalvez1-0/+3
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965/vec4: Skip dependency control for opcodes emitting multiple instructionsIago Toral Quiroga1-0/+4
The same we did for the fragment shader with commit 7452f18b.
2015-07-09glsl: Consider active all elements of a shared/std140 block arrayAntia Puentes1-0/+23
Commmit 1ca25ab (glsl: Do not eliminate 'shared' or 'std140' blocks or block members) considers active 'shared' and 'std140' uniform blocks and uniform block arrays but did not include the block array elements. It was possible to have an active uniform block array without any elements marked as used, making the assertion ((b->num_array_elements > 0) == b->type->is_array()) in link_uniform_blocks fail. Fixes the following 5 dEQP tests: * dEQP-GLES3.functional.ubo.random.nested_structs_instance_arrays.18 * dEQP-GLES3.functional.ubo.random.nested_structs_instance_arrays.24 * dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.19 * dEQP-GLES3.functional.ubo.random.all_per_block_buffers.49 * dEQP-GLES3.functional.ubo.random.all_shared_buffer.36
2015-07-09docs: Mark ARB_shader_storage_buffer_object as done for i965.Iago Toral Quiroga1-1/+1
2015-07-09i965: Enable ARB_shader_storage_buffer_object extension for gen7+Samuel Iglesias Gonsalvez1-0/+1
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965: set ARB_shader_storage_buffer_object related constant valuesSamuel Iglesias Gonsalvez1-0/+11
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09mesa: Add getters for the GL_ARB_shader_storage_buffer_object max constantsSamuel Iglesias Gonsalvez2-0/+13
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glapi: add ARB_shader_storage_block_buffer_objectSamuel Iglesias Gonsalvez5-2/+60
v2: - Add ShaderStorageBlockBinding to static_data.py Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-07-09main/tests: add ARB_shader_storage_buffer_object tokens to enum_stringsSamuel Iglesias Gonsalvez1-0/+15
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09main: Add SHADER_STORAGE_BLOCK and BUFFER_VARIABLE support for ↵Samuel Iglesias Gonsalvez5-15/+289
ARB_program_interface_query Including TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE queries. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: Do not allow reads from write-only variablesIago Toral Quiroga1-0/+49
The error location won't be right, but fixing that would require to check for this as we process each type of AST node that can involve a variable read.
2015-07-09glsl: Do not allow assignments to read-only variablesIago Toral Quiroga1-1/+8
2015-07-09glsl: Allow memory layout qualifiers on shader storage buffer objectsIago Toral Quiroga2-5/+101
Since memory qualifiers are also keywords we need to do the same trick we use for other keywords that can be used as layout qualifiers to handle alternate capitalizations in desktop GLSL, like row_major, etc.
2015-07-09glsl: Apply memory qualifiers to buffer variablesIago Toral Quiroga2-0/+35
2015-07-09glsl: Allow use of memory qualifiers with ARB_shader_storage_buffer_object.Iago Toral Quiroga1-5/+5
2015-07-09glsl: fix UNIFORM_BUFFER_START or UNIFORM_BUFFER_SIZE query when no buffer ↵Samuel Iglesias Gonsalvez1-2/+4
object is bound According to ARB_uniform_buffer_object spec: "If the parameter (starting offset or size) was not specified when the buffer object was bound (e.g. if bound with BindBufferBase), or if no buffer object is bound to <index>, zero is returned." Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09mesa: Add queries for GL_SHADER_STORAGE_BUFFERIago Toral Quiroga1-0/+31
These handle querying the buffer name attached to a giving binding point as well as the start offset and size of that buffer.
2015-07-09mesa: add glShaderStorageBlockBinding()Samuel Iglesias Gonsalvez2-0/+56
Defined in ARB_shader_storage_buffer_object extension. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: First argument to atomic functions must be a buffer variableIago Toral Quiroga1-0/+37
2015-07-09i965/vec4: Implement lowered SSBO atomic intrinsicsIago Toral Quiroga2-0/+104
The original GLSL IR intrinsics have been lowered to an internal version that accepts a block index and an offset instead of a SSBO reference.
2015-07-09i965/nir/fs: Implement SSBO atomicsIago Toral Quiroga2-0/+79
2015-07-09nir: Implement lowered SSBO atomic intrinsicsIago Toral Quiroga2-0/+67
The original GLSL IR intrinsics have been lowered to an internal version that accepts a block index and an offset instead of a SSBO reference.
2015-07-09glsl: lower SSBO atomic intrinsicsIago Toral Quiroga1-0/+141
The first argument to SSBO atomics is a reference to a SSBO buffer variable so we want to compute its block index and offset and provide these values to an internal version of the intrinsic that takes them instead of the buffer variable reference.
2015-07-09glsl: Add atomic functions from ARB_shader_storage_buffer_objectIago Toral Quiroga1-0/+185
2015-07-09glsl: Rename atomic counter functionsIago Toral Quiroga1-15/+15
Shader Storage Buffer Object will add new atomic functions that are not associated with counters, so better have atomic counter-specific functions explicitly include the word "counter" in their names.
2015-07-09glsl: atomic counters can be declared as buffer-qualified variablesKristian Høgsberg1-3/+3
2015-07-09nir: ignore an instruction's dest if it hasn't anyIago Toral Quiroga1-1/+2
2015-07-09i965/nir/fs: Implement SSBO readsIago Toral Quiroga1-0/+62
2015-07-09nir: Implement __intrinsic_store_loadIago Toral Quiroga3-2/+69
2015-07-09i965/vec4: Implement SSBO readsIago Toral Quiroga2-0/+77
2015-07-09i965/nir/fs: Implement SSBO writesIago Toral Quiroga1-0/+71
2015-07-09nir: Implement __intrinsic_store_ssboIago Toral Quiroga2-6/+42
2015-07-09i965/vec4: Implement SSBO writesIago Toral Quiroga2-0/+159
2015-07-09i965/fs: Do not include the header with a pixel mask in untyped read messagesIago Toral Quiroga2-32/+7
We need our reads to provide well-defined results for all enabled channels even for helper invocations, which means that we should not use a pixel mask with them.
2015-07-09glsl: shader storage blocks use different max block size values than uniformsSamuel Iglesias Gonsalvez1-1/+11
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: ignore buffer variables when counting uniform componentsSamuel Iglesias Gonsalvez1-5/+10
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: number of active shader storage blocks must be within allowed limitsSamuel Iglesias Gonsalvez1-4/+39
Notice that we should differentiate betweeb shader storage blocks and uniform blocks, since they have different limits. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: a shader storage buffer must be smaller than the maximum size allowedSamuel Iglesias Gonsalvez4-3/+26
Otherwise, generate a link time error as per the ARB_shader_storage_buffer_object spec. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: add std430 interface packing support to ssbo writes and unsized array ↵Samuel Iglesias Gonsalvez1-14/+50
length Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: propagate std430 packing qualifier to struct's members and array of ↵Samuel Iglesias Gonsalvez4-52/+106
structs When propagating std430 packing qualifier to the struct's members, new glsl_types need to be created because the existing ones are const. The new glsl_types are meant to replace the already defined one taking into account that the field names cannot have different names as it is the same struct definition but with different packing. This patch is designed to keep previous default behavior (use std140 as interface packing qualifier) when there is no std430 interface packing. In order to facilitate the task, the glsl_type constructors for struct and for interfaces are unified, as they had the same code but different base_type. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: propagate interface packing information to arrays of scalars, vectors.Samuel Iglesias Gonsalvez4-19/+69
Now std140 is not the only interface packing qualifier that can be used. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: Add parser/compiler support for std430 interface packing qualifierSamuel Iglesias Gonsalvez8-9/+165
This commit also adds functions to calculate std430 base alignment and sizes Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965/wm: surfaces should have the API buffer size, not the drm buffer sizeSamuel Iglesias Gonsalvez1-2/+2
The returned drm buffer object has a size multiple of 4096 but that should not be exposed to the API user, which is working with a different size. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965/wm: emit null buffer surfaces when null buffers are attachedSamuel Iglesias Gonsalvez1-18/+26
Otherwise we can expect odd things to happen if, for example, we ask for the size of the attached buffer from shader code, since that might query this value from the surface we uploaded and get random results. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965/fs/nir: implement unsized array's length calculationSamuel Iglesias Gonsalvez1-0/+50
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965/fs: Implement generator code for unsized array's length calculationSamuel Iglesias Gonsalvez5-0/+55
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09i965/vec4: Implement unsized array's length calculationSamuel Iglesias Gonsalvez6-2/+88
Notice that Skylake needs to include a header in the sampler message so it will need some tweaks to work there. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09nir: add shader storage buffer's unsized array length calculationSamuel Iglesias Gonsalvez2-0/+19
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: Lower unsized array's length calculation expressionSamuel Iglesias Gonsalvez1-0/+179
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2015-07-09glsl: Add parser/compiler support for unsized array's length()Samuel Iglesias Gonsalvez9-6/+75
It also creates unop and triop expressions to tell the driver to calculate the unsized array length. It is needed two expressions to do the calculation: * The unop expression saves the ir_rvalue* whose length should be calculated. * Afterwards, this unop is going to be processed by a lowering pass that will convert it to a triop that includes the block index, offset of the variable inside the shader storage block and the array stride. All of them are needed for length() calculation following GL_ARB_shader_storage_buffer spec: array.length() = max((buffer_object_size - offset_of_array) / stride_of_array, 0) Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>