diff options
author | Nicolai Hähnle <[email protected]> | 2018-11-19 18:23:40 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2018-11-29 13:18:23 +0100 |
commit | 729ebdf07e34cbd7bbb066b5896ff583cdc1ea4f (patch) | |
tree | 6f38102433932ea8739777af130adce60ff0bc95 /src/amd/vulkan | |
parent | 058f85d41cbe3534b1a06d321fab9afb8fbadfc0 (diff) |
radv: remove dependency on addrlib gfx9_enum.h
v2:
- use SI_CONTEXT_REG_OFFSET
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 6 | ||||
-rw-r--r-- | src/amd/vulkan/radv_device.c | 9 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index a3b3d0a6f20..ccf762ead46 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -37,8 +37,6 @@ #include "ac_debug.h" -#include "addrlib/gfx9/chip/gfx9_enum.h" - enum { RADV_PREFETCH_VBO_DESCRIPTORS = (1 << 0), RADV_PREFETCH_VS = (1 << 1), @@ -1320,7 +1318,7 @@ radv_load_ds_clear_metadata(struct radv_cmd_buffer *cmd_buffer, radeon_emit(cs, PKT3(PKT3_LOAD_CONTEXT_REG, 3, 0)); radeon_emit(cs, va); radeon_emit(cs, va >> 32); - radeon_emit(cs, (reg >> 2) - CONTEXT_SPACE_START); + radeon_emit(cs, (reg - SI_CONTEXT_REG_OFFSET) >> 2); radeon_emit(cs, reg_count); } else { radeon_emit(cs, PKT3(PKT3_COPY_DATA, 4, 0)); @@ -1457,7 +1455,7 @@ radv_load_color_clear_metadata(struct radv_cmd_buffer *cmd_buffer, radeon_emit(cs, PKT3(PKT3_LOAD_CONTEXT_REG, 3, cmd_buffer->state.predicating)); radeon_emit(cs, va); radeon_emit(cs, va >> 32); - radeon_emit(cs, (reg >> 2) - CONTEXT_SPACE_START); + radeon_emit(cs, (reg - SI_CONTEXT_REG_OFFSET) >> 2); radeon_emit(cs, 2); } else { /* TODO: Figure out how to use LOAD_CONTEXT_REG on SI/CIK. */ diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 70084a2b605..ad057a87509 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -45,7 +45,6 @@ #include "sid.h" #include "git_sha1.h" #include "gfx9d.h" -#include "addrlib/gfx9/chip/gfx9_enum.h" #include "util/build_id.h" #include "util/debug.h" #include "util/mesa-sha1.h" @@ -4526,11 +4525,11 @@ radv_tex_filter_mode(VkSamplerReductionModeEXT mode) { switch (mode) { case VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT: - return SQ_IMG_FILTER_MODE_BLEND; + return V_008F30_SQ_IMG_FILTER_MODE_BLEND; case VK_SAMPLER_REDUCTION_MODE_MIN_EXT: - return SQ_IMG_FILTER_MODE_MIN; + return V_008F30_SQ_IMG_FILTER_MODE_MIN; case VK_SAMPLER_REDUCTION_MODE_MAX_EXT: - return SQ_IMG_FILTER_MODE_MAX; + return V_008F30_SQ_IMG_FILTER_MODE_MAX; default: break; } @@ -4559,7 +4558,7 @@ radv_init_sampler(struct radv_device *device, uint32_t max_aniso = radv_get_max_anisotropy(device, pCreateInfo); uint32_t max_aniso_ratio = radv_tex_aniso_filter(max_aniso); bool is_vi = (device->physical_device->rad_info.chip_class >= VI); - unsigned filter_mode = SQ_IMG_FILTER_MODE_BLEND; + unsigned filter_mode = V_008F30_SQ_IMG_FILTER_MODE_BLEND; const struct VkSamplerReductionModeCreateInfoEXT *sampler_reduction = vk_find_struct_const(pCreateInfo->pNext, |