diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 86cbc7a16ca..ed739ee1153 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1555,12 +1555,6 @@ get_sampler_count(const struct anv_shader_bin *bin) return MIN2(count_by_4, 4); } -static uint32_t -get_binding_table_entry_count(const struct anv_shader_bin *bin) -{ - return DIV_ROUND_UP(bin->bind_map.surface_count, 32); -} - static struct anv_address get_scratch_address(struct anv_pipeline *pipeline, gl_shader_stage stage, @@ -1610,7 +1604,7 @@ emit_3dstate_vs(struct anv_graphics_pipeline *pipeline) * programming 0xB000[30] to '1'. */ vs.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(vs_bin); - vs.BindingTableEntryCount = get_binding_table_entry_count(vs_bin); + vs.BindingTableEntryCount = vs_bin->bind_map.surface_count; vs.FloatingPointMode = IEEE754; vs.IllegalOpcodeExceptionEnable = false; vs.SoftwareExceptionEnable = false; @@ -1682,7 +1676,7 @@ emit_3dstate_hs_te_ds(struct anv_graphics_pipeline *pipeline, hs.KernelStartPointer = tcs_bin->kernel.offset; /* WA_1606682166 */ hs.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(tcs_bin); - hs.BindingTableEntryCount = get_binding_table_entry_count(tcs_bin); + hs.BindingTableEntryCount = tcs_bin->bind_map.surface_count; #if GEN_GEN >= 12 /* GEN:BUG:1604578095: @@ -1760,7 +1754,7 @@ emit_3dstate_hs_te_ds(struct anv_graphics_pipeline *pipeline, ds.KernelStartPointer = tes_bin->kernel.offset; /* WA_1606682166 */ ds.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(tes_bin); - ds.BindingTableEntryCount = get_binding_table_entry_count(tes_bin); + ds.BindingTableEntryCount = tes_bin->bind_map.surface_count; ds.MaximumNumberofThreads = devinfo->max_tes_threads - 1; ds.ComputeWCoordinateEnable = @@ -1818,7 +1812,7 @@ emit_3dstate_gs(struct anv_graphics_pipeline *pipeline) gs.VectorMaskEnable = false; /* WA_1606682166 */ gs.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(gs_bin); - gs.BindingTableEntryCount = get_binding_table_entry_count(gs_bin); + gs.BindingTableEntryCount = gs_bin->bind_map.surface_count; gs.IncludeVertexHandles = gs_prog_data->base.include_vue_handles; gs.IncludePrimitiveID = gs_prog_data->include_primitive_id; @@ -2053,7 +2047,7 @@ emit_3dstate_ps(struct anv_graphics_pipeline *pipeline, ps.VectorMaskEnable = GEN_GEN >= 8; /* WA_1606682166 */ ps.SamplerCount = GEN_GEN == 11 ? 0 : get_sampler_count(fs_bin); - ps.BindingTableEntryCount = get_binding_table_entry_count(fs_bin); + ps.BindingTableEntryCount = fs_bin->bind_map.surface_count; ps.PushConstantEnable = wm_prog_data->base.nr_params > 0 || wm_prog_data->base.ubo_ranges[0].length; ps.PositionXYOffsetSelect = wm_prog_data->uses_pos_offset ?