Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
The same we did for the fragment shader with commit 7452f18b.
|
|
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
|
|
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
ARB_program_interface_query
Including TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE queries.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
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>
|
|
These handle querying the buffer name attached to a giving binding point
as well as the start offset and size of that buffer.
|
|
Defined in ARB_shader_storage_buffer_object extension.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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>
|
|
Otherwise, generate a link time error as per the
ARB_shader_storage_buffer_object spec.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
length
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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>
|
|
Now std140 is not the only interface packing qualifier that can be used.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
This commit also adds functions to calculate std430 base alignment and sizes
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
|
|
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>
|