intel/compiler: Be more conservative about subgroup sizes in GL
The rules for gl_SubgroupSize in Vulkan require that it be a constant that can be queried through the API. However, all GL requires is that it's a uniform. Instead of always claiming that the subgroup size in the shader is 32 in GL like we have to do for Vulkan, claim 8 for geometry stages, the maximum for fragment shaders, and the actual size for compute. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:

committed by
Jason Ekstrand

parent
1981460af2
commit
c84b8eeeac
@@ -203,9 +203,18 @@ struct brw_sampler_prog_key_data {
|
||||
float scale_factors[32];
|
||||
};
|
||||
|
||||
/** An enum representing what kind of input gl_SubgroupSize is. */
|
||||
enum PACKED brw_subgroup_size_type
|
||||
{
|
||||
BRW_SUBGROUP_SIZE_API_CONSTANT, /**< Vulkan behavior */
|
||||
BRW_SUBGROUP_SIZE_UNIFORM, /**< OpenGL behavior */
|
||||
};
|
||||
|
||||
struct brw_base_prog_key {
|
||||
unsigned program_string_id;
|
||||
|
||||
enum brw_subgroup_size_type subgroup_size_type;
|
||||
|
||||
struct brw_sampler_prog_key_data tex;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user