diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-07-11 08:44:14 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-07-11 15:45:47 +0200 |
commit | 45b73b3aa9aa9d0d1fd8ebe0b7bebc09a0cc108e (patch) | |
tree | bbe46d4f2545002420acd6f59bcd76395a012867 /src/amd | |
parent | ef5efb40f4621361fbceef4461b3c3d812e97ade (diff) |
radv/gfx10: Do not allocate a gs_copy_shader on gfx10.
Will use ngg for any gs anyway.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 5 | ||||
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b7ee0ff6422..91b9f9196b9 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -929,7 +929,8 @@ radv_emit_prefetch_L2(struct radv_cmd_buffer *cmd_buffer, if (mask & RADV_PREFETCH_GS) { radv_emit_shader_prefetch(cmd_buffer, pipeline->shaders[MESA_SHADER_GEOMETRY]); - radv_emit_shader_prefetch(cmd_buffer, pipeline->gs_copy_shader); + if (pipeline->gs_copy_shader) + radv_emit_shader_prefetch(cmd_buffer, pipeline->gs_copy_shader); } if (mask & RADV_PREFETCH_PS) @@ -1123,7 +1124,7 @@ radv_emit_graphics_pipeline(struct radv_cmd_buffer *cmd_buffer) pipeline->shaders[i]->bo); } - if (radv_pipeline_has_gs(pipeline)) + if (radv_pipeline_has_gs(pipeline) && pipeline->gs_copy_shader) radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, pipeline->gs_copy_shader->bo); diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index bb434f81325..8417eab41db 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2392,6 +2392,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline, struct radv_shader_binary *binaries[MESA_SHADER_STAGES] = {NULL}; struct radv_shader_variant_key keys[MESA_SHADER_STAGES] = {{{{{0}}}}}; unsigned char hash[20], gs_copy_hash[20]; + bool use_ngg = device->physical_device->rad_info.chip_class >= GFX10; radv_start_feedback(pipeline_feedback); @@ -2412,7 +2413,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline, gs_copy_hash[0] ^= 1; bool found_in_application_cache = true; - if (modules[MESA_SHADER_GEOMETRY]) { + if (modules[MESA_SHADER_GEOMETRY] && !use_ngg) { struct radv_shader_variant *variants[MESA_SHADER_STAGES] = {0}; radv_create_shader_variants_from_pipeline_cache(device, cache, gs_copy_hash, variants, &found_in_application_cache); @@ -2563,7 +2564,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline, } } - if(modules[MESA_SHADER_GEOMETRY]) { + if(modules[MESA_SHADER_GEOMETRY] && !use_ngg) { struct radv_shader_binary *gs_copy_binary = NULL; if (!pipeline->gs_copy_shader) { pipeline->gs_copy_shader = radv_create_gs_copy_shader( |