summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-06 15:12:33 -0800
committerJason Ekstrand <[email protected]>2015-11-06 15:12:33 -0800
commit1b5c7e7ecd43d3526c0a6831ff6c1edfab4529af (patch)
treefa2b2de311a32a734c956b0c7f9184c25a647d22
parent5ba281e794fbc215adfedd44b73a628cdf39a513 (diff)
anv/pipeline: Expose is_scalar_shader_stage
-rw-r--r--src/vulkan/anv_pipeline.c11
-rw-r--r--src/vulkan/anv_private.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index e4f68350b81..67579c14e87 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -121,8 +121,9 @@ static const gl_shader_stage vk_shader_stage_to_mesa_stage[] = {
[VK_SHADER_STAGE_COMPUTE] = MESA_SHADER_COMPUTE,
};
-static bool
-is_scalar_shader_stage(const struct brw_compiler *compiler, VkShaderStage stage)
+bool
+anv_is_scalar_shader_stage(const struct brw_compiler *compiler,
+ VkShaderStage stage)
{
switch (stage) {
case VK_SHADER_STAGE_VERTEX:
@@ -187,7 +188,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
assert(entrypoint != NULL);
brw_preprocess_nir(nir, &device->info,
- is_scalar_shader_stage(compiler, vk_stage));
+ anv_is_scalar_shader_stage(compiler, vk_stage));
nir_shader_gather_info(nir, entrypoint);
@@ -357,7 +358,7 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
if (nir == NULL)
return NULL;
- anv_nir_lower_push_constants(nir, is_scalar_shader_stage(compiler, stage));
+ anv_nir_lower_push_constants(nir, anv_is_scalar_shader_stage(compiler, stage));
/* Figure out the number of parameters */
prog_data->nr_params = 0;
@@ -409,7 +410,7 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
/* Finish the optimization and compilation process */
brw_postprocess_nir(nir, &pipeline->device->info,
- is_scalar_shader_stage(compiler, stage));
+ anv_is_scalar_shader_stage(compiler, stage));
/* nir_lower_io will only handle the push constants; we need to set this
* to the full number of possible uniforms.
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index 6ba2e460a8d..631b92cf267 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -430,6 +430,9 @@ struct anv_physical_device {
struct brw_compiler * compiler;
};
+bool anv_is_scalar_shader_stage(const struct brw_compiler *compiler,
+ VkShaderStage stage);
+
struct anv_instance {
VK_LOADER_DATA _loader_data;