video_core: Update usage of tex_lod_bias

This commit is contained in:
GPUCode
2023-01-06 09:37:11 +02:00
parent d320eef663
commit 3843122cf8
3 changed files with 3 additions and 3 deletions

View File

@ -67,8 +67,8 @@ layout (std140) uniform shader_data {
LightSrc light_src[NUM_LIGHTS];
vec4 const_color[NUM_TEV_STAGES];
vec4 tev_combiner_buffer_color;
vec4 clip_coef;
vec3 tex_lod_bias;
vec4 clip_coef;
};
)";

View File

@ -68,8 +68,8 @@ layout (set = 0, binding = 1, std140) uniform shader_data {
LightSrc light_src[NUM_LIGHTS];
vec4 const_color[NUM_TEV_STAGES];
vec4 tev_combiner_buffer_color;
vec4 clip_coef;
vec3 tex_lod_bias;
vec4 clip_coef;
};
)";

View File

@ -624,7 +624,7 @@ Id FragmentModule::SampleTexture(u32 texture_unit) {
const Id dx_dy_max{
OpFMax(f32_id, OpCompositeExtract(f32_id, d, 0), OpCompositeExtract(f32_id, d, 1))};
const Id lod{OpLog2(f32_id, dx_dy_max)};
const Id lod_bias{GetShaderDataMember(f32_id, ConstS32(29), ConstU32(texture_unit))};
const Id lod_bias{GetShaderDataMember(f32_id, ConstS32(28), ConstU32(texture_unit))};
const Id biased_lod{OpFAdd(f32_id, lod, lod_bias)};
return OpImageSampleExplicitLod(vec_ids.Get(4), sampled_image, texcoord,
spv::ImageOperandsMask::Lod, biased_lod);